/* =========================
   DESIGN SYSTEM
========================= */

:root {

    --primary: #2563eb;
    --primary-hover: #1d4ed8;

    --background: #f1f5f9;
    --card: #ffffff;

    --topbar: #1e3a8a;

    --text-main: #111827;
    --text-light: #6b7280;

    --border: #e5e7eb;

}

/* =========================
   RESET
========================= */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}


/* =========================
   TOPBAR
========================= */

.topbar {
    position: fixed;
    top: 0;
    width: 100%;
    min-height: 60px;

    background: linear-gradient(90deg, #0f2d6b, #1e4db7);
    color: white;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 30px;
    z-index: 1000;

    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.topbar a {
    color: #d1d5db;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;

    padding: 6px 10px;
    border-radius: 6px;

    transition: 0.2s;
}

.topbar a:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.topbar .logo {
    font-weight: bold;
    font-size: 18px;
}

.topbar-right {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.logout {
    margin-left: 10px;
    background: rgba(255, 77, 77, 0.15);
    padding: 6px 10px;
    border-radius: 6px;
    color: #ff6b6b;
}

.logout:hover {
    background: rgba(255, 77, 77, 0.25);
    color: white;
}

.user-name {
    font-size: 14px;
    color: #ffffff;
}

.content {
    margin-top: 80px; /* deja espacio debajo de la barra */
    padding: 20px;
}

/* =========================
   TOPBAR CENTER
========================= */


.topbar-center {
    flex: 1;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.topbar-center a {
    color: #d1d5db;
    font-size: 14px;
    font-weight: 500;
    transition: 0.2s;
}

.topbar-center a:hover {
    color: white;
}

/* =========================
   logo dashboard
========================= */

.logo-mundial {
    width: 220px;
    display: block;
    margin: 20px auto;
}

/* =========================
   BASE
========================= */

body {
    font-family: "Inter", "Segoe UI", Roboto, Arial, sans-serif;
    background: var(--background);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.content {
    flex: 1;
}

h1, h2, h3 {
    color: #1f2933;
    font-weight: 600;
}

a {
    text-decoration: none;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo-img {
    width: 64px;
    height: 64px;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.logo-main {
    font-size: 15px;
    font-weight: 600;
    color: white;
}

.logo-sub {
    font-size: 14px;
    font-weight: 700;
    color: #dce6f2;
}

/* =========================
   CENTER (Login/Register)
========================= */

.center-screen {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* =========================
   AUTH BOX (Login/Register)
========================= */

.auth-box {
    background: #ffffff;
    padding: 36px 32px;
    width: 380px;
}

.auth-box form{
    max-width:280px;
    margin:0 auto;
    text-align:left;
}

.auth-box h2 {
    text-align: center;
    margin-bottom: 24px;
}

.auth-box button{
    width:100%;
    margin-top:10px;
}

label {
    font-size: 13px;
    font-weight: 600;
    color: #4b5563;
}

input {
    width: 100%;
    padding: 11px 12px;
    margin-top: 6px;
    margin-bottom: 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    background: #f9fafb;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
    background: #ffffff;
}

button {
    padding: 10px 18px;
    background: #2563eb;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, transform 0.05s;
}

button:hover {
    background: #1e4fd8;
}

button:active {
    transform: scale(0.98);
}

.link {
    text-align: center;
    margin-top: 18px;
    font-size: 14px;
    color: #6b7280;
}

.link a {
    color: #2563eb;
    font-weight: 500;
}

.link a:hover {
    text-decoration: underline;
}

.error {
    background: #fef2f2;
    color: #991b1b;
    padding: 10px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 18px;
    text-align: center;
    border: 1px solid #fecaca;
}

/* =========================
   MAIN CONTAINER
========================= */

.container {
    max-width: 1100px;
    margin: 40px auto;
    padding: 20px;
}

/* =========================
   CARD
========================= */

.card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.08);
    margin-bottom: 25px;
}

/* =========================
   NAVBAR
========================= */

.navbar {
    background: white;
    padding: 15px 30px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar h3 {
    font-size: 18px;
}

.nav-links a {
    margin-left: 20px;
    font-size: 14px;
    color: #374151;
    font-weight: 500;
}

.nav-links a:hover {
    color: #2563eb;
}

/* =========================
   TABLES (Torneos / Ranking / Pronósticos)
========================= */

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

th {
    text-align: left;
    font-size: 13px;
    text-transform: uppercase;
    color: #6b7280;
    padding-bottom: 12px;
}

td {
    padding: 14px 0;
    border-bottom: 1px solid #e5e7eb;
    font-size: 14px;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover {
    background-color: #f9fafb;
}

/* =========================
   BADGES (Puntos)
========================= */

.badge {
    background: #2563eb;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

/* =========================
   POSITION NUMBER (Ranking)
========================= */

.position {
    font-weight: 600;
    color: #2563eb;
}

/* =========================
   HIGHLIGHT USER ROW
========================= */

.highlight {
    background-color: #eff6ff;
    font-weight: 500;
}

/* =========================
   BUTTON GROUP
========================= */

.button-group {
    margin-top: 20px;
}

.button-group button {
    margin-right: 10px;
}

/* =========================
   EMPTY STATE
========================= */

.empty {
    padding: 30px;
    text-align: center;
    color: #6b7280;
    font-size: 14px;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 768px) {

    .container {
        padding: 15px;
    }

    .navbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .nav-links {
        margin-top: 10px;
    }

    table {
        font-size: 13px;
    }

}


/* =========================
   DASHBOARD
========================= */

.dashboard {
    max-width: 700px;
    margin: 80px auto;
    text-align: center;
}

.dashboard h1 {
    font-size: 28px;
    margin-bottom: 10px;
}

.dashboard p {
    color: #6b7280;
    margin-bottom: 40px;
}

.menu {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.menu a {
    text-decoration: none;
}

.menu button {
    width: 220px;
    padding: 18px;
    font-size: 15px;
    border-radius: 12px;
}

/* CONTENEDOR */
.grupos-container {
  max-width: 1100px;
  margin: 40px auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
}

/* CARD */
.grupo-card {
  background: rgba(255, 255, 255, 0.85); /* 👈 más claro */
  backdrop-filter: blur(6px); /* glass effect */
  border-radius: 14px;
  padding: 18px;
  color: #222; /* 👈 texto oscuro SIEMPRE visible */
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transition: all 0.25s ease;
}

/* HOVER */
.grupo-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

/* TITULO */
.grupo-card h3 {
  text-align: center;
  margin-bottom: 12px;
  font-size: 18px;
}

/* TABLA */
.grupo-card table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

/* HEAD */
.grupo-card th {
  text-align: left;
  padding-bottom: 6px;
  color: #555;
}

/* FILAS */
.grupo-card td {
  padding: 8px 0;
  border-bottom: 1px solid #eee;
}

/* ESCUDO */
.grupo-card img {
  vertical-align: middle;
  margin-right: 6px;
}

/* CLASIFICADOS */
.clasificado td {
  background: rgba(245, 158, 11, 0.07);
}

.clasificado td:first-child {
  border-left: 3px solid #f59e0b;
  padding-left: 10px;
}

/* HOVER EN FILAS (fix del bug 🔥) */
.grupo-card tr:hover {
  background: rgba(0,0,0,0.05);
}

/* =========================
   PRONÓSTICOS W/D/L
========================= */

.fecha-section {
    margin-bottom: 32px;
}

.fecha-titulo {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border);
}

.partidos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 12px;
}

.partido-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.partido-card.finalizado {
    opacity: 0.85;
}

.partido-meta {
    display: flex;
    gap: 10px;
    align-items: center;
    font-size: 13px;
    color: var(--text-light);
}

.partido-grupo {
    background: #e0e7ff;
    color: #3730a3;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.partido-vs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 8px 0;
}

.partido-equipo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex: 1;
    font-weight: 600;
    font-size: 15px;
    text-align: center;
}

.vs-sep {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
    flex-shrink: 0;
}

.escudo-md {
    width: 44px;
    height: 44px;
    object-fit: contain;
}

.wdl-selector {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    flex-wrap: wrap;
    justify-content: center;
}

.wdl-btn {
    cursor: pointer;
}

.wdl-btn input[type="radio"] {
    display: none;
}

.wdl-btn span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 100px;
    min-height: 48px;
    padding: 8px 14px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-light);
    text-align: center;
    line-height: 1.3;
    transition: 0.15s;
}

.wdl-btn:hover span {
    border-color: var(--primary);
    color: var(--primary);
}

.wdl-btn input:checked + span {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.wdl-btn input:disabled + span {
    opacity: 0.55;
    cursor: not-allowed;
}

.partido-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}

.badge-acierto {
    background: #dcfce7;
    color: #166534;
    padding: 2px 10px;
    border-radius: 20px;
    font-weight: 600;
}

.badge-error {
    background: #fee2e2;
    color: #991b1b;
    padding: 2px 10px;
    border-radius: 20px;
    font-weight: 600;
}

.badge-bloqueado {
    background: #fef3c7;
    color: #92400e;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    margin-top: 4px;
}

.btn-ver-pron {
    width: 100%;
    margin-top: 10px;
    background: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 7px 0;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-light);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.btn-ver-pron:hover { background: var(--background); color: var(--text-main); }

.pron-lista {
    margin-top: 10px;
    border-top: 1px solid var(--border);
    padding-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.pron-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 8px;
    border-radius: 8px;
    background: var(--background);
    font-size: 13px;
}
.pron-row.pron-ok   { background: #f0fdf4; }
.pron-row.pron-fail { background: #fff1f2; }

.pron-nombre {
    color: var(--text-main);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}
.pron-icono {
    font-size: 10px;
    font-weight: 700;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.pron-icono.pron-ok   { background: #dcfce7; color: #166534; }
.pron-icono.pron-fail { background: #fee2e2; color: #991b1b; }

.pron-chip {
    font-weight: 600;
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
}
.pron-local     { background: #dbeafe; color: #1e40af; }
.pron-visitante { background: #fce7f3; color: #9d174d; }
.pron-empate    { background: #e5e7eb; color: #374151; }
.pron-cargando, .pron-vacio {
    font-size: 12px;
    color: var(--text-light);
    text-align: center;
    padding: 6px 0;
}

@media (max-width: 640px) {
    .partido-equipo { font-size: 13px; }
    .escudo-md { width: 36px; height: 36px; }
    .wdl-btn span { min-width: 80px; font-size: 12px; padding: 7px 10px; }
}

/* DASHBOARD */
.dashboard {
  text-align: center;
  margin-top: 20px;
}

.logo-mundial {
  width: 120px;
  margin-bottom: 10px;
}
/* =========================
   PRONOSTICOS
========================= */

.page {
    max-width: 1100px;
    margin: 0px auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* =========================
   TABLA
========================= */

.pronosticos-table {
    width: 100%;
    max-width: 1000px;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.table-container {
    width: 100%;
    overflow-x: auto;
}

.pronosticos-table {
    min-width: 750px;
}

.pronosticos-table th {
    background: #f9fafb;
    padding: 14px;
    font-size: 12px;
    text-transform: uppercase;
    color: #6b7280;
    text-align: center;
    letter-spacing: 0.5px;
}

.pronosticos-table td {
    
    padding: 18px 16px;
    text-align: center;
    border-bottom: 1px solid #f1f1f1;
    vertical-align: middle;
    white-space: nowrap;
}

.pronosticos-table tr:last-child td {
    border-bottom: none;
}

.pronosticos-table input {
    width: 70px;
    margin: 0;
}

.pronosticos-table tbody tr:nth-child(even) {
    background: #f8faff;
}

.estado-jugado {
    display: inline-block;
    background: #dcfce7;
    color: #166534;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.estado-pendiente {
    display: inline-block;
    background: #fff3cd;
    color: #92400e;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

/* =========================
   EQUIPOS
========================= */

.equipo {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 500;
    font-size: 14px;
}

.escudo {
    width: 44px;
    height: 44px;
    object-fit: contain;
}

/* =========================
   RESULTADO
========================= */

.score-input {
    width: 55px;
    padding: 8px;
    text-align: center;
    font-size: 15px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    background: #f9fafb;
    transition: 0.2s ease;
}

.score-input:focus {
    outline: none;
    border-color: #2563eb;
    background: white;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

/* =========================
   BOTON GUARDAR
========================= */

.save-section {
    margin-top: 30px;
    text-align: center;
}

.save-section button {
    padding: 10px 22px;
    border-radius: 8px;
    border: none;
    background: #2563eb;
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s ease;
}

.save-section button:hover {
    background: #1e4ed8;
}


/* =========================
   MIS TORNEOS
========================= */

.torneos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.torneo-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    border: 1px solid #e5e7eb;
}



.torneo-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.08);
}

.torneo-card h4 {
    margin-bottom: 10px;
    font-size: 16px;
}

.torneo-card a {
    color: #2563eb;
    font-weight: 500;
}


.join-section {
    margin-top: 35px;
    margin-bottom: 35px;
    background: #ffffff;
    padding: 22px;
    border-radius: 14px;
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.08);
    width: 100%;
    border: 1px solid #e5e7eb;
    max-width: 350px;
    margin: 0 auto;
}

.join-section h3 {
    text-align: center;
    margin-bottom: 18px;
    font-size: 18px;
}

/* form */
.join-section form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* inputs más “vivos” */
.join-section input {
    flex: 1;
    margin: 0;
    background: #ffffff;
    border: 1px solid #d1d5db;
    transition: all 0.2s ease;
    width: 100%;
}

/* focus más marcado */
.join-section input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

/* botón más integrado */
.join-section button {
    background: var(--primary);
    padding: 10px 18px;
    font-weight: 600;
    width: 100%;
    border-radius: 8px;
}


.join-section button:hover {
    background: var(--primary-hover);
}

/* =========================
   PAGE SOLO MIS TORNEOS
========================= */

.torneos-page {
    max-width: 1000px; /* rompe el límite de 700 solo acá */
}

/* =========================
   CONTENEDOR GENERAL TORNEO
========================= */

.page {
    max-width: 700px;
    margin: 0 auto;
}

/* =========================
   LAYOUT TORNEOS (2 COLUMNAS)
========================= */

.torneos-layout {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 25px;
    width: 100%;
    max-width: 1000px;
    align-items: start;
}




@media (max-width: 768px) {
    .torneos-layout {
        grid-template-columns: 1fr;
    }
}

/* =========================
   TABLA TORNEO PRO FINAL
========================= */

.table-container {
    margin-top: 15px;
    overflow-x: hidden;
}

/* tabla */
.ranking-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0 6px;
}

/* header */
.ranking-table th {
    padding: 12px 10px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6b7280;
}

/* filas tipo card */
.ranking-table tbody tr {
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 10px rgba(0,0,0,0.03);
    transition: all 0.15s ease;
    border-left: 4px solid transparent;
}

/* hover */
.ranking-table tbody tr:hover {
    background: #f1f5f9;
    box-shadow: 0 8px 18px rgba(0,0,0,0.08);
}

/* celdas */
.ranking-table td {
    padding: 10px 10px;
}

/* posición */
.position {
    width: 50px;
    text-align: center;
    font-weight: bold;
    font-size: 18px;
}

/* nombre usuario */
.ranking-table td:nth-child(2) {
    font-size: 16px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* puntos */
.ranking-table td:last-child {
    width: 80px;
    text-align: center;
}

/* badge puntos */
.puntos {
    display: inline-block;
    background: #3f6aea;
    color: #fff;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: bold;
    min-width: 45px;
}

/* podio */
.ranking-table tbody tr:nth-child(1) {
    background: #fffbeb;
    border-left: 4px solid #f59e0b;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.15);
}

.ranking-table tbody tr:nth-child(2) {
    background: #f8fafc;
    border-left: 4px solid #94a3b8;
    box-shadow: 0 4px 10px rgba(148, 163, 184, 0.12);
}

.ranking-table tbody tr:nth-child(3) {
    background: #fff7ed;
    border-left: 4px solid #d97706;
    box-shadow: 0 4px 10px rgba(217, 119, 6, 0.1);
}

/* medallas */
.gold { color: #fbbf24; }
.silver { color: #9ca3af; }
.bronze { color: #d97706; }

/* usuario actual */
.highlight {
    background: rgba(17, 24, 39, 0.04) !important;
    border-left: 4px solid #111827;
    font-weight: 600;
}

/* alinear columnas */
.ranking-table th:first-child,
.ranking-table td:first-child {
    text-align: center;
}

.ranking-table th:last-child,
.ranking-table td:last-child {
    text-align: center;
}

/* botón */
.back-button {
    margin-top: 25px;
    text-align: center;
}
/* =========================
   SCORE ROW (inputs alineados)
========================= */

.score-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.score-sep {
    font-weight: 700;
    font-size: 18px;
    color: #9ca3af;
    line-height: 1;
}

/* =========================
   CARGA RESULTADOS
========================= */

.resultados-table {
    width: 100%;
    max-width: 900px;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.resultados-table thead {
    background: #f3f4f6;
}

.resultados-table th,
.resultados-table td {
    padding: 16px;
    text-align: center;
}

.resultados-table th {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6b7280;
}

.resultados-table tbody tr {
    border-bottom: 1px solid #f1f1f1;
}

.resultados-table tbody tr:hover {
    background: #f9fafb;
}

.partido-info {
    text-align: left;
}

.fecha {
    font-size: 13px;
    color: #6b7280;
}

.score-input {
    width: 60px;
    padding: 8px;
    text-align: center;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    font-size: 15px;}

/* Menu Hamburguesa */

/* HAMBURGER */

.hamburger {
    display: none;
    font-size: 24px;
    cursor: pointer;
}

/* MOBILE MENU */

.mobile-menu {
    position: fixed;
    top: 60px;
    left: -260px;
    width: 260px;
    height: 100%;
    background: var(--topbar);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    transition: left 0.3s ease;
    z-index: 999;
}

.mobile-menu a {
    color: white;
    font-size: 15px;
    padding: 8px 0;
}

/* activar menu */

.mobile-menu.active {
    left: 0;
}

/* responsive */

@media (max-width: 1100px) {

    .topbar-center {
        display: none;
    }

    .hamburger {
        display: block;
        color: white;
    }

}

/* =========================
   LOGIN HEADER
========================= */

.login-header{
    text-align:center;
    margin-bottom:20px;
}

.login-logo{
    width:100px;
    margin-bottom:10px;
}

.login-title{
    font-size:28px;
    font-weight:800;
    margin-bottom:6px;
    color:#0c012c;
}

.login-subtitle{
    font-size:15px;
    color:#6b7280;
}


.auth-box h2{
    font-size:18px;
    font-weight:600;
    color:#374151;
    margin-bottom:20px;
}

/* =========================
   CAMPEON / DECEPCION
========================= */

.info-box{
    max-width:700px;
    background:white;
    padding:18px;
    border-radius:10px;
    box-shadow:0 8px 18px rgba(0,0,0,0.05);
    margin-bottom:30px;
    font-size:14px;
}

.info-box ul{
    margin-top:8px;
    padding-left:18px;
}

.info-box li{
    margin-bottom:6px;
}

.campeon-form{
    width:100%;
    max-width:420px;
}

.selector-box{
    margin-bottom:30px;
    display:flex;
    flex-direction:column;
    align-items:center;
}

.selector-box select{
    width:100%;
}

.preview-escudo{
    width:90px;
    margin-top:10px;
}

.save-section{
    text-align:center;
    margin-top:20px;
}


.selector-box select{
    width:260px;
    padding:12px 14px;
    font-size:15px;
    border-radius:8px;
    border:1px solid #d1d5db;
    background:#f9fafb;
    margin-top:6px;
}

.selector-box select:focus{
    outline:none;
    border-color:#2563eb;
    background:white;
    box-shadow:0 0 0 2px rgba(37,99,235,0.15);
}

/* =========================
   FOOTER
========================= */

.footer {
    width: 100%;
    margin-top: 40px;
    padding: 16px;

    text-align: center;
    font-size: 13px;
    color: white;

    background: linear-gradient(90deg, #0f2d6b, #1e4db7);
}

/* =========================
   DESIGN REFINEMENTS
========================= */

/* Unified primary color */
:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
    --shadow-lg: 0 10px 28px rgba(0,0,0,0.1), 0 4px 10px rgba(0,0,0,0.06);
    --radius: 14px;
}

button {
    padding: 10px 20px;
    background: var(--primary);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.2px;
}

button:hover {
    background: var(--primary-hover);
}

.card {
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
}

.torneo-card {
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

/* =========================
   PAGE HEADER
========================= */

.page-header {
    width: 100%;
    background: #ffffff;
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 28px;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--primary);
    text-align: center;
}

.page-header h1 {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 4px;
    letter-spacing: -0.2px;
}

.page-header p {
    color: #6b7280;
    font-size: 14px;
    margin: 0;
}

.page-header::after {
    display: none;
}

body.dark-mode .page-header {
    background: var(--card);
    border-left-color: #3b82f6;
}

body.dark-mode .page-header h1 {
    color: #f1f5f9;
}

body.dark-mode .page-header p {
    color: var(--text-light);
}

/* =========================
   LOGIN PAGE
========================= */

.login-body {
    background: linear-gradient(135deg, #0f2d6b 0%, #1e4db7 55%, #2563eb 100%);
}

.auth-box {
    border-radius: 20px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

/* =========================
   DASHBOARD HERO
========================= */

.hero-card {
    background: linear-gradient(135deg, #0f2d6b 0%, #1e4db7 50%, #2563eb 100%);
    border-radius: 20px;
    padding: 32px;
    color: white;
    text-align: center;
    margin-bottom: 30px;
    box-shadow: 0 16px 40px rgba(15, 45, 107, 0.35);
    position: relative;
    overflow: hidden;
}

.hero-card::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    pointer-events: none;
}

.hero-card::after {
    content: '';
    position: absolute;
    bottom: -80px;
    left: -30px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    pointer-events: none;
}

.hero-card h2 {
    color: white;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    position: relative;
}

.hero-card p {
    color: rgba(255, 255, 255, 0.72);
    font-size: 14px;
    margin: 0;
    position: relative;
}

.hero-card .logo-mundial {
    width: 100px;
    margin-bottom: 16px;
    position: relative;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.25));
}

/* =========================
   DARK MODE TOGGLE
========================= */

.dark-toggle {
    background: transparent;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    color: white;
    transition: background 0.2s;
    line-height: 1;
}

.dark-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* =========================
   DARK MODE
========================= */

body.dark-mode {
    --background: #0f172a;
    --card: #1e293b;
    --text-main: #e2e8f0;
    --text-light: #94a3b8;
    --border: #334155;
    background: var(--background);
    color: var(--text-main);
}

body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4 {
    color: var(--text-main);
}

body.dark-mode label {
    color: #94a3b8;
}

body.dark-mode tr:hover {
    background: rgba(255, 255, 255, 0.04);
}

body.dark-mode .grupo-card {
    background: rgba(30, 41, 59, 0.95);
    color: var(--text-main);
}

body.dark-mode .grupo-card th {
    color: var(--text-light);
}

body.dark-mode .grupo-card td {
    border-bottom-color: #334155;
    color: var(--text-main);
}

body.dark-mode .grupo-card tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

body.dark-mode .pronosticos-table {
    background: #1e293b;
}

body.dark-mode .pronosticos-table th {
    background: #162032;
    color: var(--text-light);
}

body.dark-mode .pronosticos-table td {
    border-bottom-color: #2d3f55;
    color: var(--text-main);
}

body.dark-mode .pronosticos-table tbody tr:nth-child(even) {
    background: #162032;
}

body.dark-mode .pronosticos-table tbody tr:hover {
    background: #243048 !important;
}

body.dark-mode .score-input,
body.dark-mode input,
body.dark-mode select {
    background: #162032;
    border-color: #334155;
    color: var(--text-main);
}

body.dark-mode .selector-box select {
    background: #1e293b;
    border-color: #334155;
    color: #f1f5f9;
}

body.dark-mode .selector-box select:focus {
    background: #243048;
    border-color: #3b82f6;
}

body.dark-mode .selector-box select option {
    background: #1e293b;
    color: #f1f5f9;
}

body.dark-mode .card,
body.dark-mode .torneo-card,
body.dark-mode .join-section,
body.dark-mode .info-box {
    background: var(--card);
    border-color: #334155;
    color: var(--text-main);
}

body.dark-mode .ranking-table tbody tr {
    background: var(--card);
    color: var(--text-main);
}

body.dark-mode .ranking-table tbody tr:nth-child(1) {
    background: #1f1a0a;
    border-left-color: #f59e0b;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.1);
}

body.dark-mode .ranking-table tbody tr:nth-child(2) {
    background: #141e2e;
    border-left-color: #94a3b8;
}

body.dark-mode .ranking-table tbody tr:nth-child(3) {
    background: #1f160a;
    border-left-color: #d97706;
}

body.dark-mode .ranking-table tbody tr:hover {
    background: #2a3a4a !important;
}

body.dark-mode .highlight {
    background: rgba(255, 255, 255, 0.06) !important;
    border-left-color: #94a3b8;
}

body.dark-mode .torneo-card a {
    color: #60a5fa;
}

body.dark-mode .ranking-table th {
    color: var(--text-light);
}

/* =========================
   TOAST
========================= */

.toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(16px);
    background: #14532d;
    color: #4ade80;
    padding: 12px 28px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 9999;
    border: 1px solid rgba(74, 222, 128, 0.3);
    white-space: nowrap;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* =========================
   CHIPS FILTRO
========================= */

.filtro-section {
    margin-bottom: 20px;
    text-align: center;
    width: 100%;
}

.filtro-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6b7280;
    margin-bottom: 8px;
}

.filtro-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 10px;
}

.chip {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid #d1d5db;
    background: white;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    text-decoration: none;
    transition: all 0.15s ease;
    cursor: pointer;
}

.chip:hover {
    background: #f0f4ff;
    border-color: #3b82f6;
    color: #2563eb;
}

.chip.active {
    background: #2563eb;
    border-color: #2563eb;
    color: white;
}

body.dark-mode .chip {
    background: #1e293b;
    border-color: #334155;
    color: #e2e8f0;
}

body.dark-mode .chip:hover {
    background: #243048;
    border-color: #3b82f6;
    color: #60a5fa;
}

body.dark-mode .chip.active {
    background: #2563eb;
    border-color: #2563eb;
    color: white;
}

/* =========================
   RESPONSIVE MOBILE
========================= */

@media (max-width: 600px) {

    .content {
        padding: 10px;
    }

    .page {
        padding: 10px;
    }

    .page-header h1 {
        font-size: 20px;
    }

    .page-header p {
        font-size: 13px;
    }

    .grupos-container {
        grid-template-columns: 1fr;
        margin: 10px auto;
        padding: 0 6px;
        gap: 14px;
    }

    .dashboard {
        margin: 10px auto;
        padding: 0 10px;
    }

    .hero-card {
        padding: 24px 16px;
        border-radius: 14px;
    }

    .hero-card h2 {
        font-size: 20px;
    }

    .auth-box {
        width: 92%;
        padding: 24px 16px;
    }

    .auth-box form {
        max-width: 100%;
    }

    .torneos-layout {
        grid-template-columns: 1fr;
    }

    .save-section button {
        width: 100%;
        padding: 13px;
    }

    .topbar {
        padding: 0 12px;
    }

    .logo-img {
        width: 44px;
        height: 44px;
    }

    .logo-main {
        font-size: 13px;
    }

    .logo-sub {
        font-size: 12px;
    }

    .chip {
        font-size: 12px;
        padding: 5px 10px;
    }

    .filtro-chips {
        gap: 6px;
    }

    .pronosticos-table th,
    .pronosticos-table td {
        padding: 10px 6px;
        font-size: 13px;
    }

    .escudo {
        width: 32px;
        height: 32px;
    }

    .equipo {
        font-size: 12px;
        gap: 4px;
    }

    .ranking-table td:nth-child(2) {
        font-size: 14px;
    }

    .torneos-grid {
        grid-template-columns: 1fr;
    }

    .join-section {
        max-width: 100%;
    }

    .back-button {
        margin-bottom: 20px;
    }
}