* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #020308;
}

body {
    font-family:
        'Gill Sans',
        'Gill Sans MT',
        Calibri,
        'Trebuchet MS',
        sans-serif;

    color: #ffffff;
    user-select: none;
    -webkit-user-select: none;
    cursor: crosshair;
}


/* =========================================================
   GAME SHELL
========================================================= */

.gameShell {
    position: fixed;
    inset: 0;
    overflow: hidden;
    background:
        radial-gradient(
            circle at 50% 50%,
            rgba(18, 55, 90, 0.14),
            transparent 55%
        ),
        #020308;
}

.hidden {
    display: none !important;
}


/* =========================================================
   BOOT SCREEN
========================================================= */

.bootScreen {
    position: fixed;
    inset: 0;
    z-index: 9999;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;

    background:
        radial-gradient(
            circle at center,
            rgba(10, 55, 90, 0.18),
            transparent 55%
        ),
        #020308;

    transition:
        opacity 0.7s ease,
        transform 0.7s ease;
}

.bootScreen.bootFinished {
    opacity: 0;
    transform: scale(1.04);
}

.bootScreen.hidden {
    display: none;
}

.bootNoise {
    position: absolute;
    inset: -50%;

    opacity: 0.045;

    background-image:
        repeating-radial-gradient(
            circle at 50% 50%,
            rgba(255,255,255,0.8) 0,
            rgba(255,255,255,0.8) 1px,
            transparent 1px,
            transparent 4px
        );

    animation:
        noiseMove 0.25s steps(2) infinite;
}

@keyframes noiseMove {
    0% {
        transform: translate(0, 0);
    }

    25% {
        transform: translate(-2%, 1%);
    }

    50% {
        transform: translate(1%, -2%);
    }

    75% {
        transform: translate(2%, 2%);
    }

    100% {
        transform: translate(0, 0);
    }
}

.bootGrid {
    position: absolute;
    inset: -10%;

    opacity: 0.18;

    background-image:
        linear-gradient(
            rgba(70, 190, 255, 0.08) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(70, 190, 255, 0.08) 1px,
            transparent 1px
        );

    background-size:
        70px 70px,
        70px 70px;

    transform:
        perspective(700px)
        rotateX(62deg)
        translateY(20%);

    transform-origin: center bottom;

    animation:
        bootGridMove 8s linear infinite;
}

@keyframes bootGridMove {
    from {
        background-position:
            0 0,
            0 0;
    }

    to {
        background-position:
            0 70px,
            70px 0;
    }
}

.bootOrb {
    position: absolute;

    width: 280px;
    height: 280px;

    border-radius: 50%;

    filter: blur(80px);

    opacity: 0.16;
}

.bootOrbOne {
    top: 15%;
    left: 12%;
    background: #008cff;

    animation:
        bootOrbFloat 7s ease-in-out infinite;
}

.bootOrbTwo {
    right: 10%;
    bottom: 10%;
    background: #0060ff;

    animation:
        bootOrbFloat 9s ease-in-out infinite reverse;
}

.bootOrbThree {
    top: 50%;
    left: 50%;

    width: 180px;
    height: 180px;

    transform: translate(-50%, -50%);

    background: #16d8ff;

    opacity: 0.08;
}

@keyframes bootOrbFloat {
    0%,
    100% {
        transform: translate3d(0, 0, 0);
    }

    50% {
        transform: translate3d(
            30px,
            -25px,
            0
        );
    }
}

.bootCenter {
    position: relative;
    z-index: 5;

    width: min(520px, 80vw);

    text-align: center;
}

.bootSmall {
    display: block;

    margin-bottom: 12px;

    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.42em;

    color: rgba(
        185,
        235,
        255,
        0.65
    );
}

.bootLogo {
    font-size: clamp(
        55px,
        10vw,
        110px
    );

    line-height: 0.9;

    font-weight: 900;
    letter-spacing: 0.16em;

    color: #ffffff;

    text-shadow:
        0 0 10px rgba(255,255,255,0.45),
        0 0 35px rgba(40,190,255,0.55),
        0 0 80px rgba(0,110,255,0.35);
}

.bootLine {
    width: 100%;
    height: 1px;

    margin:
        28px auto 18px;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(70,210,255,0.75),
            transparent
        );
}

.bootLoading {
    display: flex;

    justify-content: space-between;
    align-items: center;

    margin-bottom: 9px;

    font-size: 10px;
    font-weight: 700;

    letter-spacing: 0.18em;

    color:
        rgba(
            180,
            225,
            245,
            0.65
        );
}

.bootProgress {
    width: 100%;
    height: 3px;

    overflow: hidden;

    background:
        rgba(
            80,
            180,
            220,
            0.08
        );
}

.bootProgressBar {
    width: 0%;
    height: 100%;

    background:
        linear-gradient(
            90deg,
            #0a8cff,
            #4deaff
        );

    box-shadow:
        0 0 18px rgba(
            55,
            210,
            255,
            0.8
        );

    transition:
        width 0.08s linear;
}


/* =========================================================
   AMBIENT BACKGROUND
========================================================= */

.ambientBackground {
    position: absolute;
    inset: 0;

    pointer-events: none;

    overflow: hidden;
}

.ambientOrb {
    position: absolute;

    border-radius: 50%;

    filter: blur(95px);

    pointer-events: none;
}

.ambientOrbOne {
    width: 420px;
    height: 420px;

    top: -180px;
    left: -100px;

    background: rgba(
        0,
        120,
        255,
        0.11
    );

    animation:
        ambientFloatOne 13s ease-in-out infinite;
}

.ambientOrbTwo {
    width: 500px;
    height: 500px;

    right: -180px;
    bottom: -220px;

    background: rgba(
        0,
        85,
        255,
        0.09
    );

    animation:
        ambientFloatTwo 16s ease-in-out infinite;
}

.ambientOrbThree {
    width: 280px;
    height: 280px;

    top: 42%;
    left: 50%;

    transform: translate(
        -50%,
        -50%
    );

    background: rgba(
        40,
        205,
        255,
        0.045
    );

    animation:
        ambientPulse 5s ease-in-out infinite;
}

@keyframes ambientFloatOne {
    0%,
    100% {
        transform:
            translate3d(
                0,
                0,
                0
            );
    }

    50% {
        transform:
            translate3d(
                100px,
                80px,
                0
            );
    }
}

@keyframes ambientFloatTwo {
    0%,
    100% {
        transform:
            translate3d(
                0,
                0,
                0
            );
    }

    50% {
        transform:
            translate3d(
                -80px,
                -60px,
                0
            );
    }
}

@keyframes ambientPulse {
    0%,
    100% {
        opacity: 0.45;
        transform:
            translate(-50%, -50%)
            scale(0.9);
    }

    50% {
        opacity: 0.9;
        transform:
            translate(-50%, -50%)
            scale(1.15);
    }
}

.backgroundGrid {
    position: absolute;
    inset: -20%;

    opacity: 0.16;

    background-image:
        linear-gradient(
            rgba(70,190,255,0.055) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(70,190,255,0.055) 1px,
            transparent 1px
        );

    background-size:
        80px 80px,
        80px 80px;

    transform:
        perspective(800px)
        rotateX(65deg)
        translateY(28%);

    transform-origin:
        center bottom;

    animation:
        arenaGridMove 12s linear infinite;
}

@keyframes arenaGridMove {
    from {
        background-position:
            0 0,
            0 0;
    }

    to {
        background-position:
            0 80px,
            80px 0;
    }
}

.backgroundVignette {
    position: absolute;
    inset: 0;

    background:
        radial-gradient(
            circle,
            transparent 35%,
            rgba(0,0,0,0.32) 100%
        );
}

.scanlines {
    position: absolute;
    inset: 0;

    opacity: 0.035;

    background:
        repeating-linear-gradient(
            0deg,
            rgba(255,255,255,0.7) 0,
            rgba(255,255,255,0.7) 1px,
            transparent 1px,
            transparent 4px
        );

    pointer-events: none;
}


/* =========================================================
   TOP BAR
========================================================= */

.topBar {
    position: absolute;

    top: 0;
    left: 0;
    right: 0;

    z-index: 50;

    height: 72px;

    display: flex;

    align-items: center;
    justify-content: space-between;

    padding:
        0 26px;

    border-bottom:
        1px solid
        rgba(
            100,
            210,
            255,
            0.08
        );

    background:
        linear-gradient(
            180deg,
            rgba(2,5,10,0.9),
            rgba(2,5,10,0.4)
        );

    backdrop-filter:
        blur(12px);
}

.brandBlock {
    display: flex;

    align-items: center;

    gap: 12px;
}

.brandMark {
    width: 34px;
    height: 34px;

    display: grid;

    place-items: center;

    border:
        1px solid
        rgba(
            80,
            210,
            255,
            0.6
        );

    background:
        rgba(
            40,
            170,
            220,
            0.08
        );

    color: #dffaff;

    font-weight: 900;
    font-size: 16px;

    box-shadow:
        0 0 22px
        rgba(
            40,
            190,
            255,
            0.15
        );
}

.brandText {
    display: flex;

    flex-direction: column;

    line-height: 1;
}

.brandText strong {
    font-size: 15px;

    letter-spacing: 0.25em;
}

.brandText span {
    margin-top: 4px;

    font-size: 8px;

    letter-spacing: 0.42em;

    color:
        rgba(
            180,
            225,
            245,
            0.5
        );
}

.onlineStatus {
    position: absolute;

    left: 50%;

    transform:
        translateX(-50%);

    display: flex;

    align-items: center;

    gap: 7px;

    font-size: 9px;

    letter-spacing: 0.25em;

    color:
        rgba(
            150,
            230,
            245,
            0.6
        );
}

.onlineDot {
    width: 6px;
    height: 6px;

    border-radius: 50%;

    background: #55eaff;

    box-shadow:
        0 0 12px
        rgba(
            50,
            220,
            255,
            0.9
        );

    animation:
        onlinePulse 1.5s ease-in-out infinite;
}

@keyframes onlinePulse {
    0%,
    100% {
        opacity: 0.55;
        transform: scale(0.85);
    }

    50% {
        opacity: 1;
        transform: scale(1.15);
    }
}


/* =========================================================
   BUTTON BASE
========================================================= */

button {
    font-family:
        'Gill Sans',
        'Gill Sans MT',
        Calibri,
        'Trebuchet MS',
        sans-serif;

    cursor: pointer;

    border: none;

    outline: none;
}

button:disabled {
    cursor: not-allowed;

    opacity: 0.35;
}

.primaryButton,
.secondaryButton {
    position: relative;

    width: 100%;

    min-height: 48px;

    padding:
        0 22px;

    border-radius: 8px;

    font-size: 11px;

    font-weight: 800;

    letter-spacing: 0.2em;

    transition:
        transform 0.2s ease,
        box-shadow 0.25s ease,
        background 0.25s ease,
        border-color 0.25s ease,
        color 0.25s ease;

    overflow: hidden;
}

.primaryButton {
    color: #ffffff;

    border:
        1px solid
        rgba(
            75,
            215,
            255,
            0.6
        );

    background:
        linear-gradient(
            135deg,
            rgba(20,150,220,0.24),
            rgba(30,70,130,0.16)
        );

    box-shadow:
        0 0 24px
        rgba(
            30,
            190,
            255,
            0.12
        );
}

.secondaryButton {
    color:
        rgba(
            210,
            240,
            250,
            0.75
        );

    border:
        1px solid
        rgba(
            120,
            205,
            235,
            0.18
        );

    background:
        rgba(
            20,
            45,
            65,
            0.2
        );
}

.primaryButton::before,
.secondaryButton::before {
    content: "";

    position: absolute;

    top: 0;
    left: -120%;

    width: 80%;
    height: 100%;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(
                255,
                255,
                255,
                0.12
            ),
            transparent
        );

    transform:
        skewX(-20deg);

    transition:
        left 0.55s ease;

    pointer-events: none;
}

.primaryButton:hover::before,
.secondaryButton:hover::before {
    left: 140%;
}

.primaryButton:hover {
    transform:
        translateY(-2px);

    border-color:
        rgba(
            90,
            225,
            255,
            0.95
        );

    box-shadow:
        0 0 35px
        rgba(
            35,
            195,
            255,
            0.2
        );
}

.secondaryButton:hover {
    transform:
        translateY(-2px);

    color: #ffffff;

    border-color:
        rgba(
            100,
            215,
            245,
            0.5
        );

    background:
        rgba(
            35,
            90,
            120,
            0.2
        );

    box-shadow:
        0 0 25px
        rgba(
            35,
            190,
            255,
            0.1
        );
}

.primaryButton:active,
.secondaryButton:active {
    transform:
        translateY(1px)
        scale(0.985);
}


/* =========================================================
   EXIT BUTTON
========================================================= */

.backButton {
    min-width: 72px;
    height: 34px;

    padding:
        0 15px;

    border:
        1px solid
        rgba(
            255,
            100,
            125,
            0.25
        );

    border-radius: 6px;

    background:
        rgba(
            80,
            20,
            30,
            0.12
        );

    color:
        rgba(
            255,
            190,
            200,
            0.75
        );

    font-size: 9px;
    font-weight: 800;

    letter-spacing: 0.18em;

    transition:
        0.25s ease;
}

.backButton:hover {
    color: #ffffff;

    border-color:
        rgba(
            255,
            100,
            125,
            0.65
        );

    background:
        rgba(
            150,
            30,
            55,
            0.18
        );

    box-shadow:
        0 0 24px
        rgba(
            255,
            50,
            80,
            0.12
        );
}


/* =========================================================
   GAME STAGE
========================================================= */

.gameStage {
    position: absolute;

    inset: 72px 0 0;

    overflow: hidden;

    touch-action: none;

    cursor: crosshair;
}

#gameCanvas {
    position: absolute;

    inset: 0;

    width: 100%;
    height: 100%;

    display: block;
}


/* =========================================================
   CROSSHAIR
========================================================= */

.crosshair {
    position: absolute;

    left: 0;
    top: 0;

    width: 1px;
    height: 1px;

    z-index: 30;

    pointer-events: none;

    will-change:
        transform;
}

.crosshairOuter {
    position: absolute;

    width: 38px;
    height: 38px;

    left: -19px;
    top: -19px;

    border:
        1px solid
        rgba(
            100,
            225,
            255,
            0.55
        );

    border-radius: 50%;

    box-shadow:
        0 0 18px
        rgba(
            40,
            205,
            255,
            0.15
        );
}

.crosshairInner {
    position: absolute;

    width: 17px;
    height: 17px;

    left: -8.5px;
    top: -8.5px;

    border:
        1px solid
        rgba(
            220,
            250,
            255,
            0.85
        );

    border-radius: 50%;
}

.crosshairDot {
    position: absolute;

    width: 4px;
    height: 4px;

    left: -2px;
    top: -2px;

    border-radius: 50%;

    background: #ffffff;

    box-shadow:
        0 0 12px
        rgba(
            90,
            225,
            255,
            1
        );
}


/* =========================================================
   PLAYER DOM
========================================================= */

.playerCore {
    position: absolute;

    left: 50%;
    top: 50%;

    width: 1px;
    height: 1px;

    z-index: 20;

    pointer-events: none;

    will-change:
        transform;
}

.playerCoreOuter,
.playerCoreInner {
    position: absolute;

    border-radius: 50%;
}

.playerCoreOuter {
    width: 58px;
    height: 58px;

    left: -29px;
    top: -29px;

    border:
        1px solid
        rgba(
            90,
            220,
            255,
            0.22
        );

    box-shadow:
        0 0 28px
        rgba(
            30,
            190,
            255,
            0.22
        );
}

.playerCoreInner {
    width: 34px;
    height: 34px;

    left: -17px;
    top: -17px;

    background:
        radial-gradient(
            circle at 35% 30%,
            #ffffff 0%,
            #8defff 18%,
            #16a9e5 55%,
            #07527a 100%
        );

    border:
        1px solid
        rgba(
            220,
            250,
            255,
            0.85
        );

    box-shadow:
        0 0 25px
        rgba(
            40,
            210,
            255,
            0.7
        );
}


/* =========================================================
   HUD
========================================================= */

.hudTopLeft {
    position: absolute;

    top: 24px;
    left: 26px;

    z-index: 25;

    display: flex;

    gap: 22px;

    pointer-events: none;
}

.hudStat {
    display: flex;

    flex-direction: column;

    min-width: 55px;
}

.hudLabel {
    font-size: 8px;

    font-weight: 700;

    letter-spacing: 0.2em;

    color:
        rgba(
            170,
            220,
            235,
            0.5
        );
}

.hudStat strong {
    margin-top: 3px;

    font-size: 21px;

    font-weight: 800;

    color: #ffffff;

    text-shadow:
        0 0 15px
        rgba(
            80,
            210,
            255,
            0.3
        );
}

.healthHUD {
    position: absolute;

    right: 26px;
    top: 24px;

    z-index: 25;

    width: min(
        230px,
        30vw
    );

    pointer-events: none;
}

.healthHeader {
    display: flex;

    justify-content: space-between;

    align-items: center;

    margin-bottom: 7px;

    font-size: 8px;

    font-weight: 700;

    letter-spacing: 0.17em;

    color:
        rgba(
            180,
            225,
            240,
            0.55
        );
}

.healthHeader strong {
    color:
        rgba(
            235,
            250,
            255,
            0.8
        );
}

.healthBar {
    width: 100%;
    height: 5px;

    overflow: hidden;

    border:
        1px solid
        rgba(
            100,
            205,
            230,
            0.12
        );

    background:
        rgba(
            0,
            0,
            0,
            0.35
        );
}

.healthBarFill {
    width: 100%;
    height: 100%;

    background:
        linear-gradient(
            90deg,
            #12aee9,
            #74ecff
        );

    box-shadow:
        0 0 14px
        rgba(
            40,
            210,
            255,
            0.45
        );

    transition:
        width 0.15s ease;
}

.weaponHUD {
    position: absolute;

    left: 26px;
    bottom: 28px;

    z-index: 25;

    display: flex;

    flex-direction: column;

    pointer-events: none;
}

.weaponHUD strong {
    margin-top: 3px;

    font-size: 18px;

    color:
        #d9faff;

    text-shadow:
        0 0 18px
        rgba(
            50,
            210,
            255,
            0.4
        );
}


/* =========================================================
   GAME CONTROLS
========================================================= */

.gameControls {
    position: absolute;

    right: 26px;
    bottom: 26px;

    z-index: 40;

    display: flex;

    gap: 10px;

    width: 240px;
}

.gameControls .secondaryButton {
    min-width: 0;
}


/* =========================================================
   WAVE ANNOUNCEMENT
========================================================= */

.waveAnnouncement {
    position: absolute;

    left: 50%;
    top: 20%;

    z-index: 35;

    transform:
        translate(
            -50%,
            -20px
        );

    opacity: 0;

    pointer-events: none;

    transition:
        opacity 0.35s ease,
        transform 0.55s ease;
}

.waveAnnouncement.waveVisible {
    opacity: 1;

    transform:
        translate(
            -50%,
            0
        );
}

.waveAnnouncement span {
    display: block;

    padding:
        10px 28px;

    border-top:
        1px solid
        rgba(
            90,
            220,
            255,
            0.35
        );

    border-bottom:
        1px solid
        rgba(
            90,
            220,
            255,
            0.35
        );

    color:
        rgba(
            225,
            250,
            255,
            0.9
        );

    font-size: 15px;

    font-weight: 800;

    letter-spacing: 0.35em;

    text-shadow:
        0 0 20px
        rgba(
            60,
            210,
            255,
            0.5
        );
}


/* =========================================================
   CENTER HINT
========================================================= */

.centerHint {
    position: absolute;

    left: 50%;
    bottom: 18%;

    z-index: 35;

    display: flex;

    flex-direction: column;

    align-items: center;

    gap: 8px;

    transform:
        translate(
            -50%,
            12px
        );

    opacity: 0;

    pointer-events: none;

    transition:
        opacity 0.45s ease,
        transform 0.45s ease;
}

.centerHint.hintVisible {
    opacity: 1;

    transform:
        translate(
            -50%,
            0
        );
}

.centerHint span {
    font-size: 10px;

    font-weight: 800;

    letter-spacing: 0.23em;

    color:
        rgba(
            220,
            248,
            255,
            0.72
        );
}

.centerHint small {
    font-size: 8px;

    letter-spacing: 0.12em;

    color:
        rgba(
            160,
            210,
            225,
            0.35
        );
}


/* =========================================================
   OVERLAY
========================================================= */

.overlay {
    position: absolute;

    inset: 0;

    z-index: 100;

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 24px;

    background:
        rgba(
            1,
            4,
            8,
            0.72
        );

    backdrop-filter:
        blur(12px);

    opacity: 0;

    pointer-events: none;

    transition:
        opacity 0.3s ease;
}

.hiddenOverlay {
    display: none;
}

.overlay.overlayVisible {
    opacity: 1;

    pointer-events: auto;
}


/* =========================================================
   UPGRADE PANEL
========================================================= */

.upgradePanel {
    position: relative;

    width: min(
        700px,
        92vw
    );

    padding: 28px;

    overflow: hidden;

    border:
        1px solid
        rgba(
            80,
            210,
            255,
            0.2
        );

    border-radius: 14px;

    background:
        linear-gradient(
            145deg,
            rgba(10,25,38,0.95),
            rgba(3,9,16,0.97)
        );

    box-shadow:
        0 35px 100px
        rgba(
            0,
            0,
            0,
            0.6
        ),
        0 0 50px
        rgba(
            30,
            190,
            255,
            0.08
        );

    transform:
        translateY(18px)
        scale(0.97);

    transition:
        transform 0.4s
        cubic-bezier(
            .2,
            .8,
            .2,
            1
        );
}

.overlay.overlayVisible
.upgradePanel {
    transform:
        translateY(0)
        scale(1);
}

.panelTopGlow {
    position: absolute;

    top: 0;
    left: 10%;

    width: 80%;
    height: 1px;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(
                80,
                225,
                255,
                0.9
            ),
            transparent
        );

    box-shadow:
        0 0 25px
        rgba(
            70,
            220,
            255,
            0.7
        );
}

.panelHeader {
    display: flex;

    align-items: flex-start;
    justify-content: space-between;
}

.panelMiniTitle {
    display: block;

    margin-bottom: 5px;

    font-size: 8px;

    font-weight: 700;

    letter-spacing: 0.3em;

    color:
        rgba(
            130,
            210,
            230,
            0.5
        );
}

.panelHeader h2,
.pausePanel h2,
.gameOverPanel h2 {
    font-size: 32px;

    letter-spacing: 0.08em;

    line-height: 1;

    color: #ffffff;

    text-shadow:
        0 0 25px
        rgba(
            70,
            210,
            255,
            0.2
        );
}

.closeButton {
    width: 38px;
    height: 38px;

    border:
        1px solid
        rgba(
            140,
            210,
            230,
            0.18
        );

    border-radius: 7px;

    background:
        rgba(
            255,
            255,
            255,
            0.025
        );

    color:
        rgba(
            220,
            245,
            255,
            0.65
        );

    font-size: 25px;

    line-height: 1;

    transition:
        0.25s ease;
}

.closeButton:hover {
    color: #ffffff;

    border-color:
        rgba(
            255,
            110,
            135,
            0.55
        );

    background:
        rgba(
            255,
            50,
            80,
            0.08
        );
}

.upgradeCoins {
    display: flex;

    align-items: center;

    gap: 7px;

    margin:
        24px 0 20px;

    padding:
        11px 14px;

    border:
        1px solid
        rgba(
            80,
            210,
            255,
            0.1
        );

    border-radius: 7px;

    background:
        rgba(
            30,
            100,
            130,
            0.06
        );

    font-size: 8px;

    letter-spacing: 0.15em;

    color:
        rgba(
            170,
            220,
            235,
            0.5
        );
}

.upgradeCoins strong {
    font-size: 17px;

    color:
        #bdf6ff;

    letter-spacing: 0;

    text-shadow:
        0 0 14px
        rgba(
            60,
            215,
            255,
            0.4
        );
}

.upgradeCards {
    display: grid;

    grid-template-columns:
        repeat(
            2,
            minmax(0, 1fr)
        );

    gap: 14px;
}

.upgradeCard {
    position: relative;

    padding: 20px;

    border:
        1px solid
        rgba(
            100,
            200,
            230,
            0.1
        );

    border-radius: 10px;

    background:
        linear-gradient(
            145deg,
            rgba(25,55,70,0.18),
            rgba(4,12,20,0.4)
        );

    transition:
        0.3s ease;
}

.upgradeCard:hover {
    transform:
        translateY(-3px);

    border-color:
        rgba(
            80,
            210,
            255,
            0.25
        );

    box-shadow:
        0 15px 35px
        rgba(
            0,
            0,
            0,
            0.2
        );
}

.upgradeCardTop {
    display: flex;

    align-items: center;

    gap: 12px;
}

.upgradeCardIcon {
    width: 38px;
    height: 38px;

    display: grid;

    place-items: center;

    border:
        1px solid
        rgba(
            80,
            210,
            255,
            0.25
        );

    border-radius: 8px;

    background:
        rgba(
            30,
            160,
            210,
            0.08
        );

    color:
        #b9f6ff;

    font-size: 14px;

    font-weight: 900;

    box-shadow:
        0 0 20px
        rgba(
            40,
            200,
            255,
            0.08
        );
}

.upgradeName {
    display: block;

    font-size: 9px;

    letter-spacing: 0.2em;

    color:
        rgba(
            160,
            215,
            230,
            0.5
        );
}

.upgradeCardTop strong {
    display: block;

    margin-top: 3px;

    font-size: 15px;

    letter-spacing: 0.05em;
}

.upgradeCard p {
    min-height: 45px;

    margin:
        17px 0;

    font-size: 11px;

    line-height: 1.6;

    color:
        rgba(
            170,
            215,
            230,
            0.52
        );
}


/* =========================================================
   PAUSE PANEL
========================================================= */

.pausePanel {
    width: min(
        420px,
        90vw
    );

    padding: 36px;

    text-align: center;

    border:
        1px solid
        rgba(
            90,
            210,
            250,
            0.18
        );

    border-radius: 14px;

    background:
        linear-gradient(
            145deg,
            rgba(10,28,42,0.96),
            rgba(3,8,15,0.98)
        );

    box-shadow:
        0 35px 100px
        rgba(
            0,
            0,
            0,
            0.65
        ),
        0 0 45px
        rgba(
            40,
            190,
            255,
            0.08
        );

    transform:
        translateY(15px)
        scale(0.97);

    transition:
        0.4s
        cubic-bezier(
            .2,
            .8,
            .2,
            1
        );
}

.overlay.overlayVisible
.pausePanel {
    transform:
        translateY(0)
        scale(1);
}

.pausePanel h2 {
    margin-bottom: 12px;
}

.pausePanel p {
    margin-bottom: 22px;

    font-size: 11px;

    color:
        rgba(
            180,
            220,
            235,
            0.48
        );
}

.pausePanel .secondaryButton {
    margin-top: 9px;
}


/* =========================================================
   SAVE BUTTON
========================================================= */

.saveButton {
    position: relative;

    overflow: hidden;
}

.saveButton::after {
    content: "";

    position: absolute;

    inset: 0;

    background:
        linear-gradient(
            110deg,
            transparent 20%,
            rgba(
                110,
                230,
                255,
                0.18
            ) 50%,
            transparent 80%
        );

    transform:
        translateX(-120%);

    transition:
        transform 0.55s ease;

    pointer-events: none;
}

.saveButton:hover::after {
    transform:
        translateX(120%);
}

.saveButton.saveSuccess {
    color: #ffffff;

    border-color:
        rgba(
            87,
            255,
            177,
            0.65
        );

    background:
        rgba(
            50,
            210,
            150,
            0.12
        );

    box-shadow:
        0 0 30px
        rgba(
            87,
            255,
            177,
            0.18
        ),
        inset 0 0 20px
        rgba(
            87,
            255,
            177,
            0.05
        );
}


/* =========================================================
   GAME OVER
========================================================= */

.gameOverPanel {
    position: relative;

    width: min(
        480px,
        90vw
    );

    padding: 34px;

    text-align: center;

    border:
        1px solid
        rgba(
            255,
            75,
            105,
            0.22
        );

    border-radius: 14px;

    background:
        linear-gradient(
            145deg,
            rgba(35,12,20,0.97),
            rgba(5,7,12,0.98)
        );

    box-shadow:
        0 35px 100px
        rgba(
            0,
            0,
            0,
            0.7
        ),
        0 0 50px
        rgba(
            255,
            40,
            80,
            0.08
        );

    transform:
        translateY(18px)
        scale(0.96);

    opacity: 0;
}

.gameOverPanel.gameOverEnter {
    animation:
        gameOverEnter
        0.55s
        cubic-bezier(
            .2,
            .8,
            .2,
            1
        )
        forwards;
}

@keyframes gameOverEnter {

    0% {
        opacity: 0;

        transform:
            translateY(18px)
            scale(0.96);
    }

    65% {
        opacity: 1;

        transform:
            translateY(-3px)
            scale(1.01);
    }

    100% {
        opacity: 1;

        transform:
            translateY(0)
            scale(1);
    }
}

.gameOverPanel h2 {
    margin-bottom: 25px;

    color:
        #fff0f3;

    text-shadow:
        0 0 30px
        rgba(
            255,
            50,
            80,
            0.35
        );
}

.gameOverStats {
    display: grid;

    grid-template-columns:
        repeat(
            4,
            1fr
        );

    gap: 8px;

    margin-bottom: 24px;
}

.gameOverStats div {
    padding:
        12px 5px;

    border:
        1px solid
        rgba(
            255,
            120,
            140,
            0.09
        );

    border-radius: 7px;

    background:
        rgba(
            255,
            60,
            90,
            0.025
        );
}

.gameOverStats span {
    display: block;

    font-size: 7px;

    letter-spacing: 0.16em;

    color:
        rgba(
            230,
            190,
            200,
            0.42
        );
}

.gameOverStats strong {
    display: block;

    margin-top: 5px;

    font-size: 19px;

    color:
        rgba(
            255,
            245,
            248,
            0.92
        );
}

.gameOverPanel .secondaryButton {
    margin-top: 9px;
}

.gameOverFlash {
    position: absolute;

    inset: 0;

    pointer-events: none;

    background:
        radial-gradient(
            circle,
            rgba(
                255,
                50,
                80,
                0.1
            ),
            transparent 55%
        );
}


/* =========================================================
   GAME ENTER
========================================================= */

.gameEnter {
    animation:
        gameEnterAnimation
        0.9s
        cubic-bezier(
            .2,
            .8,
            .2,
            1
        )
        both;
}

@keyframes gameEnterAnimation {

    from {
        opacity: 0;

        transform:
            scale(1.025);
    }

    to {
        opacity: 1;

        transform:
            scale(1);
    }

}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (
    max-width: 700px
) {

    .topBar {
        height: 62px;

        padding:
            0 16px;
    }

    .gameStage {
        inset:
            62px 0 0;
    }

    .hudTopLeft {
        top: 18px;
        left: 16px;

        gap: 13px;
    }

    .healthHUD {
        top: 18px;
        right: 16px;

        width: 150px;
    }

    .hudStat strong {
        font-size: 17px;
    }

    .gameControls {
        right: 16px;
        bottom: 16px;

        width: 190px;
    }

    .weaponHUD {
        left: 16px;
        bottom: 20px;
    }

    .centerHint {
        bottom: 17%;
    }

    .centerHint small {
        display: none;
    }

    .upgradePanel {
        padding: 21px;
    }

    .upgradeCards {
        grid-template-columns:
            1fr;
    }

    .upgradeCard p {
        min-height: auto;
    }

    .pausePanel,
    .gameOverPanel {
        padding: 27px 22px;
    }

    .gameOverStats {
        grid-template-columns:
            repeat(
                2,
                1fr
            );
    }

}

@media (
    max-width: 480px
) {

    .brandText {
        display: none;
    }

    .onlineStatus {
        display: none;
    }

    .backButton {
        min-width: 62px;
    }

    .healthHUD {
        width: 125px;
    }

    .healthHeader {
        font-size: 7px;
    }

    .gameControls {
        width: 175px;
    }

    .gameControls .secondaryButton {
        padding:
            0 10px;

        font-size: 9px;
    }

    .waveAnnouncement {
        top: 17%;
    }

    .waveAnnouncement span {
        font-size: 12px;
    }

}


/* =========================================================
   REDUCED MOTION
========================================================= */

@media (
    prefers-reduced-motion: reduce
) {

    *,
    *::before,
    *::after {
        animation-duration:
            0.001ms !important;

        animation-iteration-count:
            1 !important;

        scroll-behavior:
            auto !important;

        transition-duration:
            0.001ms !important;
    }

}