/* ==========================================================
   ORBIT
   Premium Sci-Fi UI
========================================================== */

:root{

    --bg:#090B10;
    --bg2:#11161E;

    --panel:#161C26;

    --line:#263243;

    --blue:#00C8FF;
    --orange:#FF8A00;

    --white:#F5F7FB;

    --green:#43F7A1;

    --danger:#FF5252;

}

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    user-select:none;
}

html,
body{

    width:100%;
    height:100%;

    overflow:hidden;

    font-family:
        Inter,
        Segoe UI,
        sans-serif;

    background:radial-gradient(
        circle at center,
        #121926,
        var(--bg)
    );

    color:white;

}

/* ==========================================================
   Hidden
========================================================== */

.hidden{

    display:none !important;

}

/* ==========================================================
   Splash
========================================================== */

#splash{

    position:fixed;

    inset:0;

    display:flex;

    flex-direction:column;

    align-items:center;

    justify-content:center;

    gap:45px;

}

/* ==========================================================
   Animated Core
========================================================== */

.logo{

    display:flex;

    flex-direction:column;

    align-items:center;

}

.logo .core{

    width:130px;

    height:130px;

    border-radius:50%;

    background:

    radial-gradient(
        circle,
        white 0%,
        #9df7ff 35%,
        #2ed9ff 60%,
        transparent 100%
    );

    box-shadow:

        0 0 20px #00C8FF,

        0 0 45px #00C8FF,

        0 0 90px rgba(0,200,255,.55);

    animation:

        pulse 2.5s infinite ease-in-out,

        spin 12s linear infinite;

}

.logo h1{

    margin-top:30px;

    font-size:72px;

    letter-spacing:12px;

    font-weight:800;

}

.logo p{

    margin-top:8px;

    color:#8EA4B8;

    letter-spacing:6px;

    font-size:14px;

}

/* ==========================================================
   Buttons
========================================================== */

button{

    padding:

        18px 46px;

    border:none;

    border-radius:14px;

    background:

        linear-gradient(
            135deg,
            #18BFFF,
            #007CF0
        );

    color:white;

    font-size:18px;

    font-weight:700;

    cursor:pointer;

    transition:.25s;

    box-shadow:

        0 0 25px rgba(0,200,255,.35);

}

button:hover{

    transform:

        translateY(-2px)
        scale(1.04);

    box-shadow:

        0 0 40px rgba(0,200,255,.7);

}

button:active{

    transform:scale(.97);

}

button.secondary{

    width:100%;

    margin-top:14px;

    background:transparent;

    border:1px solid var(--line);

    box-shadow:none;

}

button.secondary:hover{

    box-shadow:0 0 20px rgba(0,200,255,.25);

}

.panel button{
    width:100%;
}

.advancedLink{

    display:block;

    text-align:center;

    margin-top:22px;

    color:#8EA4B8;

    font-size:13px;

    letter-spacing:1px;

    text-decoration:underline;

}

#advancedPanel{

    margin-top:18px;

}

/* ==========================================================
   Lobby
========================================================== */

#lobby{

    position:fixed;

    inset:0;

    display:flex;

    justify-content:center;

    align-items:center;

}

.panel{

    width:420px;

    background:rgba(18,24,35,.9);

    backdrop-filter:blur(15px);

    border:1px solid var(--line);

    border-radius:22px;

    padding:40px;

    box-shadow:

        0 30px 70px rgba(0,0,0,.45);

}

.panel h2{

    text-align:center;

    margin-bottom:30px;

    font-size:30px;

}

input{

    width:100%;

    margin-bottom:18px;

    padding:16px;

    border-radius:12px;

    border:1px solid #2E3A4C;

    background:#11161F;

    color:white;

    font-size:16px;

    outline:none;

    transition:.25s;

}

input:focus{

    border-color:var(--blue);

    box-shadow:

        0 0 15px rgba(0,200,255,.35);

}

/* ==========================================================
   Game
========================================================== */

#game{

    width:100vw;

    height:100vh;

    display:flex;

    flex-direction:column;

    opacity:0;

}

#game.fadeIn{

    animation:gameFadeIn .6s ease forwards;

}

@keyframes gameFadeIn{

    from{
        opacity:0;
        transform:scale(1.02);
    }

    to{
        opacity:1;
        transform:scale(1);
    }

}

#muteBtn{

    padding:10px 16px;

    font-size:20px;

    background:transparent;

    border:1px solid var(--line);

    box-shadow:none;

    border-radius:12px;

}

#muteBtn:hover{

    box-shadow:0 0 20px rgba(0,200,255,.25);

}

#overtimeBadge{

    margin-top:6px;

    display:inline-block;

    padding:3px 14px;

    border-radius:20px;

    font-size:12px;

    font-weight:800;

    letter-spacing:3px;

    color:#0A0E14;

    background:linear-gradient(90deg,#FFD24A,#FF8A00);

    box-shadow:0 0 18px rgba(255,150,0,.55);

    animation:overtimePulse 1.1s infinite ease-in-out;

}

@keyframes overtimePulse{

    0%,100%{ transform:scale(1); }
    50%{ transform:scale(1.08); }

}

/* ==========================================================
   HUD
========================================================== */

#hud{

    height:90px;

    display:flex;

    justify-content:space-between;

    align-items:center;

    padding:0 40px;

    background:rgba(8,11,16,.82);

    border-bottom:1px solid #202838;

    backdrop-filter:blur(16px);

    position:relative;

}

#muteBtn{

    position:absolute;

    right:40px;

    top:50%;

    transform:translateY(-50%);

}

.team{

    display:flex;

    flex-direction:column;

    gap:8px;

}

.title{

    font-size:13px;

    letter-spacing:3px;

    color:#8CA0B5;

}

.team div:last-child{

    font-size:40px;

    font-weight:800;

}

.blue div:last-child{

    color:var(--blue);

}

.orange div:last-child{

    color:var(--orange);

}

.centerHud{

    text-align:center;

}

#timer{

    font-size:48px;

    font-weight:900;

}

#status{

    margin-top:4px;

    color:#8EA4B8;

    letter-spacing:3px;

}

/* ==========================================================
   Canvas
========================================================== */

#canvasWrap{

    flex:1;

    position:relative;

    display:flex;

    overflow:hidden;

}

#gameCanvas{

    flex:1;

    width:100%;

    background:

        linear-gradient(
            180deg,
            #0D131C,
            #080B11
        );

    image-rendering:auto;

}

/* ==========================================================
   Announcer text
========================================================== */

#announcer{

    position:absolute;

    top:50%;
    left:50%;

    transform:translate(-50%,-50%) scale(.6);

    font-size:64px;

    font-weight:900;

    letter-spacing:6px;

    color:#F5F7FB;

    text-shadow:

        0 0 20px rgba(0,200,255,.8),
        0 0 60px rgba(0,200,255,.5);

    opacity:0;

    pointer-events:none;

    white-space:nowrap;

    text-align:center;

}

#announcer.announcerShow{

    animation:announcerPlay 1.3s ease forwards;

}

@keyframes announcerPlay{

    0%{
        opacity:0;
        transform:translate(-50%,-50%) scale(.5);
    }

    15%{
        opacity:1;
        transform:translate(-50%,-50%) scale(1.08);
    }

    25%{
        transform:translate(-50%,-50%) scale(1);
    }

    80%{
        opacity:1;
        transform:translate(-50%,-50%) scale(1);
    }

    100%{
        opacity:0;
        transform:translate(-50%,-50%) scale(1.15);
    }

}

/* ==========================================================
   Countdown overlay
========================================================== */

#countdownOverlay{

    position:absolute;

    inset:0;

    display:flex;

    align-items:center;

    justify-content:center;

    font-size:180px;

    font-weight:900;

    color:#FFFFFF;

    text-shadow:

        0 0 40px rgba(0,200,255,.9),
        0 0 100px rgba(0,200,255,.6);

    pointer-events:none;

    background:rgba(5,7,11,.35);

}

#countdownOverlay .countdownPulse,
#countdownOverlay.countdownPulse{

    animation:countdownPop 1s ease;

}

@keyframes countdownPop{

    0%{
        transform:scale(1.6);
        opacity:0;
    }

    30%{
        transform:scale(1);
        opacity:1;
    }

    100%{
        transform:scale(.85);
        opacity:.85;
    }

}

/* ==========================================================
   Winner banner
========================================================== */

#winnerBanner{

    position:absolute;

    inset:0;

    display:flex;

    align-items:center;

    justify-content:center;

    background:rgba(5,7,11,.55);

    backdrop-filter:blur(6px);

    opacity:0;

    transition:opacity .4s ease;

}

#winnerBanner.show{

    opacity:1;

}

#winnerText{

    font-size:96px;

    font-weight:900;

    letter-spacing:8px;

    color:#FFFFFF;

    text-shadow:

        0 0 30px rgba(255,255,255,.6),
        0 0 90px rgba(0,200,255,.6);

    transform:scale(.7);

}

#winnerBanner.show #winnerText{

    animation:winnerPop .6s cubic-bezier(.2,1.4,.4,1) forwards;

}

@keyframes winnerPop{

    from{ transform:scale(.7); }
    to{ transform:scale(1); }

}

/* ==========================================================
   Score pop / timer warning
========================================================== */

.scorePop{

    animation:scorePop .45s cubic-bezier(.3,1.5,.4,1);

}

@keyframes scorePop{

    0%{
        transform:scale(1.65);
        filter:brightness(1.8) drop-shadow(0 0 25px currentColor);
    }

    100%{
        transform:scale(1);
        filter:brightness(1);
    }

}

#timer.timerWarning{

    color:var(--danger);

    animation:timerPulse .6s infinite;

}

@keyframes timerPulse{

    0%,100%{ transform:scale(1); }
    50%{ transform:scale(1.12); }

}

/* ==========================================================
   Bottom HUD
========================================================== */

#bottomHud{

    height:90px;

    display:flex;

    justify-content:center;

    gap:60px;

    align-items:center;

    background:#0E131C;

    border-top:1px solid #202838;

}

.ability{

    width:260px;

}

.ability span{

    display:block;

    margin-bottom:8px;

    letter-spacing:3px;

    font-size:13px;

    color:#92A7BB;

}

.bar{

    width:100%;

    height:16px;

    background:#202734;

    border-radius:40px;

    overflow:hidden;

}

.fill{

    width:100%;

    height:100%;

    background:

        linear-gradient(
            90deg,
            var(--blue),
            #6AF4FF
        );

    border-radius:40px;

    transition:width .15s ease-out;

    box-shadow:0 0 10px rgba(0,200,255,.4);

}

.fill.ready{

    animation:barReady 1s infinite ease-in-out;

}

@keyframes barReady{

    0%,100%{
        box-shadow:0 0 10px rgba(0,200,255,.4);
    }

    50%{
        box-shadow:0 0 22px rgba(0,200,255,.9);
    }

}

/* ==========================================================
   Animations
========================================================== */

@keyframes pulse{

    0%{

        transform:scale(.92);

        filter:brightness(.8);

    }

    50%{

        transform:scale(1.08);

        filter:brightness(1.25);

    }

    100%{

        transform:scale(.92);

        filter:brightness(.8);

    }

}

@keyframes spin{

    from{

        transform:rotate(0deg);

    }

    to{

        transform:rotate(360deg);

    }

}