*, *::before, *::after { 
    box-sizing: border-box; 
}

body { 
    background: #020617; 
    color: #fff; 
    font-family: 'Inter', sans-serif; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center; 
    min-height: 100vh; 
    margin: 0; 
    text-align: center; 
    overflow: hidden; 
    user-select: none; 
}

.back-home { 
    position: fixed; 
    top: 20px; 
    left: 24px; 
    font-size: 0.85rem; 
    color: #475569; 
    text-decoration: none; 
    transition: color 0.2s; 
    z-index: 10; 
}

.back-home:hover { 
    color: #fff; 
}

.container { 
    position: relative; 
    z-index: 1; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    padding: 16px 24px; 
    width: 100%; 
}

h1 { 
    font-family: 'Syne', sans-serif; 
    font-size: clamp(1.6rem, 6vw, 2.4rem); 
    font-weight: 900; 
    margin: 0 0 3px; 
    letter-spacing: -1px; 
}

.subtitle { 
    font-size: 0.85rem; 
    color: #64748b; 
    margin-bottom: 10px; 
}

.hud { 
    display: flex; 
    gap: 24px; 
    margin-bottom: 8px; 
}

.hud-stat { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    gap: 2px; 
}

.hud-val { 
    font-family: 'Syne', sans-serif; 
    font-size: 1.4rem; 
    font-weight: 900; 
    color: #f8fafc; 
}

.hud-label { 
    font-size: 0.65rem; 
    color: #475569; 
    text-transform: uppercase; 
    letter-spacing: 1.5px; 
}

canvas#game { 
    display: block; 
    border-radius: 14px; 
    border: 1px solid rgba(51, 65, 85, 0.7); 
    background: rgba(5, 10, 30, 0.95); 
    touch-action: none; 
}

.controls-hint { 
    font-size: 0.75rem; 
    color: #334155; 
    margin-top: 8px; 
}

/* Overlays */
.overlay { 
    position: fixed; 
    inset: 0; 
    background: rgba(2, 6, 23, 0.92); 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center; 
    z-index: 50; 
    backdrop-filter: blur(8px); 
    opacity: 0; 
    pointer-events: none; 
    transition: opacity 0.3s; 
}

.overlay.show { 
    opacity: 1; 
    pointer-events: all; 
}

.ov-emoji { 
    font-size: 3.5rem; 
    margin-bottom: 10px; 
}

.ov-title { 
    font-family: 'Syne', sans-serif; 
    font-size: clamp(1.8rem, 6vw, 2.6rem); 
    font-weight: 900; 
    margin: 0 0 8px; 
}

.ov-sub { 
    color: #64748b; 
    font-size: 0.95rem; 
    margin-bottom: 24px; 
}

.ov-sub span { 
    color: #60a5fa; 
    font-weight: 700; 
}

.ov-btn { 
    padding: 12px 32px; 
    background: rgba(37, 99, 235, 0.3); 
    border: 1.5px solid rgba(96, 165, 250, 0.45); 
    border-radius: 999px; 
    color: #fff; 
    font-family: 'Syne', sans-serif; 
    font-size: 1rem; 
    font-weight: 700; 
    cursor: pointer; 
}

.ov-btn:hover { 
    background: rgba(37, 99, 235, 0.5); 
}
