:root {
  --bg: #070b14;
  --bg-2: #0b1120;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-2: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.09);
  --text: #e7ecf5;
  --muted: #8a95ad;
  --gold: #ffc105;
  --purple: #8b5cf6;
  --cyan: #38bdf8;
  --green: #34d399;
  --red: #f87171;
  --radius: 18px;
}

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

html, body { height: 100%; }

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.55;
}

h1, h2, h3 { font-family: 'Space Grotesk', 'Inter', sans-serif; letter-spacing: -0.02em; }

.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(140px);
  z-index: -1;
  opacity: 0.5;
  pointer-events: none;
}
.glow-a { width: 480px; height: 480px; background: #6d28d9; top: -160px; left: -120px; }
.glow-b { width: 420px; height: 420px; background: #0e7490; bottom: -140px; right: -100px; }
.glow-c { width: 300px; height: 300px; background: #b45309; top: 40%; left: 55%; opacity: 0.25; }

.hidden { display: none !important; }

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  background: rgba(7, 11, 20, 0.72);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.brand { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.brand-coin {
  width: 34px; height: 34px; border-radius: 50%;
  background: radial-gradient(circle at 30% 25%, #ffe48a, var(--gold) 60%, #b47d00);
  color: var(--bg); font-weight: 900; font-size: 17px;
  display: grid; place-items: center;
  box-shadow: 0 0 18px rgba(255, 193, 5, 0.5);
}
.brand-name { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 19px; }
.nav-links { display: flex; gap: 6px; flex: 1; }
.nav-link {
  padding: 8px 14px; border-radius: 10px; cursor: pointer;
  color: var(--muted); font-weight: 600; font-size: 14px;
  transition: background .15s, color .15s;
}
.nav-link:hover { color: var(--text); background: var(--surface); }
.nav-link.active { color: var(--text); background: var(--surface-2); }
.nav-actions { display: flex; align-items: center; gap: 10px; }

.balance-chip {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid rgba(255, 193, 5, 0.35);
  padding: 7px 14px; border-radius: 999px; font-size: 14px; font-weight: 700;
}
.chip-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 10px var(--gold); }
.chip-unit { color: var(--muted); font-weight: 500; }

/* ---------- buttons ---------- */
.btn {
  border: 0; cursor: pointer; font-weight: 700; font-size: 14px;
  padding: 10px 20px; border-radius: 12px;
  transition: transform .12s, box-shadow .12s, background .15s;
  font-family: inherit;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: linear-gradient(135deg, #7c5cff, #4f46e5); color: #fff; box-shadow: 0 6px 20px rgba(79, 70, 229, 0.35); }
.btn-primary:hover { box-shadow: 0 8px 26px rgba(79, 70, 229, 0.5); }
.btn-gold {
  background: linear-gradient(135deg, #ffd54d, var(--gold) 55%, #e89700);
  color: #171204; font-size: 15px;
  box-shadow: 0 8px 24px rgba(255, 193, 5, 0.4);
}
.btn-gold:hover { box-shadow: 0 10px 30px rgba(255, 193, 5, 0.55); }
.btn-ghost { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { background: rgba(248, 113, 113, 0.14); color: var(--red); border: 1px solid rgba(248, 113, 113, 0.3); }
.btn-success { background: rgba(52, 211, 153, 0.14); color: var(--green); border: 1px solid rgba(52, 211, 153, 0.3); }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 9px; }
.btn-block { width: 100%; }
.link-btn { background: none; border: 0; color: var(--gold); cursor: pointer; font-weight: 700; font-size: 14px; }
.link-btn:hover { text-decoration: underline; }

/* ---------- content ---------- */
.content { max-width: 1180px; margin: 0 auto; padding: 40px 24px 80px; }

.hero { text-align: center; padding: 56px 0 36px; }
.hero-tag {
  display: inline-block; padding: 7px 16px; border-radius: 999px;
  background: rgba(139, 92, 246, 0.14); border: 1px solid rgba(139, 92, 246, 0.4);
  color: #c4b5fd; font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
}
.hero-title { font-size: clamp(38px, 6vw, 64px); font-weight: 800; margin: 22px 0 14px; line-height: 1.08; }
.grad { background: linear-gradient(100deg, var(--gold), #f97316, var(--purple), var(--cyan)); background-size: 220% 220%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 7s ease infinite; }
@keyframes shimmer { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
.hero-sub { color: var(--muted); font-size: 18px; max-width: 560px; margin: 0 auto 28px; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin: 26px 0 44px; }
.stat-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; text-align: center; backdrop-filter: blur(8px);
  transition: transform .15s, border-color .15s;
}
.stat-card:hover { transform: translateY(-3px); border-color: rgba(255, 255, 255, 0.18); }
.stat-value { font-family: 'Space Grotesk', sans-serif; font-size: 34px; font-weight: 800; }
.stat-value.gold { color: var(--gold); }
.stat-label { color: var(--muted); font-size: 13px; font-weight: 600; margin-top: 4px; }

.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 34px 0 16px; }
.section-head h2 { font-size: 24px; }

/* ---------- top 3 ---------- */
.top3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.top-card {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
  border: 1px solid var(--border); border-radius: var(--radius); padding: 26px 22px; text-align: center;
  transition: transform .15s, border-color .15s;
}
.top-card:hover { transform: translateY(-4px); }
.top-card.first { border-color: rgba(255, 193, 5, 0.6); box-shadow: 0 0 40px rgba(255, 193, 5, 0.15); }
.top-card.second { border-color: rgba(190, 200, 215, 0.5); }
.top-card.third { border-color: rgba(210, 120, 60, 0.5); }
.medal { font-size: 34px; }
.top-name { font-family: 'Space Grotesk', sans-serif; font-size: 20px; font-weight: 700; margin: 10px 0 2px; }
.top-tokens { color: var(--gold); font-weight: 800; font-size: 18px; }
.top-record { color: var(--muted); font-size: 13px; margin-top: 4px; }

/* ---------- shop ---------- */
.page-head { margin-bottom: 28px; }
.page-head h1 { font-size: 34px; }
.page-head p { color: var(--muted); margin-top: 8px; max-width: 560px; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.shop-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; display: flex; flex-direction: column; gap: 6px; position: relative;
  transition: transform .15s, border-color .15s;
}
.shop-card:hover { transform: translateY(-4px); border-color: rgba(255, 193, 5, 0.45); }
.shop-card.popular { border-color: rgba(255, 193, 5, 0.7); }
.popular-badge {
  position: absolute; top: 12px; right: 12px;
  background: var(--gold); color: #171204; font-size: 11px; font-weight: 800;
  padding: 3px 9px; border-radius: 999px; letter-spacing: 0.04em;
}
.shop-amount { font-family: 'Space Grotesk', sans-serif; font-size: 40px; font-weight: 800; color: var(--gold); }
.shop-usd { font-size: 15px; color: var(--muted); margin-bottom: 12px; }
.shop-note { font-size: 12px; color: var(--muted); }

/* ---------- tabs / table ---------- */
.tabs { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.tab {
  padding: 9px 18px; border-radius: 11px; cursor: pointer; border: 1px solid var(--border);
  background: var(--surface); color: var(--muted); font-weight: 700; font-size: 14px;
  transition: all .15s; font-family: inherit;
}
.tab:hover { color: var(--text); }
.tab.active { background: linear-gradient(135deg, #7c5cff, #4f46e5); color: #fff; border-color: transparent; }
.tabs-inline { border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.tabs-inline .tab { border: 0; background: none; border-radius: 0; }
.tabs-inline .tab.active { background: none; color: var(--gold); border-bottom: 2px solid var(--gold); padding-bottom: 8px; }

.table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 13px 18px; text-align: left; font-size: 14px; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.07em; border-bottom: 1px solid var(--border); }
td { border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: rgba(255, 255, 255, 0.03); }
.rank { font-family: 'Space Grotesk', sans-serif; font-weight: 800; width: 40px; }
.rank-1 { color: var(--gold); }
.rank-2 { color: #cbd5e1; }
.rank-3 { color: #fb923c; }
.pill {
  display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: 12px; font-weight: 700;
}
.pill-pending { background: rgba(251, 191, 36, 0.15); color: #fbbf24; }
.pill-approved { background: rgba(52, 211, 153, 0.15); color: var(--green); }
.pill-declined { background: rgba(248, 113, 113, 0.15); color: var(--red); }
.pill-banned { background: rgba(248, 113, 113, 0.2); color: var(--red); }
.mono { font-family: 'Consolas', monospace; }

/* ---------- forms ---------- */
.form { display: flex; flex-direction: column; gap: 14px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.form input, .form select, .form textarea {
  background: rgba(0, 0, 0, 0.35); border: 1px solid var(--border); border-radius: 11px;
  padding: 11px 14px; color: var(--text); font-size: 14px; font-family: inherit; outline: none;
}
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15); }
.form-err { color: var(--red); font-size: 13px; min-height: 18px; }

/* ---------- stake picker ---------- */
.stake-presets { display: flex; flex-wrap: wrap; gap: 7px; }
.stake-pill {
  background: rgba(0, 0, 0, 0.35); border: 1px solid var(--border); color: var(--text);
  border-radius: 999px; padding: 6px 13px; font-size: 13px; font-weight: 600; cursor: pointer;
  font-family: inherit; transition: all 0.15s ease;
}
.stake-pill:hover { border-color: var(--purple); color: var(--white); }
.stake-pill.active { background: var(--purple); border-color: var(--purple); color: #fff; }
.stake-pill:disabled { opacity: 0.45; cursor: not-allowed; }

/* ---------- modal ---------- */
.modal-mask {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(3, 5, 10, 0.72); backdrop-filter: blur(8px);
  display: grid; place-items: center; padding: 20px;
}
.modal {
  width: 100%; max-width: 420px; background: var(--bg-2);
  border: 1px solid var(--border); border-radius: 22px; padding: 28px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6); position: relative;
}
.modal-close {
  position: absolute; top: 14px; right: 16px; background: none; border: 0;
  color: var(--muted); font-size: 26px; cursor: pointer; line-height: 1;
}
.modal-close:hover { color: var(--text); }
.modal-hint { margin-top: 16px; text-align: center; color: var(--muted); font-size: 12px; }
.modal-hint b { color: var(--gold); }

/* ---------- staff ---------- */
.staff-gate { max-width: 460px; margin: 0 auto; }
.gate-card { padding: 26px; }
.gate-card .panel-title { text-align: center; }
.gate-card .btn { margin-top: 6px; }
.staff-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(139, 92, 246, 0.14); border: 1px solid rgba(139, 92, 246, 0.4);
  color: #c4b5fd; font-size: 12px; font-weight: 800; letter-spacing: 0.06em;
  padding: 4px 12px; border-radius: 999px; text-transform: uppercase;
}

/* ---------- profile ---------- */
.profile-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }

/* ---------- admin ---------- */
.admin-panel .toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 20px; }
.admin-panel .toolbar .field { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--muted); font-weight: 600; min-width: 150px; }
.admin-panel .toolbar input, .admin-panel .toolbar select { background: rgba(0,0,0,0.35); border: 1px solid var(--border); border-radius: 9px; padding: 9px 12px; color: var(--text); font-size: 13px; outline: none; }
.admin-panel .toolbar input:focus { border-color: var(--purple); }
.row-actions { display: flex; gap: 8px; }
.row-actions .btn { white-space: nowrap; }
.amount-input { width: 90px; }
.banned-row td { opacity: 0.55; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 26px 24px; }
.footer-inner { max-width: 1180px; margin: 0 auto; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.footer-inner span:first-child { font-family: 'Space Grotesk', sans-serif; font-weight: 700; color: var(--text); }
.footer-note { font-size: 12px; }

/* ---------- toast ---------- */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 14px;
  padding: 13px 22px; font-weight: 600; font-size: 14px; z-index: 200;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5);
  animation: toastIn .25s ease;
}
.toast.err { border-color: rgba(248, 113, 113, 0.5); color: var(--red); }
.toast.ok { border-color: rgba(52, 211, 153, 0.5); color: var(--green); }
@keyframes toastIn { from { opacity: 0; transform: translateX(-50%) translateY(12px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }

@media (max-width: 720px) {
  .nav-inner { flex-wrap: wrap; gap: 12px; }
  .nav-links { order: 3; width: 100%; overflow-x: auto; }
  .hero { padding: 36px 0 24px; }
}

/* ---------- play ---------- */
.play-grid { display: grid; grid-template-columns: 340px 1fr; gap: 20px; align-items: start; }
.panel {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; backdrop-filter: blur(8px);
}
.panel-title { font-size: 17px; margin-bottom: 16px; }
.settings-grid { display: flex; flex-direction: column; gap: 20px; align-items: stretch; }
.form-row { display: flex; gap: 12px; flex-wrap: wrap; }
.form-row > label { flex: 1; min-width: 140px; }
.modes-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.mode-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px;
}
.mode-row.mode-off { opacity: 0.6; }
.mode-icon { font-size: 26px; line-height: 1; }
.mode-info { flex: 1; min-width: 160px; }
.mode-name { font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.mode-desc { font-size: 12px; color: var(--muted); margin-top: 2px; }
.modes-form { margin-top: 4px; }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; margin-bottom: 12px; cursor: pointer; }
.check .muted { font-size: 12px; }
.wager-box {
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
  background: rgba(255, 193, 5, 0.06); border: 1px solid rgba(255, 193, 5, 0.25);
  border-radius: 12px; padding: 12px 14px; font-size: 13px; color: var(--muted);
}
.wager-box .gold { margin-right: auto; font-size: 15px; }
.queue-status { font-size: 13px; margin-top: 12px; min-height: 18px; }
.queue-status.searching { color: var(--gold); }
.queue-status.error { color: var(--red); }
.empty { color: var(--muted); font-size: 14px; padding: 12px 0; }

.match-list { display: flex; flex-direction: column; gap: 12px; max-height: 520px; overflow-y: auto; }
.match-card {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.match-main { flex: 1; min-width: 200px; }
.match-vs { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; }
.match-vs .vs { color: var(--muted); font-size: 11px; font-weight: 800; }
.match-meta { color: var(--muted); font-size: 12px; margin-top: 4px; }
.match-epic {
  color: var(--gold); font-size: 13px; background: rgba(255, 193, 5, 0.06);
  border: 1px dashed rgba(255, 193, 5, 0.3); border-radius: 8px; padding: 6px 10px; margin-top: 8px;
}
.match-epic .epic-hint { color: var(--gold); cursor: pointer; text-decoration: underline; }
.match-status { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; padding: 4px 10px; border-radius: 999px; }
.ms-in_progress { background: rgba(56, 189, 248, 0.15); color: var(--cyan); }
.ms-submitted { background: rgba(251, 191, 36, 0.15); color: #fbbf24; }
.ms-disputed { background: rgba(248, 113, 113, 0.15); color: var(--red); }
.ms-confirmed { background: rgba(52, 211, 153, 0.15); color: var(--green); }
.ms-cancelled { background: rgba(148, 163, 184, 0.15); color: #94a3b8; }
.match-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.winner-name { color: var(--green); font-weight: 800; }
.loser-name { color: var(--red); font-weight: 700; }
.you-tag { background: rgba(139, 92, 246, 0.2); color: #c4b5fd; font-size: 10px; font-weight: 800; padding: 2px 7px; border-radius: 999px; margin-left: 6px; }

/* ---------- leads (staff) ---------- */
.lead-search { display: flex; gap: 8px; margin-bottom: 14px; max-width: 420px; }
.lead-search input {
  flex: 1; background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 12px; color: var(--text); font-family: inherit; font-size: 13px; outline: none;
}
.lead-search input:focus { border-color: var(--gold); }
.lead-badge { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; padding: 3px 9px; border-radius: 999px; }
.lb-active { background: rgba(52, 211, 153, 0.16); color: var(--green); }
.lb-pending { background: rgba(251, 191, 36, 0.16); color: #fbbf24; }
.lb-declined { background: rgba(248, 113, 113, 0.16); color: var(--red); }
.lb-cancelled { background: rgba(148, 163, 184, 0.16); color: #94a3b8; }

/* ---------- kill lead ---------- */
.kl-box {
  display: flex; align-items: flex-start; gap: 10px; margin-top: 10px;
  border-radius: 10px; padding: 10px 12px; font-size: 13px;
}
.kl-box .kl-flag { font-size: 18px; line-height: 1.1; }
.kl-box button { margin-top: 4px; }
.kl-actions { display: inline-flex; gap: 6px; margin-left: 6px; }
.kl-none {
  background: rgba(56, 189, 248, 0.06); border: 1px dashed rgba(56, 189, 248, 0.35);
}
.kl-none .kl-label { display: flex; align-items: center; gap: 8px; color: var(--cyan); font-weight: 700; }
.kl-input {
  width: 64px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 5px 8px; color: var(--text); font-weight: 700; text-align: center;
}
.kl-hint { color: var(--muted); font-size: 11px; margin-top: 5px; }
.kl-pending {
  background: rgba(251, 191, 36, 0.08); border: 1px solid rgba(251, 191, 36, 0.35);
}
.kl-pending > div { color: #fbbf24; }
.kl-active {
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.16), rgba(56, 189, 248, 0.1));
  border: 1px solid rgba(52, 211, 153, 0.5);
  box-shadow: 0 0 18px rgba(52, 211, 153, 0.18);
}
.kl-active > div { color: var(--green); }
.kl-declined {
  background: rgba(148, 163, 184, 0.07); border: 1px solid rgba(148, 163, 184, 0.25);
}
.kl-declined > div { color: var(--muted); }

/* ---------- games ---------- */
.games-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; margin-bottom: 10px; }
.game-card {
  position: relative; overflow: hidden; border-radius: var(--radius);
  border: 1px solid var(--border); padding: 24px; cursor: pointer;
  background: linear-gradient(160deg, rgba(56, 189, 248, 0.12), rgba(139, 92, 246, 0.06));
  transition: transform .15s, border-color .15s;
}
.game-card:hover { transform: translateY(-4px); border-color: rgba(255, 193, 5, 0.5); }
.game-icon { font-size: 34px; margin-bottom: 10px; }
.game-name { font-family: 'Space Grotesk', sans-serif; font-size: 20px; font-weight: 700; }
.game-mode { color: var(--muted); font-size: 13px; margin: 6px 0 14px; }
.game-stake { font-size: 13px; color: var(--gold); font-weight: 700; }

.how-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.how-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; position: relative;
}
.how-num {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, #7c5cff, #4f46e5); color: #fff; font-weight: 800; margin-bottom: 12px;
}
.how-card h3 { font-size: 16px; margin-bottom: 6px; }
.how-card p { color: var(--muted); font-size: 13px; }

/* ---------- tokens ---------- */
.claim-card {
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  background: linear-gradient(135deg, rgba(255, 193, 5, 0.12), rgba(139, 92, 246, 0.1));
  border: 1px solid rgba(255, 193, 5, 0.35); border-radius: var(--radius); padding: 22px 26px;
}
.claim-info h3 { font-size: 18px; margin-bottom: 6px; }
.claim-info p { color: var(--muted); font-size: 13px; max-width: 520px; }
.stat-grid.small .stat-value { font-size: 28px; }

/* ---------- rules ---------- */
.rules-list { display: flex; flex-direction: column; gap: 12px; max-width: 820px; }
.rule {
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px;
}
.rule-icon { font-size: 24px; line-height: 1.3; }
.rule h3 { font-size: 16px; margin-bottom: 4px; }
.rule p { color: var(--muted); font-size: 13px; }

/* ---------- tickets ---------- */
.discord-card {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  background: linear-gradient(135deg, rgba(88, 101, 242, 0.18), rgba(56, 189, 248, 0.08));
  border: 1px solid rgba(88, 101, 242, 0.45); border-radius: var(--radius); padding: 24px 26px;
}
.discord-logo {
  width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center;
  background: #5865f2; color: #fff; font-family: 'Space Grotesk', sans-serif; font-size: 28px; font-weight: 800;
  box-shadow: 0 0 24px rgba(88, 101, 242, 0.5);
}
.discord-info { flex: 1; min-width: 220px; }
.discord-info h3 { font-size: 19px; margin-bottom: 6px; }
.discord-info p { color: var(--muted); font-size: 13px; max-width: 520px; }

@media (max-width: 900px) {
  .play-grid { grid-template-columns: 1fr; }
}

/* ---------- chat ---------- */
.chat-btn { display: inline-flex; align-items: center; gap: 8px; }
.chat-badge {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--red); color: #fff; font-size: 11px; font-weight: 800;
  display: inline-grid; place-items: center; line-height: 1;
}
.chat-panel {
  position: fixed; top: 72px; right: 18px; bottom: 18px; width: 350px;
  display: flex; flex-direction: column;
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 18px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6); z-index: 60;
  overflow: hidden; backdrop-filter: blur(14px);
}
.chat-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border-bottom: 1px solid var(--border);
}
.chat-tabs { display: flex; gap: 6px; }
.chat-title { font-weight: 800; font-size: 14px; }
.chat-tab {
  border: 0; background: var(--surface); color: var(--muted);
  padding: 7px 14px; border-radius: 9px; font-weight: 700; font-size: 13px; cursor: pointer;
  font-family: inherit;
}
.chat-tab.active { background: linear-gradient(135deg, #7c5cff, #4f46e5); color: #fff; }
.chat-close { background: none; border: 0; color: var(--muted); font-size: 22px; cursor: pointer; line-height: 1; }
.chat-close:hover { color: var(--text); }
.chat-msgs { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.chat-msgs-inner { display: flex; flex-direction: column; gap: 10px; }
.chat-empty { color: var(--muted); font-size: 13px; text-align: center; margin: 20px 0; }
.chat-msg { display: flex; gap: 8px; align-items: flex-start; }
.chat-msg.mine { flex-direction: row-reverse; }
.chat-msg.chat-system { justify-content: center; }
.chat-system-body {
  background: rgba(251, 191, 36, 0.08); border: 1px dashed rgba(251, 191, 36, 0.35);
  color: var(--gold); font-size: 12px; text-align: center;
  border-radius: 10px; padding: 8px 12px; max-width: 100%;
}
.chat-avatar { background: none; border: 0; padding: 0; cursor: pointer; flex-shrink: 0; }
.avatar { border-radius: 50%; object-fit: cover; vertical-align: middle; }
.avatar-initials {
  display: inline-grid; place-items: center; border-radius: 50%;
  color: #0a0f1c; font-weight: 800; font-size: 13px; flex-shrink: 0;
}
.chat-bubble {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 8px 12px; max-width: 82%;
}
.chat-msg.mine .chat-bubble { background: rgba(124, 92, 255, 0.16); border-color: rgba(124, 92, 255, 0.4); }
.chat-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; }
.chat-name { background: none; border: 0; color: var(--gold); font-weight: 700; font-size: 12px; cursor: pointer; padding: 0; font-family: inherit; }
.chat-time { color: var(--muted); font-size: 10px; }
.chat-record { color: var(--muted); font-size: 10px; margin-left: auto; }
.chat-body { font-size: 13px; word-break: break-word; }
.chat-input { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--border); }
.chat-input input {
  flex: 1; background: rgba(0, 0, 0, 0.35); border: 1px solid var(--border); border-radius: 10px;
  padding: 9px 12px; color: var(--text); font-size: 13px; font-family: inherit; outline: none;
}
.chat-input input:focus { border-color: var(--purple); }

/* ---------- stats modal ---------- */
.stats-modal { max-width: 460px; }
.stats-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.stats-name { font-family: 'Space Grotesk', sans-serif; font-size: 20px; font-weight: 700; }
.stats-sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stats-grid .stat-card { padding: 14px 10px; }
.stats-grid .stat-value { font-size: 24px; }
.stats-links { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.conn-line { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 9px 12px; font-size: 13px; color: var(--muted); }

/* ---------- google / oauth ---------- */
.btn-google {
  background: #fff; color: #333; width: 100%; border: 1px solid #dadce0;
  box-shadow: 0 2px 6px rgba(60, 64, 67, 0.15);
}
.btn-google:hover { box-shadow: 0 4px 10px rgba(60, 64, 67, 0.25); }
.modal-or { display: flex; align-items: center; gap: 10px; margin: 14px 0; color: var(--muted); font-size: 12px; }
.modal-or::before, .modal-or::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ---------- connections (profile) ---------- */
.conn-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; margin-bottom: 10px; }
.conn-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px;
}
.conn-logo {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  color: #fff; font-family: 'Space Grotesk', sans-serif; font-weight: 800; font-size: 20px; flex-shrink: 0;
}
.conn-google { background: linear-gradient(135deg, #4285f4, #34a853); box-shadow: 0 0 20px rgba(66, 133, 244, 0.4); }
.conn-epic { background: linear-gradient(135deg, #1f1f1f, #000); border: 1px solid #444; }
.conn-info { flex: 1; min-width: 0; }
.conn-title { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 15px; }
.conn-sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.conn-actions { flex-shrink: 0; }
.conn-form { display: flex; gap: 6px; }
.epic-input {
  width: 110px; background: rgba(0, 0, 0, 0.35); border: 1px solid var(--border); border-radius: 9px;
  padding: 7px 10px; color: var(--text); font-size: 12px; font-family: inherit; outline: none;
}
.epic-input:focus { border-color: var(--purple); }

/* ---------- leaderboard clickable player ---------- */
.link-player { background: none; border: 0; color: var(--text); font-weight: 700; font-size: 14px; cursor: pointer; font-family: inherit; padding: 0; }
.link-player:hover { color: var(--gold); text-decoration: underline; }

@media (max-width: 720px) {
  .chat-panel { top: auto; right: 0; left: 0; bottom: 0; width: 100%; height: 60vh; border-radius: 18px 18px 0 0; }
}

