/* =====================================================
   ESTILO GENERAL
   ===================================================== */

body {
    font-family: "Barlow", sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #f4f6f8;
    color: #333;
}

button,
input,
select,
textarea {
    font-family: inherit;
}
h1,
h2,
h3,
.titulo-bote {
    font-family: "Barlow", sans-serif;
}


/* =====================================================
   CABECERA
   ===================================================== */

header {
    text-align: center;
    margin-bottom: 25px;
}

header h1 {
    margin: 0;
    color: #1976d2;
}


/* =====================================================
   MENÚ
   ===================================================== */

nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 25px;
}

button {
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    background-color: #1976d2;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
}

button:hover {
    background-color: #125ca3;
    transform: translateY(-1px);
}


/* =====================================================
   TARJETAS
   ===================================================== */

.card {
    background: white;
    border: 1px solid #ddd;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}


/* =====================================================
   BOTE PRINCIPAL
   ===================================================== */

.resumen-principal {
    text-align: center;
    padding: 30px 20px;
    background: linear-gradient(135deg, #1976d2, #42a5f5);
    color: white;
    border: none;
}

.resumen-principal h2 {
    margin: 0 0 25px 0;
    font-size: 26px;
}

.bote-grande {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.titulo-bote {
    font-size: 18px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

#bote {
    font-size: 52px;
    font-weight: bold;
    color: white;
    line-height: 1.1;
    margin: 5px 0;
    cursor: pointer;
}

.bote-grande::after {
    content: "";
    font-size: 14px;
    opacity: 0.9;
    margin-top: 5px;
}


/* =====================================================
   TABLAS
   ===================================================== */

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

th,
td {
    border-bottom: 1px solid #ddd;
    padding: 12px 10px;
    text-align: center;
}

th {
    background-color: #1976d2;
    color: white;
}

tr:hover {
    background-color: #f5f5f5;
}


/* =====================================================
   LISTAS DE JORNADAS
   ===================================================== */

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

li {
    padding: 12px;
    border-bottom: 1px solid #ddd;
    cursor: pointer;
    transition: 0.2s;
}

li:hover {
    background-color: #f5f5f5;
}


/* =====================================================
   ELEMENTOS OCULTOS
   ===================================================== */

.oculta {
    display: none;
}

/* =====================================================
   CLASIFICACIÓN - DISEÑO
   ===================================================== */

#resumen-clasificacion,
#clasificacion-tabla {
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    border-radius: 12px;
}

/* Cabecera */
#resumen-clasificacion thead th,
#clasificacion-tabla thead th {
    background: #1976d2;
    color: white;
    padding: 13px 10px;
    font-size: 14px;
}

/* Filas */
#resumen-clasificacion tbody tr,
#clasificacion-tabla tbody tr {
    background: white;
    transition: transform 0.15s, box-shadow 0.15s;
}

#resumen-clasificacion tbody tr:hover td,
#clasificacion-tabla tbody tr:hover td {
    filter: brightness(0.97);
}

/* Celdas */
#resumen-clasificacion tbody td,
#clasificacion-tabla tbody td {
    padding: 14px 10px;
    border-bottom: 1px solid #e5e5e5;
}

/* Posición */
#resumen-clasificacion tbody td:first-child,
#clasificacion-tabla tbody td:first-child {
    width: 55px;
    font-size: 24px;
    text-align: center;
}

/* Nombre */
#resumen-clasificacion tbody td:nth-child(2),
#clasificacion-tabla tbody td:nth-child(2) {
    text-align: left;
    font-weight: bold;
    font-size: 16px;
}

/* Aciertos */
#resumen-clasificacion tbody td:nth-child(3),
#clasificacion-tabla tbody td:nth-child(3) {
    font-weight: bold;
    font-size: 18px;
}

/* Media */
#resumen-clasificacion tbody td:nth-child(4),
#clasificacion-tabla tbody td:nth-child(4) {
    font-weight: bold;
    color: #1976d2;
}

/* =====================================================
   COLORES DE LOS PODIOS
   ===================================================== */

/* 🥇 PRIMER PUESTO */
#resumen-clasificacion tbody tr:first-child td,
#clasificacion-tabla tbody tr:first-child td {
    background-color: #fff4c2;
}

/* 🥈 SEGUNDO PUESTO */
#resumen-clasificacion tbody tr:nth-child(2) td,
#clasificacion-tabla tbody tr:nth-child(2) td {
    background-color: #eeeeee;
}

/* 🥉 TERCER PUESTO */
#resumen-clasificacion tbody tr:nth-child(3) td,
#clasificacion-tabla tbody tr:nth-child(3) td {
    background-color: #f8e2d0;
}
/* =====================================================
   ESTADOS DE LAS JORNADAS
   ===================================================== */

/* Base de cada jornada */
#lista-jornadas li {
    position: relative;
    margin-bottom: 8px;
    padding: 14px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    background: white;
    font-weight: bold;
    transition: all 0.2s ease;
}

/* Efecto al pasar el ratón */
#lista-jornadas li:hover {
    background-color: #f5f9ff;
    transform: translateX(3px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}
/* 🟢 JORNADA JUGADA */
#lista-jornadas li.jornada-jugada {
    border-left: 5px solid #43a047;
    background-color: #f1f8f2;
}

/* 🔵 PRÓXIMA JORNADA */
#lista-jornadas li.jornada-proxima {
    border-left: 5px solid #1976d2;
    background-color: #eaf3ff;
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.15);
}

/* ⚪ JORNADA PENDIENTE */
#lista-jornadas li.jornada-pendiente {
    border-left: 5px solid #bdbdbd;
    background-color: #fafafa;
    color: #666;
}
/* =====================================================
   JORNADA SELECCIONADA
   ===================================================== */

#lista-jornadas li.jornada-seleccionada {
    border: 2px solid #1976d2;
    border-left: 6px solid #1976d2;
    background-color: #e3f2fd;
    box-shadow: 0 3px 10px rgba(25, 118, 210, 0.20);
    transform: translateX(4px);
}
/* =====================================================
   GALERÍA DE QUINIELAS Y ACCESO ADMINISTRADOR
   ===================================================== */
.panel-admin-quinielas {
    margin: 18px 0;
    padding: 16px;
    border: 1px solid #d7e5f5;
    border-radius: 10px;
    background: #f7fbff;
}

.formulario-admin-quinielas,
.controles-subida-quiniela {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.formulario-admin-quinielas label,
.controles-subida-quiniela label {
    font-weight: bold;
}

.formulario-admin-quinielas input,
.controles-subida-quiniela input {
    max-width: 100%;
    padding: 9px;
    border: 1px solid #c8d2dc;
    border-radius: 6px;
}

.estado-sesion-admin,
.estado-subida-quiniela {
    margin-bottom: 0;
    color: #4b5563;
}

.jornada-galeria {
    overflow: hidden;
    padding: 0;
}

.titulo-jornada-galeria {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    cursor: pointer;
    font-weight: bold;
    list-style: none;
}

.titulo-jornada-galeria::-webkit-details-marker {
    display: none;
}

.titulo-jornada-galeria::after {
    content: '+';
    color: #1976d2;
    font-size: 22px;
    line-height: 1;
}

.jornada-galeria[open] > .titulo-jornada-galeria {
    border-bottom: 1px solid #ddd;
}

.jornada-galeria[open] > .titulo-jornada-galeria::after {
    content: '−';
}

.contenido-jornada-galeria {
    padding: 16px 20px 20px;
}

.selector-temporada {
    margin: 18px 0;
}

.imagen-quiniela {
    display: block;
    width: 100%;
    max-height: 720px;
    margin: 12px auto;
    object-fit: contain;
    border-radius: 8px;
}

@media (max-width: 600px) {
    .formulario-admin-quinielas,
    .controles-subida-quiniela {
        align-items: stretch;
        flex-direction: column;
    }

    .formulario-admin-quinielas input,
    .formulario-admin-quinielas button,
    .controles-subida-quiniela input,
    .controles-subida-quiniela button {
        width: 100%;
    }
}
/* Detalle desplegable de las últimas jornadas en Resumen */
#resumen-ultimas-jornadas li {
    padding: 0;
    border-bottom: 0;
}

#resumen-ultimas-jornadas details {
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    background: #f7fbf7;
    margin-bottom: 8px;
    overflow: hidden;
}

#resumen-ultimas-jornadas summary {
    padding: 14px 16px;
    cursor: pointer;
    font-weight: bold;
}

#resumen-ultimas-jornadas summary:hover {
    background: #eef7ef;
}

.resumen-jornada-detalle {
    padding: 2px 16px 12px;
    border-top: 1px solid #e0e0e0;
}

.resumen-jornada-detalle p {
    margin: 10px 0 0;
}