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

body {
    touch-action: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
    user-select: none;
    overscroll-behavior: none;
    font-family: ui-monospace, monospace;
    background: linear-gradient(180deg, #0a0a1a 0%, #1a0a2e 50%, #0a1a2e 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: #00ff88;
    overflow: hidden;
}

.container {
    text-align: center;
    padding: 15px;
    max-width: 100%;
}

h1 {
    font-size: clamp(18px, 4vw, 32px);
    margin-bottom: 10px;
    text-shadow: 0 0 20px rgba(0, 255, 136, 0.8), 0 0 40px rgba(0, 255, 136, 0.4);
    color: #00ff88;
    letter-spacing: 3px;
}

.header {
    margin-bottom: 15px;
}

.stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    font-size: clamp(12px, 2.5vw, 18px);
    font-weight: bold;
}

.stat {
    text-shadow: 0 0 10px currentColor;
}

#gameCanvas {
    background: radial-gradient(ellipse at center, #0f1a2a 0%, #050510 100%);
    border: 2px solid #00ff88;
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.3), inset 0 0 60px rgba(0, 0, 0, 0.5);
    display: block;
    margin: 0 auto;
    max-width: 100%;
}

.instructions {
    margin-top: 15px;
    color: #4a9f7f;
    font-size: clamp(10px, 2vw, 14px);
    opacity: 0.8;
}

.overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(5, 5, 16, 0.98);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100;
    padding: 20px;
}

.overlay h2 {
    font-size: clamp(28px, 6vw, 48px);
    color: #00ff88;
    margin-bottom: 25px;
    text-shadow: 0 0 30px rgba(0, 255, 136, 0.8);
    letter-spacing: 4px;
    line-height: 1.2;
}

.overlay p {
    font-size: clamp(14px, 3vw, 18px);
    margin: 10px 0;
    color: #88ccaa;
}

.overlay button {
    margin-top: 25px;
    padding: 15px 50px;
    font-size: clamp(16px, 3vw, 20px);
    font-weight: bold;
    font-family: ui-monospace, monospace;
    color: #0a0a1a;
    background: linear-gradient(180deg, #00ff88 0%, #00cc6a 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 0 25px rgba(0, 255, 136, 0.5);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.overlay button:hover {
    background: linear-gradient(180deg, #33ffaa 0%, #00ff88 100%);
    transform: translateY(-3px);
    box-shadow: 0 5px 35px rgba(0, 255, 136, 0.7);
}

.hidden { display: none !important; }

/* Stars background effect */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(2px 2px at 20px 30px, white, transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.8), transparent),
        radial-gradient(1px 1px at 90px 40px, white, transparent),
        radial-gradient(2px 2px at 160px 120px, rgba(255,255,255,0.9), transparent),
        radial-gradient(1px 1px at 230px 80px, white, transparent),
        radial-gradient(2px 2px at 300px 150px, rgba(255,255,255,0.7), transparent);
    background-repeat: repeat;
    background-size: 350px 200px;
    animation: twinkle 5s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

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