/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow: hidden;
    background: #0a0a0a;
    color: #fff;
}

#container {
    width: 100vw;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    cursor: grab;
}

#container:active {
    cursor: grabbing;
}

/* Loading Screen */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #0a0a0a 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(10px);
    transition: opacity 0.8s ease-out, visibility 0.8s ease-out;
}

#loading-screen.hide {
    opacity: 0;
    visibility: hidden;
}

.logo-container {
    position: relative;
    width: 280px;
    height: 280px;
    margin-bottom: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo-img {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 30px rgba(0, 212, 255, 0.5)) drop-shadow(0 0 50px rgba(123, 47, 247, 0.3));
    animation: logoPulse 2s ease-in-out infinite, logoFloat 3s ease-in-out infinite;
}

@keyframes logoPulse {
    0%, 100% {
        opacity: 0.8;
        filter: drop-shadow(0 0 30px rgba(0, 212, 255, 0.5)) drop-shadow(0 0 50px rgba(123, 47, 247, 0.3));
    }
    50% {
        opacity: 1;
        filter: drop-shadow(0 0 50px rgba(0, 212, 255, 0.8)) drop-shadow(0 0 70px rgba(123, 47, 247, 0.5));
    }
}

@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-15px);
    }
}

.loading-progress {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 40px;
    animation: fadeInUp 1s ease-out 0.4s backwards;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #00d4ff 0%, #7b2ff7 100%);
    border-radius: 2px;
    animation: progressFill 2s ease-out infinite;
}

@keyframes progressFill {
    0% {
        width: 0%;
    }
    50% {
        width: 100%;
    }
    100% {
        width: 100%;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid #00d4ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#loading-screen p {
    font-size: 18px;
    color: #00d4ff;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* UI Overlay */
#ui-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
}

#ui-overlay > * {
    pointer-events: auto;
}

/* Top Bar */
.top-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(180deg, rgba(10, 10, 10, 0.9) 0%, transparent 100%);
    backdrop-filter: blur(10px);
}

.logo-header {
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logo-header:hover {
    transform: scale(1.05);
}

.logo-mini {
    width: 50px;
    height: 50px;
    filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.3));
    animation: miniLogoPulse 2s ease-in-out infinite;
}

@keyframes miniLogoPulse {
    0%, 100% {
        opacity: 0.9;
        filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.3));
    }
    50% {
        opacity: 1;
        filter: drop-shadow(0 0 20px rgba(0, 212, 255, 0.6));
    }
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(135deg, #00d4ff 0%, #7b2ff7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 1px;
}

.top-bar h1 {
    font-size: 24px;
    font-weight: 600;
    background: linear-gradient(135deg, #00d4ff 0%, #7b2ff7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.controls {
    display: flex;
    gap: 15px;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.btn:hover {
    background: rgba(0, 212, 255, 0.2);
    border-color: #00d4ff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 212, 255, 0.3);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, #00d4ff 0%, #7b2ff7 100%);
    border: none;
}

.btn-primary:hover {
    box-shadow: 0 5px 20px rgba(0, 212, 255, 0.5);
}

/* Info Panel */
.info-panel {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    padding: 20px 30px;
    background: rgba(10, 10, 10, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.info-panel p {
    margin: 0;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

.hint {
    font-size: 16px !important;
    color: #00d4ff !important;
}

.photo-count {
    font-weight: 600;
}

.photo-count span {
    color: #00d4ff;
    font-size: 18px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    margin: 5% auto;
    padding: 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-content h2 {
    margin-bottom: 30px;
    color: #00d4ff;
    font-size: 28px;
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 32px;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.3s ease;
}

.close:hover {
    color: #00d4ff;
    transform: rotate(90deg);
}

/* File Input */
.file-input-wrapper {
    margin-bottom: 20px;
}

.file-input-wrapper input[type="file"] {
    display: none;
}

.file-input-wrapper label {
    display: block;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: rgba(255, 255, 255, 0.8);
}

.file-input-wrapper label:hover {
    border-color: #00d4ff;
    background: rgba(0, 212, 255, 0.1);
    color: #00d4ff;
}

/* Preview Container */
#preview-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
    max-height: 300px;
    overflow-y: auto;
}

.preview-image {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.preview-image:hover {
    border-color: #00d4ff;
    transform: scale(1.05);
}

/* Custom Scrollbar */
#preview-container::-webkit-scrollbar {
    width: 8px;
}

#preview-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

#preview-container::-webkit-scrollbar-thumb {
    background: rgba(0, 212, 255, 0.5);
    border-radius: 4px;
}

#preview-container::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 212, 255, 0.8);
}

/* Responsive Design */
@media (max-width: 768px) {
    .top-bar {
        flex-direction: column;
        gap: 15px;
        padding: 15px 20px;
    }

    .top-bar h1 {
        font-size: 20px;
    }

    .controls {
        width: 100%;
        justify-content: center;
    }

    .btn {
        padding: 10px 16px;
        font-size: 12px;
    }

    .info-panel {
        bottom: 15px;
        padding: 15px 20px;
    }

    .modal-content {
        width: 95%;
        padding: 30px 20px;
        margin: 10% auto;
    }

    #preview-container {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }

    .preview-image {
        height: 80px;
    }
}

/* Panorama Modal */
.modal-content.panorama {
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100%;
    height: 100%;
    border: none;
    border-radius: 0;
    background: #000;
}

#panorama-modal.fullpage {
    background: rgba(0, 0, 0, 1);
}

#panorama-container {
    width: 100%;
    height: 100%;
    position: relative;
}

/* Panorama Toolbar - Sağ üst köşe */
.panorama-toolbar {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    z-index: 1001;
}

.pano-btn {
    width: 48px;
    height: 48px;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #fff;
    font-size: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.pano-btn:hover {
    background: rgba(0, 212, 255, 0.3);
    border-color: #00d4ff;
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

.pano-btn:active {
    transform: scale(0.95);
}

/* Icon'lar için pseudo-element kullanarak emoji/simge göster */
#pano-fullscreen::before {
    content: "⛶";
    font-size: 24px;
    color: #fff;
}

#pano-gyro::before {
    content: "🧭";
    font-size: 20px;
}

#pano-exit::before {
    content: "✕";
    font-size: 28px;
    color: #fff;
    font-weight: normal;
}

/* Hover tooltip */
.pano-btn::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: -35px;
    right: 0;
    background: rgba(0, 0, 0, 0.9);
    color: #00d4ff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.pano-btn:hover::after {
    opacity: 1;
}

#pano-fullscreen[data-tooltip="Tam Ekran"]::after {
    content: "Tam Ekran";
}

#pano-gyro[data-tooltip="Gyro"]::after {
    content: "Gyroscope";
}

#pano-exit[data-tooltip="Çıkış"]::after {
    content: "Kapat";
}

/* Panorama close button gizle (toolbar'daki exit kullanacağız) */
#panorama-modal .close {
    display: none;
}

/* Animation for photos entering the scene */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Gyroscope Permission Modal */
.modal-content.gyro-permission {
    text-align: center;
    max-width: 400px;
    padding: 50px 40px;
}

.gyro-icon {
    font-size: 80px;
    margin-bottom: 20px;
    animation: tiltPhone 2s ease-in-out infinite;
}

@keyframes tiltPhone {
    0%, 100% { transform: rotate(-15deg); }
    50% { transform: rotate(15deg); }
}

.modal-content.gyro-permission h2 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #00d4ff;
}

.modal-content.gyro-permission p {
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
    line-height: 1.6;
}

.modal-content.gyro-permission .gyro-info {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 30px;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    margin-top: 10px;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

