/* ============================================================
   PRODE MUNDIAL 2026 - Tema oficial
   Paleta: Deep navy + Premium gold + White
   Tipografía: Montserrat (FIFA-style)
   ============================================================ */

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

:root {
  --bg-deep:        #050818;
  --bg-mid:         #0a1030;
  --bg-card:        #131a3d;
  --bg-card-hover:  #1a2350;
  --border:         #2a3470;
  --border-soft:    #1f2855;
  --text-primary:   #ffffff;
  --text-secondary: #a8b2d9;
  --text-muted:     #6b7299;
  --gold:           #d4af37;
  --gold-soft:      #b8941f;
  --gold-glow:      rgba(212, 175, 55, 0.18);
  --green:          #56d364;
  --green-deep:     #1f6f3f;
  --red:            #ff4444;
  --red-deep:       #6f1d1d;
  --blue:           #4a9eff;
  --blue-deep:      #1f4d6f;
  --yellow:         #f5e9af;
  --yellow-deep:    #4a4a1f;
  --shadow-card:    0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-hover:   0 8px 32px rgba(212, 175, 55, 0.15);
}

body {
  font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  margin: 0;
  background: var(--bg-deep);
  background-image:
    radial-gradient(ellipse at top left, rgba(74, 158, 255, 0.08), transparent 50%),
    radial-gradient(ellipse at top right, rgba(212, 175, 55, 0.06), transparent 50%),
    radial-gradient(ellipse at bottom, rgba(106, 60, 200, 0.05), transparent 60%),
    linear-gradient(180deg, #050818 0%, #0a1030 100%);
  background-attachment: fixed;
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-tap-highlight-color: transparent;
  min-height: 100vh;
}

h1, h2, h3, h4, .brand, .team, .countdown,
table th, .badge, button.primary {
  font-family: 'Montserrat', system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* ============ HEADER ============ */
header {
  background: rgba(10, 16, 48, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-soft);
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.brand {
  font-size: 18px;
  font-weight: 800;
  color: var(--gold);
  text-decoration: none;
  letter-spacing: 0.5px;
  text-shadow: 0 0 16px var(--gold-glow);
  display: flex;
  align-items: center;
  gap: 8px;
}
nav {
  display: flex;
  gap: 4px;
  align-items: center;
  flex-wrap: wrap;
}
nav a {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.15s;
}
nav a:hover, nav a:active {
  background: rgba(212, 175, 55, 0.08);
  color: var(--gold);
}
.who {
  color: var(--text-muted);
  font-size: 13px;
  padding: 0 6px;
  border-left: 1px solid var(--border-soft);
  margin-left: 4px;
}
button.link {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  padding: 8px 12px;
  border-radius: 6px;
  font-weight: 500;
}
button.link:hover, button.link:active {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

/* ============ COUNTDOWN BANNER ============ */
.countdown-bar {
  background: linear-gradient(90deg, rgba(212, 175, 55, 0.08), rgba(74, 158, 255, 0.08));
  border-bottom: 1px solid var(--border-soft);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  flex-wrap: wrap;
}
.countdown-bar strong { color: var(--text-primary); font-weight: 700; }
.countdown {
  color: var(--gold);
  font-weight: 700;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 10px var(--gold-glow);
  letter-spacing: 0.5px;
}

/* ============ MAIN ============ */
main {
  max-width: 800px;
  margin: 16px auto;
  padding: 0 16px 100px;
}
h1 { margin-top: 0; font-size: 26px; font-weight: 800; }
h2.round {
  margin-top: 32px;
  font-size: 14px;
  color: var(--gold);
  border-bottom: 1px solid var(--border-soft);
  padding-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-weight: 700;
}
.muted { color: var(--text-muted); font-size: 14px; }

/* ============ FLASH (Toast) ============ */
.flash-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 90vw;
  pointer-events: none;
}
.flash {
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  animation: toastIn 0.3s ease-out;
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}
.flash.ok {
  background: linear-gradient(135deg, #033a16 0%, #0d4220 100%);
  color: var(--green);
  border: 1px solid var(--green-deep);
  animation: toastIn 0.3s ease-out, toastOut 0.4s ease-in 4s forwards;
}
.flash.err {
  background: linear-gradient(135deg, #3a0916 0%, #4d1218 100%);
  color: #ff7b72;
  border: 1px solid var(--red-deep);
  /* errores NO auto-dismiss: se quedan hasta que cliquees la X */
}
.flash-close {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: inherit;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 1;
}
.flash-close:hover { background: rgba(255, 255, 255, 0.2); }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes toastOut {
  to { opacity: 0; transform: translateY(20px); }
}

/* ============ CARDS ============ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-card);
}
.card.narrow {
  max-width: 400px;
  margin: 32px auto;
}

/* ============ MATCH CARD ============ */
.match {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-card);
  transition: all 0.2s ease-out;
  animation: fadeIn 0.4s ease-out;
}
.match:hover {
  background: var(--bg-card-hover);
  border-color: rgba(212, 175, 55, 0.3);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}
.match.locked {
  opacity: 0.7;
}
.match.locked:hover { transform: none; }
.match.live {
  border-color: var(--red);
  box-shadow: 0 0 0 1px var(--red), 0 4px 24px rgba(255, 68, 68, 0.2);
  animation: pulseLive 2s infinite;
}
.match.finished {
  border-color: var(--blue);
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(31, 77, 111, 0.18) 100%);
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pulseLive {
  0%, 100% { box-shadow: 0 0 0 1px var(--red), 0 4px 24px rgba(255, 68, 68, 0.15); }
  50% { box-shadow: 0 0 0 1px var(--red), 0 4px 32px rgba(255, 68, 68, 0.4); }
}

.kickoff {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-weight: 600;
}
.row {
  display: grid;
  grid-template-columns: 1fr 130px 1fr;
  align-items: center;
  gap: 14px;
  margin-top: 8px;
}
.team-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 10px 6px;
  background: rgba(0, 0, 0, 0.18);
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  transition: all 0.15s;
}
.team-block:hover {
  background: rgba(212, 175, 55, 0.06);
  border-color: rgba(212, 175, 55, 0.3);
}
.team-block.home, .team-block.away { text-align: center; }
.team {
  font-family: 'Montserrat', system-ui, sans-serif;
  color: var(--text-primary);
  word-break: break-word;
  line-height: 1.2;
}
.team-abbr {
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.8px;
  color: var(--text-primary);
  display: block;
}
.team-full {
  font-weight: 500;
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
}
/* ============ ESCUDOS (CDN ESPN) + FALLBACK A BANDERA ============ */
.crest-wrap {
  position: relative;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.6));
}
.crest {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.crest-fallback {
  display: none !important;
  width: 60px;
  height: 45px;
}
/* Si la imagen falla, .crest-wrap recibe la clase .crest-fail por JS onerror */
.crest-wrap.crest-fail .crest { display: none; }
.crest-wrap.crest-fail .crest-fallback { display: block !important; }

/* Bandera grande (legacy, sigue usándose como fallback). background-size:contain
   preserva proporción y evita que se corten escudos centrales. */
.flag {
  display: block;
  width: 60px;
  height: 45px;
  border-radius: 6px;
  background-size: contain !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-color: #1a2350;
  flex-shrink: 0;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.22),
    0 4px 14px rgba(0, 0, 0, 0.55);
  position: relative;
  overflow: hidden;
}
.flag::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 6px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.18) 0%, transparent 35%),
    linear-gradient(180deg, transparent 60%, rgba(0, 0, 0, 0.15) 100%);
  pointer-events: none;
}

/* Crest hero (página de detalle) */
.crest-wrap-hero {
  position: relative;
  width: 110px;
  height: 110px;
  margin: 0 auto 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.65));
}
.crest-hero {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.crest-hero-fallback {
  display: none !important;
  width: 90px !important;
  height: 67px !important;
}
.crest-wrap-hero.crest-fail .crest-hero { display: none; }
.crest-wrap-hero.crest-fail .crest-hero-fallback { display: block !important; }

/* Crest mini (live banner section, 32x32) */
.crest-mini {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.crest-mini img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.score-inputs {
  display: grid;
  grid-template-columns: 1fr 14px 1fr;
  gap: 4px;
  align-items: center;
}
.dash {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}
.score-input-wrap {
  position: relative;
}
.score-input-wrap input[type="number"] {
  background: var(--bg-deep);
  border: 2px solid var(--border-soft);
  color: var(--text-primary);
  padding: 10px 4px;
  border-radius: 8px;
  font-size: 22px;
  font-weight: 800;
  text-align: center;
  width: 100%;
  -moz-appearance: textfield;
  font-family: 'Montserrat', system-ui, sans-serif;
  transition: all 0.15s;
}
.score-input-wrap input[type="number"]:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
}
.score-input-wrap input[type="number"]::-webkit-outer-spin-button,
.score-input-wrap input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.score-input-wrap input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: rgba(0, 0, 0, 0.3);
}
.btn-stepper {
  background: var(--border-soft);
  border: none;
  color: var(--text-secondary);
  width: 100%;
  height: 24px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  border-radius: 6px;
  margin: 2px 0;
  transition: all 0.1s;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.btn-stepper:hover:not(:disabled) {
  background: var(--gold);
  color: var(--bg-deep);
}
.btn-stepper:active:not(:disabled) { transform: scale(0.95); }
.btn-stepper:disabled { opacity: 0.3; cursor: not-allowed; }

.points-hint {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-soft);
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}
.points-hint span strong { color: var(--gold); font-family: 'Montserrat'; }

/* ============ QUICK-PICK BUTTONS ============ */
.quick-picks {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--border-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.quick-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
  margin-right: 4px;
}
.quick-pick {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-soft);
  color: var(--text-secondary);
  padding: 5px 10px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: 'Montserrat', sans-serif;
  transition: all 0.12s ease-out;
  letter-spacing: 0.3px;
  -webkit-tap-highlight-color: transparent;
}
.quick-pick:hover {
  background: rgba(212, 175, 55, 0.10);
  border-color: rgba(212, 175, 55, 0.5);
  color: var(--gold);
  transform: translateY(-1px);
}
.quick-pick.selected {
  background: linear-gradient(135deg, var(--gold), var(--gold-soft));
  color: var(--bg-deep);
  border-color: var(--gold);
  transform: scale(1.08);
  box-shadow: 0 0 12px var(--gold-glow);
}

.result {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-soft);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.result strong {
  font-family: 'Montserrat';
  font-size: 17px;
  color: var(--text-primary);
}
.points {
  padding: 4px 12px;
  border-radius: 6px;
  font-weight: 800;
  font-size: 13px;
  font-family: 'Montserrat';
  letter-spacing: 0.3px;
}
.pts-5 { background: var(--green-deep); color: #aff5c0; box-shadow: 0 0 12px rgba(86, 211, 100, 0.25); }
.pts-3 { background: var(--blue-deep); color: #afd0f5; box-shadow: 0 0 12px rgba(74, 158, 255, 0.2); }
.pts-1 { background: var(--yellow-deep); color: var(--yellow); }
.pts-0 { background: var(--red-deep); color: #f5afaf; }

/* ============ BADGES ============ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 10px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.badge.red { background: var(--red-deep); color: #f5afaf; }
.badge.gray { background: rgba(255, 255, 255, 0.06); color: var(--text-muted); }
.badge.tbd { background: linear-gradient(135deg, #4a3c20, #6f5a30); color: #f5e9af; }
.badge.gold {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-soft) 100%);
  color: var(--bg-deep);
  box-shadow: 0 0 12px var(--gold-glow);
}
.badge.live {
  background: var(--red);
  color: white;
  box-shadow: 0 0 0 0 rgba(255, 68, 68, 0.7);
  animation: pulseRed 1.5s infinite;
}
@keyframes pulseRed {
  0% { box-shadow: 0 0 0 0 rgba(255, 68, 68, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(255, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 68, 68, 0); }
}
.badge.live::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: white;
}

/* ============ BUTTONS ============ */
button {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  -webkit-tap-highlight-color: transparent;
  transition: all 0.15s;
}
button:hover { background: rgba(255, 255, 255, 0.1); }
button:active { transform: translateY(1px); }
button.primary {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-soft) 100%);
  border-color: var(--gold);
  color: var(--bg-deep);
  font-weight: 800;
  box-shadow: 0 4px 16px var(--gold-glow);
  letter-spacing: 0.3px;
}
button.primary:hover {
  box-shadow: 0 4px 24px rgba(212, 175, 55, 0.3);
  transform: translateY(-1px);
}
button.primary.big {
  padding: 16px 24px;
  font-size: 15px;
  width: 100%;
  border-radius: 10px;
}
button.danger {
  background: var(--red-deep);
  border-color: var(--red);
  color: white;
}
button.danger:hover { background: var(--red); }

/* ============ FORMS ============ */
form label {
  display: block;
  margin-bottom: 14px;
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
form label input {
  display: block;
  width: 100%;
  margin-top: 6px;
  background: var(--bg-deep);
  border: 2px solid var(--border-soft);
  color: var(--text-primary);
  padding: 13px 14px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 500;
  transition: all 0.15s;
  font-family: inherit;
}
form label input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
}
form.inline {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
form.inline input {
  background: var(--bg-deep);
  border: 1px solid var(--border-soft);
  color: var(--text-primary);
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 14px;
}
form.grid label { width: 100%; }

/* ============ STICKY SUBMIT ============ */
.sticky-bar {
  position: sticky;
  bottom: 0;
  background: linear-gradient(180deg, transparent 0%, var(--bg-deep) 30%);
  padding: 24px 0 12px;
  margin-top: 28px;
  z-index: 5;
}

/* ============ TABLES & RANKING ============ */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 12px;
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-card);
}
table.ranking, table.admin {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  min-width: 320px;
}
table th, table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--border-soft);
  text-align: left;
  font-size: 14px;
}
table th {
  background: rgba(0, 0, 0, 0.2);
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  white-space: nowrap;
  font-weight: 700;
}
table td.right, table th.right { text-align: right; }
table tbody tr:last-child td { border-bottom: none; }
table.ranking td.strong {
  font-weight: 800;
  font-size: 18px;
  font-family: 'Montserrat';
  color: var(--text-primary);
}
table.ranking tbody tr:nth-child(1) {
  background: linear-gradient(90deg, rgba(212, 175, 55, 0.12) 0%, transparent 60%);
  border-left: 3px solid var(--gold);
}
table.ranking tbody tr:nth-child(1) td.strong { color: var(--gold); }
table.ranking tbody tr:nth-child(2) {
  background: linear-gradient(90deg, rgba(192, 192, 192, 0.08) 0%, transparent 60%);
  border-left: 3px solid #c0c0c0;
}
table.ranking tbody tr:nth-child(3) {
  background: linear-gradient(90deg, rgba(205, 127, 50, 0.08) 0%, transparent 60%);
  border-left: 3px solid #cd7f32;
}

.player-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}
.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4a9eff 0%, #6a3cc8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  color: white;
  font-family: 'Montserrat';
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.medal {
  font-size: 18px;
  margin-right: 4px;
}
code {
  background: rgba(0, 0, 0, 0.3);
  padding: 3px 8px;
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 13px;
  word-break: break-all;
  color: var(--gold);
  border: 1px solid var(--border-soft);
}

/* ============ FOOTER ============ */
footer {
  text-align: center;
  padding: 32px 16px 24px;
  color: var(--text-muted);
  font-size: 12px;
  border-top: 1px solid var(--border-soft);
  margin-top: 60px;
}
footer .powered {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 4px 10px;
  border: 1px solid var(--border-soft);
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.2);
}

/* ============ STATS STRIP ============ */
.stats-strip {
  background: linear-gradient(90deg, rgba(212, 175, 55, 0.12), rgba(74, 158, 255, 0.10) 50%, rgba(212, 175, 55, 0.08));
  border-bottom: 1px solid var(--border-soft);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-size: 13px;
  color: var(--text-secondary);
  flex-wrap: wrap;
}
.stats-strip .stat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
}
.stats-strip .stat strong {
  color: var(--gold);
  font-size: 15px;
  font-family: 'Montserrat';
  letter-spacing: 0.3px;
}
.stats-strip .stat.streak {
  background: linear-gradient(135deg, #6f1d1d, #b8590c);
  color: #ffd6a4;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
}
.stats-strip .stat.bonus {
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  color: var(--bg-deep);
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 800;
}
.stats-strip .stat.next-match {
  margin-left: auto;
  color: var(--text-muted);
  font-weight: 500;
}

/* ============ LED ONLINE ============ */
.led-online {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  margin-right: 6px;
  box-shadow: 0 0 6px var(--green), 0 0 12px rgba(86, 211, 100, 0.4);
  animation: ledPulse 2s ease-in-out infinite;
  vertical-align: middle;
}
@keyframes ledPulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 6px var(--green), 0 0 12px rgba(86, 211, 100, 0.4); }
  50% { opacity: 0.6; box-shadow: 0 0 4px var(--green); }
}

/* ============ MEDAL PILLS (legends) ============ */
.medal-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 700;
  margin-right: 4px;
}
.medal-pill.gold   { background: linear-gradient(135deg, #d4af37, #b8941f); color: #1a1300; }
.medal-pill.silver { background: linear-gradient(135deg, #c0c0c0, #888);    color: #1a1a1a; }
.medal-pill.bronze { background: linear-gradient(135deg, #cd7f32, #8b4513); color: #1a0d00; }
.medal-pill.bonus  { background: linear-gradient(135deg, #4a9eff, #6a3cc8); color: white; }
.points-legend { display: inline-flex; gap: 4px; margin-left: 8px; flex-wrap: wrap; vertical-align: middle; }

/* ============ STREAK BADGE ============ */
.streak-badge {
  background: linear-gradient(135deg, #6f1d1d, #b8590c);
  color: #ffd6a4;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  margin-left: 6px;
  font-family: 'Montserrat';
  box-shadow: 0 0 8px rgba(184, 89, 12, 0.4);
}

/* ============ BONUS TAG ============ */
.bonus-tag {
  display: inline-block;
  margin-left: 8px;
  padding: 3px 10px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  color: var(--bg-deep);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.3px;
}

/* ============ VENUE / GROUP ============ */
.venue {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
  font-weight: 500;
}
.badge.group-badge {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  font-weight: 700;
}

/* Group color borders en match cards */
.match.group-a { border-left: 3px solid #ff4444; }
.match.group-b { border-left: 3px solid #4a9eff; }
.match.group-c { border-left: 3px solid #56d364; }
.match.group-d { border-left: 3px solid #f5af3c; }
.match.group-e { border-left: 3px solid #b87cff; }
.match.group-f { border-left: 3px solid #4ad4d4; }
.match.group-g { border-left: 3px solid #ff79c6; }
.match.group-h { border-left: 3px solid #f1fa8c; }

/* ============ HOURGLASS ============ */
.hourglass-wrap {
  margin-top: 12px;
  position: relative;
  height: 22px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: 0 10px;
}
.hourglass-fill {
  position: absolute;
  top: 0; left: 0;
  height: 100%;
  background: linear-gradient(90deg, #56d364 0%, #f5af3c 60%, #ff4444 100%);
  transition: width 0.4s ease-out;
  opacity: 0.4;
}
.hourglass-text {
  position: relative;
  z-index: 1;
  font-size: 10px;
  color: var(--text-secondary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.hourglass-wrap.hourglass-far .hourglass-text { color: var(--text-muted); }
.hourglass-wrap.hourglass-active .hourglass-text { color: var(--text-primary); }

/* ============ VOTE DISTRIBUTION ============ */
.votes {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--border-soft);
}
.votes-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  font-weight: 600;
}
.vote-bar {
  display: flex;
  height: 22px;
  border-radius: 6px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.3);
}
.vote-seg {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: white;
  min-width: 0;
  transition: filter 0.2s;
}
.vote-seg:hover { filter: brightness(1.2); }
.vote-seg.home { background: linear-gradient(135deg, #4a9eff, #1f4d6f); }
.vote-seg.draw { background: linear-gradient(135deg, #888, #555); }
.vote-seg.away { background: linear-gradient(135deg, #ff7b72, #6f1d1d); }

/* ============ NAV ICONOGRAPHY ============ */
.navtxt { display: inline; }

/* ============ INPUTS ANIMATIONS ============ */
.score-input-wrap input[type="number"].changed {
  animation: numChange 0.25s ease-out;
}
@keyframes numChange {
  0% { transform: translateY(-8px) scale(1.1); color: var(--gold); }
  100% { transform: translateY(0) scale(1); color: var(--text-primary); }
}

/* ============ SAVE BUTTON PULSE ============ */
.save-btn.pulse {
  animation: saveBtnPulse 0.4s ease-out;
}
@keyframes saveBtnPulse {
  0% { transform: scale(1); box-shadow: 0 4px 16px var(--gold-glow); }
  50% { transform: scale(0.97); box-shadow: 0 0 0 8px rgba(212, 175, 55, 0.3); }
  100% { transform: scale(1); box-shadow: 0 4px 16px var(--gold-glow); }
}

/* ============ BIG SELECT (picks page) ============ */
.big-select {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 14px;
  background: var(--bg-deep);
  border: 2px solid var(--border-soft);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}
.big-select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
}

/* ============ MATCH DETAIL PAGE ============ */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 16px;
  font-weight: 500;
}
.back-link:hover { color: var(--gold); }

.match-hero {
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(74, 158, 255, 0.05) 100%);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-card);
}
.match-hero.live {
  border-color: var(--red);
  box-shadow: 0 0 0 1px var(--red), 0 4px 24px rgba(255, 68, 68, 0.2);
  animation: pulseLive 2s infinite;
}
.match-hero.finished {
  border-color: var(--blue);
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(31, 77, 111, 0.18) 100%);
}
.match-hero-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.match-hero-teams {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}
.hero-team {
  text-align: center;
}
.flag-hero {
  display: inline-block;
  width: 90px;
  height: 67px;
  border-radius: 8px;
  background-size: contain !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-color: #1a2350;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.2), 0 6px 20px rgba(0,0,0,0.5);
  margin-bottom: 10px;
}
.hero-abbr {
  font-family: 'Montserrat', sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: 1px;
}
.hero-full {
  font-size: 13px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
}
.hero-score {
  text-align: center;
  font-family: 'Montserrat', sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 130px;
}
.hero-score .score-num {
  font-size: 56px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  display: inline-block;
}
.hero-score .score-num.pending {
  color: var(--text-muted);
  font-size: 40px;
}
.hero-score .score-dash {
  font-size: 32px;
  color: var(--text-muted);
  margin: 0 6px;
}
.hero-score.finished .score-num { color: var(--blue); }
.hero-score.live .score-num { color: var(--red); }
.hero-status {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--text-muted);
  text-transform: uppercase;
}
.pulse-red {
  color: var(--red);
  animation: pulseRed 1.5s infinite;
}

.my-pred-card { text-align: center; }
.my-pred-display {
  font-family: 'Montserrat', sans-serif;
  font-size: 36px;
  font-weight: 800;
  color: var(--gold);
  margin: 12px 0;
}
.my-pred-num { display: inline-block; }
.my-pred-dash { color: var(--text-muted); margin: 0 8px; }
.my-pred-points {
  margin-top: 8px;
  padding: 8px 16px;
  border-radius: 8px;
  display: inline-block;
  font-weight: 700;
}
.lock-msg { text-align: center; }
.lock-msg h2 { color: var(--gold); }

table.predictions {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  min-width: 320px;
}
table.predictions th, table.predictions td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--border-soft);
  font-size: 14px;
}
table.predictions th {
  background: rgba(0, 0, 0, 0.2);
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: left;
}
table.predictions th.right, table.predictions td.right { text-align: right; }
table.predictions tr.me-row {
  background: linear-gradient(90deg, rgba(212, 175, 55, 0.10) 0%, transparent 60%);
}
.me-tag {
  display: inline-block;
  padding: 2px 6px;
  background: var(--gold);
  color: var(--bg-deep);
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  margin-left: 4px;
}
.pred-num { font-family: 'Montserrat'; font-size: 16px; }
.live-diff {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}
.live-diff.close { color: var(--gold); }
.badge.live-match {
  background: var(--gold);
  color: var(--bg-deep);
  font-weight: 800;
  animation: pulseRed 1.5s infinite;
}

/* ============ FIXTURE: SEE PREDS LINK ============ */
.see-preds-link {
  display: block;
  margin-top: 12px;
  padding: 8px;
  text-align: center;
  background: rgba(212, 175, 55, 0.06);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 8px;
  text-decoration: none;
  color: var(--gold);
  font-size: 13px;
  font-weight: 600;
  transition: all 0.15s;
}
.see-preds-link:hover {
  background: rgba(212, 175, 55, 0.12);
  border-color: var(--gold);
}

/* ============ LIVE BANNER (top of fixture) ============ */
.live-banner-section {
  margin-bottom: 24px;
  padding: 16px;
  background: linear-gradient(135deg, rgba(255, 68, 68, 0.10), rgba(212, 175, 55, 0.08));
  border: 2px solid var(--red);
  border-radius: 14px;
  box-shadow: 0 0 0 1px rgba(255, 68, 68, 0.2), 0 4px 24px rgba(255, 68, 68, 0.15);
  animation: pulseLive 2.5s infinite;
}
.live-title {
  margin: 0 0 12px 0;
  font-size: 15px;
  font-weight: 800;
  color: var(--red);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
}
.live-strip {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.live-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 10px;
  text-decoration: none;
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.15s;
  flex-wrap: wrap;
  gap: 8px;
}
.live-card:hover {
  background: rgba(0, 0, 0, 0.4);
  border-color: var(--red);
}
.live-teams {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Montserrat';
}
.live-abbr {
  font-weight: 800;
  font-size: 14px;
}
.live-score {
  font-size: 18px;
  font-weight: 800;
  color: var(--red);
  margin: 0 8px;
  font-variant-numeric: tabular-nums;
}
.live-link {
  font-size: 12px;
  color: var(--gold);
  font-weight: 600;
}

/* ============ RESPONSIVE: TABLET ============ */
@media (max-width: 700px) {
  main { padding: 0 12px 100px; }
  h1 { font-size: 22px; }
  .card { padding: 16px; }
}

/* ============ RESPONSIVE: PHONE ============ */
@media (max-width: 520px) {
  header { padding: 10px 12px; gap: 6px; }
  .brand { font-size: 15px; }
  nav { gap: 0; }
  nav a { padding: 6px 8px; font-size: 13px; }
  nav a .navtxt { display: none; }  /* solo iconos en mobile */
  .who { font-size: 12px; padding: 0 4px; }
  .stats-strip { gap: 10px; padding: 8px 12px; font-size: 12px; }
  .stats-strip .stat.next-match { display: none; }
  .points-legend { display: block; margin: 6px 0 0 0; }

  .countdown-bar { font-size: 12px; padding: 8px 12px; }
  .countdown { font-size: 13px; }

  main { padding: 0 10px 100px; margin-top: 12px; }
  h1 { font-size: 20px; }
  h2.round { font-size: 12px; }

  .match { padding: 12px; }
  .row {
    grid-template-columns: 1fr 100px 1fr;
    gap: 8px;
  }
  .team-block { padding: 8px 4px; gap: 4px; }
  .crest-wrap { width: 52px; height: 52px; }
  .flag { width: 52px; height: 39px; }
  .team-abbr { font-size: 15px; letter-spacing: 0.4px; }
  .team-full { display: none; }
  .score-input-wrap input[type="number"] { font-size: 20px; padding: 8px 2px; }
  .btn-stepper { height: 22px; font-size: 13px; }
  .crest-wrap-hero { width: 80px; height: 80px; }
  .hero-score .score-num { font-size: 40px; }
  .quick-label { display: none; }
  .quick-pick { padding: 6px 10px; font-size: 12px; flex: 1; min-width: 50px; text-align: center; }
  .quick-picks { gap: 4px; justify-content: space-between; }

  .card.narrow {
    max-width: 100%;
    margin: 16px 0;
    padding: 16px;
  }

  table th, table td { padding: 10px 10px; font-size: 13px; }
  .avatar { width: 28px; height: 28px; font-size: 11px; }
}

/* ============ RESPONSIVE: VERY SMALL ============ */
@media (max-width: 360px) {
  .row { grid-template-columns: 1fr 86px 1fr; gap: 6px; }
  .crest-wrap { width: 44px; height: 44px; }
  .flag { width: 44px; height: 33px; }
  .team-abbr { font-size: 13px; }
  .score-input-wrap input[type="number"] { font-size: 18px; }
}

/* ============ ADMIN TABS ============ */
.admin-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 20px 0 24px;
}
.admin-tab {
  background: linear-gradient(180deg, #1a2238 0%, #0f1729 100%);
  border: 2px solid #233153;
  color: #e8eaf0;
  padding: 16px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 14px;
  text-align: center;
  line-height: 1.3;
  transition: all 0.15s ease;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.admin-tab small {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 500;
  opacity: 0.75;
  letter-spacing: 0;
  text-transform: none;
}
.admin-tab:hover {
  border-color: #d4af37;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.2);
}
.admin-tab.active {
  background: linear-gradient(180deg, #d4af37 0%, #b8941f 100%);
  color: #050818;
  border-color: #d4af37;
  box-shadow: 0 4px 16px rgba(212, 175, 55, 0.3);
}
@media (max-width: 700px) {
  .admin-tabs { grid-template-columns: repeat(2, 1fr); }
  .admin-tab { padding: 12px 8px; font-size: 12px; }
  .admin-tab small { font-size: 10px; }
}

/* ============ CHECKBOX ROW ============ */
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  font-size: 14px !important;
}
.checkbox-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #d4af37;
  flex-shrink: 0;
}
.checkbox-row span {
  flex: 1;
}
