:root {
    --green: #b5e64d;
    --green-dark: #31511e;
    --red: #e34035;
    --gold: #efcc4d;
    --cream: #f4f2cf;
    --black: #030604;
}

* {
    box-sizing: border-box;
    user-select: none;
    -webkit-user-select: none;
}

html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
    overflow: hidden;
}

body {
    color: white;
    font-family: Arial, Helvetica, sans-serif;
    background: #020503;
}

button {
    color: inherit;
    font: inherit;
}

#game-shell {
    display: grid;
    grid-template-rows: auto 1fr auto;
    width: 100vw;
    height: 100vh;
}

#hud {
    position: relative;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 92px;
    padding: 9px 18px;
    border-bottom: 4px solid var(--green);
    background:
        repeating-linear-gradient(
            -45deg,
            #081009 0 14px,
            #111c12 14px 28px
        );
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.8);
}

.brand-small {
    display: block;
    color: #99b975;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 4px;
}

.brand strong {
    display: block;
    margin-top: 2px;
    font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
    font-size: clamp(29px, 4vw, 55px);
    line-height: 0.9;
    letter-spacing: 2px;
    text-shadow:
        3px 3px 0 #33561e,
        6px 6px 0 #0c1609;
}

.brand em {
    color: var(--red);
    font-style: normal;
}

.hud-stats {
    display: flex;
    gap: 7px;
}

.stat {
    min-width: 88px;
    padding: 7px 10px;
    text-align: center;
    border: 2px solid #628239;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.72);
}

.stat span {
    display: block;
    color: #9fbc7a;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 1px;
}

.stat b {
    display: block;
    color: white;
    font-family: Impact, sans-serif;
    font-size: 26px;
    letter-spacing: 1px;
}

#stage {
    position: relative;
    min-height: 0;
    overflow: hidden;
    cursor: none;
    background:
        linear-gradient(
            rgba(5, 18, 10, 0.25),
            rgba(0, 0, 0, 0.72)
        ),
        repeating-linear-gradient(
            0deg,
            transparent 0 79px,
            rgba(173, 224, 86, 0.035) 80px
        ),
        repeating-linear-gradient(
            90deg,
            transparent 0 79px,
            rgba(173, 224, 86, 0.035) 80px
        ),
        #07100b;
}

#game-canvas {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
}

#crosshair {
    position: absolute;
    z-index: 30;
    width: 42px;
    height: 42px;
    pointer-events: none;
    transform: translate(-50%, -50%);
}

#crosshair::before,
#crosshair::after {
    content: "";
    position: absolute;
    background: rgba(220, 255, 155, 0.95);
    box-shadow: 0 0 7px #b9ff4e;
}

#crosshair::before {
    left: 19px;
    top: 0;
    width: 3px;
    height: 42px;
}

#crosshair::after {
    left: 0;
    top: 19px;
    width: 42px;
    height: 3px;
}

#crosshair span {
    position: absolute;
    inset: 11px;
    border: 2px solid #e64539;
    border-radius: 50%;
}

#wave-message {
    position: absolute;
    left: 50%;
    top: 19%;
    z-index: 40;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%);
    font-family: Impact, sans-serif;
    font-size: clamp(45px, 8vw, 105px);
    white-space: nowrap;
    text-shadow:
        4px 4px 0 #5f160f,
        8px 8px 0 #130403,
        0 0 24px black;
}

#wave-message.show {
    animation: wave-pop 1.5s ease-out;
}

@keyframes wave-pop {
    0% {
        opacity: 0;
        transform: translateX(-50%) scale(0.35);
    }

    20% {
        opacity: 1;
        transform: translateX(-50%) scale(1.18);
    }

    70% {
        opacity: 1;
        transform: translateX(-50%) scale(1);
    }

    100% {
        opacity: 0;
        transform: translateX(-50%) scale(1.3);
    }
}

.overlay {
    position: absolute;
    inset: 0;
    z-index: 100;
    display: none;
    place-items: center;
    padding: 18px;
    cursor: default;
    background: rgba(0, 0, 0, 0.84);
    backdrop-filter: blur(7px);
}

.overlay.visible {
    display: grid;
}

.panel {
    width: min(810px, 96vw);
    max-height: 94%;
    overflow-y: auto;
    padding: clamp(27px, 5vw, 58px);
    text-align: center;
    border: 5px solid var(--green);
    border-radius: 17px;
    background:
        radial-gradient(
            circle at top,
            #334d25,
            #071009 70%
        );
    box-shadow:
        0 0 0 8px #233718,
        0 0 80px black;
}

.biohazard {
    color: var(--gold);
    font-size: 70px;
    text-shadow: 0 0 20px rgba(235, 204, 69, 0.65);
}

.kicker {
    margin: 6px 0 10px;
    color: #b9dc73;
    font-weight: 900;
    letter-spacing: 4px;
}

.panel h1,
.panel h2 {
    margin: 5px 0 18px;
    color: #ebff9c;
    font-family: Impact, sans-serif;
    font-size: clamp(50px, 9vw, 96px);
    line-height: 0.84;
    text-shadow:
        4px 4px 0 #3b6323,
        8px 8px 0 #111d0b;
}

.panel h1 span {
    display: block;
    color: var(--red);
    text-shadow:
        4px 4px 0 #70160f,
        8px 8px 0 #240604;
}

.intro {
    max-width: 690px;
    margin: 0 auto;
    color: var(--cream);
    font-size: clamp(16px, 2.2vw, 21px);
    font-weight: 700;
    line-height: 1.45;
}

.controls {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 9px;
    margin: 24px 0;
}

.controls div {
    padding: 13px 8px;
    border: 2px solid #66883d;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.42);
}

.controls b,
.controls span {
    display: block;
}

.controls b {
    color: #d8f58f;
}

.controls span {
    margin-top: 4px;
    color: #c8ccb7;
    font-weight: 700;
}

#start-button,
#restart-button {
    width: min(440px, 100%);
    padding: 17px;
    border: 4px solid #dfff87;
    border-radius: 10px;
    color: white;
    background: linear-gradient(#d9473c, #76140e);
    box-shadow:
        0 8px 0 #3d0805,
        0 15px 25px black;
    font-family: Impact, sans-serif;
    font-size: clamp(27px, 4vw, 42px);
    cursor: pointer;
}

#start-button:active,
#restart-button:active {
    transform: translateY(7px);
    box-shadow: 0 1px 0 #3d0805;
}

.satire {
    margin: 27px 0 0;
    color: #86917f;
    font-size: 12px;
}

#final-score {
    margin: 12px 0 28px;
    color: var(--gold);
    font-family: Impact, sans-serif;
    font-size: 90px;
}

#status-bar {
    position: relative;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 96px;
    padding: 9px 15px;
    border-top: 4px solid var(--green);
    background:
        repeating-linear-gradient(
            -45deg,
            #081009 0 14px,
            #111c12 14px 28px
        );
}

.health-group {
    display: grid;
    grid-template-columns: auto minmax(120px, 270px) auto;
    align-items: center;
    gap: 9px;
    min-width: 310px;
}

.health-group span {
    color: #bbd48f;
    font-weight: 900;
}

.meter {
    height: 20px;
    overflow: hidden;
    border: 2px solid #66853c;
    border-radius: 999px;
    background: #070b07;
}

#health-fill {
    width: 100%;
    height: 100%;
    background:
        linear-gradient(
            90deg,
            #d5322a,
            #e6c43a,
            #8edb3f
        );
    transition: width 100ms linear;
}

.weapon-display {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 410px;
    padding: 8px 15px;
    border: 2px solid #66853c;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.58);
}

.weapon-name span,
.weapon-name b {
    display: block;
}

.weapon-name span {
    color: #9daf83;
    font-size: 9px;
    font-weight: 900;
}

.weapon-name b {
    color: #dffc91;
}

.ammo {
    display: flex;
    align-items: baseline;
    gap: 5px;
}

.ammo b {
    color: white;
    font-family: Impact, sans-serif;
    font-size: 37px;
}

.ammo strong {
    color: #b2bc9d;
    font-size: 20px;
}

#reload-status {
    min-width: 82px;
    color: #c8df8b;
    font-size: 11px;
    font-weight: 900;
    text-align: center;
}

.utility-buttons {
    display: flex;
    gap: 7px;
}

.utility-buttons button {
    padding: 12px;
    border: 2px solid #66853c;
    border-radius: 7px;
    color: white;
    background: #121a12;
    font-weight: 900;
    cursor: pointer;
}

@media (max-width: 900px) {
    #hud {
        min-height: 70px;
        padding: 6px 8px;
    }

    .brand-small {
        display: none;
    }

    .brand strong {
        font-size: 28px;
    }

    .stat {
        min-width: 56px;
        padding: 5px;
    }

    .stat span {
        font-size: 7px;
    }

    .stat b {
        font-size: 19px;
    }

    #status-bar {
        min-height: 76px;
        padding: 5px;
    }

    .health-group {
        min-width: 0;
        grid-template-columns: auto minmax(65px, 130px) auto;
        font-size: 11px;
    }

    .weapon-display {
        min-width: 0;
        flex: 1;
        gap: 7px;
        padding: 5px;
    }

    .weapon-name {
        display: none;
    }

    .ammo b {
        font-size: 28px;
    }

    .utility-buttons button {
        padding: 7px;
        font-size: 10px;
    }

    .controls {
        grid-template-columns: 1fr 1fr;
    }
}


/* HERO_SELECTOR_STYLE_START */

#hero-selector {
    display: flex;
    align-items: stretch;
    gap: 7px;
}

.hero-choice {
    display: flex;
    align-items: center;
    gap: 8px;

    min-width: 150px;
    padding: 7px 10px;

    border: 2px solid #526b36;
    border-radius: 8px;

    color: #d6ddc5;

    background:
        linear-gradient(
            #1a241a,
            #0a100b
        );

    cursor: pointer;

    transition:
        border-color 130ms ease,
        box-shadow 130ms ease,
        transform 130ms ease,
        background 130ms ease;
}

.hero-choice:hover {
    border-color: #9bc74d;
    transform: translateY(-1px);
}

.hero-choice.active {
    border-color: #e8ff92;

    color: white;

    background:
        linear-gradient(
            #8f201a,
            #3d0b08
        );

    box-shadow:
        0 0 14px
        rgba(199, 242, 87, 0.38);
}

.hero-number {
    display: grid;
    place-items: center;

    width: 28px;
    height: 28px;

    flex: 0 0 28px;

    border: 2px solid #bacf76;
    border-radius: 50%;

    color: #f5ffbd;
    background: rgba(0, 0, 0, 0.42);

    font-family: Impact, sans-serif;
    font-size: 18px;
}

.hero-description {
    display: block;
    text-align: left;
    line-height: 1.05;
}

.hero-description b,
.hero-description small {
    display: block;
}

.hero-description b {
    color: #f1f5dd;
    font-size: 11px;
}

.hero-description small {
    margin-top: 4px;
    color: #9fae8f;
    font-size: 9px;
    font-weight: 800;
}

.hero-choice.active .hero-description small {
    color: #d8e7ac;
}

@media (max-width: 1050px) {
    #hero-selector {
        gap: 4px;
    }

    .hero-choice {
        min-width: 48px;
        padding: 6px;
    }

    .hero-description {
        display: none;
    }
}

/* HERO_SELECTOR_STYLE_END */

