:root {
    --bg: #111827; 
    --text: #ffffff;
    --geo: #3b82f6; --ent: #ec4899; --hist: #eab308;
    --art: #a855f7; --sci: #22c55e; --sport: #f97316;
}

body {
    background-color: var(--bg); 
    color: var(--text); 
    font-family: system-ui, -apple-system, sans-serif;
    margin: 0; 
    min-height: 100vh;
    min-height: 100dvh; 
    display: flex; 
    justify-content: center; 
    align-items: flex-start; 
}

/* --- ESTRUCTURA DE PANTALLAS --- */
.screen { 
    display: none; 
    width: 100%; 
    min-height: 100dvh; 
    flex-direction: column; 
    align-items: center; 
    justify-content: flex-start; 
    padding: 20px 20px 60px 20px; 
    box-sizing: border-box; 
    text-align: center; 
}
.screen.active { 
    display: flex; 
    animation: fade 0.3s; 
}

/* --- HEADER Y LOGO --- */
.setup-header {
    display: flex; flex-direction: column; align-items: center; 
    margin: 20px 0 15px 0; width: 100%;
}

.game-logo {
    width: 100%; max-width: 120px; /* Logo un poco más grande */
    height: auto;
    margin-bottom: 15px; border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.game-title { 
    font-size: clamp(3rem, 10vw, 5rem); /* TÍTULO MÁS GRANDE */
    background: linear-gradient(45deg, #facc15, #f59e0b); 
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; 
    margin: 0; line-height: 1.1; white-space: nowrap; width: 100%;
    text-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

/* --- INSTRUCCIONES --- */
.game-instructions {
    background-color: rgba(31, 41, 55, 0.9); border: 2px solid #3b82f6;
    border-radius: 15px; padding: 20px; margin: 20px 0;
    max-width: 650px; width: 100%; text-align: left;
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
}
.game-instructions h3 { 
    color: #60a5fa; margin: 0 0 12px 0; 
    border-bottom: 1px solid rgba(255,255,255,0.2); 
    padding-bottom: 8px; font-size: 1.4rem; text-align: center; 
}
.game-instructions ul { 
    list-style: none; padding: 0; margin: 0; 
    font-size: 1.1rem; /* TEXTO DE REGLAS MÁS GRANDE */
    line-height: 1.6; color: #e5e7eb; 
}
.game-instructions li { margin-bottom: 8px; }
.game-instructions strong { color: #facc15; }

/* --- CONTROLES --- */
.number-control { 
    display: flex; align-items: center; justify-content: center; 
    gap: 25px; margin: 15px 0; font-size: 3.5rem; font-weight: bold; 
}
.number-control button { 
    width: 60px; height: 60px; font-size: 2rem; 
    border-radius: 50%; background: #374151; color: white; border: none; cursor: pointer; 
}

.names-grid { 
    display: grid; grid-template-columns: 1fr 1fr; gap: 15px; 
    width: 100%; max-width: 650px; margin: 15px 0 25px 0; 
}
.name-input { 
    background: #374151; border: 2px solid #4b5563; 
    color: white; padding: 15px; font-size: 1.3rem; /* INPUT MÁS GRANDE */
    border-radius: 10px; text-align: center; width: 100%; box-sizing: border-box; 
}
.name-input:focus { border-color: #60a5fa; outline: none; }

/* --- SELECCIÓN Y DASHBOARD --- */
.selection-grid { 
    display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; 
    width: 100%; max-width: 900px; margin-top: 15px; 
}
.cat-card { 
    padding: 20px; border-radius: 15px; color: white; 
    font-size: 1.4rem; /* CATEGORÍAS MÁS GRANDES */
    font-weight: 800; border: none; cursor: pointer; 
    text-transform: uppercase; transition: transform 0.2s; 
    box-shadow: 0 6px 12px rgba(0,0,0,0.3); display: flex; 
    flex-direction: column; align-items: center; justify-content: center; 
    min-height: 140px; word-wrap: break-word; line-height: 1.2; 
}
.cat-card:active { transform: scale(0.95); }

.dashboard { 
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; 
    background: #1f2937; padding: 15px; border-radius: 15px; 
    margin-bottom: 15px; width: 100%; max-width: 800px; 
}
.progress-item { 
    background: #374151; padding: 10px; border-radius: 10px; 
    display: flex; flex-direction: column; align-items: center; 
    font-size: 0.9rem; text-align: center; font-weight: bold;
}
.dots-container { display: flex; gap: 6px; margin-top: 8px; }
.dot { 
    width: 12px; height: 12px; border-radius: 50%; 
    background: #4b5563; border: 1px solid rgba(255,255,255,0.2); 
}
.dot.filled { box-shadow: 0 0 8px white; border: 1px solid white; }

/* --- BOTONES Y PREGUNTA --- */
.question-container { 
    background: white; color: #111827; padding: 30px; 
    border-radius: 20px; width: 100%; max-width: 850px; margin: 25px 0; 
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}
#question-text { 
    font-size: 2.2rem; /* PREGUNTA MUCHO MÁS GRANDE */
    line-height: 1.3; font-weight: 600;
}
.category-banner { 
    font-size: 2.5rem; font-weight: 900; text-transform: uppercase; 
    padding: 20px; width: 100%; border-radius: 15px; 
    letter-spacing: 2px;
}
.hidden { display: none !important; }
#answer-reveal { 
    margin-top: 25px; width: 100%; background: #374151; 
    padding: 25px; border-radius: 15px; 
}
.correct-answer-text { color: #4ade80; font-size: 2.5rem; margin: 15px 0; }

.btn-primary { 
    background: white; color: #111827; 
    font-size: 1.6rem; /* BOTÓN MÁS GRANDE */
    font-weight: 900; padding: 18px 40px; border-radius: 50px; 
    border: none; margin-top: 15px; cursor: pointer; 
    box-shadow: 0 6px 15px rgba(0,0,0,0.5); width: 100%; max-width: 350px;
}
.validation-buttons { display: flex; gap: 20px; justify-content: center; margin-top: 25px; }
.btn-yes, .btn-no { 
    padding: 20px 15px; font-size: 1.4rem; font-weight: bold;
    border-radius: 15px; border: none; flex: 1; cursor: pointer; color: white; 
    transition: transform 0.2s;
}
.btn-yes:active, .btn-no:active { transform: scale(0.95); }
.btn-yes { background: #22c55e; box-shadow: 0 4px 0 #15803d; } 
.btn-no { background: #ef4444; box-shadow: 0 4px 0 #b91c1c; }

/* --- ESTILOS DE REBOTE --- */
.rebound-container {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 15px;
    width: 100%; max-width: 800px; margin-bottom: 25px;
}
.btn-rebound {
    background-color: #f97316; 
    color: white; border: none; border-radius: 12px;
    padding: 12px 20px; font-weight: bold; font-size: 1.1rem;
    cursor: pointer; box-shadow: 0 4px 10px rgba(0,0,0,0.4);
    animation: bounceIn 0.5s;
}
.btn-rebound:active { transform: scale(0.95); }
.rebound-alert {
    background: #f59e0b; color: #111827;
    padding: 15px; border-radius: 10px; width: 100%; max-width: 800px;
    font-weight: bold; font-size: 1.3rem;
    animation: pulse 1s infinite; margin-bottom: 15px;
}

/* --- COLORES (Sin Cambios) --- */
.bg-geo { background-color: var(--geo); } .dot.filled.geo { background-color: var(--geo); }
.bg-ent { background-color: var(--ent); } .dot.filled.ent { background-color: var(--ent); }
.bg-hist { background-color: var(--hist); } .dot.filled.hist { background-color: var(--hist); }
.bg-art { background-color: var(--art); } .dot.filled.art { background-color: var(--art); }
.bg-sci { background-color: var(--sci); } .dot.filled.sci { background-color: var(--sci); }
.bg-sport { background-color: var(--sport); } .dot.filled.sport { background-color: var(--sport); }

/* --- FOOTER Y BOTÓN PWA --- */
.copyright-footer {
    margin-top: auto; 
    padding: 25px 10px;
    font-size: 0.9rem;
    color: #9ca3af;
    text-align: center;
    width: 100%;
}

#btn-install-pwa {
    display: none; 
    background: linear-gradient(90deg, #3b82f6, #2563eb);
    color: white;
    padding: 15px 25px;
    border-radius: 12px;
    border: none;
    font-weight: bold;
    margin-top: 20px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.5);
    font-size: 1.1rem;
    animation: pulse 2s infinite;
}

@keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.05); } 100% { transform: scale(1); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes bounceIn { from { transform: scale(0.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* --- RESPONSIVE --- */
@media (max-width: 600px) { 
    .names-grid { grid-template-columns: 1fr; } 
    .selection-grid { grid-template-columns: 1fr; }
    .dashboard { grid-template-columns: repeat(2, 1fr); }
    .game-logo { max-width: 90px; }
    h1 { font-size: 2.5rem; }
    #question-text { font-size: 1.6rem; }
    .screen { justify-content: flex-start; padding-top: 20px; }
    .cat-card { min-height: 100px; font-size: 1.3rem; }
}