
.game-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

/* =========================================
   Buscador (Reutilizado de WhoAreYou)
   ========================================= */
.search-section {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
}
.autocomplete-wrapper {
    width: 100%;
    max-width: 600px;
    position: relative;
}
.custom-input {
    width: 100%;
    padding: 20px 25px;
    border-radius: 12px;
    background: var(--card-bg, #131a26);
    border: 2px solid var(--neon-blue, #00f2ff);
    color: #fff;
    font-size: 1.3rem;
    font-weight: 900;
    text-align: center;
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.1);
    outline: none;
    transition: 0.3s;
}
.custom-input:focus {
    box-shadow: 0 0 25px rgba(0, 242, 255, 0.4);
}

/* =========================================
   TIMELINE (La Carrera del Jugador)
   ========================================= */
.timeline-container {
    width: 100%;
    max-width: 500px; /* Estrecho y elegante */
    margin: 0 auto;
    padding: 20px 0;
}

.career-timeline {
    position: relative;
    padding-left: 30px;
    border-left: 3px solid rgba(0, 242, 255, 0.3); /* Línea vertical base */
}

.timeline-stint {
    position: relative;
    margin-bottom: 30px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease forwards;
}

.timeline-stint:last-child {
    margin-bottom: 0;
}

/* El punto en la línea de tiempo */
.stint-marker {
    position: absolute;
    left: -39px; /* Ajuste preciso al borde izquierdo */
    top: 50%;
    transform: translateY(-50%);
    width: 15px;
    height: 15px;
    background: #fff;
    border: 3px solid var(--neon-blue, #00f2ff);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--neon-blue-glow, rgba(0,242,255,0.5));
    z-index: 2;
}

/* La tarjeta del equipo */
.stint-content {
    display: flex;
    align-items: center;
    background: rgba(20, 24, 34, 0.8);
    border: 1px solid var(--border-dark, #2a3441);
    border-radius: 12px;
    padding: 15px 20px;
    gap: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    transition: all 0.3s ease;
}

.stint-content:hover {
    border-color: var(--neon-blue, #00f2ff);
    background: rgba(0, 242, 255, 0.05);
    transform: translateX(5px);
}

.stint-logo-box {
    width: 65px;
    height: 65px;
    flex-shrink: 0;
    background: rgba(0,0,0,0.5);
    border-radius: 10px;
    padding: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.stint-logo-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.stint-stats {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stint-years {
    font-size: 1.4rem;
    font-weight: 900;
    color: #fff;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.stint-numbers {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-secondary, #8892b0);
    display: flex;
    gap: 10px;
    align-items: center;
}

.stint-numbers strong {
    color: var(--neon-blue, #00f2ff);
}

.neon-divider {
    color: rgba(255, 255, 255, 0.2);
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================
   FOTO MISTERIOSA
   ========================================= */
.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, #00f2ff);
    transition: filter 0.5s ease;
    background: #fff;
    object-fit: cover;
    box-shadow: 0 0 20px var(--neon-blue-glow, rgba(0, 242, 255, 0.3));
}

/* =========================================
   LISTA DE AUTOCOMPLETADO
   ========================================= */
.suggestions-list {
    position: absolute;
    top: 105%;
    width: 100%;
    background: #0d1117;
    border: 1px solid var(--border-dark, #2a3441);
    border-radius: 12px;
    z-index: 1000;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
    list-style: none;
    padding: 0;
    margin: 0;
}

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

.sugg-item:hover { background: rgba(0, 242, 255, 0.1); }

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

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

/* =========================================
   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; animation: fadeInBg 0.4s ease forwards; }

.modal-content {
    background: var(--card-bg, #131a26);
    border: 2px solid var(--neon-blue, #00f2ff);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 0 40px var(--neon-blue-glow, rgba(0, 242, 255, 0.3));
    max-width: 400px;
    width: 90%;
    animation: popInModal 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.revealed-player-info img {
    width: 180px;
    height: 180px;
    border-radius: 15px;
    border: 4px solid #fff;
    margin: 20px 0;
    object-fit: cover;
    background: #fff;
}

#endMessage {
    font-size: 2.5rem;
    font-weight: 900;
    color: #fff;
    text-shadow: 0 0 10px currentColor;
}

.modal-actions { margin-top: 20px; }
.btn-finish {
    background: var(--neon-blue, #00f2ff);
    color: #000;
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: 900;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    text-transform: uppercase;
}

@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); }
}

/* =========================================
   DISEÑO DE TARJETAS AMPLIADO Y MEJORADO
   ========================================= */

.expanded-card {
    position: relative;
    padding: 20px 25px; /* Tarjetas más grandes y espaciosas */
    min-height: 100px;
    display: flex;
    align-items: center;
    gap: 25px;
    background: rgba(15, 20, 30, 0.9);
}

/* Burbuja de la Liga en la esquina superior derecha */
.stint-league-badge {
    position: absolute;
    top: -12px;
    right: -12px;
    background: var(--bg-dark, #0a0e17);
    border: 2px solid var(--border-dark, #2a3441);
    border-radius: 8px;
    padding: 5px 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 5;
}

.league-logo-img {
    height: 25px;
    width: auto;
    object-fit: contain;
}

.league-text-badge {
    font-size: 0.75rem;
    font-weight: 900;
    color: var(--neon-blue, #00f2ff);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* El contenido del equipo (Nombre y Stats) */
.stint-info-box {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex-grow: 1;
}

.stint-team-name {
    font-size: 1.1rem;
    font-weight: 900;
    color: #fff;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.stint-years {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-secondary, #8892b0);
    margin-bottom: 6px;
}

/* =========================================
   LA TARJETA DE LA SELECCIÓN (EDICIÓN ORO)
   ========================================= */

.national-stint {
    margin-top: 50px; /* Separación extra del resto de clubes */
}

.marker-gold {
    border-color: #ffd700 !important;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.6) !important;
}

.national-card {
    background: linear-gradient(135deg, rgba(20, 24, 34, 0.9) 0%, rgba(40, 35, 10, 0.95) 100%);
    border: 1px solid #ffd700;
    box-shadow: 0 10px 20px rgba(255, 215, 0, 0.15);
}

.national-card:hover {
    border-color: #ffea00;
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.3);
}

.gold-badge {
    color: #ffd700 !important;
}

.gold-border {
    border: 2px solid rgba(255, 215, 0, 0.5);
    background: rgba(255, 215, 0, 0.1);
}

.gold-text {
    color: #ffd700 !important;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

/* =========================================
   BANDERA DEL PAÍS (ESQUINA INFERIOR DERECHA)
   ========================================= */
.stint-country-flag {
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 26px;
    height: 18px;
    border-radius: 3px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.7;
    transition: 0.3s ease;
    z-index: 5;
}

.expanded-card:hover .stint-country-flag {
    opacity: 1;
    transform: scale(1.1);
    box-shadow: 0 4px 10px rgba(0,0,0,1);
}

.stint-country-flag img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* --- PREMIUM HUD: TEAMS COUNTER --- */
.attempts-counter {
    display: flex;
    align-items: center;
    gap: 18px;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8) 0%, rgba(20, 30, 48, 0.9) 100%);
    padding: 16px 32px; /* Más grande */
    border-radius: 100px; /* Estilo cápsula */
    border: 2px solid var(--neon-blue, #00f2ff);
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.2), inset 0 0 10px rgba(0, 242, 255, 0.1);
    backdrop-filter: blur(12px);
    margin-bottom: 30px;
    transition: all 0.5s ease;
}

.counter-label {
    font-size: 1rem; /* Texto 'TEAMS' más grande */
    font-weight: 900;
    letter-spacing: 4px;
    color: #8892b0;
    text-transform: uppercase;
    text-shadow: 0 0 5px rgba(0,0,0,0.5);
}

.counter-badge {
    font-size: 2rem; /* Números muy grandes y potentes */
    font-weight: 900;
    color: #fff;
    font-family: 'Inter', sans-serif;
    line-height: 1;
}

.counter-sep {
    color: var(--neon-blue, #00f2ff);
    margin: 0 8px;
    font-weight: 400;
}

/* --- PLAYER PHOTO POSITION --- */
.mystery-container {
    margin-top: 60px; /* Bajamos la foto considerablemente */
    margin-bottom: 50px;
    perspective: 1000px;
}

.mystery-player {
    width: 240px; /* Un poco más grande para llenar el espacio */
    height: 240px;
    border-radius: 25px;
    border: 5px solid var(--neon-blue, #00f2ff);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), 0 0 25px rgba(0, 242, 255, 0.3);
    object-fit: cover;
    background: #fff;
    transition: transform 0.3s ease;
}

/* --- BONUS PHASE UI --- */
.counter-bonus-phase {
    border-color: #ffd700;
    background: linear-gradient(135deg, rgba(40, 35, 10, 0.9) 0%, rgba(20, 18, 5, 0.95) 100%);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.4);
    animation: pulseGold 2s infinite ease-in-out;
}

@keyframes pulseGold {
    0% { transform: scale(1); box-shadow: 0 0 20px rgba(255, 215, 0, 0.3); }
    50% { transform: scale(1.03); box-shadow: 0 0 40px rgba(255, 215, 0, 0.6); }
    100% { transform: scale(1); box-shadow: 0 0 20px rgba(255, 215, 0, 0.3); }
}