/* =====================================================================
 *  WORLD CUP 2026 — KÈO NỘI BỘ  |  Theme: dark sporty / esports
 *  Fonts: Montserrat (display, có fallback) + Be Vietnam Pro (body, dễ đọc, đủ dấu TV)
 * ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@300;400;500;600;700;800;900&family=Montserrat:wght@500;600;700;800;900&display=swap');

:root {
  /* nền */
  --bg-0: #050813;
  --bg-1: #0a1024;
  --panel: rgba(18, 26, 51, 0.72);
  --panel-solid: #121a33;
  --stroke: rgba(120, 150, 220, 0.16);
  --stroke-strong: rgba(140, 170, 255, 0.34);

  /* chữ */
  --text: #eef3ff;
  --muted: #9aa6c7;
  --faint: #6b769a;

  /* màu thương hiệu WC2026 */
  --magenta: #ff2d78;
  --violet: #7c3aed;
  --cyan: #22d3ee;
  --blue: #3b82f6;

  /* trạng thái */
  --win: #22c55e;
  --win-dim: rgba(34, 197, 94, 0.16);
  --lose: #f43f5e;
  --lose-dim: rgba(244, 63, 94, 0.16);
  --gold: #ffc83d;
  --silver: #cdd6ea;
  --bronze: #e8965a;

  --grad-brand: linear-gradient(100deg, #ff2d78 0%, #7c3aed 48%, #22d3ee 100%);
  --grad-pitch: radial-gradient(1200px 600px at 50% -10%, rgba(124, 58, 237, 0.28), transparent 60%),
                radial-gradient(900px 500px at 90% 10%, rgba(34, 211, 238, 0.18), transparent 55%),
                radial-gradient(800px 500px at 5% 20%, rgba(255, 45, 120, 0.16), transparent 55%);

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 18px 50px -20px rgba(0, 0, 0, 0.8);
  --maxw: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Be Vietnam Pro', system-ui, sans-serif;
  color: var(--text);
  background: var(--bg-0);
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* nền sân vận động + lưới */
.bg-fx {
  position: fixed; inset: 0; z-index: -2;
  background: var(--grad-pitch), var(--bg-0);
}
.bg-fx::after {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(120, 150, 220, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 150, 220, 0.05) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(circle at 50% 0%, #000 30%, transparent 78%);
}

h1, h2, h3, .display { font-family: 'Montserrat', 'Be Vietnam Pro', sans-serif; font-weight: 400; letter-spacing: .5px; }

a { color: var(--cyan); text-decoration: none; }
img { display: block; }

/* ---------- LAYOUT ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 18px; }
.hidden { display: none !important; }

/* ---------- HEADER ---------- */
header.site {
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: blur(14px);
  background: linear-gradient(180deg, rgba(5, 8, 19, 0.92), rgba(5, 8, 19, 0.62));
  border-bottom: 1px solid var(--stroke);
}
.site-inner { display: flex; align-items: center; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 11px; cursor: pointer; }
.brand .logo {
  width: 38px; height: 38px; border-radius: 11px; flex: none;
  background: var(--grad-brand);
  display: grid; place-items: center;
  font-family: 'Montserrat', 'Be Vietnam Pro'; font-size: 17px; color: #fff;
  box-shadow: 0 0 22px -4px var(--magenta);
}
.brand b { font-family: 'Montserrat', 'Be Vietnam Pro'; font-size: 16px; letter-spacing: .5px; }
.brand small { display: block; font-size: 10.5px; color: var(--muted); letter-spacing: 2px; margin-top: -2px; }

.header-spacer { flex: 1; }
.balance-pill {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 14px; border-radius: 999px;
  background: rgba(255, 200, 61, 0.1);
  border: 1px solid rgba(255, 200, 61, 0.4);
  color: var(--gold); font-weight: 700; font-size: 14px;
  box-shadow: 0 0 18px -6px var(--gold);
}
.balance-pill svg { width: 16px; height: 16px; }
.user-chip {
  display: flex; align-items: center; gap: 9px;
  padding: 5px 6px 5px 12px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--stroke);
  cursor: pointer; transition: border-color .2s, background .2s;
}
.user-chip:hover { border-color: var(--stroke-strong); }
.user-chip .avatar {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  background: var(--grad-brand); display: grid; place-items: center;
  font-family: 'Montserrat', 'Be Vietnam Pro'; font-size: 13px; color: #fff;
}
.user-chip .uname { font-size: 13px; font-weight: 600; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip .admin-tag {
  font-size: 9.5px; letter-spacing: 1px; color: var(--gold);
  border: 1px solid rgba(255,200,61,.4); border-radius: 5px; padding: 1px 5px;
}

/* ---------- NAV TABS ---------- */
nav.tabs { display: flex; gap: 6px; overflow-x: auto; padding: 12px 0 0; scrollbar-width: none; }
nav.tabs::-webkit-scrollbar { display: none; }
.tab-btn {
  font-family: 'Be Vietnam Pro'; font-weight: 600; font-size: 14px;
  color: var(--muted); background: transparent; border: 1px solid transparent;
  padding: 9px 16px; border-radius: 11px; cursor: pointer; white-space: nowrap;
  display: flex; align-items: center; gap: 8px; transition: color .2s, background .2s, border-color .2s;
}
.tab-btn svg { width: 16px; height: 16px; }
.tab-btn:hover { color: var(--text); background: rgba(120,150,220,.07); }
.tab-btn.active { color: #fff; background: var(--panel); border-color: var(--stroke-strong); box-shadow: var(--shadow); }
.tab-btn.active svg { color: var(--cyan); }

/* ---------- HERO ---------- */
.hero {
  position: relative; overflow: hidden;
  border-radius: 22px; margin: 18px 0 26px;
  padding: 34px 30px; border: 1px solid var(--stroke);
  background:
    radial-gradient(700px 300px at 85% 0%, rgba(34,211,238,.22), transparent 60%),
    radial-gradient(600px 320px at 10% 110%, rgba(255,45,120,.2), transparent 55%),
    linear-gradient(135deg, rgba(124,58,237,.22), rgba(10,16,36,.4));
}
.hero::before {
  content: ''; position: absolute; inset: 0; opacity: .5; pointer-events: none;
  background-image: repeating-linear-gradient(115deg, transparent 0 28px, rgba(255,255,255,.025) 28px 30px);
}
.hero-kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; letter-spacing: 3px; color: var(--cyan); text-transform: uppercase; }
.hero-kicker .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--win); box-shadow: 0 0 10px var(--win); animation: pulse 1.6s infinite; }
.hero h1 { font-size: clamp(28px, 5vw, 52px); line-height: 1.02; margin: 12px 0 6px; }
.hero h1 .grad { background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--muted); max-width: 560px; margin: 0 0 18px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 8px; }
.hero-stat .v { font-family: 'Montserrat', 'Be Vietnam Pro'; font-size: 24px; }
.hero-stat .l { font-size: 11.5px; color: var(--faint); letter-spacing: 1.5px; text-transform: uppercase; }
.hero-ball {
  position: absolute; right: -30px; top: 50%; transform: translateY(-50%);
  width: 230px; height: 230px; border-radius: 50%; opacity: .9; pointer-events: none;
  background: conic-gradient(from 30deg, #fff, #cbd5e1, #fff, #94a3b8, #fff);
  filter: blur(0.2px); box-shadow: inset -30px -30px 60px rgba(0,0,0,.45), 0 0 80px -10px rgba(124,58,237,.6);
  animation: float 6s ease-in-out infinite;
}
.hero-ball::before, .hero-ball::after {
  content: ''; position: absolute; border-radius: 50%;
}
.hero-ball::before { inset: 18%; border: 2px solid rgba(15,23,42,.25); }

@media (max-width: 720px) { .hero-ball { display: none; } }

/* video quảng cáo nền hero */
.hero-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 0; opacity: .62; pointer-events: none;
}
.hero-overlay {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(105deg, rgba(5,8,19,.9) 0%, rgba(5,8,19,.55) 42%, rgba(10,16,36,.2) 100%),
    radial-gradient(600px 300px at 82% 18%, rgba(124,58,237,.28), transparent 62%);
}
.hero::before { z-index: 1; }
.hero-content { position: relative; z-index: 2; }
@media (prefers-reduced-motion: reduce) { .hero-video { display: none; } }
/* nút bật/tắt tiếng video hero */
.hero-sound {
  position: absolute; right: 14px; bottom: 14px; z-index: 3;
  width: 42px; height: 42px; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; color: #fff;
  background: rgba(5, 8, 19, 0.55); border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(6px); transition: background .2s, transform .12s, box-shadow .2s;
}
.hero-sound:hover { background: rgba(5, 8, 19, 0.78); box-shadow: 0 0 18px -4px var(--cyan); }
.hero-sound:active { transform: scale(.92); }
.hero-sound svg { width: 20px; height: 20px; }
@media (max-width: 600px) { .hero-sound { width: 38px; height: 38px; right: 12px; bottom: 12px; } .hero-sound svg { width: 18px; height: 18px; } }

/* ---------- BUTTONS ---------- */
.btn {
  font-family: 'Be Vietnam Pro'; font-weight: 700; font-size: 14px;
  border-radius: 11px; padding: 11px 18px; cursor: pointer;
  border: 1px solid var(--stroke); background: var(--panel); color: var(--text);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform .12s, box-shadow .2s, background .2s, border-color .2s, opacity .2s;
}
.btn svg { width: 16px; height: 16px; }
.btn:hover { border-color: var(--stroke-strong); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary {
  border: none; color: #04140a; background: var(--win);
  box-shadow: 0 10px 30px -10px var(--win);
}
.btn-primary:hover { box-shadow: 0 14px 36px -8px var(--win); }
.btn-brand { border: none; color: #fff; background: var(--grad-brand); box-shadow: 0 12px 34px -12px var(--magenta); }
.btn-ghost { background: transparent; }
.btn-sm { padding: 7px 12px; font-size: 12.5px; border-radius: 9px; }
.btn-block { width: 100%; }

/* ---------- CARDS / PANELS ---------- */
.panel { background: var(--panel); border: 1px solid var(--stroke); border-radius: var(--radius); box-shadow: var(--shadow); backdrop-filter: blur(8px); }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 26px 0 14px; flex-wrap: wrap; }
.section-head h2 { font-size: 18px; display: flex; align-items: center; gap: 10px; }
.section-head h2 .bar { width: 5px; height: 22px; border-radius: 3px; background: var(--grad-brand); }

/* chip lượt đấu */
.md-divider { display: flex; align-items: center; gap: 12px; margin: 26px 0 14px; }
.md-divider .line { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--stroke-strong), transparent); }
.md-divider .label {
  font-family: 'Montserrat', 'Be Vietnam Pro'; font-size: 12px; letter-spacing: 2px; color: var(--muted);
  padding: 5px 14px; border: 1px solid var(--stroke); border-radius: 999px; background: rgba(10,16,36,.6);
}

/* ---------- MATCH CARD ---------- */
.match-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.match {
  position: relative; overflow: hidden;
  border: 1px solid var(--stroke); border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(20,28,54,.85), rgba(11,16,36,.85));
  padding: 16px; transition: border-color .25s, transform .25s, box-shadow .25s;
}
.match:hover { border-color: var(--stroke-strong); transform: translateY(-3px); box-shadow: 0 22px 50px -26px rgba(124,58,237,.55); }
.match-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; font-size: 11.5px; color: var(--faint); }
.match-grp { display: inline-flex; align-items: center; gap: 6px; }
.match-grp b { color: var(--cyan); font-family: 'Montserrat', 'Be Vietnam Pro'; }
.status-badge { font-size: 10px; letter-spacing: 1px; padding: 3px 8px; border-radius: 6px; text-transform: uppercase; font-weight: 700; }
.sb-open { color: var(--win); background: var(--win-dim); }
.sb-locked { color: var(--gold); background: rgba(255,200,61,.14); }
.sb-settled { color: var(--muted); background: rgba(120,150,220,.12); }
.sb-scheduled { color: var(--faint); background: rgba(120,150,220,.08); }

.teams { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; }
.team { display: flex; flex-direction: column; align-items: center; gap: 7px; text-align: center; }
.team img { width: 46px; height: 32px; object-fit: cover; border-radius: 5px; box-shadow: 0 4px 12px rgba(0,0,0,.5); border: 1px solid var(--stroke); }
.team .tname { font-size: 13px; font-weight: 600; line-height: 1.2; }
.vs { font-family: 'Montserrat', 'Be Vietnam Pro'; font-size: 13px; color: var(--faint); }
.score { font-family: 'Montserrat', 'Be Vietnam Pro'; font-size: 26px; }
.score .sep { color: var(--faint); margin: 0 6px; }

.line-row { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 14px 0 4px; }
.ah-chip {
  font-family: 'Montserrat', 'Be Vietnam Pro'; font-size: 13px; color: var(--text);
  background: rgba(124,58,237,.16); border: 1px solid rgba(124,58,237,.4);
  padding: 5px 12px; border-radius: 8px;
}
.ah-chip .fav { color: var(--magenta); }
.no-line { font-size: 12.5px; color: var(--faint); font-style: italic; }

/* nút chọn phe cược */
.pick-row { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 12px; }
.pick {
  border: 1px solid var(--stroke); border-radius: var(--radius-sm); padding: 9px;
  background: rgba(10,16,36,.5); cursor: pointer; text-align: center;
  transition: border-color .18s, background .18s, transform .12s;
}
.pick:hover { border-color: var(--stroke-strong); background: rgba(34,211,238,.06); }
.pick.sel { border-color: var(--cyan); background: rgba(34,211,238,.12); box-shadow: 0 0 0 1px var(--cyan) inset; }
.pick .pl { font-size: 11px; color: var(--muted); }
.pick .po { font-family: 'Montserrat', 'Be Vietnam Pro'; font-size: 16px; color: var(--text); }
.pick.win-side .po { color: var(--win); }

.bet-area { margin-top: 11px; display: flex; gap: 8px; }
.bet-area input {
  flex: 1; min-width: 0; font-family: 'Be Vietnam Pro'; font-weight: 600; font-size: 14px;
  background: rgba(5,8,19,.7); border: 1px solid var(--stroke); border-radius: var(--radius-sm);
  color: var(--text); padding: 10px 12px;
}
.bet-area input:focus { outline: none; border-color: var(--cyan); }

/* phiếu cược của tôi trên card */
.my-bet { margin-top: 12px; padding: 10px 12px; border-radius: var(--radius-sm); border: 1px dashed var(--stroke-strong); font-size: 12.5px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.my-bet .res { font-weight: 700; }
.res.won, .res.half_won { color: var(--win); }
.res.lost, .res.half_lost { color: var(--lose); }
.res.push { color: var(--muted); }
.res.pending { color: var(--gold); }

/* ---------- AUTH ---------- */
.auth-wrap { min-height: calc(100vh - 64px); display: grid; place-items: center; padding: 30px 16px; }
.auth-card { width: 100%; max-width: 420px; padding: 32px 28px; }
.auth-card h2 { font-size: 22px; margin: 6px 0 4px; }
.auth-card .sub { color: var(--muted); font-size: 13.5px; margin-bottom: 22px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; letter-spacing: .5px; }
.field input {
  width: 100%; font-family: 'Be Vietnam Pro'; font-weight: 500; font-size: 15px;
  background: rgba(5,8,19,.7); border: 1px solid var(--stroke); border-radius: var(--radius-sm);
  color: var(--text); padding: 12px 14px; transition: border-color .2s;
}
.field input:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(34,211,238,.12); }
.field-note { font-size: 11.5px; color: var(--muted); margin-top: 6px; line-height: 1.45; }
.field-note b { color: var(--lose); }
.auth-switch { text-align: center; font-size: 13px; color: var(--muted); margin-top: 16px; }
.auth-switch button { background: none; border: none; color: var(--cyan); font-family: inherit; font-weight: 700; cursor: pointer; }

/* ---------- HẠN ĐĂNG KÝ (đếm ngược) ---------- */
.reg-countdown { margin-top: 0; margin-bottom: 10px; font-size: 13.5px;
  background: rgba(255,200,61,.1); border-color: rgba(255,200,61,.34); color: var(--gold); }
.reg-countdown .num { font-size: 15px; letter-spacing: .5px; }
.reg-note { font-size: 11.5px; color: var(--muted); line-height: 1.5; margin-bottom: 18px; }
.reg-note b { color: var(--gold); }
.reg-closed { display: flex; gap: 11px; align-items: flex-start; margin-bottom: 20px;
  padding: 13px 14px; border-radius: var(--radius-sm);
  background: rgba(255,90,90,.08); border: 1px solid rgba(255,90,90,.3); }
.reg-closed svg { width: 22px; height: 22px; color: var(--lose); flex: none; margin-top: 1px; }
.reg-closed b { display: block; color: var(--lose); font-size: 14px; margin-bottom: 3px; }
.reg-closed span { display: block; font-size: 12px; color: var(--muted); line-height: 1.5; }

/* ---------- LEADERBOARD ---------- */
.podium { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; align-items: end; margin-bottom: 18px; }
.pod { border-radius: var(--radius); border: 1px solid var(--stroke); padding: 18px 12px; text-align: center; position: relative; overflow: hidden; }
.pod .rankN { font-family: 'Montserrat', 'Be Vietnam Pro'; font-size: 13px; opacity: .8; }
.pod .pavatar { width: 54px; height: 54px; border-radius: 50%; margin: 8px auto 8px; display: grid; place-items: center; font-family: 'Montserrat', 'Be Vietnam Pro'; font-size: 20px; color: #04140a; }
.pod .pname { font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pod .pbal { font-family: 'Montserrat', 'Be Vietnam Pro'; font-size: 18px; margin-top: 4px; }
.pod.p1 { background: linear-gradient(180deg, rgba(255,200,61,.18), rgba(11,16,36,.6)); border-color: rgba(255,200,61,.5); transform: translateY(-8px); box-shadow: 0 0 40px -14px var(--gold); }
.pod.p1 .pavatar { background: var(--gold); box-shadow: 0 0 24px -4px var(--gold); }
.pod.p1 .pbal { color: var(--gold); }
.pod.p2 { background: linear-gradient(180deg, rgba(205,214,234,.12), rgba(11,16,36,.6)); border-color: rgba(205,214,234,.4); }
.pod.p2 .pavatar { background: var(--silver); }
.pod.p3 { background: linear-gradient(180deg, rgba(232,150,90,.12), rgba(11,16,36,.6)); border-color: rgba(232,150,90,.4); }
.pod.p3 .pavatar { background: var(--bronze); }
.crown { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); color: var(--gold); width: 24px; height: 24px; }

table.board { width: 100%; border-collapse: collapse; }
table.board th, table.board td { padding: 12px 14px; text-align: left; font-size: 13.5px; }
table.board th { color: var(--faint); font-weight: 600; font-size: 11.5px; letter-spacing: 1px; text-transform: uppercase; border-bottom: 1px solid var(--stroke); }
table.board tbody tr { border-bottom: 1px solid rgba(120,150,220,.07); transition: background .15s; }
table.board tbody tr:hover { background: rgba(120,150,220,.05); }
table.board td.rank { font-family: 'Montserrat', 'Be Vietnam Pro'; color: var(--muted); width: 48px; }
table.board td.num { text-align: right; font-family: 'Montserrat', 'Be Vietnam Pro'; }
table.board .me { background: rgba(34,211,238,.07); }
table.board .me td:first-child { box-shadow: inset 3px 0 var(--cyan); }
.uname-cell { display: flex; align-items: center; gap: 10px; }
.uname-cell .mini-av { width: 28px; height: 28px; border-radius: 50%; background: var(--grad-brand); display: grid; place-items: center; font-size: 12px; font-family: 'Montserrat', 'Be Vietnam Pro'; color: #fff; flex: none; }
.pos { color: var(--win); } .neg { color: var(--lose); }

/* pill thống kê */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: 12px; margin-bottom: 18px; }
.stat-card { padding: 16px; border-radius: var(--radius); border: 1px solid var(--stroke); background: var(--panel); }
.stat-card .sv { font-family: 'Montserrat', 'Be Vietnam Pro'; font-size: 24px; }
.stat-card .sl { font-size: 11.5px; color: var(--faint); letter-spacing: 1px; text-transform: uppercase; margin-top: 2px; }

/* ---------- ADMIN ---------- */
.admin-row { display: grid; grid-template-columns: 1fr; gap: 10px; }
.admin-match { border: 1px solid var(--stroke); border-radius: var(--radius); padding: 14px; background: var(--panel); }
.admin-match .am-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.admin-match .am-teams { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; }
.admin-match .am-teams img { width: 28px; height: 20px; border-radius: 3px; object-fit: cover; }
.admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 8px; align-items: end; }
.admin-grid .field { margin: 0; }
.admin-grid label { font-size: 10.5px; }
.admin-grid input, .admin-grid select {
  width: 100%; font-family: 'Be Vietnam Pro'; font-weight: 600; font-size: 13px;
  background: rgba(5,8,19,.7); border: 1px solid var(--stroke); border-radius: 8px; color: var(--text); padding: 8px 10px;
}
.admin-grid input:focus, .admin-grid select:focus { outline: none; border-color: var(--cyan); }
.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 6px; }
.filter-bar select, .filter-bar input {
  font-family: 'Be Vietnam Pro'; font-weight: 600; font-size: 13px;
  background: var(--panel); border: 1px solid var(--stroke); border-radius: 9px; color: var(--text); padding: 8px 12px;
}

/* ---------- QUẢN LÝ NGƯỜI CHƠI (ADMIN) ---------- */
.user-list { display: flex; flex-direction: column; gap: 8px; }
.user-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid var(--stroke); border-radius: 10px; background: rgba(10,16,36,.45); flex-wrap: wrap; }
.ur-main { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.ur-info { min-width: 0; }
.ur-name { font-weight: 600; font-size: 13.5px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ur-sub { font-size: 11.5px; color: var(--faint); margin-top: 1px; }
.ur-acts { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.real-name { color: var(--muted); font-weight: 500; }
.warn-name { color: var(--lose); font-size: 11px; font-weight: 700; }
.btn.danger { color: var(--lose); border-color: rgba(244,63,94,.32); }
.btn.danger:hover { border-color: rgba(244,63,94,.6); background: rgba(244,63,94,.08); }
.btn.btn-sm.danger { padding: 7px 9px; }
.btn.danger svg { width: 15px; height: 15px; }
@media (max-width: 600px) { .user-row { padding: 9px 10px; } .ur-acts { width: 100%; } .ur-acts .btn { flex: 1; } }

/* ---------- MODAL (đổi tên...) ---------- */
.modal-ov { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px;
  background: rgba(5, 8, 19, 0.62); backdrop-filter: blur(4px); animation: fadein .18s ease; }
.modal-card { width: 100%; max-width: 390px; background: var(--panel-solid); border: 1px solid var(--stroke-strong);
  border-radius: 16px; padding: 22px; box-shadow: var(--shadow); animation: rise .25s forwards; }
.modal-card h3 { font-family: 'Montserrat', 'Be Vietnam Pro'; font-size: 18px; margin: 0 0 6px; display: flex; align-items: center; gap: 8px; }
.modal-card h3 svg { width: 18px; height: 18px; color: var(--cyan); }
.modal-sub { color: var(--muted); font-size: 13px; margin: 0 0 16px; line-height: 1.5; }
.modal-card input { width: 100%; font-family: 'Be Vietnam Pro'; font-size: 15px; font-weight: 600;
  background: rgba(5, 8, 19, 0.5); border: 1px solid var(--stroke); border-radius: 10px; color: var(--text); padding: 12px 14px; }
.modal-card input:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(34,211,238,.14); }
.modal-acts { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }

/* cổng Điều khoản */
.terms-card { max-width: 560px; display: flex; flex-direction: column; max-height: 88vh; }
.terms-body { overflow-y: auto; margin: 4px -4px 0; padding: 4px 8px; border-top: 1px solid var(--stroke); border-bottom: 1px solid var(--stroke); }
.tc-intro { color: var(--muted); font-size: 13.5px; margin: 12px 0; }
.tc-list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 9px; }
.tc-list li { font-size: 13px; line-height: 1.55; color: var(--text); }
.terms-check { display: flex; align-items: flex-start; gap: 9px; margin-top: 14px; font-size: 13px; line-height: 1.45; cursor: pointer; color: var(--text); }
.terms-check input { width: 18px; height: 18px; margin-top: 1px; flex: none; accent-color: var(--win); cursor: pointer; }

/* banner pháp lý + link */
.legal-banner { display: flex; align-items: flex-start; gap: 11px; padding: 13px 16px; border-radius: 12px;
  border: 1px solid rgba(34,197,94,.4); background: rgba(34,197,94,.08); font-size: 13px; line-height: 1.5; }
.legal-banner svg { width: 22px; height: 22px; color: var(--win); flex: none; margin-top: 1px; }
.link-btn { background: none; border: none; color: var(--cyan); font-family: inherit; font-weight: 700; font-size: inherit; cursor: pointer; padding: 0; text-decoration: underline; }
footer.site .link-btn { font-size: 12px; margin-top: 4px; }

/* ---------- TOAST ---------- */
#toasts { position: fixed; right: 16px; bottom: 16px; z-index: 90; display: flex; flex-direction: column; gap: 10px; max-width: 360px; }
.toast {
  padding: 13px 16px; border-radius: 12px; font-size: 13.5px; font-weight: 600;
  border: 1px solid var(--stroke); background: var(--panel-solid); box-shadow: var(--shadow);
  display: flex; gap: 10px; align-items: flex-start; animation: slidein .3s ease;
}
.toast svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.toast.ok { border-color: rgba(34,197,94,.5); } .toast.ok svg { color: var(--win); }
.toast.err { border-color: rgba(244,63,94,.5); } .toast.err svg { color: var(--lose); }
.toast.info svg { color: var(--cyan); }

/* ---------- EMPTY / LOADING ---------- */
.empty { text-align: center; padding: 50px 20px; color: var(--muted); }
.empty svg { width: 46px; height: 46px; color: var(--faint); margin-bottom: 12px; }
.skeleton { background: linear-gradient(90deg, rgba(120,150,220,.06), rgba(120,150,220,.14), rgba(120,150,220,.06)); background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: var(--radius); height: 150px; }

/* footer */
footer.site { text-align: center; color: var(--faint); font-size: 12px; padding: 40px 0 28px; }

/* reveal animation */
.reveal { opacity: 0; transform: translateY(14px); animation: rise .5s forwards; }

/* ---------- KEYFRAMES ---------- */
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.35} }
@keyframes float { 0%,100%{transform:translateY(-50%)} 50%{transform:translateY(-58%)} }
@keyframes slidein { from{opacity:0;transform:translateX(20px)} to{opacity:1;transform:none} }
@keyframes shimmer { from{background-position:200% 0} to{background-position:-200% 0} }
@keyframes rise { to{opacity:1;transform:none} }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 560px) {
  .site-inner { gap: 10px; }
  .user-chip .uname { display: none; }
  .brand small { display: none; }
  .hero { padding: 26px 20px; }
  .podium { gap: 7px; }
  .pod { padding: 14px 6px; }
  .pod .pavatar { width: 44px; height: 44px; font-size: 16px; }
  table.board th:nth-child(4), table.board td:nth-child(4) { display: none; }
}

/* ---------- LUẬT QUỸ NHẬU: bổ sung ---------- */
/* sân vận động */
.match-venue { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--faint); margin: -2px 0 12px; }
.match-venue svg { width: 13px; height: 13px; flex: none; color: var(--cyan); opacity: .8; }
.match-when { color: var(--muted); }
.match-when svg { color: var(--gold); opacity: 1; }
.match-when b { color: var(--text); }
/* form đổi đội (admin) */
.rename-row { display: grid; grid-template-columns: 1fr auto 1fr auto; gap: 8px; align-items: center; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--stroke); }
.rename-row input { font-family: 'Be Vietnam Pro'; font-weight: 600; font-size: 13px; background: rgba(5,8,19,.7); border: 1px solid var(--stroke); border-radius: 8px; color: var(--text); padding: 8px 10px; min-width: 0; }
.rename-row input:focus { outline: none; border-color: var(--cyan); }
.rename-row .vs-mini { color: var(--faint); font-size: 12px; }
@media (max-width: 480px) { .rename-row { grid-template-columns: 1fr 1fr; } .rename-row .vs-mini, .rename-row .btn { grid-column: span 2; } }

/* pill quỹ trên header */
.balance-pill.danger { color: var(--lose); background: rgba(244,63,94,.1); border-color: rgba(244,63,94,.42); box-shadow: 0 0 18px -7px var(--lose); }
.balance-pill.zero  { color: var(--win);  background: rgba(34,197,94,.1);  border-color: rgba(34,197,94,.42);  box-shadow: 0 0 18px -7px var(--win); }

/* đếm ngược */
.countdown {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  margin-top: 11px; padding: 8px 10px; border-radius: var(--radius-sm);
  font-size: 12.5px; font-weight: 600; letter-spacing: .3px;
  background: rgba(34,211,238,.07); border: 1px solid rgba(34,211,238,.22); color: var(--cyan);
}
.countdown svg { width: 14px; height: 14px; }
.countdown.soon { background: rgba(255,200,61,.09); border-color: rgba(255,200,61,.3); color: var(--gold); }
.countdown.locked { background: rgba(120,150,220,.08); border-color: var(--stroke); color: var(--muted); }
.countdown .num { font-family: 'Montserrat', 'Be Vietnam Pro'; }

/* pick (chỉ chọn phe, không mức cược) */
.pick.disabled { opacity: .55; cursor: not-allowed; }
.pick.disabled:hover { border-color: var(--stroke); background: rgba(10,16,36,.5); }
.pick .hcap { font-family: 'Montserrat', 'Be Vietnam Pro'; font-size: 17px; margin-top: 3px; }
.pick.sel .hcap { color: var(--cyan); }
.pick.win-side { border-color: rgba(34,197,94,.5); background: var(--win-dim); }
.pick.lose-side { opacity: .5; }
.pick.your-pick { box-shadow: 0 0 0 2px var(--cyan) inset; border-color: var(--cyan); }

/* cảnh báo không đặt cược */
.warn-nobet { margin-top: 11px; padding: 9px 12px; border-radius: var(--radius-sm); font-size: 12.5px;
  background: rgba(244,63,94,.08); border: 1px dashed rgba(244,63,94,.4); color: #ffb4c0; text-align: center; }

/* kết quả trận (settled) */
.result-line { margin-top: 11px; text-align: center; font-size: 12.5px; color: var(--muted); }
.result-line b { color: var(--text); }

/* badge penalty trên record */
.pen { font-family: 'Montserrat', 'Be Vietnam Pro'; }
.pen.zero { color: var(--win); } .pen.some { color: var(--lose); }

/* ---------- ADMIN: form tạo trận knockout ---------- */
.ko-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: 10px; align-items: end; }
.ko-form .field { margin: 0; }
.ko-form select, .ko-form input {
  width: 100%; font-family: 'Be Vietnam Pro'; font-weight: 600; font-size: 13px;
  background: rgba(5,8,19,.7); border: 1px solid var(--stroke); border-radius: 8px; color: var(--text); padding: 9px 11px;
}
.ko-form select:focus, .ko-form input:focus { outline: none; border-color: var(--cyan); }
details.admin-fold { margin-bottom: 16px; }
details.admin-fold > summary {
  cursor: pointer; list-style: none; padding: 14px 16px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--stroke); font-family: 'Montserrat', 'Be Vietnam Pro'; font-size: 14px;
  display: flex; align-items: center; gap: 10px;
}
details.admin-fold > summary::-webkit-details-marker { display: none; }
details.admin-fold > summary svg { width: 18px; height: 18px; flex: none; color: var(--cyan); }
details.admin-fold[open] > summary { border-radius: var(--radius) var(--radius) 0 0; border-bottom: none; }
details.admin-fold .fold-body { border: 1px solid var(--stroke); border-top: none; border-radius: 0 0 var(--radius) var(--radius); padding: 16px; background: var(--panel); }

/* select kèo admin */
.hc-controls { display: grid; grid-template-columns: 1fr 1fr 1.3fr; gap: 8px; align-items: end; }
@media (max-width: 480px) { .hc-controls { grid-template-columns: 1fr 1fr; } }

/* ---------- BẢNG XẾP HẠNG TỪNG BẢNG ---------- */
.gs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.gs-card { border: 1px solid var(--stroke); border-radius: 12px; background: var(--panel); overflow: hidden; }
.gs-h { font-family: 'Montserrat', 'Be Vietnam Pro'; font-size: 13px; padding: 9px 12px; background: rgba(124,58,237,.14); color: var(--text); display: flex; align-items: center; justify-content: space-between; }
.gs-done { font-family: 'Be Vietnam Pro'; font-size: 9.5px; letter-spacing: 1px; text-transform: uppercase; color: var(--win); border: 1px solid rgba(34,197,94,.4); border-radius: 5px; padding: 1px 6px; }
.gs-t { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.gs-t th { color: var(--faint); font-weight: 600; font-size: 10px; text-transform: uppercase; letter-spacing: .5px; padding: 6px 8px; text-align: center; border-bottom: 1px solid var(--stroke); }
.gs-t th:nth-child(2) { text-align: left; }
.gs-t td { padding: 6px 8px; text-align: center; color: var(--muted); border-bottom: 1px solid rgba(120,150,220,.06); }
.gs-t tr:last-child td { border-bottom: none; }
.gs-t td.gr { color: var(--faint); width: 26px; }
.gs-t td.gp { font-family: 'Montserrat', 'Be Vietnam Pro'; color: var(--text); }
.gs-team { display: flex; align-items: center; gap: 8px; text-align: left !important; color: var(--text); }
.gs-team .bkf { width: 20px; height: 14px; }
.gs-team span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gs-t tr.q2 td.gr { box-shadow: inset 3px 0 var(--win); }
.gs-t tr.q2 .gs-team { color: var(--win); font-weight: 600; }
.gs-t tr.q3 td.gr { box-shadow: inset 3px 0 var(--gold); }
.gs-t tr.q3 .gs-team { color: var(--gold); }

/* ---------- SƠ ĐỒ NHÁNH (BRACKET) ---------- */
.bracket-hint { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); margin: 6px 2px 14px; }
.bracket-hint svg { width: 15px; height: 15px; color: var(--cyan); flex: none; }
.bracket-wrap { overflow-x: auto; overflow-y: hidden; padding: 4px 4px 18px; scrollbar-width: thin; }
.bracket-wrap::-webkit-scrollbar { height: 9px; }
.bracket-wrap::-webkit-scrollbar-thumb { background: var(--stroke-strong); border-radius: 99px; }
.bracket { position: relative; display: flex; gap: 56px; min-width: max-content; align-items: stretch; }
.bk-col { display: flex; flex-direction: column; min-width: 188px; }
.bk-round-title {
  font-family: 'Montserrat', 'Be Vietnam Pro'; font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--cyan); text-align: center; padding: 7px 6px; margin-bottom: 8px;
  border: 1px solid var(--stroke); border-radius: 9px; background: rgba(10,16,36,.6);
  position: sticky; left: 0;
}
.bk-round { flex: 1; display: flex; flex-direction: column; justify-content: space-around; gap: 12px; }
.bk-match {
  position: relative; z-index: 2; padding: 8px 11px; border-radius: 11px;
  background: linear-gradient(180deg, rgba(20,28,54,.96), rgba(11,16,36,.96));
  border: 1px solid var(--stroke); transition: border-color .2s, box-shadow .2s, transform .2s;
}
.bk-match:hover { border-color: var(--stroke-strong); transform: translateY(-2px); box-shadow: 0 14px 34px -20px rgba(124,58,237,.7); }
.bk-head { font-size: 10px; letter-spacing: .4px; color: var(--magenta); font-weight: 700; margin-bottom: 7px; text-transform: uppercase; }
.bk-head b { color: var(--gold); }
.bk-team { display: flex; align-items: center; gap: 8px; padding: 3px 0; font-size: 12.5px; color: var(--muted); }
.bk-team + .bk-team { border-top: 1px dashed rgba(120,150,220,.12); padding-top: 6px; margin-top: 2px; }
.bk-team .bkf { width: 22px; height: 15px; object-fit: cover; border-radius: 3px; flex: none; box-shadow: 0 2px 6px rgba(0,0,0,.5); }
.bk-team .bkf.ph { background: repeating-linear-gradient(45deg, rgba(120,150,220,.18), rgba(120,150,220,.18) 4px, transparent 4px, transparent 8px); border: 1px solid var(--stroke); }
.bk-team .bkn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk-team.win { color: var(--win); font-weight: 700; }
.bk-team.win .bkn::after { content: ' ✓'; color: var(--win); }
svg.bk-lines { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none; overflow: visible; }
svg.bk-lines path { fill: none; stroke: rgba(124,58,237,.5); stroke-width: 2; filter: drop-shadow(0 0 3px rgba(124,58,237,.4)); }
.bk-third { margin-top: 22px; max-width: 240px; }
.bk-third .bk-round-title { color: var(--bronze); border-color: rgba(232,150,90,.4); }

/* ---------- TỐI ƯU MOBILE ---------- */
@media (max-width: 600px) {
  .wrap { padding: 0 12px; }

  /* header gọn */
  header.site .site-inner { height: 56px; gap: 8px; }
  .brand .logo { width: 32px; height: 32px; font-size: 14px; border-radius: 9px; }
  .brand b { font-size: 13.5px; }
  .balance-pill { padding: 6px 10px; font-size: 12px; gap: 6px; }
  .balance-pill svg { width: 14px; height: 14px; }
  .user-chip { padding: 4px 5px 4px 8px; gap: 7px; }
  .user-chip .avatar { width: 27px; height: 27px; font-size: 12px; }
  .user-chip .admin-tag { display: none; }

  /* tabs cuộn ngang, chạm dễ */
  nav.tabs { gap: 4px; padding-top: 10px; }
  .tab-btn { padding: 9px 13px; font-size: 13px; }

  /* hero */
  .hero { padding: 22px 16px; border-radius: 18px; }
  .hero h1 { font-size: clamp(23px, 7.4vw, 34px); }
  .hero p { font-size: 13.5px; }
  .hero-kicker { font-size: 10.5px; letter-spacing: 2px; }
  .hero-stats { gap: 16px; }
  .hero-stat .v { font-size: 19px; }
  .hero-stat .l { font-size: 10px; }

  /* tiêu đề mục */
  .section-head h2 { font-size: 15.5px; }
  .section-head h2 .bar { height: 18px; }

  /* lịch & kèo: 1 cột */
  .match-grid { grid-template-columns: 1fr; gap: 11px; }
  .match { padding: 14px; }
  .team img { width: 42px; height: 29px; }
  .score { font-size: 23px; }

  /* thẻ thống kê: 2 cột */
  .stat-row { grid-template-columns: repeat(2, 1fr); gap: 9px; }
  .stat-card { padding: 13px; }
  .stat-card .sv { font-size: 19px; }

  /* podium gọn hơn */
  .pod .pname { font-size: 12.5px; }
  .pod .pbal { font-size: 15px; }

  /* BXH bảng: 1 cột */
  .gs-grid { grid-template-columns: 1fr; gap: 10px; }

  /* sơ đồ nhánh: nhỏ & sát hơn để bớt phải kéo */
  .bracket { gap: 28px; }
  .bk-col { min-width: 152px; }
  .bk-round-title { font-size: 10px; letter-spacing: .8px; padding: 6px 4px; }
  .bk-match { padding: 7px 9px; }
  .bk-head { font-size: 8.5px; }
  .bk-team { font-size: 11.5px; gap: 6px; }
  .bk-team .bkf { width: 18px; height: 12px; }
  .bracket-hint { font-size: 11.5px; }
  svg.bk-lines path { stroke-width: 1.6; }

  /* admin: ô nhập 2 cột */
  .hc-controls { grid-template-columns: 1fr 1fr; }
  .admin-grid { grid-template-columns: 1fr 1fr; }
  .ko-form { grid-template-columns: 1fr 1fr; }
  .rename-row { grid-template-columns: 1fr 1fr; }
  .rename-row .vs-mini { display: none; }
  .rename-row .btn { grid-column: span 2; }

  /* bảng dữ liệu: chữ gọn, cuộn ngang trong panel */
  table.board th, table.board td { padding: 9px 8px; font-size: 12.5px; }
  .gs-t th, .gs-t td { padding: 6px 6px; }

  /* toast full hơn */
  #toasts { left: 12px; right: 12px; max-width: none; }
}

/* màn rất nhỏ */
@media (max-width: 380px) {
  .hero h1 { font-size: 21px; }
  .stat-row { grid-template-columns: 1fr 1fr; }
  .tab-btn { padding: 8px 10px; font-size: 12.5px; }
  .tab-btn svg { width: 14px; height: 14px; }
}

/* ---------- AI ĐANG VÔ KÈO (trên thẻ trận) ---------- */
.picks-wrap { margin-top: 11px; }
.picks-count { display: flex; gap: 8px; }
.pcnt { flex: 1; min-width: 0; display: flex; align-items: center; gap: 7px; padding: 8px 11px;
  border: 1px solid var(--stroke); border-radius: 9px; background: rgba(10,16,36,.4); font-size: 12px; }
:root[data-theme="light"] .pcnt { background: #f3f6fc; }
.pcnt .bkf { width: 18px; height: 12px; flex: none; }
.pcnt span { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.pcnt .pcn { font-family: 'Montserrat', 'Be Vietnam Pro'; color: var(--cyan); font-size: 15px; flex: none; }
.picks-lock { display: flex; align-items: center; justify-content: center; gap: 7px; font-size: 11.5px; color: var(--faint); padding: 8px 6px 2px; text-align: center; }
.picks-lock svg { width: 13px; height: 13px; flex: none; }
.picks-toggle { margin-top: 8px; }
.picks-toggle { width: 100%; display: flex; align-items: center; justify-content: center; gap: 7px;
  font-family: 'Be Vietnam Pro'; font-size: 12px; font-weight: 600; color: var(--muted);
  background: transparent; border: 1px solid var(--stroke); border-radius: 10px; padding: 9px; cursor: pointer;
  transition: color .2s, border-color .2s, background .2s; }
.picks-toggle:hover { color: var(--text); border-color: var(--stroke-strong); background: rgba(120,150,220,.05); }
.picks-toggle svg { width: 14px; height: 14px; }
.picks-toggle.open { color: var(--cyan); border-color: var(--stroke-strong); }
.picks-toggle b { color: var(--cyan); }
.picks-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.picks-panel[hidden] { display: none; }
.picks-col { border: 1px solid var(--stroke); border-radius: 10px; padding: 9px; background: rgba(10,16,36,.4); min-width: 0; }
:root[data-theme="light"] .picks-col { background: #f3f6fc; }
.pc-head { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--faint); margin-bottom: 7px; padding-bottom: 6px; border-bottom: 1px solid var(--stroke); }
.pc-head b { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-head .bkf { width: 18px; height: 12px; }
.pc-list { display: flex; flex-wrap: wrap; gap: 5px; }
.pick-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--text);
  background: rgba(120,150,220,.1); border: 1px solid var(--stroke); border-radius: 999px; padding: 2px 9px 2px 2px; max-width: 100%; }
.pick-chip.me { border-color: var(--cyan); color: var(--cyan); background: rgba(34,211,238,.1); font-weight: 700; }
.pc-av { width: 18px; height: 18px; border-radius: 50%; flex: none; background: var(--grad-brand); display: grid; place-items: center;
  font-size: 9px; color: #fff; font-family: 'Montserrat', 'Be Vietnam Pro'; }
.pc-empty { color: var(--faint); font-size: 11px; font-style: italic; }

/* ---------- DASHBOARD TỬU LƯỢNG (BXH) ---------- */
.spot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin-bottom: 14px; }
.spot { display: flex; align-items: center; gap: 13px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--stroke); background: var(--panel); overflow: hidden; }
.spot-emoji { font-size: 30px; line-height: 1; flex: none; filter: drop-shadow(0 2px 6px rgba(0,0,0,.35)); }
.spot-body { min-width: 0; }
.spot-title { font-size: 10.5px; letter-spacing: 1px; text-transform: uppercase; color: var(--faint); font-weight: 700; }
.spot-name { font-family: 'Montserrat', 'Be Vietnam Pro'; font-size: 16px; margin: 2px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spot-sub { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spot.king  { background: linear-gradient(135deg, rgba(255,200,61,.18), var(--panel)); border-color: rgba(255,200,61,.42); }
.spot.king .spot-name  { color: var(--gold); }
.spot.sharp { background: linear-gradient(135deg, rgba(34,211,238,.15), var(--panel)); border-color: rgba(34,211,238,.42); }
.spot.sharp .spot-name { color: var(--cyan); }
.spot.cold  { background: linear-gradient(135deg, rgba(59,130,246,.16), var(--panel)); border-color: rgba(59,130,246,.4); }
.spot.hot   { background: linear-gradient(135deg, rgba(244,63,94,.15), var(--panel)); border-color: rgba(244,63,94,.4); }
.spot.hot .spot-name { color: var(--lose); }

.your-status { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 11px 16px; border-radius: 12px;
  border: 1px dashed var(--stroke-strong); background: var(--panel); margin-bottom: 16px; font-size: 13.5px; color: var(--muted); }

.do-badge { display: inline-block; font-size: 10.5px; font-weight: 700; padding: 2px 8px; border-radius: 6px; white-space: nowrap; margin-top: 3px; }
.do-badge.do0 { color: #38bdf8; background: rgba(56,189,248,.14); }
.do-badge.do1 { color: var(--win); background: var(--win-dim); }
.do-badge.do2 { color: var(--gold); background: rgba(255,200,61,.16); }
.do-badge.do3 { color: #fb923c; background: rgba(251,146,60,.15); }
.do-badge.do4 { color: var(--lose); background: var(--lose-dim); }
.uc-stack { display: flex; flex-direction: column; min-width: 0; }
.uc-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pod .pdo { font-size: 10.5px; color: var(--muted); margin-top: 4px; }

/* ---------- TAB THỂ LỆ (LUẬT & KÈO) ---------- */
.rules-wrap { display: flex; flex-direction: column; gap: 22px; }
.rules-intro { padding: 24px 22px; position: relative; overflow: hidden;
  background:
    radial-gradient(600px 240px at 88% 0%, rgba(34,211,238,.18), transparent 60%),
    linear-gradient(135deg, rgba(124,58,237,.2), var(--panel)); }
.ri-badge { display: inline-block; font-weight: 700; font-size: 12.5px; letter-spacing: 1px;
  color: var(--gold); border: 1px solid rgba(255,200,61,.4); background: rgba(255,200,61,.1);
  padding: 5px 12px; border-radius: 999px; margin-bottom: 12px; }
.rules-intro h2 { font-size: clamp(19px, 3.4vw, 26px); margin: 0 0 8px; line-height: 1.15; }
.rules-intro p { color: var(--muted); margin: 0; max-width: 620px; }

.rule-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 10px; }
.rule-card { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 15px; border: 1px solid var(--stroke); border-radius: 12px; background: var(--panel); }
.rc-title { font-weight: 600; font-size: 14px; }
.rc-sub { font-size: 11.5px; color: var(--faint); margin-top: 2px; }
.pbadge { font-family: 'Montserrat', 'Be Vietnam Pro'; font-size: 13px; padding: 5px 11px; border-radius: 8px; white-space: nowrap; flex: none; }
.pbadge.g { color: var(--win); background: var(--win-dim); border: 1px solid rgba(34,197,94,.35); }
.pbadge.y { color: var(--gold); background: rgba(255,200,61,.13); border: 1px solid rgba(255,200,61,.4); }
.pbadge.r { color: var(--lose); background: var(--lose-dim); border: 1px solid rgba(244,63,94,.35); }

.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.steps li { display: flex; align-items: flex-start; gap: 12px; padding: 13px 15px; border: 1px solid var(--stroke);
  border-radius: 12px; background: var(--panel); font-size: 14px; line-height: 1.5; }
.step-n { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  font-family: 'Montserrat', 'Be Vietnam Pro'; font-size: 13px; color: #fff; background: var(--grad-brand); }

.rules-table td { font-size: 13.5px; }
.rules-table td.num { text-align: right; }

.example-box { border: 1px solid var(--stroke-strong); border-radius: 14px; padding: 16px 18px;
  background: var(--panel); display: flex; flex-direction: column; gap: 9px; }
.ex-line { font-size: 13.5px; line-height: 1.5; }

.rules-foot { display: flex; align-items: center; gap: 12px; padding: 15px 18px; border-radius: 14px;
  border: 1px dashed var(--stroke-strong); background: rgba(255,200,61,.06); font-size: 13.5px; color: var(--text); }
.rules-foot svg { width: 26px; height: 26px; color: var(--gold); flex: none; }

@media (max-width: 600px) {
  .rule-card { padding: 11px 12px; }
  .steps li { padding: 11px 12px; font-size: 13.5px; }
  .rules-intro { padding: 20px 16px; }
}

/* =====================================================================
 *  GIAO DIỆN SÁNG (data-theme="light") — tự động theo giờ
 * ===================================================================== */
:root[data-theme="light"] {
  --bg-0: #e9edf6;
  --bg-1: #ffffff;
  --panel: rgba(255, 255, 255, 0.88);
  --panel-solid: #ffffff;
  --stroke: rgba(15, 23, 42, 0.12);
  --stroke-strong: rgba(124, 58, 237, 0.38);
  --text: #0f172a;
  --muted: #51607a;
  --faint: #8493ac;
  --win: #16a34a;  --win-dim: rgba(22, 163, 74, 0.13);
  --lose: #dc2626; --lose-dim: rgba(220, 38, 38, 0.12);
  --gold: #c08a00;
  --grad-pitch:
    radial-gradient(1200px 600px at 50% -10%, rgba(124, 58, 237, 0.14), transparent 60%),
    radial-gradient(900px 500px at 90% 10%, rgba(34, 211, 238, 0.12), transparent 55%),
    radial-gradient(800px 500px at 5% 20%, rgba(255, 45, 120, 0.10), transparent 55%);
  --shadow: 0 18px 44px -24px rgba(30, 41, 90, 0.32);
}
:root[data-theme="light"] .bg-fx::after {
  background-image:
    linear-gradient(rgba(99, 102, 241, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 102, 241, 0.07) 1px, transparent 1px);
}
:root[data-theme="light"] header.site { background: linear-gradient(180deg, rgba(255,255,255,.93), rgba(255,255,255,.72)); }
:root[data-theme="light"] .match { background: linear-gradient(180deg, #ffffff, #f3f6fc); }
:root[data-theme="light"] .pick { background: #eef2fb; }
:root[data-theme="light"] .pick:hover { background: rgba(34, 211, 238, 0.10); }
:root[data-theme="light"] input,
:root[data-theme="light"] select,
:root[data-theme="light"] textarea { background: #ffffff !important; color: var(--text); }
:root[data-theme="light"] .md-divider .label { background: #ffffff; }
:root[data-theme="light"] .bk-match { background: linear-gradient(180deg, #ffffff, #f3f6fc); }
:root[data-theme="light"] .bk-round-title { background: #ffffff; }
:root[data-theme="light"] .gs-h { background: rgba(124, 58, 237, 0.10); }
:root[data-theme="light"] .user-row { background: #ffffff; }
:root[data-theme="light"] .ah-chip { background: rgba(124, 58, 237, 0.10); }
:root[data-theme="light"] table.board tbody tr:hover { background: rgba(99, 102, 241, 0.06); }
:root[data-theme="light"] .tab-btn:hover { background: rgba(99, 102, 241, 0.08); }
:root[data-theme="light"] .tab-btn.active { color: var(--text); }
:root[data-theme="light"] .user-chip .admin-tag { background: rgba(255,200,61,.16); }
:root[data-theme="light"] .balance-pill.zero { color: #16a34a; }
:root[data-theme="light"] .balance-pill.danger { color: #dc2626; }
:root[data-theme="light"] .warn-nobet { color: #b91c1c; }
:root[data-theme="light"] .pod.p1 { background: linear-gradient(180deg, rgba(255, 200, 61, 0.28), #ffffff); }
:root[data-theme="light"] .pod.p2 { background: linear-gradient(180deg, rgba(148, 163, 184, 0.22), #ffffff); }
:root[data-theme="light"] .pod.p3 { background: linear-gradient(180deg, rgba(232, 150, 90, 0.20), #ffffff); }
:root[data-theme="light"] .pod.p1 .pbal { color: #b8860b; }
:root[data-theme="light"] .skeleton { background: linear-gradient(90deg, rgba(15,23,42,.05), rgba(15,23,42,.1), rgba(15,23,42,.05)); background-size: 200% 100%; }
/* hero luôn nằm trên VIDEO tối -> giữ chữ sáng dù theme sáng */
:root[data-theme="light"] .hero { background:
  radial-gradient(700px 300px at 85% 0%, rgba(34,211,238,.25), transparent 60%),
  linear-gradient(135deg, #c7d0e8, #e9edf6); }
:root[data-theme="light"] .hero h1 { color: #ffffff; }
:root[data-theme="light"] .hero p { color: rgba(255, 255, 255, 0.92); }
:root[data-theme="light"] .hero-stat .v { color: #ffffff; }
:root[data-theme="light"] .hero-stat .l { color: rgba(255, 255, 255, 0.78); }
:root[data-theme="light"] .hero-kicker { color: #e0f7ff; }

/* nút đổi theme */
.theme-btn { padding: 7px; border-radius: 9px; }
.theme-btn svg { width: 17px; height: 17px; color: var(--gold); }

/* ---------- CHÁT ---------- */
.tab-btn { position: relative; }
.tab-badge {
  display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px;
  margin-left: 6px; border-radius: 999px; background: var(--lose); color: #fff;
  font-size: 11px; font-weight: 800; line-height: 1; vertical-align: middle;
}
.chat-wrap { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.chat-top { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 14px 16px; border-bottom: 1px solid var(--stroke); }
.chat-top b { display: inline-flex; align-items: center; gap: 7px; font-size: 15px; }
.chat-top b svg { width: 17px; height: 17px; color: var(--cyan); }
.chat-hint { display: block; font-size: 11.5px; color: var(--muted); margin-top: 3px; font-weight: 500; }
#notifBtn { white-space: nowrap; }
#notifBtn svg { width: 15px; height: 15px; color: var(--gold); }

.chat-scroll { height: 52vh; min-height: 320px; max-height: 560px; overflow-y: auto;
  padding: 16px; display: flex; flex-direction: column; gap: 12px; scroll-behavior: smooth; }
.chat-empty { margin: auto; text-align: center; color: var(--muted); display: grid; gap: 10px; justify-items: center; }
.chat-empty svg { width: 34px; height: 34px; color: var(--stroke); }

.msg { display: flex; gap: 9px; max-width: 86%; }
.msg.mine { flex-direction: row-reverse; align-self: flex-end; }
.msg-av { width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center;
  font-family: 'Montserrat', 'Be Vietnam Pro'; font-size: 12px; color: #04140a;
  background: linear-gradient(135deg, var(--cyan), #6ee7ff); }
.msg.mine .msg-av { background: linear-gradient(135deg, var(--gold), #ffd97a); }
.msg-main { min-width: 0; }
.msg-head { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--muted); margin-bottom: 3px; }
.msg.mine .msg-head { flex-direction: row-reverse; }
.msg-head b { color: var(--text); font-size: 12.5px; }
.msg-bubble { display: inline-block; padding: 9px 12px; border-radius: 14px; border-top-left-radius: 4px;
  background: rgba(120,150,220,.12); border: 1px solid var(--stroke); font-size: 14px; line-height: 1.5;
  word-break: break-word; white-space: pre-wrap; }
.msg.mine .msg-bubble { border-top-left-radius: 14px; border-top-right-radius: 4px;
  background: rgba(34,211,238,.13); border-color: rgba(34,211,238,.3); }
.msg-sticker { font-size: 46px; line-height: 1.1; padding: 2px 4px; }
.msg-del { background: none; border: none; color: var(--muted); cursor: pointer; padding: 2px; opacity: .5; }
.msg-del:hover { color: var(--lose); opacity: 1; }
.msg-del svg { width: 13px; height: 13px; }

.sticker-panel { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 4px;
  padding: 10px 12px; border-top: 1px solid var(--stroke); background: rgba(5,8,19,.5);
  max-height: 168px; overflow-y: auto; }
.sticker { font-size: 26px; background: none; border: 1px solid transparent; border-radius: 10px;
  padding: 5px; cursor: pointer; transition: transform .12s, background .12s; line-height: 1; }
.sticker:hover { background: rgba(34,211,238,.12); border-color: var(--stroke); transform: scale(1.18); }

.chat-bar { display: flex; align-items: center; gap: 8px; padding: 11px 12px; border-top: 1px solid var(--stroke); }
.chat-bar input { flex: 1; min-width: 0; font-family: 'Be Vietnam Pro'; font-weight: 500; font-size: 14.5px;
  background: rgba(5,8,19,.7); border: 1px solid var(--stroke); border-radius: 999px; color: var(--text); padding: 11px 16px; }
.chat-bar input:focus { outline: none; border-color: var(--cyan); }
.chat-emoji { padding: 8px; border-radius: 50%; }
.chat-emoji svg { width: 20px; height: 20px; color: var(--gold); }
.chat-send { padding: 9px 13px; border-radius: 50%; }
.chat-send svg { width: 18px; height: 18px; }
@media (max-width: 560px) {
  .chat-scroll { height: 56vh; }
  .msg { max-width: 92%; }
  .chat-hint { display: none; }
}

/* ---------- ACCESSIBILITY ---------- */
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .hero-ball { animation: none; }
}
