/* --- ESTILO "RED DYNAMIC PRO" - PROFESOR LUIS VÁZQUEZ --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;800&display=swap');

:root {
    --primary-red: #d90429;     /* Rojo Intenso */
    --hover-red: #ef233c;       /* Rojo Brillante */
    --dark-bg: #8d0801;         /* Fondo Oscuro */
    --text-color: #2b2d42;
    --glass-white: rgba(255, 255, 255, 0.95);
    --shadow-strong: 0 20px 60px rgba(0, 0, 0, 0.3);
    --success: #2a9d8f;
    --error: #e63946;
}

body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    background-color: var(--dark-bg);
}

/* --- FONDO ANIMADO --- */
.area {
    background: linear-gradient(to left, #8d0801, #d90429);
    width: 100%;
    height: 100vh;
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
}

.circles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    margin: 0; padding: 0;
}

.circles li {
    position: absolute;
    display: flex; justify-content: center; align-items: center;
    list-style: none;
    width: 20px; height: 20px;
    background: rgba(255, 255, 255, 0.15); /* Fondo un poco más visible */
    color: rgba(255, 255, 255, 0.6);        /* ÍCONOS MUY VISIBLES (Opacidad 0.6) */
    font-size: 20px;
    border-radius: 15%;
    animation: animate 25s linear infinite;
    bottom: -200px; /* Empiezan más abajo para dar tiempo a subir */
}

/* --- CONFIGURACIÓN DE PARTÍCULAS (30 ELEMENTOS) --- */
/* Incluye TAMAÑOS GIGANTES para máxima visibilidad */

/* Grupo 1: Normales y Grandes */
.circles li:nth-child(1) { left: 25%; width: 80px; height: 80px; font-size: 40px; animation-delay: 0s; }
.circles li:nth-child(2) { left: 10%; width: 20px; height: 20px; font-size: 10px; animation-delay: 2s; animation-duration: 12s; }
.circles li:nth-child(3) { left: 70%; width: 20px; height: 20px; font-size: 10px; animation-delay: 4s; }
.circles li:nth-child(4) { left: 40%; width: 60px; height: 60px; font-size: 30px; animation-delay: 0s; animation-duration: 18s; }
.circles li:nth-child(5) { left: 65%; width: 20px; height: 20px; font-size: 10px; animation-delay: 0s; }

/* Grupo 2: Grandes */
.circles li:nth-child(6) { left: 75%; width: 110px; height: 110px; font-size: 50px; animation-delay: 3s; }
.circles li:nth-child(7) { left: 35%; width: 150px; height: 150px; font-size: 70px; animation-delay: 7s; }
.circles li:nth-child(8) { left: 50%; width: 25px; height: 25px; font-size: 12px; animation-delay: 15s; animation-duration: 45s; }
.circles li:nth-child(9) { left: 20%; width: 15px; height: 15px; font-size: 10px; animation-delay: 2s; animation-duration: 35s; }
.circles li:nth-child(10) { left: 85%; width: 150px; height: 150px; font-size: 60px; animation-delay: 0s; animation-duration: 11s; }

/* Grupo 3: Variados */
.circles li:nth-child(11) { left: 5%; width: 90px; height: 90px; font-size: 45px; animation-delay: 10s; animation-duration: 20s; }
.circles li:nth-child(12) { left: 15%; width: 10px; height: 10px; font-size: 8px; animation-delay: 5s; animation-duration: 25s; }
.circles li:nth-child(13) { left: 30%; width: 50px; height: 50px; font-size: 25px; animation-delay: 1s; animation-duration: 15s; }
.circles li:nth-child(14) { left: 45%; width: 120px; height: 120px; font-size: 55px; animation-delay: 8s; animation-duration: 30s; }
.circles li:nth-child(15) { left: 55%; width: 15px; height: 15px; font-size: 10px; animation-delay: 12s; animation-duration: 40s; }

/* Grupo 4: LOS GIGANTES (16-30) */
.circles li:nth-child(16) { left: 60%; width: 200px; height: 200px; font-size: 90px; animation-delay: 6s; animation-duration: 25s; }
.circles li:nth-child(17) { left: 80%; width: 180px; height: 180px; font-size: 80px; animation-delay: 3s; animation-duration: 19s; }
.circles li:nth-child(18) { left: 90%; width: 40px; height: 40px; font-size: 20px; animation-delay: 9s; animation-duration: 28s; }
.circles li:nth-child(19) { left: 95%; width: 70px; height: 70px; font-size: 35px; animation-delay: 2s; animation-duration: 14s; }
.circles li:nth-child(20) { left: 2%; width: 220px; height: 220px; font-size: 100px; animation-delay: 14s; animation-duration: 35s; }

/* Grupo 5: LOS SUPER GIGANTES (Para que se noten de verdad) */
.circles li:nth-child(21) { left: 10%; width: 300px; height: 300px; font-size: 140px; animation-delay: 5s; animation-duration: 40s; opacity: 0.4; }
.circles li:nth-child(22) { left: 50%; width: 250px; height: 250px; font-size: 110px; animation-delay: 12s; animation-duration: 38s; opacity: 0.4; }
.circles li:nth-child(23) { left: 85%; width: 350px; height: 350px; font-size: 160px; animation-delay: 0s; animation-duration: 45s; opacity: 0.3; }
.circles li:nth-child(24) { left: 30%; width: 60px; height: 60px; font-size: 30px; animation-delay: 18s; animation-duration: 20s; }
.circles li:nth-child(25) { left: 60%; width: 40px; height: 40px; font-size: 20px; animation-delay: 22s; animation-duration: 22s; }
.circles li:nth-child(26) { left: 0%; width: 160px; height: 160px; font-size: 70px; animation-delay: 8s; animation-duration: 30s; }
.circles li:nth-child(27) { left: 90%; width: 190px; height: 190px; font-size: 85px; animation-delay: 4s; animation-duration: 32s; }
.circles li:nth-child(28) { left: 40%; width: 280px; height: 280px; font-size: 130px; animation-delay: 16s; animation-duration: 42s; opacity: 0.4; }
.circles li:nth-child(29) { left: 20%; width: 50px; height: 50px; font-size: 25px; animation-delay: 10s; animation-duration: 18s; }
.circles li:nth-child(30) { left: 70%; width: 80px; height: 80px; font-size: 40px; animation-delay: 6s; animation-duration: 24s; }

@keyframes animate {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; border-radius: 10%; }
    100% { transform: translateY(-1200px) rotate(720deg); opacity: 0; border-radius: 50%; }
}

/* --- TARJETA PRINCIPAL (Glass Effect) --- */
.container {
    background: var(--glass-white);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    padding: 40px;
    width: 90%;
    max-width: 650px;
    text-align: center;
    position: relative;
    box-shadow: var(--shadow-strong);
    border: 1px solid rgba(255,255,255,0.5);
    transition: transform 0.3s;
    z-index: 10; /* Asegura que el contenido esté sobre los íconos */
}

/* Logo y Títulos */
.logo { width: 100%; max-width: 260px; filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1)); }
.logo-medium { width: 140px; margin-bottom: 10px; }

h1 {
    color: var(--primary-red);
    font-weight: 800;
    font-size: 2rem;
    margin: 10px 0 5px 0;
    text-transform: uppercase;
    letter-spacing: -1px;
}

.badge-profesor {
    background: #ffebeb;
    color: var(--primary-red);
    display: inline-block;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.subtitle { color: #666; font-size: 1rem; margin-bottom: 30px; }

/* --- BOTONES DINÁMICOS --- */
.btn-group { display: flex; flex-direction: column; gap: 15px; margin-bottom: 25px; }

.carrera-btn {
    border: none;
    padding: 18px;
    border-radius: 15px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    text-transform: uppercase;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    text-decoration: none;
}

/* Botón Primario Rojo */
.primary-btn {
    background: linear-gradient(135deg, var(--primary-red), var(--hover-red));
    color: white;
    box-shadow: 0 10px 20px rgba(217, 4, 41, 0.4);
}
.primary-btn:hover { transform: translateY(-4px) scale(1.02); box-shadow: 0 15px 30px rgba(217, 4, 41, 0.6); }

/* Botón Secundario Blanco */
.secondary-btn {
    background: white; color: var(--text-color);
    border: 2px solid #f0f0f0;
}
.secondary-btn:hover { border-color: var(--primary-red); color: var(--primary-red); background: #fff5f5; }

/* --- QUIZ & IMÁGENES --- */
.quiz-top-bar {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 20px; padding-bottom: 15px; border-bottom: 2px solid #f5f5f5;
}

#timer-container {
    background: var(--primary-red); 
    color: #fff;
    padding: 6px 15px; border-radius: 20px;
    font-weight: 700; display: flex; align-items: center; gap: 8px;
    box-shadow: 0 4px 10px rgba(217, 4, 41, 0.3);
}

/* IMAGENES MÁS GRANDES (50% AUMENTO) */
.pregunta-img {
    width: 100%;
    max-width: 420px;
    max-height: 330px;
    object-fit: contain;   
    display: block;
    margin: 20px auto;     
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s;
}
.pregunta-img:hover { transform: scale(1.05); }

#pregunta { font-size: 1.25rem; font-weight: 600; color: var(--text-color); margin: 20px 0; }

/* Barra de Progreso Rayada */
#progress-container {
    width: 100%; height: 12px;
    background: #e9ecef; border-radius: 10px;
    margin-bottom: 20px; overflow: hidden;
}
#progress-bar {
    height: 100%; width: 0%;
    background: repeating-linear-gradient(
        45deg,
        var(--primary-red),
        var(--primary-red) 10px,
        #ff4d6d 10px,
        #ff4d6d 20px
    );
    background-size: 200% 200%;
    animation: moveStripes 2s linear infinite;
    border-radius: 10px;
    transition: width 0.5s ease;
}

@keyframes moveStripes { 0% { background-position: 0 0; } 100% { background-position: 50px 50px; } }

/* Opciones */
.opciones-grid { display: grid; gap: 12px; }

.opcion-btn {
    background: white; border: 2px solid #f1f3f5;
    padding: 16px 20px; border-radius: 14px;
    font-size: 1rem; color: #495057; text-align: left;
    cursor: pointer; transition: all 0.2s;
    font-family: 'Poppins', sans-serif;
    position: relative;
}

.opcion-btn:hover:not([disabled]) {
    border-color: var(--primary-red);
    background: #fff0f3;
    transform: translateX(5px);
}

.opcion-btn.correcto { background: #d1e7dd; border-color: var(--success); color: #0f5132; font-weight: 700; }
.opcion-btn.incorrecto { background: #f8d7da; border-color: var(--error); color: #842029; font-weight: 700; animation: shake 0.5s; }

@keyframes shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
    100% { transform: translateX(0); }
}

/* Resultados */
.score-card {
    background: #fff; padding: 25px;
    border-radius: 16px; margin: 20px 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border-top: 5px solid var(--primary-red);
}
.score-icon { font-size: 3rem; color: #ffca3a; margin-bottom: 10px; }
.resultado-img { width: 100%; border-radius: 12px; margin-bottom: 15px; }
.resultado-frase { font-style: italic; color: #6c757d; }

/* Link y Utilidades */
.link-text { color: var(--primary-red); text-decoration: none; font-weight: 600; margin-top: 15px; display: inline-flex; align-items: center; gap: 8px; }

.action-btn {
    margin-top: 25px; 
    background: var(--primary-red); /* Fondo rojo */
    color: white;
    border: none; padding: 15px 35px; border-radius: 50px;
    font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; gap: 10px;
    transition: 0.3s;
    box-shadow: 0 5px 15px rgba(217, 4, 41, 0.3);
}
.action-btn:hover { 
    background: var(--hover-red); /* Rojo más brillante */
    transform: translateY(-3px); 
}

.volver-btn { background: transparent; border: 1px solid #ddd; padding: 10px 20px; border-radius: 50px; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; margin-top: 10px;}

.oculto { display: none !important; }
.fade-in { animation: fadeIn 0.8s ease-out forwards; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.animate-pop { animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
@keyframes popIn { 0% { transform: scale(0.5); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.pulse-effect { animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(217, 4, 41, 0.7); } 70% { box-shadow: 0 0 0 15px rgba(217, 4, 41, 0); } 100% { box-shadow: 0 0 0 0 rgba(217, 4, 41, 0); } }

/* Móvil */
@media (max-width: 600px) {
    .container { padding: 25px; width: 85%; }
    h1 { font-size: 1.8rem; }
    .quiz-top-bar { flex-direction: column; gap: 10px; }
    .circles li { opacity: 0.2; }
}