body {
    background-color: #f8fafc;
    overflow: hidden;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Señal Subliminal: Un poco más intensa como pidió el usuario */
.subliminal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: var(--color-primary);
    opacity: 0;
    pointer-events: none;
    z-index: -1;
    transition: opacity 0.08s ease-out;
}

.subliminal-overlay.pulse {
    opacity: 0.07; /* Aumentado de 0.03 a 0.07 */
}

.game-container {
    width: 95%;
    max-width: 950px;
    height: 550px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 10;
}

.game-header {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f1f5f9;
}

.stats {
    display: flex;
    gap: 2rem;
    font-weight: 800;
    color: var(--color-primary);
}

.game-view {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1rem 2rem;
    position: relative;
}

/* Vista Previa del Patrón */
.pattern-display {
    background-color: #f8fafc;
    padding: 0.75rem 2rem;
    border-radius: var(--radius-md);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    border: 2px dashed #cbd5e1;
}

.pattern-label {
    font-weight: 800;
    color: var(--color-text-light);
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.pattern-notes {
    font-size: 2.5rem;
    letter-spacing: 10px;
    color: var(--color-primary);
    font-family: serif;
    line-height: 1;
}

/* Pista de Ritmo (Derecha a Izquierda) */
.rhythm-track {
    width: 100%;
    height: 120px;
    background-color: #f1f5f9;
    border-radius: var(--radius-md);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    border: 4px solid #e2e8f0;
}

/* Zona de Impacto */
.target-zone {
    position: absolute;
    left: 80px; 
    width: 80px;
    height: 100%;
    border-left: 4px dashed var(--color-primary);
    border-right: 4px dashed var(--color-primary);
    background: rgba(124, 58, 237, 0.05);
    z-index: 5;
    transition: background 0.1s;
}

.target-zone.active {
    background: rgba(124, 58, 237, 0.2);
}

.notes-container {
    position: absolute;
    width: 100%;
    height: 100%;
}

/* Notas */
.note {
    position: absolute;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-weight: 800;
    font-size: 1.2rem;
    box-shadow: var(--shadow-sm);
    z-index: 10;
    transition: opacity 0.2s;
}

.note.red { background-color: #ef4444; border: 3px solid #dc2626; }
.note.blue { background-color: #3b82f6; border: 3px solid #2563eb; }
.note.yellow { background-color: #eab308; border: 3px solid #ca8a04; }

/* Efecto de Explosión al Hit */
.note.hit-explosion {
    animation: explode 0.4s ease-out forwards;
    pointer-events: none;
}

@keyframes explode {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(2.5); opacity: 0; filter: blur(4px); }
}

/* Overlay de Cuenta Atrás */
.countdown-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    border-radius: var(--radius-lg);
    pointer-events: none;
}

#countdown-number {
    font-size: 8rem;
    font-weight: 800;
    color: white;
    text-shadow: 0 4px 10px rgba(0,0,0,0.3);
    animation: countdown-ping 1s infinite ease-out;
}

@keyframes countdown-ping {
    0% { transform: scale(0.5); opacity: 0; }
    20% { transform: scale(1.1); opacity: 1; }
    80% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.5); opacity: 0; }
}

/* Feedback */
.feedback-text {
    margin-top: 1.5rem;
    font-size: 1.5rem;
    font-weight: 800;
    height: 2rem;
}

.controls-info {
    margin-top: 1.5rem;
    display: flex;
    gap: 2rem;
}

.key-guide {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.key {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    color: white;
}

.key.red { background-color: #ef4444; }
.key.blue { background-color: #3b82f6; }
.key.yellow { background-color: #eab308; }

.game-controls {
    padding: 1rem;
    text-align: center;
}

.hidden { display: none !important; }
