* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: fixed;
    background-color: black;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

#video-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: black;
    display: flex;
    justify-content: center;
    align-items: center;
}

#main-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 1;
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    perspective: 1000;
    -webkit-perspective: 1000;
} 

/* High-res frame overlay for 360 idle state */
#frame-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    pointer-events: none;
    transition: opacity 500ms ease-in-out;
}



/* Constrain video height for intro and film views */
body[data-view="overview"] #main-video,
body[data-view="film"] #main-video {
    object-fit: contain;
    max-height: calc(100vh - 100px); /* Leave space for progress bar */
    width: 100%;
    height: 100%;
    max-width: 100%;
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Portrait/Mobile Styles */
@media (orientation: portrait) {
    #main-video {
        object-fit: contain;
        background-color: black;
    }
    
    /* Hide the 360 video on mobile */
    body[data-view="360"] #main-video {
        opacity: 0 !important;
    }
    
    #vignette {
        display: none;
    }

    body #menu {
        position: fixed;
        left: 0!important;
        right: 0;
        padding-left: 0;
        gap: 28px;
        align-items: center;
        justify-content: center;
        padding: 0 !important;
        width: 100%;
    }

    .menu-item {
        font-size: 24px;
        padding: 12px 0;
        margin: 0;
        opacity: 0.6;
        font-weight: 200;
        letter-spacing: 0.06em;
        text-align: center!important;
        width: 100%;
        max-width: 80%;
        transform: translateY(20px) scale(0.95);
        transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .menu-item::before {
        display: none;
    }

    .menu-item:hover {
        /* transform: translateY(-4px) scale(1); */
        opacity: 1;
        /* letter-spacing: 0.08em; */
    }

    #menu.visible .menu-item {
        transform: translateY(0) scale(1);
        transition-delay: calc(var(--index) * 0.12s);
    }

    body #back-button {
        top: 20px !important;
        left: 20px !important;
        width: 44px !important;
        height: 44px !important;
    }

    #progress-bar {
        bottom: 30px;
        width: 160px;
    }
}

#back-button {
    position: fixed;
    top: 40px;
    left: 40px;
    width: 48px;
    height: 48px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 50%;
    display: none;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease-in-out, transform 0.2s ease-in-out;
}

#back-button:hover {
    transform: scale(1.1);
}

#menu {
    position: fixed;
    left: 40px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 32px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    padding-left: 40px;
}

#menu.visible {
    opacity: 1;
    pointer-events: all;
    transform: translateY(-50%);
}

.menu-item {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 1);
    font-size: 32px;
    font-weight: 200;
    letter-spacing: 0.06em;
    cursor: pointer;
    text-align: left;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0.8;
    padding: 8px 0;
    position: relative;
    transform: translateX(0);
}

.menu-item::before {
    content: '';
    position: absolute;
    left: -40px;
    top: 50%;
    width: 24px;
    height: 1px;
    background: white;
    transform: scaleX(0);
    transform-origin: right;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0;
}

@media (min-width: 768px) {
    .menu-item:hover {
        transform: translateX(12px);
        opacity: 1;
        color: white;
        letter-spacing: 0.08em;
        font-weight: 300;
    }
}

.menu-item:hover::before {
    transform: scaleX(1);
    opacity: 0.4;
}

/* Add subtle number styling */
.menu-item span {
    opacity: 0.4;
    font-size: 0.9em;
    margin-right: 8px;
    font-weight: 300;
    transition: opacity 0.4s ease;
}

.menu-item:hover span {
    opacity: 0.7;
}

#start-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: black;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 3s cubic-bezier(0.16, 1, 0.3, 1);
}

.audio-prompt {
    position: absolute;
    bottom: 120px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    font-weight: 200;
    letter-spacing: 0.08em;
    opacity: 0;
    animation: fadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.5s;
}

#start-button {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0);
    padding: 0 30px;
    height: 10px;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 200;
    letter-spacing: 0.12em;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    min-width: 260px;
    text-transform: uppercase;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 10rem;
    
}

#start-button.loading {
    cursor: default;
    pointer-events: none;
    letter-spacing: 0.16em;
    border-color: rgba(255, 255, 255, 0.08);
    transform: scale(0.98);

}

#start-button.ready {
    border-color: rgba(255, 255, 255, 0.4);
    letter-spacing: 0.12em;
    transition-delay: 0.2s;
    height: 60px;
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1), color 0.5s cubic-bezier(0.16, 1, 0.3, 1) .2s;
}

#start-button:not(.loading):hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
    border-color: rgba(255, 255, 255, 1);
    /* letter-spacing: 0.18em; */
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.1);
}

#start-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    /* background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transition: transform 0.1s linear;
    transform: skewX(-15deg); */
}

#start-button.loading::before {
    animation: loading-shine 2s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

@keyframes loading-shine {
    0% { 
        left: -100%;
        opacity: 0;
    }
    20% {
        opacity: 1;
    }
    60%, 100% { 
        left: 200%;
        opacity: 0;
    }
}

#start-button::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    transform: scaleX(0);
    transform-origin: left;
}

#start-button.loading::after {
    animation: loading-progress 3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes loading-progress {
    0% { 
        transform: scaleX(0);
        opacity: 1;
    }
    95% {
        opacity: 1;
    }
    100% { 
        transform: scaleX(1);
        opacity: 1;
    }
}

#vignette {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    /* Apply blur only at the edges via a radial mask (center stays sharp) */
    mask-image: radial-gradient(circle at 60% 50%, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 1) 80%);
    -webkit-mask-image: radial-gradient(circle at 60% 50%, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 1) 80%);
    /* Darken edges in addition to blur */
    background: radial-gradient(
        circle at 50% 50%,
        rgba(0, 0, 0, 0) 45%,
        rgba(0, 0, 0, 0.6) 80%,
        rgba(0, 0, 0, 0.9) 100%
    );
}

#vignette.visible {
    opacity: 1;
}

/* Fallback for browsers that don't support backdrop-filter */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    #vignette {
        background: radial-gradient(
            circle,
            rgba(0, 0, 0, 0) 50%,
            rgba(0, 0, 0, 0.8) 100%
        );
    }
}

/* Progress Bar */
#progress-bar {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 2px;
    background: rgba(255, 255, 255, 0.2);
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 100;
    pointer-events: none;
}

#progress-fill {
    width: 0%;
    height: 100%;
    background: white;
    transition: width 0.1s linear;
}

/* Show progress bar only for intro and film videos */
body[data-view="overview"] #progress-bar,
body[data-view="film"] #progress-bar {
    opacity: 0.8;
}

/* Fade out progress bar with play/pause icon */
body[data-view="overview"] #progress-bar.fade-out,
body[data-view="film"] #progress-bar.fade-out,
#progress-bar.fade-out {
    opacity: 0 !important;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.audio-prompt svg {
    opacity: 0.6;
    transform: scale(0.9);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, 10px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

#play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    background: rgba(0, 0, 0, 0);
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#play-overlay svg {
    width: 80px;
    height: 80px;
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#play-overlay:hover svg {
    opacity: 0.8;
    transform: scale(1);
}

#play-overlay.fade-out {
    opacity: 0 !important;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#play-overlay.fade-out svg {
    opacity: 0 !important;
    transform: scale(1.1);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

#play-overlay .play-icon,
#play-overlay .pause-icon {
    position: absolute;
}

#play-overlay .pause-icon {
    display: none;
}

/* Show play overlay only for intro and film videos */
body[data-view="overview"] #play-overlay,
body[data-view="film"] #play-overlay {
    display: flex;
}

/* Show correct icon based on video state */
body[data-playstate="playing"] #play-overlay .play-icon {
    display: none;
}

body[data-playstate="playing"] #play-overlay .pause-icon {
    display: block;
}

body[data-playstate="paused"] #play-overlay .play-icon {
    display: block;
}

body[data-playstate="paused"] #play-overlay .pause-icon {
    display: none;
}

#scroll-prompt {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    border-radius: 24px;
    color: white;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

#scroll-prompt svg {
    opacity: 0.8;
}

#scroll-prompt span {
    font-weight: 500;
    letter-spacing: 0.02em;
}

/* Only show scroll prompt on desktop */
@media (max-width: 767px) {
    #scroll-prompt {
        display: none !important;
    }
}

@media (min-width: 768px) {
    #scroll-prompt {
        display: flex;
    }
} 