/* Tabla de partidos moderna */
.tabla-partidos {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
    font-size: 1rem;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-radius: 8px;
    overflow: hidden;
}
.tabla-partidos th, .tabla-partidos td {
    padding: 12px 16px;
    text-align: center;
    border-bottom: 1px solid #eee;
}
.tabla-partidos th {
    background: var(--ffcv-blue-dark);
    color: #fff;
    font-weight: 700;
    text-transform: uppercase;
}
.tabla-partidos tr:last-child td {
    border-bottom: none;
}
.tabla-partidos tr:hover {
    background: #f6f8fa;
}
@media (max-width: 768px) {
    .tabla-partidos th, .tabla-partidos td {
        padding: 8px 6px;
        font-size: 0.95em;
    }
}
/* --- VARIABLES --- */
:root {
  --ffcv-blue-dark: #001C47; 
  --ffcv-blue-light: #3871D7; 
  --ffcv-orange: #D8641C; 
  --ffcv-white: #FFFFFF;
  --caribbean-blue: #00E5FF; 
  --text-dark: #222;
    --chip-gap: 6px;
    --scroll-pad: 16px;
}

body { 
    font-family: 'Roboto', sans-serif; 
    margin: 0; 
    background-color: #f4f4f4; 
    color: var(--text-dark); 
}

/* HEADER */
.main-header { 
    /* Eliminar degradado por defecto: dejamos el fondo controlado por custom.css con header_bg.jpg */
    background: none; 
    color: var(--ffcv-white); 
    padding-bottom: 5px; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}
.container-wide { max-width: 1200px; margin: 0 auto; padding: 0 15px; }
.header-content { display: flex; align-items: center; padding: 15px 0; gap: 20px; }
.header-right { flex-grow: 1; display: flex; justify-content: flex-end; }
.logo img { height: 60px; }

/* MENU SUPERIOR (Referencia de estilo) */
.main-nav ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.main-nav a { 
    color: var(--ffcv-white); 
    text-decoration: none; 
    font-size: 16px; 
    font-weight: 700; 
    padding: 8px 20px; 
    border-radius: 50px; 
    transition: 0.3s; 
}
.main-nav a:hover, .main-nav a.active { 
    background-color: var(--ffcv-orange); 
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3); 
}

/* TÍTULO Y BUSCADOR */
.title-search-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0 15px 0; }
#current-page-title { margin: 0; font-size: 32px; font-weight: 900; color: var(--ffcv-white); text-transform: uppercase; font-style: italic; }

#club-search { 
    padding: 10px 18px; border-radius: 20px; border: 2px solid var(--ffcv-white); width: 300px; 
    font-size: 15px; background: rgba(255, 255, 255, 0.1); color: var(--ffcv-white); font-weight: 500;
}
#club-search:focus { outline: none; border-color: var(--ffcv-orange); background: var(--ffcv-white); color: var(--text-dark); }
#club-results {
    position: absolute; z-index: 100; width: 300px; background: var(--ffcv-white);
    border-radius: 8px; box-shadow: 0 8px 15px rgba(0,0,0,0.2); margin-top: 5px;
    max-height: 300px; overflow-y: auto; display: none;
}
#club-results, #club-results li { color: var(--ffcv-blue-dark); }
#club-results li { padding: 10px 15px; cursor: pointer; border-bottom: 1px solid #eee; }
#club-results li:hover { background: #e8f0fb; color: var(--ffcv-blue-dark); }
#club-results li.active { background: #e8f0fb; color: var(--ffcv-blue-dark); }
#club-results li .club-item { display:flex; flex-direction:column; }
#club-results li .club-name { font-weight: 800; color: var(--ffcv-blue-dark); }
#club-results li .club-loc { font-size: 12px; color: #567; }
mark { background: #ffeb99; color: inherit; padding: 0 2px; border-radius: 2px; }

/* SECTION */
#comp-debug-section { margin-top: 20px; background: var(--ffcv-white); padding: 25px; border-radius: 15px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); }

/* TÍTULO COMPETICIÓN */
#res-titulo { 
    color: var(--ffcv-blue-dark); 
    font-size: 1.6rem; font-weight: 900; text-transform: uppercase; 
    margin-bottom: 20px; padding-bottom: 10px; border-bottom: 3px solid var(--ffcv-orange);
}
#res-titulo .subtitle-info { font-size: 0.8em; color: #666; font-weight: 500; margin-left: 10px; text-transform: none; }

/* FILTROS */
.filters-top-row { display: flex; gap: 15px; margin-bottom: 20px; flex-wrap: wrap; }
.filter-group { flex: 1; min-width: 140px; display: flex; flex-direction: column; }
.filter-group label { font-size: 12px; font-weight: 700; color: #888; margin-bottom: 4px; text-transform: uppercase; }
.filter-group select { 
    padding: 10px; border: 2px solid #eee; border-radius: 8px; font-weight: 600; color: var(--ffcv-blue-dark); 
}

/* Carrusel de Jornadas (único) */
.hidden-select { display: none !important; }
/* Estilos de carrusel desactivados por defecto; se podrán reactivar si FLAGS lo permiten */
.j-carousel-wrapper { display: none; }
.j-arrow { display: none; }
.j-arrow:hover { }
.j-arrow:disabled { }
.j-scroller { display: none; }
.j-scroller::-webkit-scrollbar { display: none; }
.j-scroller.dragging { }
.j-scroller { }
.j-chip { display: none; }
.j-chip .j-num, .j-chip .j-date { }
.j-chip .j-num { }
.j-chip .j-date { }
.j-chip:hover { }
.j-chip.active { }
.j-chip.active .j-num, .j-chip.active .j-date { }
.j-chip:focus-visible { }

/* Evitar desbordes visuales fuera del wrapper */
.j-carousel-wrapper { position: relative; }
.j-carousel-wrapper::after,
.j-carousel-wrapper::before { display: none; }

@media (max-width: 600px) {
    .j-arrow { }
    .j-chip { }
    .j-chip .j-date { display: none; }
}

/* Forzar 8 chips visibles en carruseles con clase fit-8 */
.j-carousel-wrapper.fit-8 .j-chip { }

/* TABLAS Y ESCUDOS EN CLASIFICACIÓN (NUEVOS ESTILOS) */
.table-container { overflow-x: auto; border-top: 4px solid var(--ffcv-orange); border-radius: 8px; }

/* Nueva tabla de clasificaciones mejorada */
.clasificacion-table-wrapper {
    overflow-x: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* Tabs Total / Casa / Fuera (clasificación) */
.clasif-tabs-wrapper {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 6px 0 12px 0;
    text-align: right;
}
.clasif-title {
    font-weight: 800;
    font-size: 1.05rem;
    color: #0b1c33;
    margin-right: auto;
    padding-bottom: 6px;
    border-bottom: 3px solid var(--ffcv-orange);
}
.view-clasificaciones #res-title-row { display: none !important; }
.clasif-tab-input {
    display: none;
}
.clasif-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 16px;
    border: 1px solid #d6d6d6;
    border-radius: 18px;
    font-weight: 700;
    font-size: 13px;
    color: #333;
    background: #fff;
    margin-right: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.clasif-tab-input:checked + .clasif-tab {
    background: #e10600;
    color: #fff;
    border-color: #b90400;
}
.clasif-tabs-wrapper .clasif-panels {
    flex-basis: 100%;
    width: 100%;
    margin-top: 8px;
    text-align: left;
}
.clasif-tabs-wrapper .clasif-panel {
    display: none;
}
.clasif-tab-input[data-tab="total"]:checked ~ .clasif-panels [data-panel="total"] {
    display: block;
}
.clasif-tab-input[data-tab="casa"]:checked ~ .clasif-panels [data-panel="casa"] {
    display: block;
}
.clasif-tab-input[data-tab="fuera"]:checked ~ .clasif-panels [data-panel="fuera"] {
    display: block;
}

.clasificacion-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.clasificacion-table thead {
    background: var(--ffcv-blue-dark);
}

.clasificacion-table th {
    color: white;
    padding: 15px 12px;
    text-align: center;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.clasificacion-table th.col-equipo {
    text-align: left;
    padding-left: 20px;
}

.clasificacion-table tbody tr {
    position: relative;
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.2s;
}

.clasificacion-table tbody tr:hover {
    background-color: #f8f9fa;
}

.clasificacion-row td {
    padding: 12px;
    font-size: 14px;
    text-align: center;
}

.color-indicator {
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background-color: transparent;
}

.col-pos {
    width: 50px;
    font-weight: 700;
    font-size: 16px;
    color: var(--ffcv-blue-dark);
}

.col-equipo {
    text-align: left !important;
    padding-left: 20px !important;
    min-width: 250px;
}

.team-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.team-shield {
    width: 35px;
    height: 35px;
    object-fit: contain;
    flex-shrink: 0;
}

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

.col-stat {
    width: 50px;
    font-weight: 500;
    color: #495057;
}

.col-pts {
    color: var(--ffcv-orange) !important;
    font-weight: 900 !important;
    font-size: 16px !important;
}

.col-racha {
    min-width: 150px;
}

.col-next {
    min-width: 120px;
}

.next-match {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.next-match img {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.next-vs {
    display: inline-block;
    width: 12px;
    height: 2px;
    background: #c9c1b6;
    border-radius: 2px;
    font-size: 0;
    line-height: 0;
    color: transparent;
}

.next-empty {
    color: #999;
    font-weight: 600;
}

.racha-container {
    display: flex;
    gap: 4px;
    justify-content: center;
    align-items: center;
}

.racha-badge {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

/* Leyenda de promociones */
.clasificacion-legend {
    padding: 20px;
    background: #f8f9fa;
    border-top: 2px solid #dee2e6;
    margin-top: 0;
}

.legend-title {
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--ffcv-blue-dark);
    font-size: 14px;
    text-transform: uppercase;
}

.legend-items {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
}

.legend-color-box {
    width: 20px;
    height: 20px;
    border-radius: 3px;
    flex-shrink: 0;
}

.legend-text {
    color: #495057;
}

/* Estilos responsivos para clasificación */
@media (max-width: 768px) {
    .clasificacion-table th,
    .clasificacion-table td {
        padding: 8px 5px;
        font-size: 12px;
    }
    
    .team-shield {
        width: 28px;
        height: 28px;
    }
    
    .racha-badge {
        width: 24px;
        height: 24px;
        font-size: 11px;
    }
    
    .col-equipo {
        min-width: 180px;
    }
}

/* Estilos antiguos mantenidos para compatibilidad */
table { width: 100%; border-collapse: collapse; }
th { background: var(--ffcv-blue-dark); color: white; padding: 12px; }
td { padding: 12px; border-bottom: 1px solid #eee; text-align: center; }
tr:nth-child(even) { background: #f9f9f9; }

td:nth-child(2) { 
    text-align: left;
    padding-left: 15px;
}
.table-club-name {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: var(--ffcv-blue-dark);
}
.table-club-name img {
    height: 30px;
    width: 30px;
    object-fit: contain;
    flex-shrink: 0;
}
/* FIN ESTILOS CLASIFICACIÓN */

/* SANCIONES */
.sanciones-container { 
    overflow-x: auto; 
    border-top: 4px solid var(--ffcv-orange); 
    border-radius: 8px; 
}
.sanciones-container .styled-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    font-size: 14px;
}
.sanciones-container .styled-table thead tr {
    background: var(--ffcv-blue-dark);
    color: white;
    text-align: left;
    font-weight: 700;
}
.sanciones-container .styled-table th,
.sanciones-container .styled-table td {
    padding: 12px 15px;
}
.sanciones-container .styled-table tbody tr {
    border-bottom: 1px solid #e0e0e0;
    transition: background 0.2s ease;
}
.sanciones-container .styled-table tbody tr:hover {
    background: #f8f9fa;
}
.sanciones-container .styled-table tbody tr.jugador-row:hover {
    background: #e3f2fd;
    box-shadow: inset 0 0 0 1px #001C47;
}
.sanciones-container .styled-table tbody tr:last-of-type {
    border-bottom: 2px solid var(--ffcv-orange);
}
.sanciones-container .styled-table img {
    border-radius: 50%;
    object-fit: cover;
    display: block;
}
.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
    padding: 15px;
}
.pagination-controls button {
    padding: 10px 20px;
    background: var(--ffcv-blue-dark);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 700;
    font-family: 'Roboto', sans-serif;
    transition: background 0.3s ease, transform 0.1s ease;
}
.pagination-controls button:not(:disabled):hover {
    background: #D8641C;
    transform: translateY(-2px);
}
.pagination-controls button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.pagination-controls span {
    color: var(--ffcv-blue-dark);
    font-weight: 700;
    font-size: 14px;
}
/* FIN SANCIONES */

/* PARTIDOS GRID */
.matches-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); gap: 15px; }
.match-card { 
    background: white; border-radius: 12px; overflow: hidden; border-left: 5px solid var(--ffcv-orange); 
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.match-header { background: #f8f9fa; padding: 10px 15px; font-size: 12px; font-weight: 700; display: flex; justify-content: space-between; }
.match-body { padding: 15px; display: flex; align-items: center; justify-content: space-between; }
.team { width: 40%; text-align: center; font-weight: 700; font-size: 13px; color: var(--ffcv-blue-dark); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.score-box { font-size: 28px; font-weight: 900; color: var(--ffcv-orange); width: 20%; text-align: center; }
.team img { /* Estilo de escudo en partido */
    height: 50px; 
    width: 50px;
    object-fit: contain;
}

.status-fin { color: #28a745; }
.status-susp { color: #dc3545; }

#club-detail-container { margin-top: 30px; background: white; padding: 20px; border-radius: 15px; }
.no-data-message { padding: 40px; text-align: center; color: #999; background: #fff; border-radius: 10px; }

/* =============================================== */
/* ESTILOS DE SANCIONES */
/* =============================================== */

/* =============================================== */
/* ESTILOS DE SANCIONES */
/* =============================================== */

.sanciones-filters-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    flex-wrap: wrap;
}

.sanciones-filters-row .filter-group {
    flex: 1;
    min-width: 200px;
}

.sanciones-filters-row input[type="text"] {
    padding: 10px;
    border: 2px solid #eee;
    border-radius: 8px;
    font-weight: 600;
    color: var(--ffcv-blue-dark);
    width: 100%;
    font-family: 'Roboto', sans-serif;
}

.sanciones-filters-row input[type="text"]:focus {
    outline: none;
    border-color: var(--ffcv-orange);
}

.sanciones-wrapper {
    padding: 0;
}

.sancion-comite-section {
    margin-bottom: 35px;
}

.sancion-comite-titulo {
    color: var(--ffcv-blue-dark);
    font-size: 1.4rem;
    font-weight: 900;
    text-transform: uppercase;
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--ffcv-orange);
    font-family: 'Roboto', sans-serif;
}

.sancion-grupo-titulo {
    color: #555;
    font-size: 1.1rem;
    font-weight: 700;
    margin: 20px 0 12px 0;
    font-family: 'Roboto', sans-serif;
}

.sanciones-table-wrapper {
    overflow-x: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

.sanciones-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    font-family: 'Roboto', sans-serif;
}

.sanciones-table thead {
    background: var(--ffcv-blue-dark);
}

.sanciones-table th {
    color: white;
    padding: 15px 12px;
    text-align: center;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sanciones-table th.col-foto {
    width: 70px;
}

.sanciones-table th.col-equipo {
    text-align: left;
    padding-left: 20px;
    min-width: 200px;
}

.sanciones-table th.col-nombre {
    text-align: left;
    min-width: 180px;
}

.sanciones-table th.col-licencia {
    width: 90px;
}

.sanciones-table th.col-tipo {
    width: 120px;
}

.sanciones-table th.col-partidos {
    width: 80px;
}

.sanciones-table tbody tr {
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.2s;
}

.sanciones-table tbody tr:hover {
    background-color: #f8f9fa;
}

.sanciones-table tbody tr.suspension-row {
    background-color: #fff3e0;
}

.sanciones-table tbody tr.suspension-row:hover {
    background-color: #ffe0b2;
}

.sancion-row td {
    padding: 12px;
    font-size: 14px;
    text-align: center;
}

.col-foto {
    text-align: center !important;
}

.jugador-foto {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e0e0e0;
}

.jugador-foto-placeholder {
    width: 50px;
    height: 50px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.col-equipo {
    text-align: left !important;
    padding-left: 20px !important;
    font-weight: 600;
    color: var(--ffcv-blue-dark);
}

.col-nombre {
    text-align: left !important;
    font-weight: 500;
    color: #495057;
}

.col-licencia {
    font-weight: 700;
    color: #666;
    font-size: 13px;
}

.col-tipo {
    font-weight: 600;
    color: #495057;
}

.col-partidos {
    font-weight: 900;
}

.partidos-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 16px;
    font-weight: 900;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.partidos-badge.tiene-suspension {
    background: var(--ffcv-orange);
    color: white;
}

.partidos-badge.sin-suspension {
    background: #e0e0e0;
    color: #999;
}

/* Responsive para sanciones */
@media (max-width: 768px) {
    .sanciones-table th,
    .sanciones-table td {
        padding: 8px 6px;
        font-size: 12px;
    }
    
    .jugador-foto,
    .jugador-foto-placeholder {
        width: 40px;
        height: 40px;
    }
    
    .partidos-badge {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .sancion-comite-titulo {
        font-size: 1.1rem;
    }
    
    .sancion-grupo-titulo {
        font-size: 0.95rem;
    }
}

@media (max-width: 768px) {
    .filters-top-row { flex-direction: column; }
}

/* --- MODAL DE FICHA DE JUGADOR --- */
.modal-ficha-jugador {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

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

.modal-content-jugador {
    background-color: #fff;
    margin: auto;
    padding: 0;
    border-radius: 15px;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { 
        transform: translateY(-50px);
        opacity: 0;
    }
    to { 
        transform: translateY(0);
        opacity: 1;
    }
}

.close-modal-jugador {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #fff;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10001;
    background: rgba(0, 0, 0, 0.5);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-modal-jugador:hover,
.close-modal-jugador:focus {
    background: rgba(220, 53, 69, 0.8);
    transform: rotate(90deg);
}

/* Estilos de la tarjeta del jugador */
.player-card-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    overflow: hidden;
}

.player-header {
    background: rgba(255, 255, 255, 0.1);
    padding: 30px;
    backdrop-filter: blur(10px);
}

.player-header-content {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.player-photo-wrapper {
    position: relative;
    flex-shrink: 0;
}

.player-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.player-dorsal {
    position: absolute;
    bottom: -10px;
    right: -10px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    border: 3px solid white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.player-info {
    flex: 1;
}

.player-name {
    font-size: 32px;
    font-weight: 900;
    margin: 0 0 10px 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.player-position {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 20px;
    font-weight: 500;
}

.player-team-info {
    display: flex;
    gap: 15px;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 10px;
}

.team-shield {
    width: 50px;
    height: 50px;
    object-fit: contain;
    background: white;
    border-radius: 8px;
    padding: 5px;
}

.team-details {
    flex: 1;
}

.team-name {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 5px;
}

.competition-info {
    font-size: 14px;
    opacity: 0.8;
}

.player-age-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
}

.player-stats {
    padding: 30px;
    background: white;
    color: #333;
}

.stats-title {
    font-size: 24px;
    font-weight: bold;
    margin: 0 0 20px 0;
    color: #667eea;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-value {
    font-size: 36px;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.cards-display {
    display: flex;
    justify-content: center;
    gap: 5px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.card-icon {
    width: 20px;
    height: 28px;
    border-radius: 3px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.card-icon.yellow {
    background: linear-gradient(135deg, #f9d423 0%, #ff4e50 100%);
}

.card-icon.red {
    background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
}

/* Responsive modal */
@media (max-width: 768px) {
    .modal-content-jugador {
        width: 95%;
        max-height: 95vh;
    }
    
    .player-header-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .player-name {
        font-size: 24px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Imprimir: Clasificación en B/N */
@media print {
    /* Ocultar elementos no necesarios */
    .main-header, .filters-top-row, .filters-modern, #club-search-container, .j-carousel-wrapper, .matches-grid, #view-partidos, #view-sanciones, .pagination-controls, #empty-msg { display: none !important; }
    body { background: #fff !important; }

    /* Mostrar y formatear sólo la clasificación */
    #view-clasificaciones, .clasificacion-table-wrapper, .clasificacion-table { display: block !important; box-shadow: none !important; }
    .clasificacion-table, .clasificacion-table th, .clasificacion-table td { color: #000 !important; background: #fff !important; border-color: #000 !important; }
    .clasificacion-table thead { background: #fff !important; }
    .clasificacion-table th { border-bottom: 2px solid #000 !important; }
    .clasificacion-table tbody tr { border-bottom: 1px solid #000 !important; }
    .col-pts, .team-name-text { color: #000 !important; }
    .legend-color-box { border: 1px solid #000 !important; background: #fff !important; }
    .clasificacion-legend { border-top: 1px solid #000 !important; background: #fff !important; }
    img { filter: grayscale(100%) contrast(110%); }
}