*, *::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; 
}

#particles { 
    position: fixed; 
    inset: 0; 
    z-index: 0; 
    pointer-events: none; 
}

.bg-glow { 
    position: fixed; 
    inset: 0; 
    background: radial-gradient(ellipse 80% 60% at 50% 40%, #1e3a8a44 0%, transparent 70%); 
    z-index: 0; 
    pointer-events: 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: 40px 24px; 
    max-width: 560px; 
    width: 100%; 
}

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

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

.stats-row { 
    display: flex; 
    gap: 24px; 
    margin-bottom: 24px; 
}

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

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

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

.phase-badge {
    display: inline-flex; 
    align-items: center; 
    gap: 8px;
    padding: 7px 18px; 
    border-radius: 99px;
    font-size: 0.8rem; 
    font-weight: 700; 
    text-transform: uppercase; 
    letter-spacing: 1.5px;
    margin-bottom: 20px; 
    transition: all 0.3s;
    background: rgba(96, 165, 250, 0.15); 
    color: #60a5fa; 
    border: 1px solid rgba(96, 165, 250, 0.3);
}

.phase-badge.recall { 
    background: rgba(251, 191, 36, 0.15); 
    color: #fbbf24; 
    border-color: rgba(251, 191, 36, 0.3); 
}

.phase-badge.result-good { 
    background: rgba(16, 185, 129, 0.15); 
    color: #10b981; 
    border-color: rgba(16, 185, 129, 0.3); 
}

.phase-badge.result-bad { 
    background: rgba(239, 68, 68, 0.15); 
    color: #f87171; 
    border-color: rgba(239, 68, 68, 0.3); 
}

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

.tile {
    width: 60px; 
    height: 60px; 
    border-radius: 12px;
    background: rgba(30, 58, 138, 0.25);
    border: 1.5px solid rgba(51, 65, 85, 0.6);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, transform 0.1s;
}

.tile.lit { 
    background: #60a5fa; 
    border-color: #3b82f6; 
    box-shadow: 0 0 18px rgba(96, 165, 250, 0.4); 
}

.tile.correct { 
    background: #10b981; 
    border-color: #059669; 
}

.tile.wrong { 
    background: #ef4444; 
    border-color: #dc2626; 
    animation: tileShake 0.3s ease; 
}

.tile.missed { 
    background: rgba(251, 191, 36, 0.4); 
    border-color: #fbbf24; 
}

.tile:hover:not(.lit):not(.correct):not(.wrong) { 
    background: rgba(37, 99, 235, 0.3); 
    border-color: rgba(96, 165, 250, 0.4); 
    transform: scale(1.05); 
}

@keyframes tileShake { 
    0%, 100% { transform: translateX(0); } 
    25% { transform: translateX(-4px); } 
    75% { transform: translateX(4px); } 
}

.status { 
    font-size: 0.95rem; 
    color: #64748b; 
    min-height: 24px; 
    margin-bottom: 20px; 
    transition: color 0.3s; 
}

.status.good { 
    color: #10b981; 
}

.status.bad { 
    color: #f87171; 
}

.next-btn {
    padding: 12px 32px; 
    background: rgba(37, 99, 235, 0.25); 
    border: 1.5px solid rgba(96, 165, 250, 0.4);
    border-radius: 999px; 
    color: #fff; 
    font-family: 'Syne', sans-serif; 
    font-size: 1rem; 
    font-weight: 700;
    cursor: pointer; 
    transition: background 0.2s; 
    display: none;
}

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

.next-btn.show { 
    display: inline-block; 
}

.gameover { 
    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; 
    opacity: 0; 
    pointer-events: none; 
    transition: opacity 0.4s; 
    backdrop-filter: blur(8px); 
}

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

.go-emoji { 
    font-size: 4rem; 
    margin-bottom: 12px; 
}

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

.go-sub { 
    color: #64748b; 
    font-size: 1rem; 
    margin-bottom: 28px; 
}

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

.go-btn { 
    padding: 13px 36px; 
    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; 
    transition: background 0.2s;
}

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