/* ============ Survivor NFL — tema oscuro "prime time" ============ */
:root {
  --nfl-bg: #0b0f16;
  --nfl-bg2: #121826;
  --nfl-card: #161e2e;
  --nfl-border: #253048;
  --nfl-red: #d50a0a;
  --nfl-blue: #013369;
  --nfl-gold: #ffb612;
  --nfl-green: #22c55e;
}

html, body {
  background: var(--nfl-bg);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 16.5px;
  line-height: 1.55;
}

h1, h2, h3, h4, h5, .brand-text, .num-grande, .countdown, .stat-valor {
  font-family: 'Archivo', 'Inter', sans-serif;
  font-weight: 700;
  letter-spacing: 0;
}

/* Líneas de yardas sutiles de fondo */
.yardlines {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    repeating-linear-gradient(to bottom,
      transparent 0, transparent 118px,
      rgba(255,255,255,.028) 118px, rgba(255,255,255,.028) 120px),
    radial-gradient(ellipse at 50% -20%, #16233c 0%, var(--nfl-bg) 60%);
}

.main-wrap { max-width: 1400px; margin: 0 auto; min-height: 72vh; }

/* Navbar */
.nfl-navbar {
  background: linear-gradient(90deg, #0d1320 0%, #101a2e 60%, #0d1320 100%);
  border-bottom: 2px solid var(--nfl-red);
  box-shadow: 0 4px 18px rgba(0,0,0,.5);
}
.nfl-navbar .brand-text { font-weight: 800; font-size: 1.25rem; }
.nfl-navbar .nav-link { font-weight: 600; font-size: 1.02rem; padding-top: .55rem; padding-bottom: .55rem; }
.nfl-navbar .nav-link.active { color: var(--nfl-gold); }
.semana-badge { font-size: .85rem; }
.vidas-mini { font-size: .9rem; letter-spacing: 1px; }

/* Tarjetas */
.card { background: var(--nfl-card); border: 1px solid var(--nfl-border); }
.card-header { background: rgba(255,255,255,.03); border-bottom: 1px solid var(--nfl-border); font-size: 1.02rem; }

.stat-card { text-align: center; padding: 1.1rem .6rem; height: 100%; }
.stat-card .stat-valor { font-size: 2.1rem; font-weight: 800; line-height: 1.15; }
.stat-card .stat-label { font-size: .85rem; color: #9aa7bd; margin-top: .15rem; }

/* Countdown */
.countdown { font-size: 1.7rem; font-weight: 800; color: var(--nfl-gold); }
.countdown.urgente { color: #ff4d4d; animation: parpadeo 1s infinite; }
@keyframes parpadeo { 50% { opacity: .45; } }

/* Tarjeta de partido / selección de equipo */
.partido-card { border: 1px solid var(--nfl-border); border-radius: .75rem; overflow: hidden; }
.partido-head { font-size: .88rem; color: #9aa7bd; padding: .45rem .8rem; background: rgba(255,255,255,.03); }
.equipo-btn {
  display: flex; align-items: center; gap: .7rem; width: 100%;
  background: var(--nfl-bg2); border: 2px solid transparent; border-radius: .6rem;
  padding: .7rem .8rem; color: #e9eef7; text-align: left; transition: all .15s;
  --team-color: #444;
  border-left: 5px solid var(--team-color);
}
.equipo-btn:hover:not(:disabled) { border-color: var(--nfl-gold); transform: translateY(-1px); }
.equipo-btn.seleccionado { border-color: var(--nfl-green); background: rgba(34,197,94,.12); box-shadow: 0 0 0 2px rgba(34,197,94,.35); }
.equipo-btn:disabled { opacity: .38; cursor: not-allowed; filter: grayscale(.7); }
.equipo-btn img { width: 42px; height: 42px; object-fit: contain; }
.equipo-btn .eq-nombre { font-family: 'Archivo', sans-serif; font-weight: 700; font-size: 1.08rem; line-height: 1.25; }
.equipo-btn .eq-momio { margin-left: auto; font-family: 'Archivo', sans-serif; font-weight: 600; font-size: .98rem; color: #9fb0ca; white-space: nowrap; }
.equipo-btn .eq-momio.fav { color: var(--nfl-gold); }
.badge-usado { font-size: .68rem; }

/* Chuleta */
.chuleta-wrap { overflow-x: auto; }
.chuleta { border-collapse: separate; border-spacing: 2px; }
.chuleta th, .chuleta td { padding: .4rem .55rem; text-align: center; white-space: nowrap; font-size: .92rem; }
.chuleta thead th { background: var(--nfl-bg2); color: #9fb0ca; font-weight: 600; }
.chuleta .col-fija { position: sticky; left: 0; z-index: 2; background: var(--nfl-bg2); text-align: left; }
.chuleta td.celda { border-radius: .3rem; font-weight: 700; }
.celda-verde { background: rgba(34,197,94,.28); color: #6ee7a0; }
.celda-roja  { background: rgba(213,10,10,.30); color: #ff8080; }
.celda-gris  { background: rgba(255,255,255,.07); color: #9aa5b8; }
.celda-azul  { background: rgba(59,130,246,.22); color: #8ab6ff; }
.celda-lock  { background: rgba(255,255,255,.04); color: #5d6a7c; }
.chuleta img { width: 24px; height: 24px; object-fit: contain; vertical-align: -6px; }

/* Tablero */
.fila-eliminado { opacity: .45; }
.num-grande { font-size: 2.8rem; font-weight: 800; }

/* Bracket */
.bracket-wrap { overflow-x: auto; }
.bracket { display: flex; gap: 2rem; min-width: 980px; align-items: stretch; }
.bracket-col { display: flex; flex-direction: column; justify-content: space-around; gap: 1rem; flex: 1; }
.bracket-game {
  background: var(--nfl-card); border: 1px solid var(--nfl-border); border-radius: .5rem;
  padding: .5rem .7rem; min-width: 180px; position: relative;
}
.bracket-game .bg-row { display: flex; align-items: center; gap: .5rem; padding: .22rem 0; font-weight: 600; font-size: 1rem; }
.bracket-game .bg-row img { width: 24px; height: 24px; }
.bracket-game .bg-row.ganador { color: var(--nfl-green); }
.bracket-game .bg-row .marcador { margin-left: auto; font-family: 'Archivo', sans-serif; font-weight: 700; }
.bracket-titulo { color: #9aa7bd; font-size: .88rem; font-weight: 600; text-align: center; }

/* Admin sidebar */
.admin-shell { display: flex; gap: 1.25rem; }
.admin-sidebar { flex: 0 0 230px; }
.admin-sidebar .list-group-item { background: var(--nfl-card); border-color: var(--nfl-border); font-weight: 600; font-size: 1rem; }
.admin-sidebar .list-group-item.active { background: var(--nfl-red); border-color: var(--nfl-red); }
.admin-content { flex: 1; min-width: 0; }
.admin-navmovil { display: none; }
@media (max-width: 991px) {
  .admin-sidebar { display: none; }
  .admin-navmovil { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .5rem; margin-bottom: 1rem; }
  .admin-navmovil .btn { white-space: nowrap; font-weight: 600; }
}

/* Barras del reporte de visitas */
.barra-bg { background: rgba(255,255,255,.07); border-radius: .3rem; height: 18px; overflow: hidden; }
.barra-fill { background: linear-gradient(90deg, var(--nfl-blue), #2563eb); height: 100%; }

/* Login */
.login-card { max-width: 430px; margin: 6vh auto 0; }
.login-logo { font-size: 3.2rem; }

/* Avatares en registro */
.avatar-pick { font-size: 1.6rem; padding: .3rem .55rem; border: 2px solid transparent; border-radius: .5rem; cursor: pointer; background: var(--nfl-bg2); display: inline-flex; align-items: center; justify-content: center; min-width: 46px; min-height: 46px; }
.avatar-pick img { width: 30px; height: 30px; object-fit: contain; display: block; }
.avatar-pick.sel { border-color: var(--nfl-gold); }
.avatar-ico { object-fit: contain; vertical-align: -5px; }

/* Tablas */
.table { --bs-table-bg: transparent; }
.table > :not(caption) > * > * { border-color: var(--nfl-border); padding-top: .55rem; padding-bottom: .55rem; }
.table-sm > :not(caption) > * > * { padding-top: .42rem; padding-bottom: .42rem; }

/* Textos secundarios: que no queden ilegibles de pequeños */
.small, small { font-size: .9rem; }

@media (max-width: 576px) {
  html, body { font-size: 16px; }
  .stat-card .stat-valor { font-size: 1.6rem; }
  .countdown { font-size: 1.35rem; }
}
