:root {
    --bg-dark: #0a0a0c;
    --primary: #4a5d23;
    --accent: #d4af37;
    --text: #e0e0e0;
    --surface: rgba(20, 20, 25, 0.85);
    --glass: rgba(255, 255, 255, 0.05);
    --font-main: 'Outfit', sans-serif;
    --font-mono: 'JetBrains+Mono', monospace;
}

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



#game-container {
    position: relative;
    width: 100vmin;
    /* Take up the smaller dimension */
    height: 100vmin;
    /* Enforce 1:1 square */
    background: radial-gradient(circle at center, #1a1a20, #000);
    box-shadow: 0 0 100px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    max-width: 100vw;
    max-height: 100vh;
}

canvas {
    display: block;
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
    touch-action: none;
    /* Critical for custom touch logic */
}

#ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    display: flex;
    flex-direction: column;
}

#hud {
    display: flex;
    justify-content: center;
    gap: 40px;
    padding: 20px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent);
    z-index: 10;
}

.stat-box {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-box .label {
    font-size: 10px;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 700;
}

.stat-box .value {
    font-family: var(--font-mono);
    font-size: 24px;
    color: var(--accent);
    text-shadow: 0 0 10px var(--accent);
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    pointer-events: all;
    backdrop-filter: blur(10px);
}

.title-card {
    text-align: center;
    padding: 60px;
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8);
}

h1 {
    font-size: 72px;
    letter-spacing: 8px;
    color: var(--accent);
    margin-bottom: 5px;
}

.subtitle {
    font-size: 18px;
    letter-spacing: 12px;
    opacity: 0.6;
    margin-bottom: 40px;
}

.mission-briefing {
    font-family: var(--font-mono);
    font-size: 14px;
    line-height: 2;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 40px;
    text-align: left;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    border-left: 2px solid var(--accent);
    padding-left: 20px;
}

button {
    background: var(--accent);
    color: black;
    border: none;
    padding: 15px 40px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 2px;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s ease;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(212, 175, 55, 0.3);
    filter: brightness(1.2);
}

.hidden {
    display: none !important;
}