/* --- RESET Y CONFIGURACIÓN GLOBAL --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    /* Fondo oscuro con degradado sutil para dar profundidad */
    background: radial-gradient(circle at 10% 30%, #1a0b1f, #0a0510);
    font-family: 'Inter', sans-serif;
    color: #e0dceb;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 1rem;
}

/* Contenedor principal: ancho máximo y centrado */
.container {
    max-width: 1100px;
    width: 100%;
    background: rgba(20, 10, 30, 0.75); /* Fondo semi-transparente para efecto "cristal" */
    backdrop-filter: blur(4px);
    border-radius: 2.5rem;
    padding: 2.5rem 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(150, 0, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* --- ENCABEZADO CON ESTILO NEÓN --- */
.header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.titulo-principal {
    font-family: 'Orbitron', sans-serif; /* Fuente futurista */
    font-size: 4rem;
    font-weight: 900;
    letter-spacing: 6px;
    text-transform: uppercase;
    /* Efecto neón rosa/malva */
    color: #f0e6ff;
    text-shadow: 0 0 10px #c084fc, 0 0 20px #a855f7, 0 0 40px #7e22ce, 0 0 80px #581c87;
    margin-bottom: 0.5rem;
}

.subtitulo {
    font-size: 1.2rem;
    font-weight: 300;
    color: #b8b0d1;
    letter-spacing: 2px;
    font-style: italic;
}

.linea-neon {
    width: 120px;
    height: 4px;
    margin: 1.2rem auto 0;
    background: linear-gradient(90deg, transparent, #a78bfa, #f472b6, transparent);
    border-radius: 10px;
    box-shadow: 0 0 20px #a78bfa;
}

/* --- TARJETA DE SINOPSIS --- */
.sinopsis {
    margin-bottom: 3rem;
}

.tarjeta-sinopsis {
    background: rgba(30, 15, 45, 0.7);
    padding: 2rem 2.5rem;
    border-radius: 2rem;
    border-left: 6px solid #c084fc;
    box-shadow: inset 0 0 30px rgba(100, 0, 200, 0.15), 0 8px 20px rgba(0,0,0,0.6);
}

.tarjeta-sinopsis h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: #d8b4fe;
    margin-bottom: 1rem;
    letter-spacing: 2px;
}

.tarjeta-sinopsis p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #cfc8e3;
    margin-bottom: 1.5rem;
}

.destacado {
    color: #f472b6;
    font-weight: 600;
    text-shadow: 0 0 8px #ec4899;
}

.dr-voss {
    color: #4ecdc4;
    font-weight: 600;
    text-shadow: 0 0 8px #14b8a6;
}

/* Badges (etiquetas) */
.badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 0.5rem;
}

.badge {
    background: rgba(167, 139, 250, 0.15);
    border: 1px solid #7c3aed;
    padding: 0.5rem 1.2rem;
    border-radius: 40px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #d8b4fe;
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
}

.badge:hover {
    background: #7c3aed;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 0 20px #7c3aed;
}

/* --- SECCIÓN DEL JUEGO DE MEMORIA --- */
.juego-memoria {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 2rem;
    padding: 2rem 2rem 1.8rem;
    margin-bottom: 2.5rem;
    border: 1px solid rgba(167, 139, 250, 0.2);
    box-shadow: 0 0 30px rgba(100, 0, 200, 0.1);
}

.juego-memoria h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 0.3rem;
}

.neon-text {
    color: #f472b6;
    text-shadow: 0 0 10px #ec4899, 0 0 20px #db2777;
}

.instrucciones-juego {
    text-align: center;
    color: #a9a1c7;
    margin-bottom: 1.8rem;
    font-size: 0.95rem;
}

/* Grid de botones del juego (4 casillas) */
.grid-botones {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.2rem;
    max-width: 450px;
    margin: 0 auto 1.8rem;
}

.casilla {
    aspect-ratio: 1/1; /* Mantiene forma cuadrada */
    border-radius: 20px;
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: all 0.15s ease;
    box-shadow: 0 8px 0 rgba(0, 0, 0, 0.4);
}

/* Efectos para las casillas */
.casilla:hover {
    transform: scale(1.03);
    border-color: rgba(255, 255, 255, 0.4);
}

/* Efecto "iluminado" cuando se presiona o se muestra la secuencia */
.casilla.iluminado {
    filter: brightness(1.6);
    transform: scale(0.96);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.6);
    border-color: white;
}

/* Clase para cuando el jugador falla (efecto de error) */
.casilla.error {
    animation: parpadeoRojo 0.3s ease 2;
}

@keyframes parpadeoRojo {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(0.2) drop-shadow(0 0 20px red); background-color: red; }
}

/* Controles del juego */
.controles-juego {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin: 0.5rem 0 0.8rem;
}

.btn-neon {
    font-family: 'Orbitron', sans-serif;
    background: transparent;
    border: 2px solid #a78bfa;
    color: #d8b4fe;
    padding: 0.8rem 2.2rem;
    border-radius: 60px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-shadow: 0 0 8px #7c3aed;
    box-shadow: 0 0 15px rgba(124, 58, 237, 0.2);
    letter-spacing: 1px;
}

.btn-neon:hover {
    background: #7c3aed;
    color: #fff;
    box-shadow: 0 0 30px #7c3aed, 0 0 60px #5b21b6;
    transform: scale(1.05);
    border-color: #7c3aed;
}

.btn-neon:active {
    transform: scale(0.95);
}

.puntuacion {
    display: flex;
    gap: 0.8rem;
    background: rgba(0, 0, 0, 0.4);
    padding: 0.5rem 1.2rem;
    border-radius: 40px;
    font-size: 1rem;
    color: #b8b0d1;
    border: 1px solid #3b2e4d;
}

.puntuacion strong {
    color: #f0e6ff;
}

#estadoJuego {
    font-weight: 600;
    color: #f472b6;
}

.aviso-juego {
    text-align: center;
    font-size: 0.8rem;
    color: #6b5e83;
    margin-top: 0.5rem;
    font-style: italic;
}

/* --- PIE DE PÁGINA --- */
.footer {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(167, 139, 250, 0.15);
    color: #6b5e83;
    font-size: 0.9rem;
}

.footer-leyenda {
    font-style: italic;
    color: #4a3d5e;
    margin-top: 0.3rem;
    font-size: 0.8rem;
}

/* --- RESPONSIVE (Móviles) --- */
@media (max-width: 700px) {
    .container {
        padding: 1.5rem 1rem;
    }
    .titulo-principal {
        font-size: 2.5rem;
        letter-spacing: 3px;
    }
    .grid-botones {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.8rem;
        max-width: 300px;
    }
    .controles-juego {
        flex-direction: column;
        gap: 1rem;
    }
    .tarjeta-sinopsis {
        padding: 1.5rem;
    }
    .badges {
        justify-content: center;
    }
}