/* ── RESET ───────────────────────────────────── */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{font-size:16px;-webkit-text-size-adjust:100%}
body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',system-ui,sans-serif;min-height:100vh;line-height:1.5;-webkit-tap-highlight-color:transparent}
button{cursor:pointer;font-family:inherit}
input,select{font-family:inherit}

/* ── DARK THEME (default) ────────────────────── */
[data-theme="dark"] {
  --bg:        #0a0e1a;
  --bg2:       #111827;
  --bg3:       #1a2438;
  --bg4:       #222f45;
  --bg5:       #2a3a55;
  --border:    rgba(255,255,255,.08);
  --border2:   rgba(255,255,255,.14);
  --text:      #e8edf5;
  --text2:     #9aa5ba;
  --text3:     #5f6e87;
  --green:     #00d068;
  --green-dk:  #00a050;
  --green-bg:  rgba(0,208,104,.10);
  --green-bd:  rgba(0,208,104,.25);
  --gold:      #ffb700;
  --gold-bg:   rgba(255,183,0,.12);
  --gold-bd:   rgba(255,183,0,.30);
  --red:       #ff4d4d;
  --red-bg:    rgba(255,77,77,.10);
  --red-bd:    rgba(255,77,77,.25);
  --blue:      #4da6ff;
  --shadow:    0 8px 32px rgba(0,0,0,.5);
  --shadow-sm: 0 2px 12px rgba(0,0,0,.35);
  /* Splash gradients */
  --splash-bg1: #060a14;
  --splash-bg2: #0a1628;
  --orb1: rgba(0,208,104,.18);
  --orb2: rgba(255,183,0,.12);
  --orb3: rgba(0,120,255,.10);
  --card-bg: rgba(17,24,39,.85);
  --card-bd: rgba(255,255,255,.10);
}

/* ── LIGHT THEME ─────────────────────────────── */
[data-theme="light"] {
  --bg:        #f0f4f8;
  --bg2:       #ffffff;
  --bg3:       #e8eef5;
  --bg4:       #d8e2ed;
  --bg5:       #c8d4e3;
  --border:    rgba(0,0,0,.08);
  --border2:   rgba(0,0,0,.14);
  --text:      #0d1826;
  --text2:     #4a5e75;
  --text3:     #8a9db5;
  --green:     #007a3d;
  --green-dk:  #005c2c;
  --green-bg:  rgba(0,122,61,.10);
  --green-bd:  rgba(0,122,61,.30);
  --gold:      #b07800;
  --gold-bg:   rgba(176,120,0,.10);
  --gold-bd:   rgba(176,120,0,.30);
  --red:       #c0392b;
  --red-bg:    rgba(192,57,43,.08);
  --red-bd:    rgba(192,57,43,.25);
  --blue:      #1a5fa8;
  --shadow:    0 8px 32px rgba(0,0,0,.12);
  --shadow-sm: 0 2px 12px rgba(0,0,0,.08);
  --splash-bg1: #003d1a;
  --splash-bg2: #005c28;
  --orb1: rgba(0,200,90,.25);
  --orb2: rgba(255,210,0,.20);
  --orb3: rgba(255,255,255,.30);
  --card-bg: rgba(255,255,255,.92);
  --card-bd: rgba(0,0,0,.10);
}

body { background: var(--bg); color: var(--text); }

/* ── SPLASH ──────────────────────────────────── */
.splash {
  min-height: 100vh;
  background:
    linear-gradient(to bottom, rgba(0,0,0,0.55) 0%, rgba(0,10,3,0.80) 60%, rgba(0,15,5,0.92) 100%),
    url('arda.jpg') center center / cover no-repeat;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  position: relative; overflow: hidden;
}
.splash-bg { position:absolute; inset:0; pointer-events:none; }
.splash-orb {
  position: absolute; border-radius: 50%;
  filter: blur(60px); opacity: .8;
}
.splash-orb-1 { width:300px;height:300px; background:var(--orb1); top:-80px;  left:-60px; }
.splash-orb-2 { width:250px;height:250px; background:var(--orb2); bottom:-40px; right:-40px; }
.splash-orb-3 { width:180px;height:180px; background:var(--orb3); top:40%;   left:60%; }

.splash-content {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center;
  width: 100%; max-width: 420px;
  text-align: center;
}

.splash-trophy { font-size: 64px; margin-bottom: 8px; animation: float 3s ease-in-out infinite; }
@keyframes float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-10px)} }

.splash-title {
  font-size: 26px; font-weight: 800; color: #fff;
  letter-spacing: -0.5px; line-height: 1.1;
}
.splash-year {
  font-size: 72px; font-weight: 900; color: var(--gold);
  line-height: 1; letter-spacing: -2px;
  text-shadow: 0 0 40px rgba(255,183,0,.4);
  margin: -4px 0 4px;
}
.splash-hosts { font-size: 13px; color: rgba(255,255,255,.7); margin-bottom: 4px; }
.splash-sub   { font-size: 12px; color: rgba(255,255,255,.5); margin-bottom: 24px; }

.splash-card {
  background: var(--card-bg);
  border: 1px solid var(--card-bd);
  border-radius: 16px;
  padding: 20px;
  width: 100%;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
}

.splash-tabs {
  display: flex; background: var(--bg3); border-radius: 10px;
  padding: 3px; margin-bottom: 16px; gap: 3px;
}
.stab {
  flex: 1; padding: 9px 8px;
  background: transparent; border: none; border-radius: 8px;
  color: var(--text2); font-size: 14px; font-weight: 700;
  transition: all .2s;
}
.stab.active { background: var(--green); color: #fff; }

/* form fields */
.sfield { margin-bottom: 14px; text-align: left; }
.sfield label {
  display: block; font-size: 11px; font-weight: 700;
  color: var(--text2); text-transform: uppercase; letter-spacing: .6px; margin-bottom: 5px;
}
.sfield small { font-size: 10px; color: var(--text3); text-transform: none; letter-spacing: 0; }
.sinp {
  width: 100%; padding: 11px 14px;
  background: var(--bg2); border: 1.5px solid var(--border2);
  border-radius: 10px; color: var(--text); font-size: 14px;
  transition: border-color .15s;
}
.sinp:focus { outline: none; border-color: var(--green); }
.pw-row { position: relative; }
.pw-row .sinp { padding-right: 42px; }
.pw-eye {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; font-size: 16px; color: var(--text3); padding: 0;
}
.serr { color: var(--red); font-size: 12px; text-align: center; min-height: 18px; margin-bottom: 8px; }
.sbtn {
  width: 100%; padding: 13px;
  background: var(--green); color: #fff;
  border: none; border-radius: 10px;
  font-size: 15px; font-weight: 800;
  transition: background .15s, transform .1s;
  letter-spacing: .3px;
}
.sbtn:hover  { background: var(--green-dk); }
.sbtn:active { transform: scale(.98); }

.splash-note { font-size: 11px; color: rgba(255,255,255,.35); margin-top: 14px; }

/* ── HEADER ──────────────────────────────────── */
.header {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 200;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 54px; padding: 0 14px; gap: 10px;
}
.hdr-brand { display: flex; align-items: center; gap: 10px; }
.hdr-logo  { font-size: 24px; }
.hdr-title { font-size: 15px; font-weight: 800; color: var(--text); line-height: 1.1; }
.hdr-lock  { font-size: 10px; color: var(--gold); }
.hdr-right { display: flex; align-items: center; gap: 8px; }

.theme-toggle {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--bg3); border: 1px solid var(--border2);
  font-size: 16px; display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.theme-toggle:hover { background: var(--bg4); }

.hdr-chip {
  display: flex; align-items: center; gap: 6px;
  background: var(--bg3); border: 1px solid var(--border2);
  border-radius: 20px; padding: 4px 8px 4px 4px;
}
.hdr-av {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--green); color: #fff;
  font-size: 11px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.hdr-uname { font-size: 12px; font-weight: 700; color: var(--text); max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hdr-out {
  padding: 3px 8px; background: var(--red-bg); border: 1px solid var(--red-bd);
  border-radius: 12px; color: var(--red); font-size: 11px; font-weight: 700;
}

/* ── STEP BAR ────────────────────────────────── */
#step-bar {
  background: var(--bg2); border-bottom: 1px solid var(--border);
  padding: 10px 14px 8px;
  position: sticky; top: 54px; z-index: 100;
}
.sb-wrap { display: flex; align-items: center; gap: 10px; }
.sb-back {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--bg3); border: 1px solid var(--border2);
  color: var(--text2); font-size: 20px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.sb-back:hover { background: var(--bg4); }
.sb-back.ghost { visibility: hidden; pointer-events: none; }
.sb-center { flex: 1; min-width: 0; }
.sb-label  { font-size: 14px; font-weight: 800; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-prog   { height: 4px; background: var(--bg4); border-radius: 2px; margin: 4px 0 3px; overflow: hidden; }
.sb-prog-f { height: 100%; background: var(--green); border-radius: 2px; transition: width .4s ease; }
.sb-info   { font-size: 10px; color: var(--text3); }

/* ── MAIN / TABS ─────────────────────────────── */
.main {
  flex: 1;
  padding-bottom: calc(64px + env(safe-area-inset-bottom));
}
#main-content { min-height: 60vh; }

/* ── BOTTOM NAV ──────────────────────────────── */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 200;
  background: var(--bg2); border-top: 1px solid var(--border);
  display: flex;
  padding-bottom: env(safe-area-inset-bottom);
}
.tab-btn {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 10px 4px 8px;
  background: transparent; border: none; border-top: 2px solid transparent;
  color: var(--text3); font-size: 10px; font-weight: 700;
  transition: color .15s, border-color .15s;
}
.tab-btn .ti { font-size: 20px; display: block; }
.tab-btn.active { color: var(--green); border-top-color: var(--green); }

/* ── SAVE FAB ────────────────────────────────── */
.save-fab {
  position: fixed;
  right: 16px;
  bottom: calc(70px + env(safe-area-inset-bottom) + 10px);
  width: 50px; height: 50px;
  background: var(--green); color: #fff;
  border: none; border-radius: 50%; font-size: 20px;
  box-shadow: 0 4px 16px var(--green-bd);
  z-index: 150; display: flex; align-items: center; justify-content: center;
  transition: transform .15s, background .15s;
}
.save-fab:hover  { background: var(--green-dk); transform: scale(1.07); }
.save-fab:active { transform: scale(.94); }

/* ── TOAST ───────────────────────────────────── */
#toast-wrap {
  position: fixed; bottom: calc(80px + env(safe-area-inset-bottom));
  left: 50%; transform: translateX(-50%);
  z-index: 9999; display: flex; flex-direction: column; gap: 6px;
  align-items: center; width: 92%; max-width: 360px; pointer-events: none;
}
.toast {
  padding: 10px 20px; border-radius: 20px; font-size: 13px; font-weight: 700;
  text-align: center; animation: tin .25s ease; white-space: nowrap;
}
.toast-ok  { background: var(--green); color: #fff; }
.toast-err { background: var(--red);   color: #fff; }
@keyframes tin { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:none} }

/* ── MODAL ───────────────────────────────────── */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.65); z-index: 500;
  align-items: flex-end; justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: var(--bg2); width: 100%; max-width: 520px;
  max-height: 85vh; border-radius: 16px 16px 0 0;
  overflow: hidden; display: flex; flex-direction: column;
  animation: slideUp .25s ease;
}
@keyframes slideUp { from{transform:translateY(100%)} to{transform:none} }
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid var(--border);
  font-size: 15px; font-weight: 800; color: var(--text); flex-shrink: 0;
}
.modal-close {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--bg3); border: 1px solid var(--border2);
  color: var(--text2); font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
.modal-body { overflow-y: auto; padding: 14px; }

/* Fixture */
.fx-match {
  background: var(--bg3); border: 1px solid var(--border); border-radius: 12px;
  padding: 12px; margin-bottom: 8px;
}
.fx-match:last-child { margin-bottom: 0; }
.fx-row { display: grid; grid-template-columns: 1fr 36px 1fr; align-items: center; gap: 6px; margin-bottom: 6px; }
.fx-t   { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; }
.fx-t.r { flex-direction: row-reverse; }
.fx-flag{ font-size: 20px; }
.fx-vs  { text-align: center; font-size: 11px; font-weight: 800; color: var(--text3); }
.fx-info{ font-size: 11px; color: var(--text3); text-align: center; }

/* ── BUTTONS ─────────────────────────────────── */
.btn-primary {
  padding: 13px 20px; background: var(--green); color: #fff;
  border: none; border-radius: 10px; font-size: 15px; font-weight: 800;
  transition: background .15s, transform .1s;
}
.btn-primary:hover  { background: var(--green-dk); }
.btn-primary:active { transform: scale(.98); }
.btn-full { width: 100%; }

.page-actions { padding: 14px 14px 0; }
.btn-next { width: 100%; font-size: 16px; padding: 14px; }
.pick-warn { text-align: center; color: var(--gold); font-size: 13px; padding: 14px 14px 0; }

/* ── PAGE WRAPPER ────────────────────────────── */
.page { padding: 14px; max-width: 640px; margin: 0 auto; }

/* ── GROUP PAGE ──────────────────────────────── */
.grp-topbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.grp-badge {
  font-size: 20px; font-weight: 900; color: var(--green);
  background: var(--green-bg); border: 1px solid var(--green-bd);
  padding: 5px 14px; border-radius: 20px;
}
.btn-fix {
  display: flex; align-items: center; gap: 5px;
  padding: 6px 12px; background: var(--bg3); border: 1px solid var(--border2);
  border-radius: 20px; color: var(--text2); font-size: 12px; font-weight: 700;
  transition: all .15s;
}
.btn-fix:hover { background: var(--bg4); color: var(--text); }
.grp-hint { font-size: 12px; color: var(--text3); margin-bottom: 12px; }

/* Rank table */
.rank-table { background: var(--bg2); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; margin-bottom: 12px; }
.rank-hdr {
  display: grid; grid-template-columns: 30px 1fr auto 30px;
  padding: 8px 12px; background: var(--bg3);
  border-bottom: 1px solid var(--border);
  font-size: 10px; font-weight: 700; color: var(--text3);
  text-transform: uppercase; letter-spacing: .5px;
}
.rank-row {
  display: grid; grid-template-columns: 30px 1fr auto 30px;
  align-items: center; padding: 12px 12px;
  border-bottom: 1px solid var(--border);
  cursor: grab; user-select: none; -webkit-user-select: none;
  transition: background .1s;
  touch-action: none;
}
.rank-row:last-child { border-bottom: none; }
.rank-row.dragging   { opacity: .45; background: var(--bg4); cursor: grabbing; }
.rank-row.drag-over  { background: var(--green-bg); outline: 2px solid var(--green-bd); outline-offset: -1px; }

.rr-num { font-size: 15px; font-weight: 900; }
.pos-1 .rr-num { color: #ffd700; }
.pos-2 .rr-num { color: #c0c0c0; }
.pos-3 .rr-num { color: var(--gold); }
.pos-4 .rr-num { color: var(--text3); }

.rr-team { display: flex; align-items: center; gap: 10px; }
.rr-flag { font-size: 24px; line-height: 1; }
.rr-name { font-size: 14px; font-weight: 700; color: var(--text); }
.rr-drag { font-size: 20px; color: var(--text3); text-align: center; cursor: grab; }

.rr-badge { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 10px; white-space: nowrap; }
.b-pass  { background: var(--green-bg); color: var(--green); border: 1px solid var(--green-bd); }
.b-third { background: var(--gold-bg);  color: var(--gold);  border: 1px solid var(--gold-bd); }
.b-out   { background: var(--red-bg);   color: var(--red);   border: 1px solid var(--red-bd); }

/* qualify legend */
.qual-legend {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 0;
}
.ql-item {
  display: flex; align-items: center; gap: 7px;
  padding: 8px 10px; background: var(--bg2); border: 1px solid var(--border); border-radius: 10px;
  font-size: 11px; color: var(--text2);
}
.ql-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.ql-1 .ql-dot, .ql-2 .ql-dot { background: var(--green); }
.ql-3 .ql-dot { background: var(--gold); }
.ql-4 .ql-dot { background: var(--red); }

/* ── SUMMARY PAGE ────────────────────────────── */
.sum-title { font-size: 20px; font-weight: 900; color: var(--text); margin-bottom: 4px; }
.sum-sub   { font-size: 12px; color: var(--text3); margin-bottom: 14px; }
.sum-table { background: var(--bg2); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; margin-bottom: 12px; }
.sum-row   {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 11px 14px; border-bottom: 1px solid var(--border);
}
.sum-row:last-child { border-bottom: none; }
.sum-gid { font-size: 13px; font-weight: 900; color: var(--green); min-width: 52px; padding-top: 1px; }
.sum-teams { display: flex; flex-wrap: wrap; gap: 5px; }
.stag { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 10px; }
.stag.pass  { background: var(--green-bg); color: var(--green); }
.stag.third { background: var(--gold-bg);  color: var(--gold);  }

/* ── ELIM PAGE ───────────────────────────────── */
.elim-title { font-size: 22px; font-weight: 900; color: var(--text); }
.elim-sub   { font-size: 12px; color: var(--text3); margin-top: 2px; margin-bottom: 14px; }
.locked-banner {
  background: var(--gold-bg); border: 1px solid var(--gold-bd);
  border-radius: 10px; padding: 10px 14px;
  font-size: 12px; color: var(--gold); margin-bottom: 12px;
}
.matches-list { display: flex; flex-direction: column; gap: 8px; }

.match-card {
  background: var(--bg2); border: 1px solid var(--border); border-radius: 14px;
  overflow: hidden; transition: border-color .15s;
}
.match-card.won { border-color: var(--green-bd); }
.match-num {
  padding: 6px 14px; background: var(--bg3); border-bottom: 1px solid var(--border);
  font-size: 10px; font-weight: 800; color: var(--text3);
  text-transform: uppercase; letter-spacing: .6px;
}
.match-teams { display: grid; grid-template-columns: 1fr 36px 1fr; }
.match-vs {
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; color: var(--text3);
  border-left: 1px solid var(--border); border-right: 1px solid var(--border);
}
.match-team {
  display: flex; align-items: center; gap: 8px; padding: 14px 12px;
  cursor: pointer; transition: background .12s; position: relative;
}
.match-team:hover:not(.tbd):not(.no-pick) { background: var(--bg3); }
.match-team.winner { background: var(--green-bg); }
.match-team.tbd    { opacity: .45; cursor: default; }
.match-team.no-pick{ cursor: default; }
.mt-flag  { font-size: 24px; flex-shrink: 0; }
.mt-name  { font-size: 13px; font-weight: 700; color: var(--text); flex: 1; line-height: 1.3; }
.mt-check { font-size: 16px; color: var(--green); font-weight: 900; }

/* ── LEADERBOARD ─────────────────────────────── */
.page-title { font-size: 20px; font-weight: 900; color: var(--text); margin-bottom: 10px; }
.pts-key {
  background: var(--bg2); border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 14px; font-size: 11px; color: var(--text2); line-height: 2;
  margin-bottom: 14px;
}
.pts-key b { color: var(--gold); }
.lb-table { background: var(--bg2); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.lb-hdr-row, .lb-row {
  display: grid; grid-template-columns: 38px 1fr 60px 60px;
  align-items: center; padding: 11px 14px;
  border-bottom: 1px solid var(--border); font-size: 13px;
}
.lb-row:last-child { border-bottom: none; }
.lb-hdr-row {
  background: var(--bg3);
  font-size: 10px; font-weight: 800; color: var(--text3);
  text-transform: uppercase; letter-spacing: .5px;
}
.lb-row.me { background: var(--green-bg); }
.lb-rank { font-weight: 900; color: var(--text3); }
.lb-name { font-weight: 700; color: var(--text); }
.me-tag  { font-size: 10px; color: var(--green); margin-left: 4px; }
.lb-pts  { text-align: right; font-weight: 900; color: var(--green); }
.lb-pct  { text-align: right; color: var(--text3); font-size: 12px; }
.lb-empty { padding: 2rem; text-align: center; color: var(--text3); font-size: 13px; }
.lb-loading { padding: 2rem; text-align: center; color: var(--text2); }

/* ── STATS ───────────────────────────────────── */
.stat-cards { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-bottom: 16px; }
.stat-card  { background: var(--bg2); border: 1px solid var(--border); border-radius: 10px; padding: 12px; text-align: center; }
.sc-val { font-size: 26px; font-weight: 900; color: var(--green); }
.sc-lbl { font-size: 11px; color: var(--text3); margin-top: 3px; }
.stats-sub { font-size: 14px; font-weight: 800; color: var(--text); margin-bottom: 10px; }
.bar-list  { display: flex; flex-direction: column; gap: 8px; }
.bar-row   { display: flex; align-items: center; gap: 8px; }
.bar-lbl   { width: 130px; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { flex: 1; height: 6px; background: var(--bg4); border-radius: 3px; overflow: hidden; }
.bar-fill  { height: 100%; background: var(--green); border-radius: 3px; transition: width .5s; }
.bar-cnt   { width: 26px; text-align: right; font-size: 12px; color: var(--text3); }

/* ── DESKTOP ─────────────────────────────────── */
@media (min-width: 600px) {
  .splash-year { font-size: 88px; }
  .splash-trophy { font-size: 80px; }
  .header-inner  { height: 60px; padding: 0 20px; }
  .hdr-title     { font-size: 17px; }
  #step-bar      { padding: 12px 20px 10px; }
  .page          { padding: 20px; }
  .rr-name       { font-size: 15px; }
  .rr-flag       { font-size: 26px; }
  .mt-flag       { font-size: 28px; }
  .mt-name       { font-size: 14px; }
  .match-team    { padding: 16px 14px; }
  .modal-overlay { align-items: center; }
  .modal-box     { border-radius: 16px; max-width: 500px; }
}
@media (min-width: 900px) {
  .matches-list  { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
}

/* ── RANK ROW BÜYÜTME ────────────────────────── */
.rank-row {
  padding: 14px 12px !important;
}
.rr-pos {
  display: flex;
  align-items: center;
  justify-content: center;
}
.rr-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.rr-desc {
  font-size: 11px;
  color: var(--text3);
  font-weight: 400;
}
.rr-team {
  gap: 12px !important;
  align-items: flex-start !important;
}
.rr-flag {
  font-size: 28px !important;
  margin-top: 2px;
}

/* ── BEST 8 SAYFASI ──────────────────────────── */
.best8-header { margin-bottom: 12px; }
.best8-title  { font-size: 20px; font-weight: 900; color: var(--text); margin-bottom: 6px; }
.best8-sub    { font-size: 12px; color: var(--text3); line-height: 1.6; }

.best8-counter {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 14px; margin-bottom: 14px;
}
.b8c-bar  { flex: 1; height: 6px; background: var(--bg4); border-radius: 3px; overflow: hidden; }
.b8c-fill { height: 100%; background: var(--gold); border-radius: 3px; transition: width .3s; }
.b8c-txt  { font-size: 13px; color: var(--text2); white-space: nowrap; }
.b8c-txt b { color: var(--gold); }

.best8-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 4px; }

.b8-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 14px;
  background: var(--bg2); border: 1.5px solid var(--border);
  border-radius: 12px; cursor: pointer;
  transition: all .15s;
}
.b8-row:hover:not(.b8-sel) { background: var(--bg3); border-color: var(--border2); }
.b8-row.b8-sel {
  background: var(--gold-bg);
  border-color: var(--gold-bd);
}
.b8-left  { display: flex; align-items: center; gap: 12px; }
.b8-flag  { font-size: 28px; }
.b8-info  { display: flex; flex-direction: column; gap: 2px; }
.b8-name  { font-size: 14px; font-weight: 700; color: var(--text); }
.b8-group { font-size: 11px; color: var(--text3); }
.b8-check {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--gold); color: #fff;
  font-size: 14px; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .15s;
}
.b8-row.b8-sel .b8-check { opacity: 1; }
