/* --- guesstheclub.css | THE LIIGA GAMES (NORDIC ICE) --- */

:root {
    --neon-blue: #00A3E0; 
    --neon-blue-glow: rgba(0, 163, 224, 0.4);
    --fin-bg-main: #020813;
    --fin-surface: rgba(10, 20, 35, 0.85);
    
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --border-glass: rgba(255, 255, 255, 0.1);
    
    --correct-bg: rgba(0, 163, 224, 0.3);
    --correct-border: #00A3E0;
    --wrong-bg: rgba(255, 255, 255, 0.05);
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Inter', sans-serif; }

body {
    background-color: var(--fin-bg-main);
    background-image: radial-gradient(circle at top, #001838 0%, var(--fin-bg-main) 80%);
    color: var(--text-primary);
    min-height: 100vh;
}

.hidden { display: none !important; }

.game-wrapper {
    max-width: 1000px; margin: 0 auto; padding: 2rem 1.5rem;
    display: flex; flex-direction: column; align-items: center;
}

.main-title { 
    font-weight: 900; font-size: 3rem; text-transform: uppercase;
    color: #fff; margin-bottom: 10px; letter-spacing: -1px; text-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.game-status { margin-bottom: 25px; }
#guesses-left {
    background: var(--fin-bg-main); border: 1px solid var(--neon-blue);
    color: var(--neon-blue); padding: 5px 15px; border-radius: 20px;
    font-weight: 800; font-size: 0.9rem; box-shadow: 0 4px 10px rgba(0,0,0,0.8);
}

/* --- BUSCADOR --- */
.search-section { width: 100%; max-width: 500px; margin-bottom: 30px; position: relative; z-index: 100; }
.search-container { position: relative; width: 100%; }

.glass-input {
    width: 100%; padding: 16px 20px; background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 163, 224, 0.5); color: #fff; border-radius: 12px;
    font-size: 1.1rem; font-weight: 600; backdrop-filter: blur(10px);
    transition: all 0.3s ease; box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}
.glass-input:focus { outline: none; border-color: var(--neon-blue); box-shadow: 0 0 0 4px rgba(0, 163, 224, 0.15); }
.glass-input:disabled { opacity: 0.5; cursor: not-allowed; }

.suggestions-list {
    position: absolute; top: calc(100% + 5px); left: 0; width: 100%;
    background: rgba(5, 15, 30, 0.95); backdrop-filter: blur(15px);
    border: 1px solid var(--neon-blue); border-radius: 12px;
    list-style: none; padding: 0; margin: 0; max-height: 300px; overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0,0,0,0.8); z-index: 1000;
}
.suggestions-list li {
    padding: 12px 20px; cursor: pointer; border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex; align-items: center; gap: 15px; font-weight: 700; color: #fff;
}
.suggestions-list li:hover { background: rgba(0, 163, 224, 0.15); }
.sugg-logo { width: 30px; height: 30px; object-fit: contain; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5)); }

/* --- GRID DE INTENTOS --- */
.guesses-grid { width: 100%; max-width: 950px; overflow-x: auto; padding-bottom: 10px; }
.grid-table { min-width: 750px; display: flex; flex-direction: column; gap: 8px; }

/* 7 Columnas adaptadas para Liiga: Club, Prov, City, Est, Cap, Dist, Dir */
.grid-header, .grid-attempt-row {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 0.7fr 0.8fr 0.8fr 0.7fr;
    gap: 8px; align-items: center;
}

.grid-header { padding: 0 10px 5px; border-bottom: 1px solid var(--border-glass); margin-bottom: 10px; }
.grid-col {
    color: var(--text-secondary); font-size: 0.75rem; font-weight: 800;
    text-transform: uppercase; text-align: center; letter-spacing: 1px;
}

.grid-box {
    background: var(--wrong-bg); border: 1px solid rgba(255, 255, 255, 0.1);
    height: 70px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 800; font-size: 1rem; position: relative;
    backdrop-filter: blur(5px); transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.grid-box.correct {
    background: var(--correct-bg); border-color: var(--correct-border);
    box-shadow: inset 0 0 15px rgba(0, 163, 224, 0.2), 0 0 10px rgba(0, 163, 224, 0.3);
}

.club-box { justify-content: flex-start; padding-left: 10px; text-align: left; background: transparent; border: none; }
.box-logo { max-width: 45px; max-height: 45px; object-fit: contain; margin-right: 15px; filter: drop-shadow(0 2px 5px rgba(0,0,0,0.6)); }
.box-name { font-size: 0.95rem; line-height: 1.2; text-shadow: 0 2px 4px rgba(0,0,0,0.8); }

.arrow { margin-left: 5px; font-weight: 900; color: #ff3333; }
.dist-text { font-size: 0.95rem; }
.dir-arrow { font-size: 1.8rem; line-height: 1; }
.dir-arrow.correct { color: #fff; font-size: 1.5rem; } /* El check verde -> blanco */

@keyframes popIn { 0% { transform: scale(0.9); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.grid-attempt-row { animation: popIn 0.4s ease-out forwards; }

/* --- MODAL Y FAQ --- */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0, 5, 12, 0.85); backdrop-filter: blur(8px); display: flex; justify-content: center; align-items: center; z-index: 2000; padding: 15px; transition: all 0.3s ease; }
.glass-modal { background: #051021; border: 1px solid rgba(255, 255, 255, 0.1); box-shadow: 0 25px 50px rgba(0, 0, 0, 0.8); border-radius: 20px; padding: 2rem; text-align: center; width: 100%; max-width: 400px; position: relative; }
.close-btn { position: absolute; top: 15px; right: 20px; color: var(--text-secondary); font-size: 2rem; cursor: pointer; }
.close-btn:hover { color: #fff; }

.btn-neon-outline { background: rgba(0, 163, 224, 0.1); color: var(--neon-blue); border: 1px solid var(--neon-blue); padding: 0.6rem 1.8rem; font-weight: 800; border-radius: 8px; cursor: pointer; text-transform: uppercase; letter-spacing: 1px; transition: all 0.2s ease; }
.btn-neon-outline:hover { background: var(--neon-blue); color: #000; transform: translateY(-2px); }
.play-btn { background: var(--text-primary); color: #000; border: none; font-weight: 900; border-radius: 8px; cursor: pointer; text-transform: uppercase; transition: all 0.2s ease; }
.play-btn:hover { background: var(--text-secondary); }

.modal-stats-grid { display: grid; grid-template-columns: 1fr; border-top: 1px solid var(--border-glass); padding-top: 20px; }
.stat-box { background: rgba(255, 255, 255, 0.03); padding: 12px; border-radius: 10px; }
.stat-num { font-size: 1.8rem; font-weight: 900; color: #fff; display: block;}
.stat-text { font-size: 0.8rem; color: var(--text-secondary); font-weight: 700; }

.faq-section { margin-top: 4rem; padding: 4rem 2rem; background: rgba(255,255,255,0.02); border-top: 1px solid var(--border-glass); }
.faq-container { max-width: 800px; margin: 0 auto; }
.faq-title { font-size: 1.8rem; font-weight: 900; margin-bottom: 2rem; }
.faq-title .accent { color: var(--neon-blue); }
.faq-question { font-size: 1.2rem; color: #fff; margin-top: 2rem; margin-bottom: 0.8rem; }
.faq-answer { color: var(--text-secondary); line-height: 1.7; }
.faq-answer strong { color: #fff; }

/* --- MÓVILES --- */
@media (max-width: 768px) {
    .main-title { font-size: 2rem; margin-bottom: 10px; }
    .grid-table { min-width: 0 !important; width: 100%; }
    
    .grid-header, .grid-attempt-row {
        grid-template-columns: 1.3fr 1fr 1fr 0.7fr 0.8fr 0.7fr 0.6fr;
        gap: 4px;
    }
    .grid-col { font-size: 0.5rem; letter-spacing: 0; word-wrap: break-word; }
    .grid-box { height: 50px; font-size: 0.65rem; border-radius: 6px; padding: 2px; }
    
    .club-box { padding-left: 0; flex-direction: column; justify-content: center; align-items: center; }
    .box-logo { max-width: 25px; max-height: 25px; margin-right: 0; margin-bottom: 2px; }
    .box-name { font-size: 0.55rem; text-align: center; }
    
    .dir-arrow { font-size: 1.2rem; }
    .dist-text { font-size: 0.65rem; }
}