body {
    margin: 0px;
    padding: 0px;
    width: 100%;
    height: 100%;
    background-color: #000000;
    font-family: "Myriad Pro", Myriad, "Helvetica Neue", Helvetica, Arial, sans-serif;
    overflow: hidden;
    overscroll-behavior: none;
}

#unity-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
}

#unity-canvas {
    width: 100%;
    height: 100%;
}

#unity-loading-bar {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000000;
    z-index: 2;
    pointer-events: none;
}

#progress-bar {
    box-sizing: border-box;
    width: min(72vw, 420px);
    height: 18px;
    padding: 2px;
    overflow: hidden;
    border: 2px solid #ffffff;
    background: transparent;
}

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

#unity-fullscreen-button {
    height: 32px;
    width: 32px;
    position: absolute;
    z-index: 1;
    bottom: 10px;
    left: 10px;
    background-color: transparent;
    background-image: url("fullscreen-button-out.png");
    background-repeat: no-repeat;
    background-position: center;
    border: none;
    cursor: pointer;
    opacity: 0.333;
}

#unity-fullscreen-button:hover {
    opacity: 1.0;
}

#unity-warning {
    position: absolute;
    left: 50%;
    top: 5%;
    transform: translate(-50%);
    background: white;
    padding: 10px;
    display: none;
    z-index: 200;
}

/* --- Splash Screen --- */
#custom-splash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #000000;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.splash-logo {
    display: flex;
    align-items: center;
    gap: 18px;
}

.splash-logo-four {
    height: min(16vw, 110px);
    width: auto;
    opacity: 0;
    filter: brightness(.9);
}

.splash-logo-friends {
    height: min(7vw, 56px);
    width: auto;
    opacity: 0;
    transform: translateX(-8px);
}

/* The logo animation only starts once the user has pressed START
   (so the sound and the logo appear at the exact same moment). */
#custom-splash.playing .splash-logo-four {
    animation: fourFlicker 1.9s ease forwards;
}

#custom-splash.playing .splash-logo-friends {
    animation: friendsReveal .9s ease forwards;
    animation-delay: 1.7s;
}

/* --- START gate (a user click here unlocks audio playback) --- */
#start-screen {
    position: fixed;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
    background-color: #000000;
    z-index: 10000;
}

#start-screen.hide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.start-card {
    width: min(520px, 100%);
    padding: 38px 32px;
    text-align: center;
    background: rgba(5, 10, 14, .72);
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 28px;
    box-shadow: 0 28px 90px rgba(0, 0, 0, .5);
    backdrop-filter: blur(14px);
    box-sizing: border-box;
}

.start-btn {
    font-family: inherit;
    font-weight: 700;                 /* bold */
    font-size: clamp(18px, 4vw, 24px);
    letter-spacing: .06em;
    color: #111;                      /* black text */
    /* green with a downward glow */
    background: linear-gradient(180deg, #daf97a 0%, #b8ea49 100%);
    box-shadow: 0 12px 30px rgba(200, 242, 90, .25);
    border: none;
    border-radius: 16px;
    padding: 16px 56px;
    cursor: pointer;
    transition: transform .12s ease, box-shadow .2s ease;
}

.start-btn:hover {
    box-shadow: 0 16px 40px rgba(200, 242, 90, .4);
}

.start-btn:active {
    transform: translateY(1px);
}

#custom-splash.fade-out {
    pointer-events: none;
    animation: splashFadeOut 0.8s ease-in-out forwards;
}

@keyframes fourFlicker {
    0%   { opacity: 0;   filter: brightness(.1)  drop-shadow(0 0 0   rgba(200,242,90,0)) }
    8%   { opacity: .18 }
    14%  { opacity: .04 }
    22%  { opacity: .45 }
    28%  { opacity: .16 }
    40%  { opacity: .72; filter: brightness(1.05) drop-shadow(0 0 8px  rgba(200,242,90,.25)) }
    52%  { opacity: .28 }
    66%  { opacity: .92; filter: brightness(1.15) drop-shadow(0 0 22px rgba(200,242,90,.45)) }
    78%  { opacity: .76 }
    100% { opacity: 1;   filter: brightness(1.2)  drop-shadow(0 0 26px rgba(200,242,90,.55)) }
}

@keyframes friendsReveal {
    from { opacity: 0; transform: translateX(-10px) }
    to   { opacity: 1; transform: none }
}

@keyframes splashFadeOut {
    0%   { opacity: 1; }
    100% { opacity: 0; }
}
