/* =========================================================
   switzerland/whoareyou.css | generado por _build/build.py
   Paleta de switzerland/index.css + /whoareyou.css original. NO EDITAR AQUÍ:
   cambia el original, index.css o _build/templates/css/ y reconstruye.
   ========================================================= */

:root {
    --bg-black: #050505;
    --bg-deep: #2a0505;
    --text-primary: #ffffff;
    --text-secondary: #a0aec0;

    --card-bg: rgba(26, 8, 8, 0.8);
    --card-bg-hover: #240404;
    --card-border: rgba(255, 42, 42, 0.18);

    --accent: #ff2a2a;
    --accent-soft: rgba(255, 42, 42, 0.14);
    --accent-line: rgba(255, 42, 42, 0.35);
    --accent-glow: rgba(255, 42, 42, 0.45);
    --accent-peak: #ff6b6b;

    --badge-bg: rgba(38, 10, 10, 0.92);
    --badge-fg: #ffffff;
    --cta-bg: #ff2a2a;
    --cta-fg: #ffffff;

    --feat-bg: rgba(30, 9, 9, 0.92);
    --track-bg: rgba(18, 4, 4, 0.6);
}

:root {
    --neon-blue: var(--accent);
    --neon-blue-glow: var(--accent-glow);
    --bg-color: var(--bg-black);
    --border-dark: #1f2430;
    --neon-pink: #ff0055;
    --neon-pink-glow: rgba(255, 0, 85, 0.4);
}

/* ---- whoareyou.css original (raíz), con el color de la liga ---- */
/* --- whoareyou.css | THE PUCK GAMES STYLE --- */

:root {
    --correct-glass: rgba(0, 255, 136, 0.15);
    --correct-border: #00ff88;
    --wrong-glass: rgba(255, 255, 255, 0.05);
    --border-neon: var(--border-dark);
}

.hidden { display: none !important; }

/* Contenedor principal */
.game-wrapper {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* --- CABECERA Y FOTO --- */
.main-title { 
    font-weight: 900; 
    font-size: 3.5rem; 
    text-transform: uppercase;
    background: linear-gradient(to bottom, #fff, #888);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}

.mystery-player {
    width: 180px; 
    height: 180px;
    border-radius: 15px;
    border: 2px solid var(--neon-blue);
    box-shadow: 0 0 20px var(--neon-blue-glow);
    object-fit: cover;
    transition: filter 0.5s ease;
    background: #fff;
}

/* --- BUSCADOR (ESTILO GRID PRO) --- */
.autocomplete-wrapper {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 30px 0;
}

.custom-input {
    width: 100%;
    box-sizing: border-box;
    padding: 20px 25px;
    border-radius: 12px;
    background: var(--card-bg);
    border: 1px solid var(--border-dark);
    color: #fff;
    font-size: 1.3rem;
    font-weight: 700;
    outline: none;
    transition: 0.3s;
}

.custom-input:focus {
    border-color: var(--neon-blue);
    box-shadow: 0 0 15px var(--neon-blue-glow);
}

.suggestions-list {
    position: absolute;
    top: 105%;
    width: 100%;
    background: #0d1117;
    border: 1px solid var(--border-dark);
    border-radius: 12px;
    z-index: 1000;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.sugg-item {
    display: flex;
    align-items: center;
    padding: 15px;
    gap: 20px;
    border-bottom: 1px solid #222;
    cursor: pointer;
    transition: 0.2s;
}

.sugg-item:hover { background: color-mix(in srgb, var(--neon-blue) 10%, transparent); }

.sugg-img { width: 60px; height: 60px; border-radius: 50%; border: 2px solid #fff; background: #fff; }

.sugg-name { font-weight: 900; font-size: 1.2rem; color: #fff; display: block; }

.sugg-pos { color: var(--neon-blue); font-weight: 900; text-transform: uppercase; }

.sugg-logo { height: 50px; width: auto; margin-left: auto; }

/* --- EL TABLERO (ESTILO GRID DE ATRIBUTOS) --- */
.grid-table {
    width: 100%;
    min-width: 1000px;
    margin-top: 20px;
}

.grid-header {
    display: grid;
    grid-template-columns: 2.5fr 1fr 1fr 1.2fr 1fr 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
    text-align: center;
}

.grid-header div {
    font-weight: 900;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.grid-attempt-row {
    display: grid;
    grid-template-columns: 2.5fr 1fr 1fr 1.2fr 1fr 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.grid-box {
    height: 110px; /* Celdas mucho más grandes */
    background: var(--wrong-glass);
    border: 1px solid var(--border-dark);
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: 2.2rem; /* Números y letras GIGANTES */
    font-weight: 900;
    position: relative;
    transition: transform 0.3s ease;
}

/* Variantes de Acierto */
.correct {
    background: var(--correct-glass) !important;
    border: 2px solid var(--correct-border) !important;
    color: var(--correct-border) !important;
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.2);
}

/* Jugador (Foto + Nombre) */
.player-box {
    flex-direction: row;
    justify-content: flex-start;
    padding-left: 20px;
}

.box-photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid #fff;
    margin-right: 20px;
    background: #fff;
    object-fit: cover;
}

.box-name {
    font-size: 1.4rem;
    text-align: left;
    line-height: 1.2;
}

/* Banderas y Logos (MAXIMIZADOS) */
.box-flag {
    width: 85%;
    max-width: 80px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.box-logo {
    width: 85%;
    height: 85%;
    object-fit: contain;
}

/* Indicadores de flechas */
.arrow-indicator {
    position: absolute;
    bottom: 2px;
    right: 12px;
    font-size: 2.5rem;
    color: var(--neon-blue);
    text-shadow: 0 0 10px var(--neon-blue-glow);
}

/* --- MODAL DE FINAL --- */
.final-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    backdrop-filter: blur(10px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.final-modal.show { display: flex; }

.modal-content {
    background: var(--card-bg);
    border: 2px solid var(--neon-blue);
    padding: 50px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 0 40px var(--neon-blue-glow);
}

#endMessage {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 20px;
    text-shadow: 0 0 10px currentColor;
}

.revealed-player-info img {
    width: 200px;
    height: 200px;
    border-radius: 20px;
    border: 4px solid #fff;
    margin-bottom: 20px;
}

/* --- whoareyou.css --- */
.game-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.mystery-container {
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
}

.mystery-player {
    width: 200px;
    height: 200px;
    border-radius: 12px;
    border: 3px solid var(--neon-blue);
    background: white;
    object-fit: cover;
}

.search-section {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
}

.autocomplete-wrapper {
    width: 100%;
    max-width: 600px;
    position: relative;
}

/* Tabla Gigante */
.grid-table { min-width: 1000px; }
.grid-header, .grid-attempt-row {
    display: grid;
    grid-template-columns: 2.5fr 1fr 1fr 1.2fr 1fr 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.grid-box {
    height: 110px;
    background: var(--card-bg);
    border: 1px solid var(--border-dark);
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: 2.5rem; /* Números muy grandes */
    font-weight: 900;
    position: relative;
}

.player-box { flex-direction: row; justify-content: flex-start; padding-left: 15px; }
.box-photo { width: 85px; height: 85px; border-radius: 50%; border: 2px solid white; margin-right: 15px; background: white; }
.box-name { font-size: 1.3rem; font-weight: 900; line-height: 1.1; }

.box-flag { width: 80%; border-radius: 8px; }
.box-logo { width: 85%; height: 85%; object-fit: contain; }

.correct {
    background: rgba(0, 255, 136, 0.2) !important;
    border: 2px solid #00ff88 !important;
    color: #00ff88 !important;
}

.arrow-indicator {
    position: absolute;
    bottom: 5px;
    right: 10px;
    font-size: 2.2rem;
    color: var(--neon-blue);
}

/* Modal Estilo Grid */
.final-modal {
    position: fixed; inset: 0; background: rgba(0,0,0,0.9);
    display: none; justify-content: center; align-items: center; z-index: 2000;
}
.final-modal.show { display: flex; }
.modal-content {
    background: var(--card-bg); padding: 40px; border-radius: 20px;
    border: 2px solid var(--neon-blue); text-align: center; max-width: 500px;
}
.modal-actions { display: flex; gap: 15px; justify-content: center; margin-top: 25px; }
.b2b-btn { padding: 12px 25px; border-radius: 8px; font-weight: 900; border: none; cursor: pointer; }
.btn-share { background: #5c4dff; color: white; }
.btn-finish { background: #ccff00; color: black; }

/* --- BARRA SUPERIOR Y CONTADOR --- */
.stats-top-bar {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    margin-bottom: -15px; /* Evita que empuje la imagen hacia abajo */
    z-index: 10;
}

.attempts-counter {
    font-size: 1.1rem;
    font-weight: 900;
    color: var(--neon-blue);
    background: var(--card-bg);
    padding: 8px 15px;
    border: 1px solid var(--border-dark);
    border-radius: 8px;
    text-transform: uppercase;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

/* =========================================
   ANIMACIONES DEL JUEGO
   ========================================= */

/* 1. Animación en cascada para las celdas del intento */
.grid-attempt-row .grid-box {
    opacity: 0;
    /* Usamos forwards para que se queden visibles al terminar */
    animation: flipIn 0.5s ease forwards;
}

/* Retrasos escalonados para cada columna (efecto Wordle) */
.grid-attempt-row .grid-box:nth-child(1) { animation-delay: 0.1s; }
.grid-attempt-row .grid-box:nth-child(2) { animation-delay: 0.25s; }
.grid-attempt-row .grid-box:nth-child(3) { animation-delay: 0.4s; }
.grid-attempt-row .grid-box:nth-child(4) { animation-delay: 0.55s; }
.grid-attempt-row .grid-box:nth-child(5) { animation-delay: 0.7s; }
.grid-attempt-row .grid-box:nth-child(6) { animation-delay: 0.85s; }
.grid-attempt-row .grid-box:nth-child(7) { animation-delay: 1.0s; }

@keyframes flipIn {
    0% { 
        opacity: 0; 
        transform: rotateX(90deg); /* Empieza girado hacia atrás */
    }
    100% { 
        opacity: 1; 
        transform: rotateX(0); /* Termina de frente */
    }
}

/* 2. Animación de entrada para el Modal Final */
.final-modal.show { 
    display: flex; 
    animation: fadeInBg 0.4s ease forwards;
}

.final-modal.show .modal-content {
    /* cubic-bezier crea ese efecto de "rebote" elástico */
    animation: popInModal 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes fadeInBg {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes popInModal {
    0% { 
        opacity: 0; 
        transform: scale(0.5) translateY(50px); 
    }
    100% { 
        opacity: 1; 
        transform: scale(1) translateY(0); 
    }
}

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

.faq-section {
    width: 100%;
    margin: 2rem 0 0 0;
    padding: 4rem 2rem;
    border-top: 1px solid color-mix(in srgb, var(--neon-blue) 20%, transparent); 
    border-bottom: 1px solid color-mix(in srgb, var(--neon-blue) 20%, transparent);
    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); 
}

.faq-question {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--neon-blue);
    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;
}

/* Ocultar textos de móvil en pantallas grandes por defecto */
.hide-desktop {
    display: none;
}

/* =========================================
   AJUSTES PARA MÓVILES (Who Are You)
   ========================================= */
@media (max-width: 768px) {
    /* Quitamos el ancho mínimo que forzaba el scroll */
    .grid-table {
        min-width: 0 !important;
        width: 100%;
    }

    /* Reducimos las 7 columnas y el espacio (gap) entre ellas */
    .grid-header, .grid-attempt-row {
        grid-template-columns: 1.6fr 0.7fr 0.7fr 1fr 0.7fr 0.6fr 0.6fr;
        gap: 3px;
    }

    /* Textos de la cabecera diminutos */
    .grid-header div {
        font-size: 0.45rem;
        letter-spacing: 0;
        word-wrap: break-word;
    }

    /* Reducimos el tamaño general de las cajas */
    .grid-box {
        height: 60px; /* Mitad de altura */
        font-size: 0.8rem; /* Tamaño para números y posición */
        border-radius: 6px;
        padding: 2px;
    }

    /* Primera columna (Jugador): apilamos la foto arriba y el nombre abajo */
    .player-box {
        padding-left: 0;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    .box-photo {
        width: 30px;
        height: 30px;
        margin-right: 0;
        margin-bottom: 2px;
        border-width: 1px;
    }

    .box-name {
        font-size: 0.45rem;
        text-align: center;
        line-height: 1;
    }

    /* Ajustar tamaños de bandera y logos */
    .box-flag {
        max-width: 25px;
        border-radius: 3px;
    }

    .box-logo {
        width: 90%;
        height: 90%;
    }

    /* Hacer las flechas (↑ ↓) más pequeñas */
    .arrow-indicator {
        font-size: 0.8rem;
        bottom: 2px;
        right: 2px;
    }

    /* Intercambio de palabras: ocultar largas, mostrar cortas */
    .hide-mobile {
        display: none;
    }
    
    .hide-desktop {
        display: inline;
    }
}
/* =========================================
   AÑADIDO: casi acertado, H1, intro y enlaces
   ========================================= */

/* Ambar: cerca en edad (+-2) o dorsal (+-3) */
.close {
    background: rgba(255, 193, 7, 0.18) !important;
    border: 2px solid #ffc107 !important;
    color: #ffc107 !important;
    box-shadow: 0 0 15px rgba(255, 193, 7, 0.2);
}

/* Titular de la pagina (antes no habia ningun H1) */
.game-h1 {
    font-size: 2.2rem;
    font-weight: 900;
    color: #fff;
    text-align: center;
    margin: 0 0 10px 0;
    letter-spacing: -0.5px;
    line-height: 1.1;
}

.game-h1 .accent {
    color: var(--neon-blue);
}

.game-intro {
    max-width: 640px;
    margin: 0 auto 25px auto;
    text-align: center;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-secondary, #8892b0);
}

/* Datos del jugador revelado en el modal */
.revealed-sub {
    color: var(--text-secondary, #8892b0);
    font-weight: 700;
    font-size: 0.9rem;
    margin-top: 6px;
}

/* Enlaces a los otros juegos */
.faq-answer a {
    color: var(--neon-blue);
    text-decoration: none;
    border-bottom: 1px solid color-mix(in srgb, var(--neon-blue) 30%, transparent);
}

.faq-answer a:hover {
    border-bottom-color: var(--neon-blue);
}

/* Etiqueta solo para lectores de pantalla */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 768px) {
    .game-h1 { font-size: 1.5rem; }
    .game-intro { font-size: 0.85rem; padding: 0 10px; }
}
/* ---- ajustes de liga ---- */
:root {
    --neon-blue: var(--accent);
    --neon-blue-glow: var(--accent-glow);
    --bg-color: var(--bg-black);
    --border-dark: #1f2430;
    --neon-pink: #ff0055;
    --neon-pink-glow: rgba(255, 0, 85, 0.4);
}
:root {
    --card-bg: #131a26;
    --bg-dark: #0a0e17;
}
body {
    background-color: var(--bg-black);
    background-image: radial-gradient(circle at top, var(--bg-deep) 0%, var(--bg-black) 70%);
    background-attachment: fixed;
}
/* ---------- Who Are You? · ajustes de liga sobre el whoareyou.css original ---------- */
/* La interrogación (en el original la crea el JS con estilos en línea) */
.mystery-qmark {
    width: 200px; height: 200px; border-radius: 12px; border: 3px solid var(--neon-blue);
    background: rgba(10, 15, 25, .9); display: flex; align-items: center; justify-content: center;
    font-size: 5rem; font-weight: 900; color: var(--neon-blue);
    text-shadow: 0 0 25px var(--neon-blue-glow); box-shadow: 0 0 20px color-mix(in srgb, var(--neon-blue) 25%, transparent);
}
.mystery-player { background: #1c2230; }
.box-photo { background: #1c2230; }
.revealed-player-info img { background: #1c2230; }

/* Cerrar el modal */
.modal-content { position: relative; }
.modal-x { position: absolute; top: 10px; right: 14px; background: none; border: 0; color: var(--text-secondary); font-size: 1.8rem; cursor: pointer; line-height: 1; }
.modal-x:hover { color: var(--neon-pink); }

/* Sugerencias con equipo a la derecha */
.sugg-team { margin-left: auto; }
@media (max-width: 768px) { .mystery-qmark { width: 150px; height: 150px; font-size: 4rem; } }
