/* mundial.css – Estilos premium y modernos de alta fidelidad para el módulo Mundial */

:root {
    --color-primario: #0f172a;      /* Azul pizarra muy profundo */
    --color-secundario: #1e293b;    /* Slate oscuro */
    --color-acento: #2563eb;        /* Azul eléctrico */
    --color-acento-hover: #1d4ed8;  /* Azul eléctrico más oscuro */
    --color-exito: #10b981;         /* Esmeralda */
    --color-fondo: #f8fafc;         /* Gris hielo muy limpio */
    --color-tarjeta: #ffffff;
    --color-texto: #0f172a;
    --color-texto-muted: #64748b;
    --color-borde: #e2e8f0;
    --sombra-premium: 0 4px 20px -2px rgba(15, 23, 42, 0.08), 0 2px 8px -1px rgba(15, 23, 42, 0.04);
    --sombra-tarjeta: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
    --sombra-hover: 0 20px 25px -5px rgba(37, 99, 235, 0.1), 0 10px 10px -5px rgba(37, 99, 235, 0.04);
    --radio-borde: 12px;
}

/* Contenedor Principal */
.mundial-dashboard-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: 'Poppins', sans-serif;
    color: var(--color-texto);
}

/* Encabezado */
.mundial-header {
    text-align: center;
    margin-bottom: 40px;
}

.mundial-header h1 {
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--color-primario);
    background: linear-gradient(135deg, var(--color-primario) 30%, var(--color-acento));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}

.mundial-header p {
    font-size: 1.1rem;
    color: var(--color-texto-muted);
}

/* Selector de Pestañas (Tabs) */
.mundial-tabs-wrapper {
    display: inline-flex;
    background: #e2e8f0;
    padding: 6px;
    border-radius: 30px;
    margin-bottom: 30px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.06);
    justify-content: center;
}

.tabs-center-align {
    text-align: center;
    margin-bottom: 15px;
}

.mundial-tab-btn {
    border: none;
    background: transparent;
    padding: 10px 28px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-texto-muted);
    cursor: pointer;
    border-radius: 25px;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mundial-tab-btn i {
    font-size: 1.1rem;
}

.mundial-tab-btn:hover {
    color: var(--color-primario);
}

.mundial-tab-btn.active {
    background: var(--color-tarjeta);
    color: var(--color-acento);
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

/* Contenido de Pestañas */
.mundial-tab-content {
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.35s ease;
}

.mundial-tab-content.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================
   PESTAÑA: PARTIDOS Y CALENDARIO
   ========================================== */

/* Filtros por fase (Pills) */
.fase-filters-container {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 30px;
    justify-content: center;
}

.fase-filter-pill {
    padding: 8px 18px;
    background: #f1f5f9;
    border: 1px solid var(--color-borde);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-texto-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.fase-filter-pill:hover {
    background: #e2e8f0;
    color: var(--color-primario);
}

.fase-filter-pill.active {
    background: var(--color-acento);
    border-color: var(--color-acento);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

/* Grid de Partidos */
.partidos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 25px;
}

/* Tarjeta de Partido Premium */
.match-card {
    background: var(--color-tarjeta);
    border-radius: var(--radio-borde);
    border: 1px solid var(--color-borde);
    box-shadow: var(--sombra-tarjeta);
    display: flex;
    flex-direction: column;
    padding: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.match-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--color-acento), var(--color-exito));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.match-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--sombra-hover);
    border-color: rgba(37, 99, 235, 0.2);
}

.match-card:hover::before {
    opacity: 1;
}

/* Encabezado Tarjeta */
.match-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 12px;
    margin-bottom: 16px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--color-texto-muted);
}

.match-fase-badge {
    background: #eff6ff;
    color: var(--color-acento);
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 600;
}

.match-stadium {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Cuerpo Tarjeta */
.match-card-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-grow: 1;
    margin-bottom: 12px;
}

.match-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 35%;
    text-align: center;
}

.match-team-flag {
    margin-bottom: 8px;
    transition: transform 0.2s ease;
}

.match-team:hover .match-team-flag {
    transform: scale(1.1);
}

.match-team span.fi {
    width: 48px;
    height: 36px;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    display: block;
}

.match-team img {
    height: 36px;
    max-width: 48px;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.match-team-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-primario);
}

/* Marcador y Tiempo */
.match-score-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 30%;
}

.match-score-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-primario);
    letter-spacing: 4px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.04);
}

.match-score-badge.pending {
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0;
    color: var(--color-texto-muted);
    background: #f8fafc;
    border: 1px dashed var(--color-borde);
}

.match-time-badge {
    margin-top: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-acento);
}

/* Pie Tarjeta */
.match-card-footer {
    display: flex;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--color-texto-muted);
    border-top: 1px solid #f1f5f9;
    padding-top: 12px;
}

/* ==========================================
   PESTAÑA: TABLAS DE POSICIONES
   ========================================== */

/* Grid de Grupos */
.grupos-posiciones-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 30px;
}

@media (max-width: 600px) {
    .grupos-posiciones-grid {
        grid-template-columns: 1fr;
    }
    .partidos-grid {
        grid-template-columns: 1fr;
    }
}

/* Caja de Grupo Premium */
.grupo-card {
    background: var(--color-tarjeta);
    border-radius: var(--radio-borde);
    border: 1px solid var(--color-borde);
    box-shadow: var(--sombra-tarjeta);
    padding: 20px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.grupo-card:hover {
    box-shadow: var(--sombra-premium);
}

.grupo-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-primario);
    border-bottom: 2px solid var(--color-acento);
    display: inline-block;
    padding-bottom: 4px;
    margin-bottom: 20px;
}

/* Tabla de Posiciones */
.tabla-grupo {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.tabla-grupo th {
    color: var(--color-texto-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    padding: 10px 8px;
    border-bottom: 2px solid var(--color-borde);
    text-align: center;
}

.tabla-grupo th.col-team {
    text-align: left;
}

.tabla-grupo td {
    padding: 12px 8px;
    border-bottom: 1px solid #f1f5f9;
    text-align: center;
    vertical-align: middle;
}

.tabla-grupo tr:last-child td {
    border-bottom: none;
}

.tabla-grupo tr.pos-1 td,
.tabla-grupo tr.pos-2 td {
    background-color: rgba(37, 99, 235, 0.02); /* Sutil marca de clasificación */
}

/* Clasificados indicación visual */
.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.8rem;
    background: #f1f5f9;
    color: var(--color-texto-muted);
}

.pos-1 .rank-badge {
    background: #fef3c7;
    color: #d97706;
}

.pos-2 .rank-badge {
    background: #eff6ff;
    color: var(--color-acento);
}

/* Equipo Celda */
.team-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
}

.team-cell span.fi {
    width: 22px;
    height: 16px;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
    display: inline-block;
}

.team-cell img {
    height: 16px;
    max-width: 22px;
    object-fit: contain;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.team-name-text {
    font-weight: 600;
    color: var(--color-primario);
}

/* Resaltado de Puntos */
.puntos-destacados {
    font-weight: 700;
    color: var(--color-acento);
}

/* Sin datos alerta */
.empty-data-alert {
    background: #f8fafc;
    border: 1px dashed var(--color-borde);
    padding: 40px;
    text-align: center;
    border-radius: var(--radio-borde);
    color: var(--color-texto-muted);
}

.empty-data-alert i {
    font-size: 3rem;
    margin-bottom: 12px;
    color: var(--color-borde);
}
