/* ========================================
   Trivia Mobile First - App Style (Mejorado)
   ======================================== */

:root {
    --bg-page: #f8fafc;
    --card-bg: #ffffff;
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --secondary: #10b981;
    --danger: #ef4444;
    --danger-dark: #dc2626;
    --warning: #f59e0b;
    --text-dark: #0f172a;
    --text-gray: #475569;
    --text-light: #94a3b8;
    --border-light: #e2e8f0;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 25px rgba(0, 0, 0, 0.1);
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 12px;
}

@import url('https://fonts.googleapis.com/css2?family=Ranchers&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    /* Fondo moderno tipo app en lugar de negro puro */
    background: black;    
    color: var(--text-dark);
    padding: 20px 12px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Contenedor principal */
.trivia-container {
    max-width: 480px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Tarjetas */
.card {
    background: var(--card-bg);
    
    box-shadow: var(--shadow-md);
    padding: 32px 24px;
}

h1 {
    font-family: "Ranchers", sans-serif;
    letter-spacing: 1px;
}

/* ========== SELECTOR DE MODOS ========== */
.mode-selector {
    text-align: center;
}

.mode-selector h2 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.mode-selector p {
    color: var(--text-gray);
    font-size: 0.95rem;
    margin-bottom: 24px;
}

.mode-buttons {
    display: flex;
    flex-direction: column;
    gap: 16px;
    
}

.mode-btn {
    background: #909b2a;
    background: linear-gradient(150deg,rgba(42, 123, 155, 1) 0%, rgba(87, 199, 133, 1) 50%, rgba(237, 221, 83, 1) 100%);
    border: none;
    padding: 18px;
    border-radius: 999px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mode-btn:hover {
    background-color: var(--bg-page);
    border-color: #cbd5e1;
    transform: rotate(-1.2deg);
}

.mode-btn:active {
    transform: scale(0.97);
}

/* Colores específicos por modo (ahora más limpios) */
.mode-btn[data-mode="facil"]:hover { border-color: var(--secondary); color: var(--secondary); }
.mode-btn[data-mode="normal"]:hover { border-color: var(--primary); color: var(--primary); }
.mode-btn[data-mode="maradona"]:hover { border-color: var(--warning); color: var(--warning); }

.mode-description {
    margin-top: 24px;
    font-size: 0.85rem;
    color: var(--text-gray);
    background: var(--bg-page);
    padding: 14px;
    
    font-weight: 600;
}

/* ========== ÁREA DE JUEGO ========== */
.header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--bg-page);
}

.progress-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-gray);
}

.timer-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.timer {
    font-size: 1.2rem;
    font-weight: 800;
    font-family: monospace;
    background: var(--bg-page);
    color: var(--text-dark);
    padding: 8px 16px;
    
    border: 1px solid var(--border-light);
}

.timer.danger {
    color: var(--danger);
    background: #fee2e2;
    border-color: #fca5a5;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.question-text {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.5;
    margin-bottom: 28px;
    text-align: center;
    color: var(--text-dark);
}

/* Opciones en grid */
.options-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option-btn {
    background: #ffffff;
    border: 2px solid var(--border-light);
    border-radius: 999px;
    padding: 18px 20px;
    font-size: 1.05rem;
    font-weight: 600;
    text-align: left;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    text-align: center;
}

.option-btn:hover {
    background: var(--bg-page);
    border-color: #000000;
}

.option-btn:active {
    background: #e0e7ff;
    border-color: var(--primary);
    color: var(--primary-dark);
    transform: scale(0.98);
}
/* Contenedor de los puntos */
.answer-tracker {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    margin: 1.5rem 0;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50px;
}

/* El punto individual */
.tracker-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    color: transparent;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid transparent;
}

.tracker-dot svg {
    width: 16px;
    height: 16px;
}

/* Estado: Pregunta actual */
.tracker-dot.active {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--color-accent);
    color: var(--color-accent);
    transform: scale(1.2);
    box-shadow: 0 0 15px rgba(238, 224, 201, 0.3);
}

/* Estado: Correcta (O) */
.tracker-dot.correct {
    background: #10b981;
    color: white;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

/* Estado: Incorrecta (X) */
.tracker-dot.wrong {
    background: #ef4444;
    color: white;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
}

/* Estado: Pendiente */
.tracker-dot.pending {
    color: rgba(255, 255, 255, 0.2);
}
/* ========== BOTONES GENERALES ========== */
.btn {
    border: none;
    padding: 16px 20px;
    
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    margin-top: 12px;
    transition: all 0.2s;
    text-align: center;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-primary:active {
    background: var(--primary-dark);
}

.btn-success {
    background: var(--secondary);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-secondary {
    background: var(--bg-page);
    color: var(--text-dark);
    border: 1px solid var(--border-light);
}

.btn-secondary:active {
    background: #e2e8f0;
}

.btn-danger {
    background: var(--danger);
    color: white;
    width: auto;
    padding: 10px 18px;
    font-size: 0.9rem;
    
}

.btn-danger:active {
    background: var(--danger-dark);
}

/* ========== RESULTADOS & FORMULARIO ========== */
.results-area {
    text-align: center;
}

.results-area h2 {
    font-size: 1.8rem;
    margin-bottom: 12px;
    color: var(--text-dark);
    text-align: center;
}

.score-display {
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--primary);
    margin: 16px 0;
    display: block;
    text-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
    text-align: center;
}

.game-over {
    text-align: center;
}

.stats-text {
    color: var(--text-gray);
    font-size: 1rem;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-container {
    margin-top: 32px;
    text-align: left;
    background: var(--bg-page);
    padding: 24px;
    
    border: 1px solid var(--border-light);
}

.form-container h4 {
    margin-bottom: 16px;
    font-size: 1.15rem;
    color: var(--text-dark);
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-light);  
    font-size: 1rem;
    margin-bottom: 12px;
    background: white;
    color: var(--text-dark);
    transition: all 0.2s;
}

.form-input::placeholder {
    color: var(--text-light);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.error-text {
    color: var(--danger);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 12px;
    display: block;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    padding: 16px;
    
    margin: 20px 0;
    font-weight: 700;
    text-align: center;
    border: 1px solid #10b981;
}

/* ========== LEADERBOARD ========== */
.leaderboard-column h3 {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 20px;
    text-align: center;
    color: var(--text-dark);
    padding-bottom: 16px;
    border-bottom: 2px solid var(--bg-page);
}

.leaderboard-list {
    list-style: none;
    counter-reset: rank;
}

.leaderboard-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-light);
    position: relative;
    padding-left: 32px;
}

.leaderboard-item::before {
    counter-increment: rank;
    content: counter(rank);
    position: absolute;
    left: 0;
    font-weight: 800;
    color: var(--text-light);
    font-size: 1.1rem;
}

.leaderboard-item:nth-child(1)::before { content: "🥇"; font-size: 1.3rem; }
.leaderboard-item:nth-child(2)::before { content: "🥈"; font-size: 1.3rem; }
.leaderboard-item:nth-child(3)::before { content: "🥉"; font-size: 1.3rem; }

.leaderboard-item:last-child {
    border-bottom: none;
}

.leaderboard-item strong {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-dark);
}

.points {
    background: var(--primary);
    padding: 6px 12px;
    
    font-weight: 800;
    color: white;
    font-size: 0.85rem;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}