/* ============================================
   360° Street View — Style
   Palet: Cream #FFF8E7 + Hijau Terang #4ADE80
   Tanpa gradasi — warna solid flat
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --cream: #FFF8E7;
    --cream-dark: #F5EDD6;
    --green: #4ADE80;
    --green-hover: #16A34A;
    --green-light: #BBF7D0;
    --text-dark: #2D2D2D;
    --text-muted: #6B7280;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: 'Outfit', sans-serif;
    background: var(--cream);
    color: var(--text-dark);
    cursor: default;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
}

/* --- Canvas Container --- */
#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    touch-action: none;
}

#canvas-container canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* Drag cursors */
#canvas-container.grabbing {
    cursor: grabbing;
}

#canvas-container.grab {
    cursor: grab;
}

/* --- Loading Screen --- */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--cream);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    transition: opacity 0.8s ease;
}

#loading-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loading-content {
    text-align: center;
    z-index: 10;
    position: relative;
}

.loading-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.loading-subtitle {
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

/* Progress Bar */
.progress-container {
    width: 280px;
    height: 6px;
    background: var(--cream-dark);
    border-radius: 3px;
    margin: 0 auto 1rem;
    overflow: hidden;
}

.progress-bar {
    width: 0%;
    height: 100%;
    background: var(--green);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--green);
}

/* --- Ocean Waves Animation --- */
.waves-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40%;
    overflow: hidden;
}

.wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 200%;
    height: 100%;
}

.wave path {
    fill: var(--green);
}

.wave-1 {
    opacity: 0.15;
    animation: wave-drift 8s ease-in-out infinite;
}

.wave-2 {
    opacity: 0.25;
    animation: wave-drift 6s ease-in-out infinite reverse;
    bottom: -10px;
}

.wave-3 {
    opacity: 0.4;
    animation: wave-drift 4s ease-in-out infinite;
    bottom: -20px;
}

@keyframes wave-drift {
    0% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(-25%);
    }
    100% {
        transform: translateX(0);
    }
}

/* --- Mini Loading (navigasi) --- */
#mini-loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100;
    background: var(--cream);
    border: 2px solid var(--green);
    border-radius: 16px;
    padding: 1.5rem 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: mini-pop-in 0.3s ease;
}

#mini-loading.hidden {
    display: none;
}

.mini-loading-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.mini-loading-inner span {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--green-hover);
}

.mini-wave {
    width: 80px;
    height: 20px;
}

.mini-wave path {
    fill: var(--green);
    animation: mini-wave-move 1.5s ease-in-out infinite;
}

@keyframes mini-wave-move {
    0%, 100% {
        d: path("M0,20 Q25,5 50,20 T100,20 T150,20 T200,20 L200,40 L0,40 Z");
    }
    50% {
        d: path("M0,15 Q25,30 50,15 T100,15 T150,15 T200,15 L200,40 L0,40 Z");
    }
}

@keyframes mini-pop-in {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* --- Position Indicator --- */
#position-indicator {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
    background: var(--cream);
    border: 2px solid var(--green);
    border-radius: 30px;
    padding: 0.5rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    user-select: none;
}

#position-indicator.visible {
    opacity: 1;
}

#current-pos {
    color: var(--green-hover);
    font-size: 1.2rem;
}

.pos-separator {
    color: var(--text-muted);
    margin: 0 0.25rem;
}

/* --- Keyboard Hint --- */
#keyboard-hint {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    opacity: 0;
    transition: opacity 0.5s ease 1s;
    pointer-events: none;
}

#keyboard-hint.visible {
    opacity: 0.7;
}

.hint-key {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: var(--cream);
    border: 2px solid var(--green);
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--green-hover);
}

.hint-text {
    font-size: 0.75rem;
    color: var(--cream);
    font-weight: 400;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .loading-title {
        font-size: 1.8rem;
    }

    .loading-subtitle {
        font-size: 0.95rem;
    }

    .progress-container {
        width: 220px;
    }

    #position-indicator {
        bottom: 20px;
        padding: 0.4rem 1.2rem;
        font-size: 0.85rem;
    }

    #keyboard-hint {
        display: none;
    }
}
