/* Base Setup */
body {
    background: #000;
    margin: 0;
    overflow: hidden; /* No scrolling allowed */
    font-family: 'Outfit', sans-serif;
}

/* Click Indicator */
#scroll-indicator {
    position: fixed;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-family: 'Outfit', sans-serif;
    font-size: 18px; /* Bigger */
    text-transform: uppercase;
    letter-spacing: 4px;
    z-index: 1000;
    pointer-events: none;
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
    
    background: rgba(0, 0, 0, 0.6); 
    padding: 18px 40px;
    border-radius: 100px;
    border: 2px solid #ffcc80; /* Orange border */
    box-shadow: 0 0 30px rgba(255, 204, 128, 0.4); /* Orange glow */
    backdrop-filter: blur(10px);
    
    animation: floatIndicator 3s ease-in-out infinite;
    white-space: nowrap;
}

@keyframes floatIndicator {
    0%, 100% { transform: translate(-50%, 0); }
    50% { transform: translate(-50%, -20px); box-shadow: 0 15px 45px rgba(255, 204, 128, 0.6); }
}

/* Video & Layers */
#video-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 1;
    background: #000;
}

video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Social Icons & Control Buttons */
#social-icons, #controls-left {
    position: fixed;
    top: 20px;
    display: flex;
    gap: 15px;
    z-index: 200;
    transition: opacity 0.5s ease;
}

#social-icons {
    right: 20px;
}

#controls-left {
    left: 20px;
}

.control-btn, .icon-link img {
    background: rgba(0,0,0,0.5);
    border: 2px solid #ffcc80;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
    text-decoration: none;
}

#speed-text {
    font-family: 'Oswald', sans-serif;
    font-size: 14px;
    font-weight: bold;
}

/* Intro Overlay */
#intro-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4); /* Slight black overlay */
    z-index: 40; /* Below logo, above video */
    transition: opacity 1.5s ease;
    pointer-events: none;
}
#intro-overlay.hidden {
    opacity: 0;
}

/* Logo / Title */
#logo-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* Centered */
    text-align: center;
    z-index: 150; /* Boosted to be above reveal (index 100) */
    transition: all 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    pointer-events: none; /* Let clicks pass through to video trigger */
    /* mix-blend-mode: overlay; REMOVED to keep 100% opacity availability */
    color: white;
}

.logo-main {
    font-family: 'Oswald', sans-serif;
    font-size: 180px; /* Bigger text */
    margin: 0;
    line-height: 0.9;
    text-transform: uppercase;
    letter-spacing: -4px;
    text-shadow: 0 10px 40px rgba(0,0,0,0.8); /* Stronger shadow for contrast */
}

.logo-sub {
    font-family: 'Pacifico', cursive;
    font-size: 60px; /* Bigger text */
    margin: -10px 0 0 0;
    color: #eee;
    text-shadow: 0 5px 20px rgba(0,0,0,0.8);
}

/* Minimized State (triggered via JS) */
#logo-container.minimized {
    top: -55px; /* Pushed into the black bar zone */
    left: 50%;
    transform: translate(-50%, 0) scale(0.35); /* Scale down */
    opacity: 1;
}

.icon-link img {
    width: 50px;
    height: 50px;
    border-radius: 50%; /* Rounded icons */
    border: 2px solid #ffcc80; /* Light orange border */
    transition: transform 0.2s ease;
    background: rgba(0,0,0,0.5); /* Slight contrast background */
}

.tiktok-img {
    transform: scale(1.2) !important; /* Scale specific logo inside circle */
    object-fit: contain;
}

.icon-link img:hover {
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(255, 204, 128, 0.5);
}

/* Final Reveal Layer */
#final-stats-container {
    position: fixed; 
    inset: 0; /* Modern shorthand for top/left/right/bottom: 0 */
    width: 100vw;
    height: 100vh;
    z-index: 100; /* FORCE TOP LAYER */
    display: block !important; /* FORCE RENDER */
    opacity: 0;
    transition: opacity 0.5s ease;
}

#final-stats-container.visible {
    opacity: 1 !important;
}

#final-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh; /* FORCE VIEWPORT HEIGHT */
    background-image: url('wilsonLast.png');
    background-size: cover;
    background-position: center;
    z-index: 1;
}

/* Cinematic Bars */
/* They sit ON TOP of the image to mask it initially */
#black-bars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.bar {
    position: absolute;
    left: 0;
    width: 100%;
    height: 13vh; /* Matches presumed video letterbox (approx 2.35:1 gap) */
    background: #000;
    transition: transform 1.5s cubic-bezier(0.25, 1, 0.5, 1); /* Smooth cinematic open */
    will-change: transform;
}

.bar-top {
    top: 0;
    transform: translateY(0);
}

.bar-bottom {
    bottom: 0;
    transform: translateY(0);
}

/* End Card Component */
#end-card {
    position: absolute;
    top: 55%; 
    left: 50%;
    transform: translate(-50%, -40%);
    z-index: 10; 
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    opacity: 0;
    transition: all 1s cubic-bezier(0.25, 1, 0.5, 1) 0.5s;
    
    /* Card Styles */
    background: rgba(15, 23, 31, 0.7);
    backdrop-filter: blur(20px);
    padding: 30px;
    border-radius: 32px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 40px 100px rgba(0,0,0,0.6);
}

#final-stats-container.revealed #end-card {
    opacity: 1;
    transform: translate(-50%, -50%);
}

#end-card-icon {
    width: 450px; /* Matched to ca-container width */
    height: 450px;
    border-radius: 20px;
    object-fit: cover;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

#ca-container {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
    width: 450px; /* Same as image */
}

#ca-text {
    font-family: 'Courier New', Courier, monospace;
    color: white;
    font-size: 14px;
    letter-spacing: 0.5px;
    flex-grow: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#copy-btn {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

#copy-btn:hover {
    background: rgba(255,255,255,0.25);
    transform: scale(1.05);
}

#copy-btn:active {
    transform: scale(0.95);
}

/* The Reveal State - FLING THEM OPEN */
#final-stats-container.revealed .bar-top {
    transform: translateY(-100%) !important;
}

#final-stats-container.revealed .bar-bottom {
    transform: translateY(100%) !important;
}

/* --- MOBILE RESPONSIVENESS --- */
@media (max-width: 768px) {
    /* Logo / Intro Scaling */
    .logo-main {
        font-size: 80px;
        letter-spacing: -2px;
    }
    .logo-sub {
        font-size: 28px;
        margin-top: -5px;
    }

    /* Minimized Logo Position on Mobile */
    #logo-container.minimized {
        top: 30px; /* Moved lower (was 20px) */
        transform: translate(-50%, 0) scale(0.5); /* Slightly bigger (was 0.4) */
    }

    /* Top Navigation Icons */
    #social-icons, #controls-left {
        top: 15px;
    }
    .control-btn, .icon-link img {
        width: 40px;
        height: 40px;
    }
    /* Icons Arrangement on Mobile */
    #social-icons, #controls-left {
        opacity: 1;
        pointer-events: auto;
        transform: none;
        display: flex;
        flex-direction: column; /* Vertical Stacking */
        gap: 12px;
        top: 20px;
    }

    #controls-left {
        left: 15px;
    }

    #social-icons {
        right: 15px;
    }

    /* Minimized Logo Position on Mobile - Aligned with icons */
    #logo-container.minimized {
        top: 0px; 
        transform: translate(-50%, 0) scale(0.4);
    }

    #speed-text {
        font-size: 12px;
    }

    /* Click to Play Indicator */
    #scroll-indicator {
        font-size: 14px;
        padding: 12px 25px;
        bottom: 50px;
        letter-spacing: 2px;
    }

    /* End Card Layout */
    #end-card {
        width: 92vw;
        padding: 15px;
        gap: 15px;
        border-radius: 20px;
        transform: translate(-50%, -45%); /* Adjust centering slightly */
    }

    #end-card-icon {
        width: 100%;
        height: auto;
        max-width: 320px;
        border-radius: 12px;
    }

    #ca-container {
        width: 100%;
        padding: 10px 12px;
        gap: 8px;
    }

    #ca-text {
        font-size: 10px; 
    }

    #copy-btn {
        padding: 6px;
    }
}

