/* =========================================
   LIGA PRO – ESTILO PC + RESPONSIVE
========================================= */

:root {
  --bg-dark: #05261a;
  --accent-neon: #61ff33;
  --pill-bg: rgba(59, 95, 82, 0.9);
  --glass-bg: rgba(255, 255, 255, 0.07);
  --admin-orange: #ff9800; /* Nueva variable para Admin */
}

/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', system-ui, sans-serif;
}

body {
  background: linear-gradient(rgba(0, 20, 10, 0.85), rgba(0, 20, 10, 0.85)),
    url('imagen/fondo.jpg');
  background-size: cover;
  background-attachment: fixed;
  color: white;
  min-height: 100vh;
}

/* =========================
   HEADER
========================= */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--accent-neon);
}

.header h1 {
  font-size: 22px;
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--accent-neon);
  color: var(--accent-neon);
  padding: 8px 16px;
  cursor: pointer;
  border-radius: 6px;
}

/* =========================
   DASHBOARD (PC HORIZONTAL)
========================= */
.dashboard {
  display: flex;
  gap: 25px;
  padding: 25px;
  max-width: 1400px;
  margin: auto;
}

/* =========================
   FIXTURE
========================= */
.fixture {
  flex: 3;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  padding: 20px;
  border: 1px solid rgba(97,255,51,0.25);
}

/* FECHA */
.fixture-header {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

.arrow-btn {
  background: var(--accent-neon);
  border: none;
  padding: 8px 14px;
  font-size: 18px;
  cursor: pointer;
  border-radius: 6px;
}

/* =========================
   RANKING
========================= */
.ranking {
  flex: 1;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  padding: 20px;
  border: 1px solid rgba(97,255,51,0.25);
}
.ranking-container {
    max-height: 400px; /* Altura máxima del casillero */
    overflow-y: auto;  /* Habilita el scroll vertical */
    border: 1px solid #444;
    border-radius: 8px;
    background: rgba(0,0,0,0.2);
}
/* =========================
   RANKING - PODIO CORREGIDO
========================= */

/* Contenedor de la celda de posición */
.posicion-celda {
    position: relative;
    text-align: center;
    font-weight: bold;
    width: 45px;
}

/* --- REGLAS PARA LOS 3 PRIMEROS --- */

/* =========================
   RANKING - PODIO (FIX FINAL)
========================= */

/* Estilo base para que el emoji quepa bien */
.posicion-celda {
    position: relative;
    text-align: center;
    font-weight: bold;
    width: 50px; /* Un poco más ancho para los emojis */
    height: 40px;
    vertical-align: middle;
}

/* =========================
    RANKING - DISEÑO Y PODIO (CORREGIDO)
========================= */
.ranking {
  flex: 1;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  padding: 20px;
  border: 1px solid rgba(97,255,51,0.25);
}

.ranking-container {
    max-height: 400px; 
    overflow-y: auto;  
    border: 1px solid #444;
    border-radius: 8px;
    background: rgba(0,0,0,0.2);
}

/* Celda de posición: Ahora permite ver número y emoji juntos */
.posicion-celda {
    text-align: center;
    font-weight: bold;
    color: white !important; /* Asegura el número blanco */
    min-width: 60px;
    padding: 5px;
    font-size: 1.1rem;
}

/* --- REGLAS PARA EL PODIO --- */

/* 1º Lugar - Oro */
#tabla-ranking tr:nth-child(1) .posicion-celda::before {
    content: "👑 "; /* Espacio después del emoji */
    font-size: 1.3rem;
}
#tabla-ranking tr:nth-child(1) .nombre-celda {
    color: #ffd700 !important;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
}

/* 2º Lugar - Plata */
#tabla-ranking tr:nth-child(2) .posicion-celda::before {
    content: "🥈 ";
    font-size: 1.1rem;
}

/* 3º Lugar - Bronce */
#tabla-ranking tr:nth-child(3) .posicion-celda::before {
    content: "🥉 ";
    font-size: 1.1rem;
}

/* Efectos visuales de las filas */
#tabla-ranking tr:nth-child(1):hover {
    box-shadow: inset 0 0 15px rgba(255, 215, 0, 0.2);
    transition: 0.3s;
}

/* Resaltado sutil para los tres primeros */
#tabla-ranking tr:nth-child(1) { background: rgba(255, 215, 0, 0.05); }
#tabla-ranking tr:nth-child(2) { background: rgba(192, 192, 192, 0.05); }
#tabla-ranking tr:nth-child(3) { background: rgba(205, 127, 50, 0.05); }
/* =========================
   TITULOS
========================= */
h2 {
  background: var(--pill-bg);
  padding: 10px 30px;
  border-radius: 40px;
  font-size: 14px;
  text-transform: uppercase;
  border: 1px solid rgba(255,255,255,0.2);
  margin: 20px auto;
  width: fit-content;
}

/* =========================
   TABLAS
========================= */
.table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

.table th,
.table td {
  padding: 12px;
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}

.table thead {
  background: rgba(76,124,106,0.8);
}

.table.small th,
.table.small td {
  padding: 8px;
  font-size: 13px;
}

/* =========================
   BOTONES
========================= */
.btn-primary {
  background: var(--accent-neon);
  color: black;
  border: none;
  padding: 14px;
  width: 100%;
  font-weight: bold;
  cursor: pointer;
  border-radius: 6px;
  transition: 0.3s;
}

.btn-primary:hover {
  box-shadow: 0 0 15px var(--accent-neon);
}

/* =========================
   LOGIN / REGISTER
========================= */

.main-layout {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

#loginForm,
#form-register {
  width: 100%;
  max-width: 400px;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  padding: 35px;
  border-radius: 18px;
  border: 1px solid rgba(97,255,51,0.35);
  box-shadow: 0 0 25px rgba(97,255,51,0.15);
}

#loginForm h1,
#form-register h1 {
  text-align: center;
  margin-bottom: 25px;
}

.input-group {
  margin-bottom: 18px;
}

.input-group label {
  font-size: 12px;
  color: var(--accent-neon);
  display: block;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.input-group input {
  width: 100%;
  padding: 11px;
  border-radius: 6px;
  border: none;
  font-size: 14px;
}

/* Botón login / register */
#loginForm button,
#form-register button {
  margin-top: 10px;
}

/* Texto inferior (registrarse / login) */
.auth-link {
  margin-top: 18px;
  text-align: center;
  font-size: 13px;
}

.auth-link a {
  color: var(--accent-neon);
  text-decoration: none;
  font-weight: bold;
}

.auth-link a:hover {
  text-decoration: underline;
}

/* Mensajes */
.login-msg {
  margin-top: 15px;
  font-size: 13px;
  text-align: center;
}

.login-msg.error {
  color: #ff4d4d;
}

.login-msg.success {
  color: var(--accent-neon);
}


/* =========================================
   AGREGADO: ESTILOS PARA PANEL ADMIN
========================================= */

/* Botón Admin Específico */
#btnAdmin {
  background: var(--admin-orange);
  color: white;
  border: none;
  padding: 8px 12px;
  font-weight: bold;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.3s;
}

#btnAdmin:hover {
  background: #e68a00;
  box-shadow: 0 0 12px var(--admin-orange);
}
/* Contenedor fijo donde se apilarán los avisos */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000; /* Siempre por encima de todo */
}

/* Estilo base de la notificación */
.toast {
    background: #222;
    color: white;
    padding: 14px 20px;
    margin-bottom: 10px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    min-width: 250px;
    border-left: 6px solid #ccc;
    animation: slideIn 0.4s ease forwards;
}

/* Colores según el resultado */
.toast.success { border-left-color: #4caf50; } /* Verde */
.toast.error { border-left-color: #f44336; }   /* Rojo */
.toast.info { border-left-color: #2196f3; }    /* Azul */

/* Animación de salida */
.toast.fade-out {
    animation: slideOut 0.4s ease forwards;
}

@keyframes slideIn {
    from { transform: translateX(110%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(110%); opacity: 0; }
}
/* Entradas de Goles (Inputs tipo número) */
.score-box {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--accent-neon);
  color: white;
  text-align: center;
  padding: 5px;
  border-radius: 4px;
  font-weight: bold;
}

.score-box:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.2);
}

/* Botón de guardado pequeño (Check) */
.btn-mini-save {
  background: var(--accent-neon);
  color: black;
  border: none;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
}

.btn-mini-save:hover {
  filter: brightness(1.2);
}

/* Estado de tabla para auditoría */
.status-tag {
  font-size: 11px;
  padding: 3px 8px;
  background: var(--pill-bg);
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.2);
}

/* =========================
   CRONÓMETRO REFINADO (ESTILO PÍLDORA)
========================= */
.countdown-wrapper {
    background: rgba(0, 0, 0, 0.5); 
    border: 1px solid rgba(97, 255, 51, 0.4);
    padding: 8px 18px; 
    border-radius: 50px; /* Forma de cápsula */
    text-align: center;
    margin: 15px auto;
    color: white;
    max-width: fit-content; /* No ocupa todo el ancho */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.countdown-wrapper span {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    color: #ccc;
}

.timer-clock {
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.3rem; /* Tamaño elegante y legible */
    font-weight: bold;
    color: var(--accent-neon);
    text-shadow: 0 0 10px rgba(97, 255, 51, 0.4);
}

/* Estado de urgencia: menos de 1 hora */
.timer-low {
    color: #ff4444 !important;
    text-shadow: 0 0 10px rgba(255, 68, 68, 0.5) !important;
    animation: timer-blink 1.5s infinite;
}

@keyframes timer-blink {
    0% { opacity: 1; }
    50% { opacity: 0.6; }
    100% { opacity: 1; }
}

/* Estilo para los inputs de goles deshabilitados (Cerrados) */
.score-box:disabled {
    background: rgba(0, 0, 0, 0.4) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #666 !important;
    cursor: not-allowed;
    opacity: 0.7;
}

/* =========================
   RESPONSIVE (AJUSTES FINALES)
========================= */
@media (max-width: 900px) {
  .dashboard {
    flex-direction: column;
  }

  .header {
    flex-direction: column;
    gap: 10px;
    padding: 15px; /* Ajuste suave */
  }
}

/* --- AJUSTES ESPECÍFICOS PARA CELULAR (Compacto) --- */
@media (max-width: 600px) {
    /* Header más pequeño */
    .header h1 { font-size: 16px; }
    .header { padding: 10px; }

    /* Títulos Píldora más chicos */
    h2 { 
        font-size: 10px; 
        padding: 6px 15px; 
        margin: 10px auto; 
    }

    /* Tablas compactas (Letra y padding) */
    .table th, .table td {
        padding: 6px 4px;
        font-size: 11px;
    }

    /* Navegación de flechas reducida */
    .arrow-btn {
        padding: 5px 10px;
        font-size: 14px;
    }
    .fixture-header { gap: 10px; margin-bottom: 10px; }

    /* Inputs de admin y botones compactos */
    .score-box {
        width: 30px !important;
        font-size: 11px;
        padding: 2px;
    }

    .btn-mini-save {
        padding: 4px 6px;
        font-size: 10px;
    }

    /* Cronómetro reducido */
    .timer-clock { font-size: 1rem; }
    .countdown-wrapper { padding: 5px 12px; gap: 8px; }
}

/* =========================================
   REVISIÓN FINAL: CARGA MASIVA ADMIN
========================================= */

.crear-fecha-header, .crear-fecha-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.fila-partido-nueva {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Cambié var(--accent-neon) por var(--admin-orange) para que combine con el botón naranja */
.fila-partido-nueva select {
    flex: 1;
    padding: 8px;
    background: #1a1a1a;
    color: white;
    border: 1px solid rgba(255, 152, 0, 0.3); 
    border-radius: 4px;
    outline: none;
    transition: all 0.3s ease;
}

.fila-partido-nueva select:focus {
    border-color: var(--admin-orange) !important;
    box-shadow: 0 0 8px rgba(255, 152, 0, 0.4);
    background: #222;
}

.vs {
    font-weight: bold;
    color: var(--admin-orange); /* Naranja para resaltar el VS en admin */
    font-size: 12px;
}

/* Ajuste Responsive para las filas de carga */
@media (max-width: 600px) {
    .fila-partido-nueva {
        flex-direction: column;
        gap: 8px;
        padding: 15px;
        background: rgba(255, 255, 255, 0.02);
        border-radius: 8px;
        margin-bottom: 5px;
    }
    
    .fila-partido-nueva select {
        width: 100%;
    }

    .vs {
        background: rgba(255, 152, 0, 0.1);
        padding: 2px 10px;
        border-radius: 10px;
    }
}
/* Mejora visual para los selectores del admin */
.local-select, .visitante-select {
    outline: none;
    transition: all 0.3s ease;
}

.local-select:focus, .visitante-select:focus {
    border-color: #ff9800 !important; /* Color naranja al seleccionar */
    box-shadow: 0 0 8px rgba(255, 152, 0, 0.3);
}
/* Contenedor de las tarjetas de stats */
.stats-container {
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); 
    gap: 20px; 
    margin-bottom: 30px;
}

/* Tarjeta individual de estadística */
.stat-card {
    margin: 0; 
    padding: 20px; 
    text-align: center; 
    background: var(--bg-card); /* Usando tus variables de color */
    border-radius: 8px;
    border-bottom: 4px solid transparent; /* Para el efecto de color abajo */
    transition: transform 0.3s ease;
}

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

.stat-card h3 {
    font-size: 12px; 
    color: #aaa; 
    text-transform: uppercase;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.stat-card p {
    font-size: 2.2rem; 
    font-weight: bold; 
    color: #fff;
    margin: 0;
}

/* Colores específicos para cada borde */
.border-neon { border-color: var(--accent-neon); }
.border-orange { border-color: #ff9800; }
.border-red { border-color: #f44336; }

.estado-suspendido {
    color: #888 !important;
    font-weight: bold;
    font-size: 0.75rem;
}

.estado-finalizado {
    color: #4caf50;
    font-weight: bold;
}

.estado-pendiente {
    color: #ff9800;
}

/* =========================================
   ESTILOS PARA EL LOGO Y NOMBRE (PREDIVO)
========================================= */

/* Contenedor del logo y el texto */
.logo-link {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

/* La imagen del logo (sin fondo) */
.logo-link img {
    height: 45px;
    width: auto;
    object-fit: contain;
    background: transparent; 
}

/* El texto PREDIVO */
.logo-text {
    font-size: 22px;
    font-weight: bold;
    color: white; /* Puedes cambiarlo a var(--accent-neon) si quieres que sea verde */
    letter-spacing: 1px;
}

/* Efecto al pasar el mouse (solo en PC) */
.logo-link:hover {
    transform: scale(1.05);
}

/* --- MODO CELULAR (Media Query) --- */
@media (max-width: 600px) {
    .logo-text {
        display: none; /* ESCONDE EL NOMBRE EN CELULARES */
    }

    .logo-link img {
        height: 38px; /* Logo un poco más chico en el móvil */
    }
}
/* --- CONTENEDOR DE BOTONES DEL HEADER --- */
.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* --- ESTILO DEL BOTÓN ADMIN --- */
.btn-admin {
    display: none; /* Se activa por JS si es admin */
    background-color: #ff9800;
    border: 1px solid #e68a00;
    color: white;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.3s;
}

.btn-admin:hover {
    background-color: #e68a00;
    box-shadow: 0 0 10px rgba(255, 152, 0, 0.4);
}

/* --- NOMBRE DEL USUARIO --- */
.user-name {
    color: var(--accent-neon);
    font-size: 14px;
    font-weight: 500;
}

/* --- AJUSTE RESPONSIVE PARA EL HEADER --- */
@media (max-width: 600px) {
    .header-actions {
        gap: 8px; /* Menos espacio entre botones en celular */
    }
    
    .user-name {
        font-size: 12px; /* Letra un poco más chica */
    }
}

/* =========================================
   PIE DE PÁGINA (FOOTER) - DISEÑO SEGURO
========================================= */
.footer {
    background-color: rgba(18, 18, 18, 0.95); /* Color oscuro */
    border-top: 2px solid #61ff33; /* Tu color verde neón */
    padding: 40px 20px;
    margin-top: 50px; /* Espacio para que no toque las tablas */
    width: 100%;
    box-sizing: border-box;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between; /* En PC separa los elementos */
    align-items: center;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-logo img {
    height: 35px;
    width: auto;
}

.footer-logo span {
    color: #61ff33;
    font-weight: bold;
    font-size: 1.2rem;
}

.footer-text {
    color: #888;
    font-size: 14px;
    margin: 0;
}

.footer-tag {
    background: #222;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    color: #fff;
    border: 1px solid #444;
}

/* --- RESPONSIVE: AJUSTE PARA CELULAR --- */
@media (max-width: 768px) {
    .footer-content {
        flex-direction: column; /* En celular pone uno debajo de otro */
        gap: 20px;
        text-align: center;
    }
    
    .footer {
        padding: 30px 10px;
    }
}

/* Efecto de resaltado en las filas de los partidos */
.table tbody tr {
    transition: all 0.2s ease;
    cursor: default;
}

/* Efecto de resaltado en filas (Solo funciona bien en PC con mouse) */
@media (min-width: 769px) {
    .table tbody tr:hover {
        background-color: rgba(97, 255, 51, 0.05) !important;
        transform: scale(1.005);
        transition: 0.2s;
    }
}

/* --- AJUSTES PARA CELULAR --- */
@media (max-width: 768px) {
    .table {
        font-size: 12px; /* Letra un poco más chica en móvil */
    }
    
    .table th, .table td {
        padding: 10px 5px; /* Menos espacio lateral */
    }

    /* Ocultamos la columna "Estado" si se amontona mucho, o la achicamos */
    .table th:last-child, .table td:last-child {
        font-size: 10px;
    }
}

/* =========================================
   MEJORAS PARA RANKING POR FASES
========================================= */

/* Contenedor del Título y el Selector */
.ranking-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

/* Selector Neón */
#selectorFase {
    background: #111;
    color: var(--accent-neon);
    border: 1px solid rgba(97, 255, 51, 0.3);
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
    outline: none;
    transition: 0.3s;
}

#selectorFase:focus {
    border-color: var(--accent-neon);
    box-shadow: 0 0 10px rgba(97, 255, 51, 0.2);
}

/* Colores para la columna de Estado en las tablas */
.status-pendiente {
    color: #ff9800 !important; /* Naranja */
    font-weight: bold;
}

.status-finalizado {
    color: var(--accent-neon) !important; /* Verde Neón */
    font-weight: bold;
}

.status-suspendido {
    color: #888 !important; /* Gris */
    font-style: italic;
}

/* Ajuste para el selector en celulares */
@media (max-width: 600px) {
    .ranking-header {
        flex-direction: column;
        align-items: center;
    }
    
    #selectorFase {
        width: 100%;
        text-align: center;
    }
}

/* --- ESTADÍSTICAS VERSIÓN COMPACTA --- */
.mis-stats-section {
    margin-top: 15px; 
    border-top: 1px solid rgba(255, 255, 255, 0.1); 
    padding-top: 10px;
}

.stats-container {
    display: flex;
    gap: 5px; /* Menos espacio entre cajas */
    justify-content: space-between;
}

.stat-box {
    flex: 1;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    padding: 4px 2px; /* Mucho más estrecho */
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-val {
    display: block;
    font-size: 1rem; /* Número más pequeño */
    font-weight: bold;
    color: #61ff33;
    line-height: 1; /* Quita espacio sobrante arriba/abajo */
}

.stat-label {
    display: block;
    font-size: 0.55rem; /* Texto muy pequeño y fino */
    color: #888;
    text-transform: uppercase;
    margin-top: 2px;
}

/* Bordes de colores más finos */
.exacto { border-bottom: 1.5px solid #ffd700; }
.ganador { border-bottom: 1.5px solid #00d4ff; }
.perdido { border-bottom: 1.5px solid #ff4d4d; }

/* --- NUEVO: DISEÑO DE BOTONES + Y - (OPTIMIZADO) --- */
.stepper {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(97, 255, 51, 0.3);
    border-radius: 6px;
    flex-shrink: 0; /* Evita que se aplaste en pantallas chicas */
}

.stepper button {
    width: 32px; /* Tamaño ideal para PC */
    height: 32px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent-neon);
    border: none;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.stepper button:hover {
    background: rgba(255, 255, 255, 0.2);
}

.stepper button:active {
    background: var(--accent-neon);
    color: black;
}

.stepper input {
    width: 32px;
    text-align: center;
    background: transparent;
    border: none;
    color: white;
    font-weight: bold;
    font-size: 15px;
    /* Quita las flechas por defecto */
    -moz-appearance: textfield;
}

.stepper input::-webkit-inner-spin-button,
.stepper input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* --- CONTENEDOR DE TABLAS (Mobile Friendly sin romper PC) --- */
.ranking-wrapper {
    width: 100%;
    overflow-x: auto; /* Solo hace scroll si el contenido no cabe */
    -webkit-overflow-scrolling: touch;
}

/* Oculta la barra de scroll en PC para que no aparezca el dibujo de la barra */
.ranking-wrapper::-webkit-scrollbar {
    height: 0px;
    background: transparent;
}

/* --- AJUSTES ESPECÍFICOS PARA CELULAR --- */
@media (max-width: 600px) {
    .stepper button {
        width: 42px; /* Más grande en celular para el pulgar */
        height: 42px;
        font-size: 22px;
    }
    
    .stepper input {
        width: 38px;
        font-size: 17px;
    }

    .table th, .table td {
        padding: 10px 4px; /* Ajuste de espacio para que quepan los botones */
    }
}

.badge-puntos {
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: bold;
    margin-top: 4px;
}
.pts-exacto { background-color: #61ff33; color: #000; box-shadow: 0 0 10px #61ff33; }
.pts-ganador { background-color: #2e7d32; color: #fff; }
.pts-error { background-color: #444; color: #bbb; }

/* --- 1. ESTILO DEL BUSCADOR (Mantenlo) --- */
#busquedaUsuario {
    width: 100%;
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.3);
    color: white;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
    margin-bottom: 15px; /* Le di un poco más de espacio abajo */
}

#busquedaUsuario:focus {
    border-color: var(--accent-neon);
    box-shadow: 0 0 10px rgba(97, 255, 51, 0.2);
    background: rgba(0, 0, 0, 0.5);
}

#busquedaUsuario::placeholder {
    color: #666;
    font-style: italic;
}

/* --- 2. ESTILO DEL SCROLL (Agrégalo debajo) --- */
.contenedor-scroll {
    max-height: 400px;    
    overflow-y: auto;     
    overflow-x: hidden;   
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

/* Esto deja los títulos quietos arriba mientras bajas */
.contenedor-scroll thead th {
    position: sticky;
    top: 0;
    background: #1a1a1a; 
    z-index: 10;
}

/* Personalización de la barra de scroll */
.contenedor-scroll::-webkit-scrollbar {
    width: 6px;
}
.contenedor-scroll::-webkit-scrollbar-thumb {
    background: var(--accent-neon, #61ff33); 
    border-radius: 10px;
}

