/* Simulador interactivo Mundial 2026 */
:root { --red: #c8102e; --red-dark: #9d0a21; --black: #111; --ink: #1a1a1a; --bg: #fafaf7; --paper: #fff; --border: #e5e2dc; --muted: #6b6b6b; --green: #0a8a4a; }
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'IBM Plex Sans', sans-serif; background: var(--bg); color: var(--ink); line-height: 1.5; }
a { color: inherit; text-decoration: none; }
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.header { background: var(--paper); border-bottom: 3px solid var(--black); padding: 18px 0; }
.header-inner { display: flex; align-items: center; justify-content: space-between; }
.logo img { height: 64px; width: auto; }
.nav { background: var(--black); color: #fff; position: sticky; top: 0; z-index: 50; }
.nav ul { display: flex; list-style: none; }
.nav a { display: block; padding: 13px 18px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 1.2px; color: rgba(255,255,255,0.85); border-bottom: 3px solid transparent; }
.nav a:hover { color: #fff; border-bottom-color: var(--red); }

.sim-hero { background: linear-gradient(135deg, #0c1f3d 0%, #0a3d2e 100%); color: #fff; padding: 34px 0; }
.sim-hero h1 { font-family: 'Fraunces', serif; font-size: clamp(26px, 5vw, 42px); font-weight: 900; letter-spacing: -0.5px; }
.sim-hero p { color: rgba(255,255,255,0.82); margin-top: 8px; font-size: 15px; max-width: 720px; }
.wrap { padding: 28px 0 60px; }

.sim-controls { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 22px; }
.sim-btn { background: var(--black); color: #fff; border: 0; padding: 9px 16px; border-radius: 6px; font-weight: 700; font-size: 13px; cursor: pointer; }
.sim-btn:hover { background: var(--red); }
.sim-hint { color: var(--muted); font-size: 13px; }
.sim-empty { color: var(--muted); padding: 40px 0; text-align: center; }
.sim-sec { font-family: 'Fraunces', serif; font-size: 22px; font-weight: 800; margin: 40px 0 20px; letter-spacing: -0.3px; }
.sim-sec small { font-family: 'IBM Plex Sans', sans-serif; font-weight: 400; font-size: 13px; color: var(--muted); }

/* Chips de equipo */
.t-chip { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; min-width: 0; }
.flag { display: inline-block; width: 20px; height: 14px; border-radius: 2px; object-fit: cover; vertical-align: middle; box-shadow: 0 0 0 1px rgba(0,0,0,0.10); flex: 0 0 auto; }
.flag-big { width: 56px; height: 38px; border-radius: 5px; box-shadow: 0 2px 10px rgba(0,0,0,0.28); margin: 0 auto 10px; }
.t-chip .t-nm { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-chip.win .t-nm { color: var(--green); font-weight: 800; }
.t-chip.tbd { color: var(--muted); font-style: italic; font-weight: 500; }

/* Grupos */
.grupos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 22px; }
.g-card { background: var(--paper); border: 1px solid var(--border); border-radius: 10px; padding: 18px 18px 14px; }
.g-card h3 { font-family: 'Fraunces', serif; font-size: 17px; font-weight: 800; margin-bottom: 14px; padding-bottom: 9px; border-bottom: 2px solid var(--red); }
.g-matches { margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px dashed var(--border); }
.g-m { display: grid; grid-template-columns: 1fr auto auto auto 1fr auto; align-items: center; gap: 7px; padding: 6px 0; }
.g-t { min-width: 0; }
.g-t.r { text-align: right; } .g-t.l { text-align: left; }
.g-t .t-nm { font-size: 12px; }
.stp { display: inline-flex; align-items: center; gap: 2px; }
.stp button { width: 20px; height: 20px; border: 1px solid var(--border); background: #f3efe7; border-radius: 4px; cursor: pointer; font-weight: 800; font-size: 13px; line-height: 1; color: var(--ink); padding: 0; }
.stp button:hover { background: var(--red); color: #fff; border-color: var(--red); }
.sc { display: inline-block; min-width: 18px; text-align: center; font-weight: 800; font-size: 14px; }
.sc.locked { color: var(--muted); }
.g-sep { color: var(--muted); font-weight: 700; }
.g-lock { font-size: 11px; }
.g-tabla { width: 100%; border-collapse: collapse; }
.g-tabla td { padding: 6px 4px; font-size: 12px; text-align: center; }
.g-tabla tr + tr td { border-top: 1px solid var(--border); }
.g-tabla td.tl { text-align: left; } .g-tabla td.b { font-weight: 800; } .g-tabla td.pos { color: var(--muted); font-weight: 700; width: 16px; }
.g-tabla tr.q1 td { background: rgba(10,138,74,0.10); }
.g-tabla tr.q3on td { background: rgba(10,138,74,0.05); }
.g-tabla tr.q3 td { background: rgba(200,16,46,0.05); }

/* Bracket */
.bracket { display: flex; gap: 18px; overflow-x: auto; padding-bottom: 14px; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; }
.bk-col { flex: 0 0 auto; width: 210px; scroll-snap-align: start; }
.bk-h { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); margin-bottom: 8px; text-align: center; }
.bk-m { background: var(--paper); border: 1px solid var(--border); border-radius: 6px; margin-bottom: 8px; overflow: hidden; }
.bk-side { padding: 7px 9px; cursor: pointer; border-left: 3px solid transparent; display: flex; align-items: center; min-height: 34px; }
.bk-side + .bk-side { border-top: 1px solid var(--border); }
.bk-side[data-pick]:hover { background: #faf6ee; }
.bk-side.win { border-left-color: var(--green); background: rgba(10,138,74,0.07); }
.bk-m.locked .bk-side { cursor: default; }
.bk-champ { width: 180px; }
.champ-box { background: linear-gradient(135deg, #b8860b 0%, #c8102e 100%); color: #fff; border-radius: 8px; padding: 22px 12px; text-align: center; }
.champ-fl { font-size: 40px; line-height: 1; }
.champ-nm { font-family: 'Fraunces', serif; font-weight: 900; font-size: 18px; margin-top: 8px; }
.champ-tbd { font-size: 40px; opacity: 0.5; }

.footer { background: var(--black); color: #fff; margin-top: 30px; padding: 30px 0 20px; }
.footer-bottom { text-align: center; font-size: 11px; color: rgba(255,255,255,0.45); }
.back-link { display: inline-block; margin-top: 18px; font-size: 13px; font-weight: 600; color: var(--red); }

@media (max-width: 560px) {
  .container { padding: 0 14px; }
  .grupos-grid { grid-template-columns: 1fr; }
  .g-m { grid-template-columns: 1fr auto auto auto 1fr auto; }
}
