/* ============================================================
   POLLA DEL MUNDIAL 2026 — Stylesheet
   Paleta: Rojo #C8102E · Azul #003DA5 · Dorado #F5C518 · Gris Oscuro #1A1A2E
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --red:     #C8102E;
  --blue:    #003DA5;
  --gold:    #F5C518;
  --dark:    #0D0D1A;
  --darker:  #06060F;
  --card:    #12122A;
  --card2:   #1A1A35;
  --border:  rgba(255,255,255,0.08);
  --text:    #F0F0F8;
  --muted:   #8888AA;
  --green:   #22c55e;
  --radius:  12px;
  --shadow:  0 4px 24px rgba(0,0,0,0.4);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--darker);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; }

/* ── Container ── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 1rem; }

/* ── Navbar ── */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(13,13,26,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-container {
  max-width: 1100px; margin: 0 auto;
  padding: 0 1rem;
  display: flex; align-items: center; justify-content: space-between;
  height: 60px;
}
.nav-logo {
  display: flex; align-items: center; gap: .4rem;
  text-decoration: none; font-family: 'Space Grotesk', sans-serif;
}
.logo-trophy { font-size: 1.4rem; }
.logo-text { font-size: 1.2rem; font-weight: 800; color: var(--text); }
.logo-accent { color: var(--gold); }

.nav-links {
  display: flex; align-items: center; gap: .25rem;
  list-style: none;
}
.nav-link {
  display: flex; align-items: center; gap: .3rem;
  padding: .4rem .7rem; border-radius: 8px;
  color: var(--muted); font-size: .9rem; font-weight: 500;
  transition: color .2s, background .2s;
  text-decoration: none;
}
.nav-link:hover, .nav-link.active {
  color: var(--text); background: var(--card);
  text-decoration: none;
}
.nav-btn {
  padding: .4rem .9rem; border-radius: 8px;
  background: var(--red); color: #fff !important;
  font-weight: 600; font-size: .9rem;
  text-decoration: none;
  transition: opacity .2s;
}
.nav-btn:hover { opacity: .85; text-decoration: none; }
.nav-user { display: flex; align-items: center; gap: .5rem; }
.user-badge {
  background: var(--blue); color: #fff;
  padding: .25rem .6rem; border-radius: 6px;
  font-size: .8rem; font-weight: 700;
}
.nav-logout { color: var(--muted) !important; display: flex; align-items: center; }
.nav-logout:hover { color: #f87171 !important; }
.nav-logout svg { display: block; }
.bnav-logout-svg {
  display: block;
  width: 24px; height: 24px;
  stroke: currentColor;
  margin-bottom: 1px;
}

.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: .5rem;
}
.nav-toggle span {
  display: block; width: 22px; height: 2px;
  background: var(--text); border-radius: 2px; transition: .3s;
}

/* ── Chile Clock ── */
.chile-clock {
  position: fixed; bottom: 1rem; right: 1rem; z-index: 90;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 10px; padding: .4rem .8rem;
  display: flex; align-items: center; gap: .4rem;
  font-size: .85rem; box-shadow: var(--shadow);
}
.clock-time { font-family: 'Space Grotesk', monospace; font-weight: 700; color: var(--gold); }
.clock-label { color: var(--muted); font-size: .75rem; }

/* ── Flash messages ── */
.flash-container {
  position: fixed; top: 65px; right: 1rem; z-index: 200;
  display: flex; flex-direction: column; gap: .5rem; max-width: 360px;
}
.flash {
  display: flex; align-items: center; justify-content: space-between;
  padding: .7rem 1rem; border-radius: 10px;
  font-size: .9rem; font-weight: 500;
  animation: slideIn .3s ease;
}
.flash-success { background: #064e3b; border: 1px solid #065f46; color: #d1fae5; }
.flash-danger  { background: #7f1d1d; border: 1px solid #991b1b; color: #fecaca; }
.flash-warning { background: #78350f; border: 1px solid #92400e; color: #fde68a; }
.flash-info    { background: #1e3a5f; border: 1px solid #1d4ed8; color: #bfdbfe; }
.flash-close   { background: none; border: none; color: inherit; cursor: pointer; font-size: 1rem; margin-left: .5rem; }
@keyframes slideIn { from { transform: translateX(110%); } to { transform: translateX(0); } }

/* ── Main content ── */
.main-content { min-height: calc(100vh - 60px - 80px); padding-bottom: 2rem; }

/* ── Hero ── */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--darker) 0%, #0a0a2a 50%, var(--dark) 100%);
  padding: 5rem 1rem 4rem;
  text-align: center;
}
.hero-bg { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.hero-ball {
  position: absolute; border-radius: 50%; opacity: .06;
  background: radial-gradient(circle, var(--gold), transparent);
}
.hero-ball.ball-1 { width: 600px; height: 600px; top: -200px; left: -200px; }
.hero-ball.ball-2 { width: 400px; height: 400px; top: 50%; right: -100px; }
.hero-ball.ball-3 { width: 300px; height: 300px; bottom: -100px; left: 40%; }

.hero-content { position: relative; z-index: 1; max-width: 700px; margin: 0 auto; }
.hero-badge {
  display: inline-block;
  background: rgba(245,197,24,.15); border: 1px solid rgba(245,197,24,.3);
  color: var(--gold); padding: .3rem .9rem; border-radius: 20px;
  font-size: .8rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; margin-bottom: 1.2rem;
}
.hero-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.8rem, 8vw, 5rem);
  font-weight: 900; line-height: 1.05; margin-bottom: .8rem;
}
.hero-accent { color: var(--gold); }
.hero-sub { color: var(--muted); font-size: 1.1rem; margin-bottom: 2rem; }
.hero-stats {
  display: flex; justify-content: center; gap: 2rem;
  margin-bottom: 2.5rem;
}
.hero-stat { text-align: center; }
.stat-num {
  display: block; font-size: 2rem; font-weight: 900;
  font-family: 'Space Grotesk', sans-serif; color: var(--gold);
}
.stat-label { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .65rem 1.4rem; border-radius: 10px;
  font-weight: 600; font-size: .95rem; cursor: pointer;
  border: none; text-decoration: none; transition: all .2s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: #a00d24; color: #fff; }
.btn-secondary { background: var(--card2); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--card); color: var(--text); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--card); }
.btn-lg { padding: .85rem 2rem; font-size: 1.05rem; }
.btn-sm { padding: .35rem .8rem; font-size: .82rem; }
.btn-block { width: 100%; }

/* ── How it works ── */
.how-it-works { padding: 4rem 1rem; }
.section-title {
  font-family: 'Space Grotesk', sans-serif; font-size: 1.8rem; font-weight: 700;
  text-align: center; margin-bottom: 2rem;
}
.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem; }
.step-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.75rem 1.5rem; text-align: center;
  transition: transform .2s, border-color .2s;
}
.step-card:hover { transform: translateY(-3px); border-color: rgba(245,197,24,.3); }
.step-icon { font-size: 2.2rem; margin-bottom: .75rem; }
.step-card h3 { font-size: 1.1rem; margin-bottom: .4rem; }
.step-card p { color: var(--muted); font-size: .9rem; }

/* ── Top 10 ── */
.top10 { padding-bottom: 4rem; }

/* ── Ranking Table ── */
.ranking-table-wrap { overflow-x: auto; margin-bottom: 1rem; }
.ranking-table { width: 100%; border-collapse: collapse; }
.ranking-table th {
  padding: .75rem 1rem; text-align: left;
  background: var(--card); color: var(--muted);
  font-size: .8rem; text-transform: uppercase; letter-spacing: .06em;
  border-bottom: 1px solid var(--border);
}
.ranking-table td {
  padding: .75rem 1rem; border-bottom: 1px solid var(--border);
  font-size: .95rem;
}
.ranking-table tr:hover td { background: rgba(255,255,255,.03); }
.rank-gold td  { background: rgba(245,197,24,.06); }
.rank-silver td { background: rgba(192,192,192,.05); }
.rank-bronze td { background: rgba(205,127,50,.05); }
.rank-me td { outline: 1px solid var(--blue); }
.rank-pos { font-size: 1.2rem; text-align: center; width: 50px; }
.rank-name { font-weight: 600; }
.rank-pts { font-family: 'Space Grotesk', sans-serif; font-size: 1.1rem; color: var(--gold); }
.you-badge {
  background: var(--blue); color: #fff;
  font-size: .7rem; padding: .1rem .4rem; border-radius: 4px; margin-left: .4rem;
}
.ranking-legend {
  display: flex; gap: 1.5rem; justify-content: center;
  color: var(--muted); font-size: .85rem; margin-top: 1rem;
}

/* ── Auth ── */
.auth-section {
  display: flex; align-items: center; justify-content: center;
  min-height: calc(100vh - 140px); padding: 2rem 1rem;
}
.auth-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 18px; padding: 2.5rem 2rem;
  width: 100%; max-width: 420px; text-align: center;
}
.auth-icon { font-size: 3rem; margin-bottom: 1rem; }
.auth-title { font-size: 1.6rem; font-weight: 700; margin-bottom: .5rem; }
.auth-sub { color: var(--muted); font-size: .95rem; margin-bottom: 2rem; }
.auth-form { text-align: left; }
.auth-footer { margin-top: 1.5rem; color: var(--muted); font-size: .9rem; }

.form-group { margin-bottom: 1.2rem; }
.form-group label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: .4rem; color: var(--muted); }
.form-group input {
  width: 100%; padding: .7rem 1rem;
  background: var(--darker); border: 1px solid var(--border);
  border-radius: 10px; color: var(--text); font-size: 1rem;
  transition: border-color .2s;
}
.form-group input:focus { outline: none; border-color: var(--blue); }

/* ── Page headers ── */
.page-title { font-family: 'Space Grotesk', sans-serif; font-size: 2rem; font-weight: 800; margin-bottom: .4rem; }
.page-sub { color: var(--muted); margin-bottom: 2rem; }
.cal-header, .ranking-header, .rules-header, .admin-header {
  padding: 2rem 0 1rem;
  display: flex; align-items: flex-start; flex-direction: column;
}
.admin-header { flex-direction: row; justify-content: space-between; align-items: center; }

/* ── Stage / Group tabs ── */
.stage-tabs, .group-tabs {
  display: flex; gap: .4rem; flex-wrap: wrap;
  margin-bottom: 1.5rem; padding-bottom: .75rem;
  border-bottom: 1px solid var(--border);
}
.stage-tab, .group-tab {
  padding: .4rem .9rem; border-radius: 8px;
  background: var(--card); border: 1px solid var(--border);
  color: var(--muted); font-size: .85rem; font-weight: 500;
  cursor: pointer; transition: all .2s;
}
.stage-tab:hover, .group-tab:hover { color: var(--text); border-color: rgba(255,255,255,.2); }
.stage-tab.active, .group-tab.active {
  background: var(--red); color: #fff; border-color: var(--red);
}

/* ── Match Card ── */
.match-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem;
  margin-bottom: 1rem; transition: border-color .2s;
}
.match-card:hover { border-color: rgba(255,255,255,.15); }
.match-card.locked { opacity: .85; }
.match-card.finished { border-left: 3px solid var(--green); }

.match-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: .6rem;
  margin-bottom: .75rem; font-size: .8rem; color: var(--muted);
}
.match-date { font-weight: 600; color: var(--text); }
.match-time { color: var(--gold); }
.match-group-badge {
  background: var(--blue); color: #fff;
  padding: .1rem .5rem; border-radius: 5px; font-size: .75rem; font-weight: 700;
}

.match-body {
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; gap: 1rem;
}

.team { display: flex; align-items: center; gap: .5rem; }
.team-home { justify-content: flex-end; flex-direction: row-reverse; }
.team-away { justify-content: flex-start; }
.team-flag { font-size: 1.5rem; }
.team-name { font-weight: 600; font-size: .95rem; }

.match-center { display: flex; flex-direction: column; align-items: center; gap: .5rem; min-width: 160px; }

/* Result oficial */
.result-official {
  display: flex; align-items: center; gap: .4rem;
  font-family: 'Space Grotesk', sans-serif; font-size: 2rem; font-weight: 800;
}
.result-sep { color: var(--muted); }
.result-goals { color: var(--gold); }
.my-bet-result {
  font-size: .8rem; padding: .25rem .6rem; border-radius: 6px; font-weight: 600;
}
.bet-exact  { background: rgba(34,197,94,.2); color: #4ade80; }
.bet-correct { background: rgba(59,130,246,.2); color: #60a5fa; }
.bet-wrong  { background: rgba(239,68,68,.15); color: #f87171; }
.no-bet-result { font-size: .8rem; color: var(--muted); }

/* Locked display */
.locked-display { display: flex; flex-direction: column; align-items: center; gap: .3rem; }
.bet-placed {
  display: flex; align-items: center; gap: .3rem;
  font-family: 'Space Grotesk', sans-serif; font-size: 1.6rem; font-weight: 700;
}
.bet-sep { color: var(--muted); }
.bet-score { color: var(--text); }
.locked-label { font-size: .75rem; color: var(--muted); }
.no-bet-locked { font-size: .8rem; color: var(--muted); }

/* Bet inputs */
.bet-inputs { display: flex; align-items: center; gap: .5rem; }
.goals-selector { display: flex; align-items: center; }
.goals-btn {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--card2); border: 1px solid var(--border);
  color: var(--text); font-size: 1.1rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s; user-select: none;
}
.goals-btn:hover { background: var(--blue); border-color: var(--blue); }
.goals-input {
  width: 38px; height: 32px; text-align: center;
  background: var(--darker); border: 1px solid var(--border);
  color: var(--gold); font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem; font-weight: 700; border-radius: 6px;
  -moz-appearance: textfield;
}
.goals-input::-webkit-inner-spin-button,
.goals-input::-webkit-outer-spin-button { -webkit-appearance: none; }
.vs-sep { color: var(--muted); font-size: 1.1rem; margin: 0 .25rem; }

/* Quick result buttons */
.quick-result { display: flex; gap: .4rem; }
.quick-btn {
  padding: .25rem .6rem; border-radius: 6px; font-size: .75rem;
  font-weight: 600; cursor: pointer; border: 1px solid var(--border);
  background: var(--card2); color: var(--muted); transition: all .15s;
}
.quick-home:hover { background: var(--blue); color: #fff; border-color: var(--blue); }
.quick-draw:hover { background: #4b5563; color: #fff; border-color: #6b7280; }
.quick-away:hover { background: var(--red); color: #fff; border-color: var(--red); }

/* Save bet button */
.btn-save-bet {
  padding: .4rem 1rem; border-radius: 8px; font-size: .85rem; font-weight: 600;
  background: var(--red); color: #fff; border: none; cursor: pointer;
  transition: all .2s;
}
.btn-save-bet:hover { background: #a00d24; }
.btn-save-bet[data-saved="true"] { background: #064e3b; color: #4ade80; cursor: default; }
.bet-feedback { font-size: .78rem; min-height: 16px; margin-top: .15rem; }
.bet-feedback.ok  { color: #4ade80; }
.bet-feedback.err { color: #f87171; }

/* ── Countdown reloj ── */
.countdown {
  margin-top: .6rem; padding-top: .6rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

/* Más de 24h: texto discreto */
.cd-far .cd-text { font-size: .75rem; color: var(--muted); }

/* Menos de 24h: reloj visible */
.cd-near, .cd-warning, .cd-urgent, .cd-critical, .cd-active {
  padding: .5rem .75rem;
  border-radius: 8px;
}
.cd-near    { background: rgba(255,255,255,.04); }
.cd-warning { background: rgba(59,130,246,.08); border: 1px solid rgba(59,130,246,.2); }
.cd-urgent  { background: rgba(245,197,24,.08); border: 1px solid rgba(245,197,24,.25); }
.cd-critical{ background: rgba(200,16,46,.12);  border: 1px solid rgba(200,16,46,.4); animation: pulse-red 1s ease-in-out infinite; }
.cd-active  { background: rgba(34,197,94,.08);  border: 1px solid rgba(34,197,94,.25); }

@keyframes pulse-red {
  0%, 100% { background: rgba(200,16,46,.12); }
  50%       { background: rgba(200,16,46,.22); }
}

.cd-label {
  display: block; font-size: .7rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em;
  margin-bottom: .35rem; color: var(--muted);
}
.cd-warning .cd-label  { color: #60a5fa; }
.cd-urgent  .cd-label  { color: var(--gold); }
.cd-critical .cd-label { color: #f87171; }

.cd-clock {
  display: flex; justify-content: center; align-items: baseline; gap: 2px;
}
.cd-unit {
  font-family: 'Space Grotesk', monospace;
  font-size: 1.4rem; font-weight: 800; color: var(--text);
  line-height: 1;
}
.cd-unit small {
  font-size: .55rem; font-weight: 600; color: var(--muted);
  margin-left: 1px;
}
.cd-sep {
  font-size: 1.2rem; font-weight: 700; color: var(--muted);
  padding: 0 1px; line-height: 1; align-self: flex-start; margin-top: 3px;
}
.cd-near    .cd-unit { color: var(--text); }
.cd-warning .cd-unit { color: #60a5fa; }
.cd-urgent  .cd-unit { color: var(--gold); }
.cd-critical .cd-unit{ color: #f87171; }
.cd-live { font-size: .85rem; font-weight: 700; color: #4ade80; }

/* ── Stage title ── */
.stage-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.4rem; font-weight: 700;
  margin-bottom: 1.2rem; padding-left: .75rem;
  border-left: 3px solid var(--red);
}

/* ── Rules ── */
.rules-header { padding: 2rem 0 1rem; }
.rules-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; padding-bottom: 3rem; }
.rule-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.75rem;
}
.rule-card.highlight { border-color: rgba(245,197,24,.3); background: linear-gradient(135deg, var(--card), #1a1a20); }
.rule-icon { font-size: 2rem; margin-bottom: .75rem; }
.rule-card h2 { font-size: 1.1rem; font-weight: 700; margin-bottom: 1rem; }
.rule-card ul, .rule-card ol { padding-left: 1.2rem; color: var(--muted); }
.rule-card li { margin-bottom: .4rem; }
.rule-card strong { color: var(--text); }

.points-table { display: flex; flex-direction: column; gap: .5rem; margin-bottom: 1rem; }
.points-row { display: flex; justify-content: space-between; align-items: center; font-size: .9rem; }
.points-header { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; border-bottom: 1px solid var(--border); padding-bottom: .4rem; }
.points-val { font-weight: 700; font-family: 'Space Grotesk', sans-serif; }
.points-val.gold { color: var(--gold); }
.points-val.silver { color: #a8b0c0; }

.rule-example {
  background: var(--darker); border-radius: 8px; padding: .9rem;
  font-size: .85rem; line-height: 1.8; color: var(--muted);
}
.green { color: #4ade80; } .blue { color: #60a5fa; } .red { color: #f87171; }
.mt-4 { margin-top: 1.5rem; }
.text-center { text-align: center; }

/* ── Admin ── */
.admin-matches { display: flex; flex-direction: column; gap: 1rem; padding-bottom: 3rem; }
.admin-match-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem; display: flex;
  flex-direction: column; gap: .75rem;
}
.admin-match-info { display: flex; flex-wrap: wrap; gap: .5rem; font-size: .8rem; }
.admin-match-num { color: var(--muted); }
.admin-stage-badge { background: var(--card2); padding: .15rem .5rem; border-radius: 5px; font-size: .75rem; }
.admin-time { color: var(--gold); }
.admin-match-teams { display: flex; align-items: center; gap: 1rem; font-weight: 600; }
.admin-vs { color: var(--muted); }
.admin-result-badge { background: var(--green); color: #000; padding: .2rem .6rem; border-radius: 6px; font-size: .9rem; font-family: 'Space Grotesk', sans-serif; }
.admin-team { flex: 1; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-end; }
.admin-result-form, .admin-teams-form { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.admin-score-inputs { display: flex; align-items: center; gap: .4rem; }
.admin-score-input {
  width: 55px; padding: .35rem .5rem; background: var(--darker);
  border: 1px solid var(--border); border-radius: 8px; color: var(--text);
  font-size: .95rem; text-align: center;
}
.admin-team-input {
  padding: .35rem .6rem; background: var(--darker);
  border: 1px solid var(--border); border-radius: 8px; color: var(--text);
  font-size: .85rem; width: 150px;
}

/* ── Predicciones especiales ── */
.pred-header { padding: 2rem 0 1rem; }
.pred-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.5rem; margin-bottom: 2rem; }
.pred-section {}
.pred-section-title { font-family: 'Space Grotesk', sans-serif; font-size: 1.2rem; font-weight: 700; margin-bottom: .4rem; }
.pred-section-sub { color: var(--muted); font-size: .85rem; margin-bottom: 1.2rem; }

.pred-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem; margin-bottom: 1rem;
  transition: border-color .2s;
}
.pred-card.confirmed { border-color: rgba(34,197,94,.3); }
.pred-card-head { display: flex; align-items: center; gap: .75rem; margin-bottom: 1rem; }
.pred-icon { font-size: 1.6rem; }
.pred-label { font-weight: 600; font-size: 1rem; }
.pred-pts-badge { font-size: .75rem; color: var(--gold); font-weight: 600; }
.pred-result-tag {
  margin-left: auto; background: rgba(34,197,94,.15); color: #4ade80;
  border: 1px solid rgba(34,197,94,.3); padding: .2rem .6rem;
  border-radius: 6px; font-size: .8rem; font-weight: 600; white-space: nowrap;
}

.pred-select, .pred-input {
  width: 100%; padding: .65rem .9rem;
  background: var(--darker); border: 1px solid var(--border);
  border-radius: 10px; color: var(--text); font-size: .95rem;
  transition: border-color .2s;
}
.pred-select:focus, .pred-input:focus { outline: none; border-color: var(--blue); }
.pred-select option { background: var(--dark); }

.pred-confirmed { padding: .6rem .8rem; border-radius: 8px; background: var(--darker); font-size: .9rem; }
.pred-hit { color: #4ade80; }
.pred-miss { color: #f87171; }
.pred-no-bet { color: var(--muted); }
.pred-locked-val { color: var(--muted); font-size: .9rem; padding: .4rem 0; }

.pred-submit { text-align: center; padding: 1.5rem 0; }
.pred-submit-note { color: var(--muted); font-size: .85rem; margin-top: .5rem; }

.countdown-inline { color: var(--gold); font-weight: 600; }

/* Special summary card */
.special-summary {
  background: var(--card); border: 1px solid rgba(245,197,24,.25);
  border-radius: var(--radius); padding: 1.25rem; margin-bottom: 2rem;
  display: flex; gap: 1.5rem; align-items: flex-start; flex-wrap: wrap;
}
.summary-pts { text-align: center; min-width: 80px; }
.summary-num { display: block; font-size: 2.5rem; font-weight: 900; font-family: 'Space Grotesk',sans-serif; color: var(--gold); }
.summary-label { font-size: .75rem; color: var(--muted); text-transform: uppercase; }
.summary-breakdown { flex: 1; display: flex; flex-direction: column; gap: .4rem; }
.summary-item { display: flex; justify-content: space-between; font-size: .88rem; padding: .3rem .5rem; border-radius: 6px; }
.summary-item.earned { background: rgba(34,197,94,.08); }
.summary-result { display: flex; align-items: center; gap: .5rem; }
.pts-badge { background: rgba(34,197,94,.2); color: #4ade80; padding: .1rem .4rem; border-radius: 5px; font-size: .75rem; font-weight: 700; }
.pts-badge.wrong { background: rgba(239,68,68,.15); color: #f87171; }

/* Tabla predicciones de todos */
.pred-all-section { padding: 2rem 0; }
.pred-all-table-wrap { overflow-x: auto; }
.pred-all-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.pred-all-table th { padding: .6rem .8rem; background: var(--card); color: var(--muted); font-size: .75rem; text-transform: uppercase; border-bottom: 1px solid var(--border); white-space: nowrap; }
.pred-all-table td { padding: .55rem .8rem; border-bottom: 1px solid var(--border); }
.cell-hit { background: rgba(34,197,94,.1); color: #4ade80; font-weight: 600; }
.cell-miss { background: rgba(239,68,68,.07); color: #f87171; }

/* Sync status card */
.sync-status-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem 1.25rem;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap;
}
.sync-info { display: flex; align-items: flex-start; gap: .75rem; flex: 1; }
.sync-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 5px; flex-shrink: 0; }
.dot-green { background: #22c55e; box-shadow: 0 0 6px #22c55e; }
.dot-gray  { background: #6b7280; }
.sync-detail { font-size: .82rem; color: var(--muted); margin-top: .2rem; }
.sync-disabled { color: #f87171; }
.sync-error { color: #fbbf24; display: block; margin-top: .2rem; }

/* Admin sections */
.admin-section { margin-bottom: 2.5rem; }
.admin-section-title { font-family: 'Space Grotesk',sans-serif; font-size: 1.2rem; font-weight: 700; margin-bottom: 1rem; padding-bottom: .5rem; border-bottom: 1px solid var(--border); }

/* Special admin grid */
.special-admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.special-admin-card { background: var(--card2); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; }
.special-admin-head { display: flex; align-items: center; gap: .6rem; margin-bottom: .75rem; }
.confirmed-tag { background: rgba(34,197,94,.15); color: #4ade80; border: 1px solid rgba(34,197,94,.3); padding: .15rem .5rem; border-radius: 5px; font-size: .75rem; font-weight: 600; margin-left: auto; }
.special-admin-form { display: flex; gap: .5rem; align-items: center; }

/* Rule highlight gold */
.rule-card.highlight-gold { border-color: rgba(245,197,24,.35); background: linear-gradient(135deg, var(--card), #1a1a10); }

/* ── Pendientes de aprobación ── */
.pending-section { border: 1px solid rgba(245,197,24,.25); border-radius: var(--radius); padding: 1.25rem; background: linear-gradient(135deg, var(--card), #1a1a10); }
.pending-badge { background: var(--red); color: #fff; font-size: .75rem; font-weight: 700; padding: .15rem .5rem; border-radius: 10px; margin-left: .5rem; vertical-align: middle; }
.pending-list { display: flex; flex-direction: column; gap: .75rem; margin-top: 1rem; }
.pending-card { background: var(--card2); border: 1px solid var(--border); border-radius: 10px; padding: .9rem 1rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.pending-info { display: flex; flex-direction: column; gap: .2rem; }
.pending-name { font-weight: 700; font-size: .95rem; }
.pending-email { color: var(--muted); font-size: .82rem; }
.pending-date { color: var(--muted); font-size: .75rem; }
.pending-actions { display: flex; gap: .5rem; flex-shrink: 0; }
.btn-approve { background: #064e3b; color: #4ade80; border: 1px solid #065f46; }
.btn-approve:hover { background: #065f46; color: #4ade80; }
.btn-reject { background: #7f1d1d; color: #fca5a5; border: 1px solid #991b1b; }
.btn-reject:hover { background: #991b1b; color: #fca5a5; }
.email-warning { background: rgba(245,197,24,.1); border: 1px solid rgba(245,197,24,.3); border-radius: 8px; padding: .7rem 1rem; font-size: .85rem; color: var(--gold); margin-bottom: .75rem; }

/* ── Estado pendiente registro ── */
.pending-state { text-align: center; }
.pending-icon { font-size: 3rem; margin-bottom: 1rem; }
.pending-steps { display: flex; flex-direction: column; gap: .6rem; margin: 1.5rem 0; text-align: left; }
.pending-step { padding: .6rem .9rem; border-radius: 8px; background: var(--card2); font-size: .88rem; color: var(--muted); border: 1px solid var(--border); }
.pending-step.done { color: #4ade80; border-color: rgba(34,197,94,.3); background: rgba(34,197,94,.06); }
.pending-step.waiting { color: var(--gold); border-color: rgba(245,197,24,.3); background: rgba(245,197,24,.06); }

/* ── Lista de participantes admin ── */
.participants-list { display: flex; flex-direction: column; gap: .5rem; }
.participant-row { background: var(--card2); border: 1px solid var(--border); border-radius: 10px; padding: .75rem 1rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.participant-info { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; flex: 1; }
.participant-name { font-weight: 600; font-size: .9rem; }
.participant-email { color: var(--muted); font-size: .8rem; }
.participant-status { font-size: .75rem; font-weight: 700; padding: .15rem .5rem; border-radius: 5px; }
.status-ok   { background: rgba(34,197,94,.15);  color: #4ade80; }
.status-wait { background: rgba(245,197,24,.15); color: var(--gold); }
.status-no   { background: rgba(239,68,68,.15);  color: #f87171; }

/* ── Pozo acumulado ── */
.pozo-header { padding: 2rem 0 1rem; }
.pozo-total-card {
  background: linear-gradient(135deg, #003DA5, #001a6e);
  border-radius: 18px; padding: 2.5rem; text-align: center; margin-bottom: 2.5rem;
  border: 1px solid rgba(245,197,24,.3);
}
.pozo-total-label { font-size: .75rem; font-weight: 700; color: rgba(255,255,255,.6); text-transform: uppercase; letter-spacing: .1em; margin-bottom: .5rem; }
.pozo-total-amount { font-family: 'Space Grotesk', sans-serif; font-size: clamp(2.5rem, 8vw, 4rem); font-weight: 900; color: var(--gold); line-height: 1; margin-bottom: .5rem; }
.pozo-total-sub { font-size: .9rem; color: rgba(255,255,255,.6); }

/* ── PODIO ── */
.podio-wrapper {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0;
  margin-bottom: 2rem;
  padding: 0 1rem;
}

.podio-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  max-width: 200px;
}

/* Info flotante sobre cada bloque */
.podio-info {
  display: flex; flex-direction: column; align-items: center;
  padding-bottom: .75rem; text-align: center;
}
.podio-info-top { padding-bottom: .75rem; }
.podio-crown { font-size: 1.6rem; margin-bottom: .15rem; }
.podio-emoji { font-size: 2.2rem; margin-bottom: .35rem; }
.podio-prize {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem; font-weight: 800; color: var(--text);
  margin-bottom: .2rem;
}
.podio-prize-gold { font-size: 1.35rem; color: var(--gold); }
.podio-pct {
  font-size: .78rem; font-weight: 700; color: var(--muted);
  background: var(--card2); padding: .15rem .5rem; border-radius: 20px;
}

/* Bloques del podio */
.podio-block {
  width: 100%;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px 8px 0 0;
  font-family: 'Space Grotesk', sans-serif;
}
.podio-label { font-size: 1.1rem; font-weight: 900; color: rgba(255,255,255,.5); }

.podio-block-1 {
  height: 130px;
  background: linear-gradient(180deg, #b8880a, #7a5a00);
  border: 1px solid rgba(245,197,24,.5);
  border-bottom: none;
}
.podio-block-2 {
  height: 90px;
  background: linear-gradient(180deg, #4a4a6a, #2a2a4a);
  border: 1px solid rgba(192,192,192,.3);
  border-bottom: none;
}
.podio-block-3 {
  height: 60px;
  background: linear-gradient(180deg, #5a3a1a, #3a2010);
  border: 1px solid rgba(205,127,50,.3);
  border-bottom: none;
}

/* Base del podio */
.podio-wrapper::after {
  content: '';
  display: none;
}
.podio-base {
  height: 12px;
  background: var(--card2);
  border-radius: 0 0 8px 8px;
  width: 100%;
}

.pozo-note { text-align: center; color: var(--muted); font-size: .85rem; line-height: 1.7; margin-bottom: 1rem; }

/* Pozo en admin */
.pozo-admin-row { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 1rem; }
.pozo-admin-stat { background: var(--card2); border: 1px solid var(--border); border-radius: 10px; padding: .75rem 1.25rem; text-align: center; flex: 1; min-width: 120px; }
.pozo-admin-num { display: block; font-family: 'Space Grotesk', sans-serif; font-size: 1.2rem; font-weight: 800; color: var(--text); }
.pozo-admin-num.gold { color: var(--gold); }
.pozo-admin-label { display: block; font-size: .75rem; color: var(--muted); margin-top: .2rem; }
.cuota-form { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin-top: .5rem; }

/* Aviso cuota en registro */
.registro-aviso {
  background: rgba(245,197,24,.08); border: 1px solid rgba(245,197,24,.25);
  border-radius: 10px; padding: .85rem 1rem; margin-bottom: 1.5rem;
  font-size: .87rem; color: var(--text); line-height: 1.6;
}

/* ── Toggles predicciones especiales ── */
.toggle-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .75rem; margin-bottom: 1.25rem; }
.toggle-card {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: .8rem 1rem; border-radius: 10px;
  border: 1px solid var(--border); background: var(--card2);
  transition: border-color .2s;
}
.toggle-on  { border-color: rgba(34,197,94,.3); background: rgba(34,197,94,.05); }
.toggle-off { border-color: rgba(239,68,68,.2); background: rgba(239,68,68,.04); opacity: .75; }
.toggle-info { display: flex; align-items: center; gap: .65rem; }
.toggle-label { font-size: .88rem; font-weight: 600; }
.toggle-btn { padding: .35rem .85rem; border-radius: 6px; font-size: .8rem; font-weight: 700; cursor: pointer; border: none; transition: all .15s; }
.toggle-btn-on  { background: rgba(34,197,94,.2); color: #4ade80; }
.toggle-btn-on:hover  { background: rgba(34,197,94,.35); }
.toggle-btn-off { background: rgba(239,68,68,.15); color: #f87171; }
.toggle-btn-off:hover { background: rgba(239,68,68,.3); }
.admin-divider { border: none; border-top: 1px solid var(--border); margin: 1rem 0 1.25rem; }

/* ── Empty state ── */
.empty-state { text-align: center; padding: 4rem 1rem; }
.empty-icon { font-size: 3rem; margin-bottom: 1rem; }
.empty-state h3 { font-size: 1.2rem; margin-bottom: .5rem; }
.empty-state p { color: var(--muted); margin-bottom: 1.5rem; }

/* ── Footer ── */
.footer {
  background: var(--card); border-top: 1px solid var(--border);
  text-align: center; padding: 1.25rem;
}
.footer p { font-size: .85rem; color: var(--muted); }
.footer-sub { font-size: .75rem; margin-top: .2rem; }

/* ── Utilities ── */
.hide-mobile { }

/* ══════════════════════════════════════════════════════
   PWA / MOBILE NAVIGATION
   ══════════════════════════════════════════════════════ */

/* Top navbar desktop links */
.nav-links-desktop {
  display: flex; align-items: center; gap: .25rem; list-style: none;
}

/* Cuenta regresiva global en navbar */
.global-countdown-nav {
  display: flex; align-items: center; gap: .4rem;
  font-size: .85rem; color: var(--muted);
}
.gcn-label { font-size: 1rem; }
.gcn-time {
  font-family: 'Space Grotesk', monospace;
  font-weight: 700; color: var(--gold); font-size: .95rem;
}

/* Cuenta regresiva flotante móvil */
.global-countdown-mobile {
  display: none;
  position: fixed; top: 56px; right: .75rem; z-index: 80;
  background: var(--card); border: 1px solid rgba(245,197,24,.3);
  border-radius: 8px; padding: .3rem .65rem;
  font-size: .82rem; font-weight: 700; color: var(--gold);
  box-shadow: var(--shadow);
  font-family: 'Space Grotesk', monospace;
}

/* Bottom Navigation Bar — oculta en desktop */
.bottom-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  background: rgba(18, 18, 42, 0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  /* Safe area para iPhone con notch/home indicator */
  padding-bottom: env(safe-area-inset-bottom, 0px);
  display: none;
  grid-template-columns: repeat(6, 1fr);
}

.bnav-item {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 2px;
  padding: .55rem .25rem; min-height: 56px;
  text-decoration: none; color: var(--muted);
  font-size: .68rem; font-weight: 500;
  transition: color .15s;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}
.bnav-item:hover, .bnav-item:active { text-decoration: none; color: var(--text); }
.bnav-active { color: var(--gold) !important; }
.bnav-active .bnav-icon { transform: scale(1.15); }

.bnav-icon { font-size: 1.35rem; line-height: 1; transition: transform .15s; }
.bnav-label { font-size: .62rem; text-align: center; line-height: 1.2; max-width: 52px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Responsive Mobile-first ─────────────────────────── */
@media (max-width: 700px) {
  /* Ocultar elementos desktop */
  .hide-mobile { display: none !important; }
  .nav-links-desktop { display: none !important; }
  .footer { display: none; }
  .chile-clock-nav { display: none; }

  /* Mostrar elementos móvil */
  .bottom-nav { display: grid !important; }
  .global-countdown-mobile { display: flex; }

  /* Body: padding para bottom nav + top bar */
  body {
    padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px));
  }

  /* Navbar más compacta */
  .navbar { height: 52px; }
  .nav-container { height: 52px; }
  .logo-text { font-size: 1.05rem; }

  /* Contenido principal */
  .main-content { padding-top: .25rem; }

  /* Container */
  .container { padding: 0 .75rem; }

  /* ── Hero ── */
  .hero { padding: 2.5rem .75rem 2rem; }
  .hero-title { font-size: clamp(2rem, 11vw, 3.5rem); }
  .hero-stats { gap: 1rem; }
  .stat-num { font-size: 1.5rem; }
  .hero-badge { font-size: .72rem; }

  /* ── Steps ── */
  .steps-grid { grid-template-columns: 1fr; gap: 1rem; }

  /* ── Match cards ── */
  .match-card { padding: .85rem .75rem; border-radius: 10px; }
  .match-meta { font-size: .72rem; gap: .4rem; }
  .match-venue { display: none; } /* ocultar sede en móvil para ahorrar espacio */

  .match-body { grid-template-columns: 1fr auto 1fr; gap: .3rem; }
  .team-flag { font-size: 1.3rem; }
  .team-name { font-size: .75rem; font-weight: 600; }
  .team-home { flex-direction: row-reverse; }

  .match-center { min-width: 110px; }

  /* Goals inputs más grandes y táctiles */
  .goals-btn {
    width: 36px; height: 36px; font-size: 1.1rem; border-radius: 8px;
    min-height: 44px; min-width: 36px; /* tap target */
  }
  .goals-input { width: 36px; height: 36px; font-size: 1.05rem; border-radius: 6px; }

  .quick-result { gap: .3rem; }
  .quick-btn { padding: .3rem .55rem; font-size: .72rem; min-height: 36px; }

  .btn-save-bet { font-size: .82rem; padding: .45rem .9rem; min-height: 40px; }

  /* ── Stage / group tabs ── */
  .stage-tabs, .group-tabs { gap: .3rem; padding-bottom: .5rem; overflow-x: auto; flex-wrap: nowrap; }
  .stage-tab, .group-tab { font-size: .78rem; padding: .35rem .7rem; white-space: nowrap; flex-shrink: 0; min-height: 36px; }

  /* ── Ranking ── */
  .ranking-table td, .ranking-table th { padding: .6rem .5rem; font-size: .85rem; }
  .rank-pos { width: 36px; font-size: 1.1rem; }

  /* ── Auth ── */
  .auth-section { padding: 1.25rem .75rem; align-items: flex-start; padding-top: 2rem; }
  .auth-card { padding: 2rem 1.25rem; border-radius: 16px; }

  /* Inputs grandes para móvil (evita zoom en iOS) */
  .form-group input,
  .pred-select,
  .pred-input,
  .admin-score-input,
  .admin-team-input {
    font-size: 16px !important; /* mínimo para evitar zoom en iOS */
  }

  /* ── Predicciones ── */
  .pred-grid { grid-template-columns: 1fr; gap: 1rem; }
  .pred-card { padding: 1rem; }
  .pred-header { padding: 1.25rem 0 .5rem; }
  .page-title { font-size: 1.6rem; }
  .pred-submit { padding: 1rem 0 2rem; }

  /* ── Admin ── */
  .admin-header { flex-direction: column; align-items: flex-start; gap: .75rem; }
  .admin-match-teams { flex-direction: column; align-items: flex-start; gap: .3rem; }
  .admin-actions { flex-direction: column; }
  .special-admin-grid { grid-template-columns: 1fr; }
  .sync-status-card { flex-direction: column; }

  /* ── Rules ── */
  .rules-grid { grid-template-columns: 1fr; }

  /* Botones: tap targets mínimos de 44px */
  .btn { min-height: 44px; }
  .btn-sm { min-height: 36px; }
}

/* Pantallas muy pequeñas */
@media (max-width: 380px) {
  .team-name { font-size: .68rem; }
  .team-flag { font-size: 1.1rem; }
  .match-center { min-width: 96px; }
  .goals-input { width: 30px; }
  .goals-btn { width: 30px; }
  .bnav-label { display: none; }
  .bnav-icon { font-size: 1.5rem; }
  .bnav-item { padding: .65rem .25rem; }
}

/* ── Safe area para iPhone ── */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .bottom-nav {
    padding-bottom: env(safe-area-inset-bottom);
  }
  @media (max-width: 700px) {
    body {
      padding-bottom: calc(56px + env(safe-area-inset-bottom));
    }
  }
}

/* ── Link admin footer ── */
.admin-footer-link {
  display: inline-block; margin-top: .5rem;
  font-size: .75rem; color: rgba(255,255,255,.2);
  text-decoration: none; transition: color .2s;
}
.admin-footer-link:hover { color: var(--muted); text-decoration: none; }

/* ── Botón flotante admin (solo móvil) ── */
.admin-fab {
  position: fixed; bottom: 80px; left: .75rem; z-index: 80;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 8px; padding: .3rem .6rem;
  font-size: .9rem; color: rgba(255,255,255,.2);
  text-decoration: none; transition: all .2s;
  box-shadow: var(--shadow);
  display: none;
}
.admin-fab:hover { color: var(--muted); text-decoration: none; background: var(--card2); }
@media (max-width: 700px) { .admin-fab { display: block; } }

/* ── Admin link en home ── */
.admin-index-link {
  text-align: center;
  padding: 1.5rem 0 3rem;
}
.admin-index-link a {
  font-size: .85rem;
  color: rgba(255,255,255,.25);
  text-decoration: none;
  padding: .6rem 1.2rem;
  border-radius: 8px;
  transition: all .2s;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
}
.admin-index-link a:hover { color: var(--muted); background: var(--card); text-decoration: none; }

/* ── Configuración del pozo (admin) ── */
.pozo-config-form { margin-top: .5rem; }
.pozo-cfg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.pozo-cfg-block { display: flex; flex-direction: column; gap: .4rem; }
.pozo-cfg-label { font-size: .82rem; font-weight: 600; color: var(--muted); }
.pozo-cfg-row { display: flex; align-items: center; gap: .5rem; }
.pozo-cfg-hint { font-size: .78rem; color: var(--muted); }
.pozo-place-label { display: flex; align-items: center; gap: .35rem; font-size: .85rem; cursor: pointer; padding: .3rem .5rem; border-radius: 6px; border: 1px solid var(--border); background: var(--card2); }
.pozo-place-label input[type="radio"] { accent-color: var(--blue); }
.pozo-pcts-grid { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-end; margin-bottom: .75rem; }
.pozo-pct-block { display: flex; flex-direction: column; gap: .3rem; }
.pozo-pct-total { font-size: .85rem; font-weight: 700; padding: .4rem .7rem; border-radius: 6px; background: var(--card2); }

/* ── Validación porcentaje pozo ── */
.pct-warning {
  background: rgba(239,68,68,.1); border: 1px solid rgba(239,68,68,.3);
  border-radius: 8px; padding: .6rem .9rem;
  font-size: .85rem; color: #f87171;
  margin-bottom: .5rem;
}
