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

body {
    background: #0C0D14;
    color: #e0e0e0;
    font-family: 'Segoe UI', system-ui, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
}

#game-container {
    position: relative;
    width: 90vw;
    height: 85vh;
    max-width: 900px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#game-canvas {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    cursor: pointer;
}

/* ── Overlay ────────────────────────────────────────── */

#overlay {
    position: absolute;
    inset: 0;
    background: rgba(12, 13, 20, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    backdrop-filter: blur(4px);
    border-radius: 12px;
    cursor: pointer;
}

#overlay.hidden {
    display: none;
}

#overlay-box {
    text-align: center;
    max-width: 420px;
    padding: 32px 28px;
    background: #161822;
    border: 1px solid #2a2d3a;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* ── Start Screen ───────────────────────────────────── */

#screen-start h1 {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 16px;
    color: #4ade80;
    text-shadow: 0 0 30px rgba(74, 222, 128, 0.4);
}

/* ── Game Over Screen ───────────────────────────────── */

#screen-gameover h1 {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 16px;
    color: #60a5fa;
    text-shadow: 0 0 30px rgba(96, 165, 250, 0.4);
}

#screen-gameover p {
    font-size: 20px;
    color: #ccc;
    margin-bottom: 8px;
}

#screen-gameover p span {
    font-weight: 700;
    color: #4ade80;
    font-variant-numeric: tabular-nums;
}

/* ── Text Styles ────────────────────────────────────── */

.controls-hint {
    font-size: 16px;
    color: #aaa;
    margin-bottom: 24px;
    line-height: 1.5;
}

.action-hint {
    font-size: 14px;
    color: #666;
    margin-top: 20px;
    animation: pulse 2s ease-in-out infinite;
}

.hidden {
    display: none !important;
}

/* ── Animations ─────────────────────────────────────── */

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* ── Responsive ─────────────────────────────────────── */

@media (max-width: 600px) {
    #game-container {
        width: 100vw;
        height: 100vh;
        max-width: none;
    }

    #game-canvas {
        border-radius: 0;
    }

    #overlay {
        border-radius: 0;
    }

    #overlay-box {
        margin: 16px;
        padding: 24px 20px;
    }

    #screen-start h1,
    #screen-gameover h1 {
        font-size: 32px;
    }

    #screen-gameover p {
        font-size: 17px;
    }
}
