*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    background-color: #000000;
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Splash screen: black, play button centered */
#splash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #000000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;
    transition: opacity 0.8s ease-out, visibility 0.8s ease-out;
}

#play-button {
    max-width: 320px;
    max-height: 45vh;
    width: auto;
    height: auto;
    cursor: pointer;
    filter: drop-shadow(0 0 0px rgba(127, 212, 240, 0));
    transition: filter 0.4s ease, transform 0.4s ease;
}

#play-button:hover {
    filter: drop-shadow(0 0 35px rgba(127, 212, 240, 0.9));
    transform: scale(1.05);
}

#prompt {
    margin-top: 20px;
    color: #4a8aa8;
    font-size: 0.85rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    opacity: 0.6;
    transition: opacity 0.4s ease, color 0.4s ease;
}

#splash:hover #prompt {
    color: #7fd4f0;
    opacity: 1;
}

/* Video layer */
#video-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    opacity: 0;
    z-index: 20;
}

/* Branding sits at the top left, just above the video */
#video-branding {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    align-self: flex-start;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.8s ease-out 0.3s, transform 0.8s ease-out 0.3s;
}

#top-titles {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1;
}

#top-game {
    margin: 0 0 4px 0;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.65rem;
    font-weight: 400;
    letter-spacing: 4px;
    color: #7fd4f0;
    text-transform: uppercase;
    opacity: 0.8;
}

#top-title {
    margin: 0;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.4rem;
    font-weight: 900;
    letter-spacing: 2px;
    color: #e8f3f8;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(127, 212, 240, 0.6);
}

#top-logo {
    height: 48px;
    width: auto;
    opacity: 0.85;
}

/* YouTube player wrapper */
#player-wrapper {
    position: relative;
    width: 95vw;
    max-width: 95vw;
    max-height: calc(100vh - 160px);
    aspect-ratio: 21 / 9;
    box-shadow: 0 0 30px 0 rgba(127, 212, 240, 0.479);
    border-radius: 10px;
    overflow: hidden;
}

#player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Utility classes */
.fade-in {
    opacity: 1 !important;
}

.fade-out {
    opacity: 0 !important;
    visibility: hidden !important;
}

/* Reveal branding with the video */
#video-layer.fade-in #video-branding {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile portrait: center the video and keep branding out of the way */
@media (max-width: 768px) and (orientation: portrait) {
    #video-layer {
        padding: 0;
    }

    #video-branding {
        position: absolute;
        top: 12px;
        left: 12px;
        margin-bottom: 0;
        transform: scale(0.8);
        transform-origin: top left;
    }

    #top-logo {
        height: 36px;
    }

    #top-title {
        font-size: 1rem;
    }

    #top-game {
        font-size: 0.55rem;
    }

    #player-wrapper {
        width: 100vw;
        max-width: 100vw;
        max-height: 80vh;
        aspect-ratio: 16 / 9;
        border-radius: 0;
    }
}
