/* --- bingo.css | THE PUCK GAMES STYLE --- */

.bingo-play-area {
    display: flex;
    flex-direction: column;
    gap: 30px;
    width: 100%;
    max-width: 1000px;
    margin-top: 20px;
    margin-bottom: 40px;
}

@media (min-width: 768px) {
    .bingo-play-area {
        flex-direction: row;
        align-items: flex-start;
    }
}

/* Panel del Jugador (Estático) */
.current-player-panel {
    flex: 0 0 300px;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--card-bg, #131a26);
    border: 1px solid var(--border-dark, #2a3441);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
    
    /* FIJO Y POR ENCIMA DEL GRID */
    position: sticky;
    top: 90px; /* Ajustado para que no se meta debajo del menú de 75px */
    align-self: flex-start;
    z-index: 20; /* <-- LA CLAVE: Fuerza al panel a estar por encima del grid */
}

.player-card {
    width: 200px;
    height: 200px;
    flex-shrink: 0;
    border-radius: 12px;
    border: 3px solid var(--neon-blue, #00f2ff);
    box-shadow: 0 0 20px var(--neon-blue-glow, rgba(0, 242, 255, 0.5));
    background: var(--bg-dark, #0a0e17);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    margin-bottom: 20px;
}

.player-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.question-mark {
    font-size: 5rem;
    font-weight: 900;
    color: var(--text-secondary, #8892b0);
}

.player-name-display {
    font-size: 1.5rem;
    font-weight: 900;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 20px;
    min-height: 3rem; 
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.action-buttons {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: auto; 
}

.btn-secondary {
    background: transparent;
    color: #ff4757;
    border: 2px solid #ff4757;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    text-transform: uppercase;
}

.btn-secondary:hover {
    background: rgba(255, 71, 87, 0.1);
    box-shadow: 0 0 10px rgba(255, 71, 87, 0.4);
}

/* =========================================
   ADAPTACIÓN EXCLUSIVA PARA MÓVILES
   ========================================= */
@media (max-width: 767px) {
    /* Transformamos el panel en una tarjeta estática (NO flotante) */
    .current-player-panel {
        position: relative; /* Anula el "sticky" que hacía que te persiguiera */
        top: 0;             /* Reseteamos su altura */
        z-index: 1;         /* Le quitamos la prioridad sobre el tablero */
        flex: auto;
        min-height: auto;
        flex-direction: row; /* Elementos de lado a lado */
        width: 100%;
        padding: 12px 15px;
        border-radius: 16px; /* Bordes redondeados por todos lados */
        box-shadow: 0 5px 15px rgba(0,0,0,0.5); /* Sombra más suave */
        gap: 15px;
        box-sizing: border-box;
        margin-bottom: 10px; /* Separación con el grid de Bingo */
    }

    .player-card {
        width: 70px; /* Foto pequeñita */
        height: 70px;
        margin-bottom: 0;
        border-width: 2px;
    }

    .question-mark {
        font-size: 2.5rem;
    }

    .player-name-display {
        font-size: 1rem;
        margin-bottom: 0;
        min-height: auto;
        flex: 1; /* Ocupa el espacio central restante */
        text-align: left;
        justify-content: flex-start;
        line-height: 1.2;
    }

    .action-buttons {
        width: auto;
        margin-top: 0;
    }

    .btn-secondary {
        padding: 8px 15px;
        font-size: 0.85rem;
    }

    /* Ajustes para que el grid 4x4 quepa sin explotar la pantalla */
    .bingo-grid { gap: 6px; }
    .grid-cell { padding: 5px; }
    .cell-icon { font-size: 2.5rem; margin-bottom: 2px; }
    .cell-label { font-size: 0.55rem; }
}
/* Cuadrícula 4x4 */
.bingo-grid-container {
    flex: 1;
    width: 100%;
}

.bingo-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.grid-cell {
    aspect-ratio: 1;
    background: var(--card-bg, #131a26);
    border: 2px solid var(--border-dark, #2a3441);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 10px;
    position: relative;
    overflow: hidden;
}

.grid-cell:hover:not(.filled) {
    border-color: var(--neon-blue, #00f2ff);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--neon-blue-glow, rgba(0, 242, 255, 0.3));
}

/* --- ACTUALIZACIÓN DE TAMAÑOS --- */
.cell-icon {
    font-size: 4.5rem; /* ¡Tamaño XXL para las letras de posición! */
    font-weight: 900;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    margin-bottom: 5px;
}

.cell-logo {
    max-width: 85%; /* Banderas y logos mucho más grandes */
    max-height: 85%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
    margin-bottom: 5px;
}
/* -------------------------------- */

.cell-label {
    font-size: 0.75rem;
    font-weight: 900;
    color: var(--text-secondary, #8892b0);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    z-index: 2; /* Para asegurar que el texto no se tape si el icono es muy grande */
}

/* Estado Relleno (Acertado) */
.grid-cell.filled {
    border-color: var(--correct-border, #00ff88);
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.4);
    cursor: default;
}

.grid-cell.filled .cell-bg-img {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover;
    opacity: 0.35; 
    z-index: 1;
}

.grid-cell.filled .filled-name {
    position: relative;
    z-index: 2;
    font-size: 0.85rem;
    font-weight: 900;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.9);
}

@keyframes shakeError {
    0%, 100% { transform: translateX(0); border-color: var(--border-dark); }
    20%, 60% { transform: translateX(-5px); border-color: #ff4757; background: rgba(255, 71, 87, 0.2); }
    40%, 80% { transform: translateX(5px); border-color: #ff4757; background: rgba(255, 71, 87, 0.2); }
}

.error-shake {
    animation: shakeError 0.5s ease;
}

/* --- AÑADIDOS PARA EL SISTEMA DIARIO Y MODAL --- */

/* Navegación Diaria */
.daily-nav { display: flex; align-items: center; justify-content: center; gap: 15px; }
.btn-nav { padding: 5px 15px; font-size: 1.2rem; border-radius: 8px; cursor: pointer; background: transparent; border: 1px solid var(--neon-blue); color: var(--neon-blue); transition: all 0.3s; }
.btn-nav:hover:not(:disabled) { background: rgba(0, 242, 255, 0.1); box-shadow: 0 0 10px var(--neon-blue-glow); }
.btn-nav:disabled { opacity: 0.3; cursor: not-allowed; border-color: var(--text-secondary); color: var(--text-secondary); }
.day-info { text-align: center; min-width: 130px; }
.day-text { font-size: 1.5rem; font-weight: 900; color: var(--neon-blue); letter-spacing: 2px; text-shadow: 0 0 10px var(--neon-blue-glow); }

/* Nuevo Contador de Intentos */
.attempts-pill {
    background: rgba(20, 24, 34, 0.8);
    border: 2px solid var(--neon-blue);
    border-radius: 50px;
    padding: 10px 30px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.2);
    transition: all 0.3s ease;
}
.attempts-text {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-secondary);
    letter-spacing: 1.5px;
}
.attempts-value {
    font-size: 2rem;
    font-weight: 900;
    color: #fff;
    text-shadow: 0 0 10px var(--neon-blue-glow);
    min-width: 45px;
    text-align: center;
}
.attempts-pill.danger-border {
    border-color: var(--neon-pink);
    box-shadow: 0 0 15px rgba(255, 0, 85, 0.3);
}

/* --- MODAL NEÓN COMPACTO --- */

.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.85); backdrop-filter: blur(5px);
    display: flex; justify-content: center; align-items: center;
    z-index: 1000; overflow-y: auto; padding: 15px; box-sizing: border-box;
}

.neon-modal {
    background: var(--bg-color, #080a0f); border: 1px solid var(--neon-blue);
    box-shadow: 0 0 40px rgba(0, 242, 255, 0.15); border-radius: 12px;
    padding: 1.5rem 1.2rem; text-align: center; position: relative;
    width: 100%; max-width: 380px; margin: auto;
    background-image: radial-gradient(circle at top, #111827 0%, var(--bg-color) 70%);
}

.modal-header-title { font-size: 1.4rem; font-weight: 900; color: #fff; margin-bottom: 10px; letter-spacing: 2px; }
.modal-top-stats { display: flex; justify-content: center; gap: 30px; margin-bottom: 10px; }
.stat-big-box { display: flex; flex-direction: column; align-items: center; }
.big-number { font-size: 2.5rem; font-weight: 900; line-height: 1; }
.highlight { color: var(--neon-blue); text-shadow: 0 0 15px var(--neon-blue-glow); }
.pink-glow { color: var(--neon-pink); text-shadow: 0 0 15px var(--neon-pink-glow); }
.big-label { font-size: 0.75rem; color: var(--text-secondary); font-weight: 700; letter-spacing: 1.5px; margin-top: 5px; text-transform: uppercase; }

/* Mini Grid 4x4 Compacto */
.mini-grid {
    display: grid; gap: 4px; justify-content: center; margin-bottom: 15px;
}
.mini-cell { border-radius: 4px; background-color: rgba(20, 24, 34, 0.8); border: 1px solid var(--border-dark); transition: all 0.3s ease; }
.mini-cell.correct { background-color: rgba(0, 242, 255, 0.2); border-color: var(--neon-blue); box-shadow: inset 0 0 10px rgba(0, 242, 255, 0.3), 0 0 5px var(--neon-blue-glow); }

/* Cronómetro Compacto */
.modal-countdown { margin-bottom: 15px; padding: 10px; background: rgba(20, 24, 34, 0.6); border-radius: 8px; border: 1px dashed rgba(255, 255, 255, 0.1); }
.countdown-label { display: block; font-size: 0.7rem; color: var(--text-secondary); font-weight: 700; margin-bottom: 2px; text-transform: uppercase; letter-spacing: 1px; }
.countdown-time { font-size: 1.8rem; font-weight: 900; color: #fff; letter-spacing: 2px; }

/* Botones */
.modal-buttons { display: flex; gap: 10px; margin-bottom: 15px; }

/* REJILLA DE ESTADÍSTICAS 2x2 Compacta */
.modal-stats-grid { 
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; 
    border-top: 1px solid var(--border-dark); padding-top: 15px; 
}
.stat-box { 
    background: rgba(20, 24, 34, 0.6); padding: 10px 5px; border-radius: 8px; 
    border: 1px solid var(--border-dark); display: flex; flex-direction: column; 
    align-items: center; justify-content: center; transition: all 0.3s ease; 
}
.stat-box:hover { background: rgba(0, 242, 255, 0.05); border-color: var(--neon-blue); }
.stat-num { display: block; font-size: 1.3rem; font-weight: 900; color: #fff; margin-bottom: 2px; text-align: center; text-shadow: 0 0 10px rgba(255, 255, 255, 0.1); }
.stat-text { font-size: 0.65rem; color: var(--text-secondary); font-weight: 800; letter-spacing: 1px; text-align: center; text-transform: uppercase; }

/* =========================================
   HOW TO PLAY / FAQ SECTION (Minimalist)
   ========================================= */

.faq-section {
    width: 100%;
    margin: 2rem 0 0 0;
    padding: 4rem 2rem;
    border-top: 1px solid rgba(0, 242, 255, 0.2); 
    border-bottom: 1px solid rgba(0, 242, 255, 0.2);
    background: rgba(13, 17, 26, 0.4); 
    box-sizing: border-box; 
}

.faq-container {
    max-width: 800px; 
    margin: 0 auto;
    text-align: left;
}

.faq-title {
    font-size: 1.6rem;
    font-weight: 900;
    color: #fff;
    margin-bottom: 2rem;
    letter-spacing: -0.5px;
}

.faq-title .accent {
    color: var(--neon-blue, #00f2ff); 
}

.faq-question {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--neon-blue, #00f2ff);
    margin-top: 1.8rem;
    margin-bottom: 0.6rem;
    letter-spacing: -0.3px;
}

.faq-answer {
    font-size: 0.95rem;
    color: var(--text-secondary, #8892b0);
    line-height: 1.6;
    margin-bottom: 0;
}

.faq-answer strong {
    color: #fff;
    font-weight: 700;
}