:root {
    --bg: #d7ebea;
    --bg-deep: #8eb7c5;
    --panel: rgba(8, 20, 28, 0.62);
    --panel-border: rgba(255, 255, 255, 0.18);
    --text: #f6fbff;
    --muted: rgba(246, 251, 255, 0.74);
    --accent: #ff8f3c;
    --accent-strong: #ff6a00;
    --shadow: 0 24px 60px rgba(4, 18, 26, 0.28);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    overflow: hidden;
    font-family: "Outfit", "Segoe UI", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.65), transparent 26%),
        radial-gradient(circle at 82% 12%, rgba(255, 143, 60, 0.32), transparent 22%),
        linear-gradient(180deg, #e6f3fb 0%, var(--bg) 34%, var(--bg-deep) 100%);
}

button {
    font: inherit;
}

.app-shell {
    position: relative;
    width: 100vw;
    height: 100vh;
}

#gameCanvas {
    display: block;
    width: 100%;
    height: 100%;
}

.sky-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(60px);
    pointer-events: none;
    opacity: 0.65;
}

.sky-glow-one {
    width: 26vw;
    height: 26vw;
    top: -10vw;
    right: -4vw;
    background: rgba(255, 145, 64, 0.28);
}

.sky-glow-two {
    width: 32vw;
    height: 32vw;
    bottom: -14vw;
    left: -10vw;
    background: rgba(100, 157, 255, 0.2);
}

.hud,
.intro-card {
    backdrop-filter: blur(18px);
    background: var(--panel);
    border: 1px solid var(--panel-border);
    box-shadow: var(--shadow);
}

.hud {
    position: absolute;
    z-index: 5;
    border-radius: 26px;
}

.hud-top-left {
    top: 22px;
    left: 22px;
    width: min(420px, calc(100vw - 44px));
    padding: 22px 24px;
}

.hud-top-right {
    top: 22px;
    right: 22px;
    display: grid;
    gap: 12px;
    width: min(240px, calc(100vw - 44px));
    padding: 16px;
}

.eyebrow,
.stat-label,
.footnote,
.pill {
    font-family: "Space Mono", monospace;
}

.eyebrow {
    margin: 0 0 10px;
    font-size: 0.74rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.74);
}

h1,
h2,
p {
    margin: 0;
}

h1 {
    font-size: clamp(2.2rem, 5vw, 4rem);
    line-height: 0.92;
}

.hud-copy {
    margin-top: 14px;
    color: var(--muted);
    line-height: 1.55;
    max-width: 34ch;
}

.pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.pill {
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 0.76rem;
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.stat-card {
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.64);
}

.stat-card strong {
    font-size: 1.08rem;
}

.intro-panel {
    position: absolute;
    inset: 0;
    z-index: 6;
    display: grid;
    place-items: center;
    padding: 20px;
    transition: opacity 180ms ease, visibility 180ms ease;
}

.intro-panel.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.intro-card {
    width: min(540px, 100%);
    padding: 30px;
    border-radius: 32px;
}

.intro-card h2 {
    font-size: clamp(2rem, 4vw, 3rem);
}

.intro-card p + p,
.intro-card h2 + p {
    margin-top: 14px;
}

.intro-card p {
    color: var(--muted);
    line-height: 1.6;
}

.start-button {
    margin-top: 22px;
    border: 0;
    border-radius: 999px;
    padding: 15px 22px;
    font-weight: 700;
    color: #08141c;
    background: linear-gradient(135deg, #ffd56b 0%, var(--accent) 54%, var(--accent-strong) 100%);
    box-shadow: 0 18px 36px rgba(255, 106, 0, 0.3);
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.start-button:hover,
.start-button:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 24px 44px rgba(255, 106, 0, 0.4);
}

.footnote {
    margin-top: 14px;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.crosshair {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 4;
    width: 18px;
    height: 18px;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 120ms ease;
    pointer-events: none;
}

.crosshair::before,
.crosshair::after {
    content: "";
    position: absolute;
    background: rgba(255, 255, 255, 0.88);
    border-radius: 999px;
}

.crosshair::before {
    top: 8px;
    left: 0;
    right: 0;
    height: 2px;
}

.crosshair::after {
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
}

body.is-playing .crosshair {
    opacity: 1;
}

@media (max-width: 820px) {
    .hud-top-left,
    .hud-top-right {
        width: calc(100vw - 32px);
        left: 16px;
        right: 16px;
    }

    .hud-top-left {
        top: 16px;
        padding: 18px 18px 16px;
    }

    .hud-top-right {
        top: auto;
        bottom: 16px;
    }

    .intro-card {
        padding: 24px;
        border-radius: 24px;
    }
}