/* --- lineup.css | THE PUCK GAMES STYLE --- */
/* Se complementa con las variables de guesstheclub.css */

/* =========================================
   CABECERA DEL JUEGO (ESTADO Y CONTADORES)
   ========================================= */
.game-header {
    width: 100%;
    max-width: 800px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    z-index: 10;
}

.status-badge {
    font-size: 0.9rem;
    font-weight: 900;
    color: var(--text-secondary);
    letter-spacing: 1.5px;
    background: var(--wrong-glass);
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid var(--border-dark);
}

/* =========================================
   ZONA DE LA PISTA DE HOCKEY (RINK)
   ========================================= */
.rink-area {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
}

.rink-container {
    width: 100%;
    max-width: 700px;
    height: 500px;
    /* Gradiente mágico para dibujar las líneas de la pista (Azul - Roja - Azul) */
    background: linear-gradient(
        to bottom,
        #0b101a 0%,
        #0b101a 34%,
        rgba(0, 153, 255, 0.25) 34%, rgba(0, 153, 255, 0.25) 35%,
        #0b101a 35%,
        #0b101a 49.5%,
        rgba(255, 51, 51, 0.25) 49.5%, rgba(255, 51, 51, 0.25) 50.5%,
        #0b101a 50.5%,
        #0b101a 65%,
        rgba(0, 153, 255, 0.25) 65%, rgba(0, 153, 255, 0.25) 66%,
        #0b101a 66%,
        #0b101a 100%
    );
    border: 2px solid var(--border-dark);
    border-radius: 60px; /* Bordes redondeados imitando la pista */
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    position: relative;
    box-shadow: 
        inset 0 0 50px rgba(0,0,0,0.6),
        0 10px 30px rgba(0,0,0,0.3);
}

/* Filas de posiciones */
.rink-row {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    width: 100%;
    z-index: 1; /* Para estar encima de las líneas pintadas */
}

.forwards { padding: 0 10%; }
.defense { padding: 0 20%; }
.goalie { padding: 0; }

/* Nodos de Posición Vacíos */
.pos-node {
    width: 80px;
    height: 80px;
    border: 2px solid var(--neon-blue);
    border-radius: 50%;
    background: rgba(19, 26, 38, 0.85); /* var(--card-bg) con un poco de transparencia */
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    color: var(--neon-blue);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Efecto rebote */
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.15);
    backdrop-filter: blur(4px);
}

.pos-label {
    font-size: 1.4rem;
    font-weight: 900;
}

/* Nodos de Posición Rellenados (Jugador adivinado) */
.pos-node.filled {
    border-color: var(--correct-border);
    background: var(--correct-glass);
    color: #ffffff;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
    text-align: center;
    padding: 5px;
}

.pos-node.filled .pos-label {
    font-size: 0.7rem;
    color: var(--correct-border);
    margin-bottom: 3px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* =========================================
   ZONA DE CONTROLES (EQUIPO ACTUAL Y BUSCADOR)
   ========================================= */
.controls-area {
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin: 0 auto;
}

/* =========================================
   EQUIPO ACTUAL (ANCLADO EN LA PISTA)
   ========================================= */
.current-challenge {
    position: absolute;
    bottom: 20px; /* Distancia desde abajo */
    left: 20px;   /* Distancia desde la izquierda */
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(19, 26, 38, 0.85); /* Fondo semitransparente oscuro */
    backdrop-filter: blur(5px); /* Efecto cristal para que se vean las líneas de la pista */
    padding: 15px;
    border-radius: 15px;
    border: 2px solid var(--border-dark);
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    z-index: 10;
    width: 140px; /* Tamaño compacto */
    text-align: center;
}

/* =========================================
   EQUIPO ACTUAL (ANCLADO EN LA PISTA)
   ========================================= */
.current-challenge {
    position: absolute;
    bottom: 20px; 
    left: 20px;   
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center; /* Centramos el contenido dentro del cuadrado */
    background: rgba(19, 26, 38, 0.85); 
    backdrop-filter: blur(5px); 
    padding: 10px;
    border-radius: 12px; /* Un poco menos redondeado para dar sensación de cromo/cuadrado */
    border: 2px solid var(--border-dark);
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    z-index: 10;
    width: 125px;  /* Fijamos el ancho */
    height: 125px; /* Fijamos el mismo alto para que sea un cuadrado perfecto */
    text-align: center;
}

/* Ocultamos el texto de "Buscando jugador" sin tocar el HTML */
.challenge-hint {
    display: none;
}

.team-display-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: transparent; 
    border: none;
    box-shadow: none;
    min-width: unset;
    padding: 0;
}

.team-display-card img {
    width: 80px; /* ¡Logo mucho más grande! Ocupará casi todo el cuadrado */
    height: 80px;
    object-fit: contain;
    filter: drop-shadow(0 0 5px rgba(255,255,255,0.2)); 
}

.team-display-card h2 {
    font-size: 0.75rem; /* Un pelín más pequeño para que quepa bien bajo el logo gigante */
    font-weight: 900;
    color: #fff;
    margin: 0;
    line-height: 1.1;
    text-transform: uppercase;
}
/* 2. Autocompletado (Sugerencias) */
/* Eliminamos el estilo anterior de .sugg-logo-team ya que no usaremos <img> */

/* Nuevo estilo para la medalla de posición */
.sugg-pos-badge {
    width: 35px;
    height: 35px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid var(--neon-blue, #00f2ff);
    border-radius: 4px;
    color: var(--neon-blue, #00f2ff);
    font-weight: 900;
    font-size: 1.1rem;
    background: rgba(0, 242, 255, 0.1); /* Fondo sutil azul neón */
}

/* Input y Botón */
.search-container {
    width: 100%;
    display: flex;
    gap: 15px;
}

.autocomplete-wrapper {
    flex-grow: 1;
    position: relative;
}

.btn-secondary {
    background: rgba(255, 51, 102, 0.1);
    border: 2px solid #ff3366;
    color: #ff3366;
    border-radius: 12px;
    padding: 0 25px;
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: #ff3366;
    color: #ffffff;
    box-shadow: 0 0 20px rgba(255, 51, 102, 0.4);
    transform: translateY(-2px);
}

/* Toast de Error */
.error-toast {
    background: rgba(255, 51, 102, 0.15);
    color: #ff3366;
    border: 1px solid #ff3366;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 700;
    width: 100%;
    text-align: center;
    animation: shake 0.4s ease-in-out;
}

/* --- AUTOCOMPLETADO --- */
.autocomplete-wrapper {
    position: relative;
    width: 100%;
}

.suggestions-list {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--card-bg, #131a26);
    border: 1px solid var(--border-dark, #2a3441);
    border-radius: 8px;
    margin-top: 5px;
    max-height: 250px;
    overflow-y: auto;
    z-index: 9999; /* Z-index altísimo para que pase por encima de la pista */
    list-style: none;
    padding: 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
}

.sugg-item {
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    color: white;
    transition: background 0.2s ease;
}

.sugg-item:hover {
    background: rgba(0, 242, 255, 0.1); /* Efecto hover azul neón */
}

.sugg-logo {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
    background: #fff;
}
/* --- lineup.css --- */

/* El cuadrado principal donde va el jugador */
.pos-node {
    width: 85px; 
    height: 85px;
    border: 2px solid var(--neon-blue);
    border-radius: 14px; /* Cambiado de 50% a 14px para hacerlo un cuadrado suavizado */
    background: rgba(19, 26, 38, 0.85);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    transition: all 0.4s ease;
}

.pos-node.filled {
    border-color: var(--correct-border);
    background: var(--card-bg);
    padding: 0;
    overflow: visible; 
}

/* EL CUADRADO PEQUEÑO EN LA ESQUINA (NUEVO) */
.pos-label {
    position: absolute;
    top: -8px;    /* Sobresale un poco por arriba */
    left: -8px;   /* Sobresale un poco por la izquierda */
    width: 28px;
    height: 28px;
    background: var(--bg-dark, #0a0e17);
    border: 2px solid var(--neon-blue);
    border-radius: 6px; /* Cuadradito pequeño */
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.85rem;
    font-weight: 900;
    color: var(--neon-blue);
    z-index: 5; /* Asegura que quede por encima de la foto */
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

/* Cambiar de color el cuadradito cuando acertamos */
.pos-node.filled .pos-label {
    border-color: var(--correct-border);
    color: var(--correct-border);
    background: var(--card-bg, #131a26);
}

/* La foto del jugador se adapta al nuevo cuadrado */
.player-photo-rink {
    width: 100%;
    height: 100%;
    border-radius: 12px; /* Borde un pelín más pequeño para encajar perfecto en la caja */
    object-fit: cover;
    border: 1px solid var(--correct-border);
}

.player-name-rink {
    position: absolute;
    top: 100%; 
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 800;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
    margin-top: 5px;
    line-height: 1.1;
}

/* Ajuste para el logo del equipo en las sugerencias */
.sugg-logo-team {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

/* =========================================
   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;
}

/* =========================================
   AJUSTES PARA MÓVILES (The Lineup)
   ========================================= */
@media (max-width: 768px) {
    /* 1. Arreglar transparencia del autocompletado */
    .suggestions-list {
        background-color: #131a26 !important; /* Forzamos un color sólido oscuro */
        box-shadow: 0 15px 35px rgba(0,0,0,0.9); /* Sombra más fuerte para separarlo del fondo */
    }
    
    .sugg-item {
        background-color: #131a26; /* Color sólido para cada fila */
    }

    /* 2. Encoger el recuadro del equipo para no tapar al portero */
    .current-challenge {
        width: 85px;       /* Mucho más pequeño (antes 125px) */
        height: 85px;      /* Cuadrado perfecto */
        bottom: 15px;      /* Lo pegamos más al borde inferior */
        left: 15px;        /* Lo pegamos más al borde izquierdo */
        padding: 5px;
    }

    .team-display-card img {
        width: 50px;       /* Reducimos el logo */
        height: 50px;
    }

    .team-display-card h2 {
        font-size: 0.6rem; /* Reducimos el texto */
    }
}