:root {
  --bg: #05030b;
  --bg-2: #0d0718;
  --panel: rgba(255,255,255,0.06);
  --panel-2: rgba(255,255,255,0.08);
  --stroke: rgba(255,255,255,0.12);
  --text: #f7f4ff;
  --muted: #b9aed4;
  --purple: #8f3dff;
  --purple-2: #b46cff;
  --purple-3: #d7bcff;
  --green: #22c55e;
  --danger: #f87171;
  --shadow: 0 20px 60px rgba(113, 39, 255, 0.24);
  --radius: 24px;
  --radius-sm: 16px;
  --max: 1240px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background:
    radial-gradient(circle at top, rgba(143, 61, 255, 0.25), transparent 28%),
    radial-gradient(circle at 80% 20%, rgba(180, 108, 255, 0.18), transparent 18%),
    linear-gradient(180deg, #05030b 0%, #080511 100%);
  color: var(--text);
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.site-shell { max-width: var(--max); margin: 0 auto; padding: 20px; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 16px 20px; border: 1px solid var(--stroke); border-radius: 999px;
  background: rgba(10, 7, 18, 0.7); backdrop-filter: blur(14px); position: sticky; top: 12px; z-index: 50;
  position: sticky;
  position: -webkit-sticky;
  position: sticky;
  position: relative;
}
.brand { display:flex; align-items:center; gap:14px; min-width:0; }
.brand img { width: 54px; height: 54px; object-fit: contain; }
.brand strong { display:block; font-size:1.1rem; }
.brand span { display:block; color:var(--muted); font-size:.84rem; }
.nav { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.nav a:not(.btn) { color: var(--muted); font-weight: 600; }
.nav a.active, .nav a:not(.btn):hover { color: var(--text); }
.burger {
  display:none; border:none; background:rgba(255,255,255,.06); color:#fff; font-size:1.2rem;
  width:46px; height:46px; border-radius:50%; cursor:pointer;
  position: relative; z-index: 60; -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.btn {
  display:inline-flex; align-items:center; justify-content:center; gap:10px; min-height:48px; padding:0 18px;
  border-radius:999px; font-weight:800; border:1px solid transparent; transition:.2s ease; cursor:pointer;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--purple) 0%, var(--purple-2) 100%);
  box-shadow: var(--shadow);
}
.btn-outline { border-color: var(--stroke); background: rgba(255,255,255,.02); }
.btn-block { width:100%; }
.text-link { color: var(--purple-3); font-weight: 700; }
.glass {
  background: linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.04));
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}
.hero {
  display:grid; grid-template-columns: 1.15fr .85fr; gap:28px; align-items:center;
  min-height: calc(100vh - 160px); padding: 40px 0;
}
.hero-copy h1, .page-hero h1 { font-size: clamp(2.7rem, 6vw, 5rem); line-height: .98; margin: 12px 0 16px; letter-spacing: -0.04em; }
.hero-copy p, .page-hero p { color: var(--muted); font-size: 1.05rem; max-width: 760px; }
.eyebrow {
  display:inline-flex; padding:10px 14px; border-radius:999px; font-size:.76rem; letter-spacing:.15em;
  color: var(--purple-3); background: rgba(143,61,255,.12); border: 1px solid rgba(180,108,255,.22); font-weight: 800;
}
.hero-actions, .hero-badges { display:flex; gap:14px; flex-wrap:wrap; margin-top:24px; }
.hero-badges span {
  padding:10px 14px; background:rgba(255,255,255,.04); border:1px solid var(--stroke); border-radius:999px; color:var(--muted); font-weight:600;
}
.hero-card { position:relative; padding:28px; overflow:hidden; }
.hero-card-top { display:flex; align-items:center; gap:10px; color: var(--purple-3); margin-bottom:16px; }
.card-glow {
  position:absolute; inset:auto -40px -40px auto; width:200px; height:200px;
  background: radial-gradient(circle, rgba(143,61,255,.42), transparent 70%); pointer-events:none;
}
.status-dot { width:10px; height:10px; border-radius:50%; background:#777; display:inline-block; }
.status-dot.live { background: var(--green); box-shadow: 0 0 0 6px rgba(34,197,94,.14); }
.hero-list { margin:18px 0 22px; padding-left:18px; color:var(--muted); }
.hero-list li { margin:8px 0; }
.section { padding: 24px 0 40px; }
.section-header { display:flex; justify-content:space-between; align-items:end; gap:16px; margin-bottom:20px; }
.section-header h2 { margin:10px 0 0; font-size: clamp(2rem, 3vw, 2.8rem); }
.metrics, .cards-3, .dashboard-grid, .game-grid { display:grid; gap:18px; }
.metrics { grid-template-columns: repeat(4, 1fr); }
.metric { padding:24px; text-align:center; }
.metric strong { display:block; font-size:1.8rem; margin-bottom:8px; }
.metric span, .muted, .info-card p, .game-card p { color: var(--muted); }
.cards-3 { grid-template-columns: repeat(3, 1fr); }
.card, .info-card, .game-card, .panel, .detail-panel, .side-panel, .step { padding:22px; }
.tournament-card { display:flex; flex-direction:column; gap:16px; }
.tournament-top { display:flex; justify-content:space-between; gap:12px; align-items:start; }
.badge {
  display:inline-flex; align-items:center; padding:8px 12px; border-radius:999px; font-weight:800; font-size:.76rem; border:1px solid var(--stroke);
  background: rgba(255,255,255,.04);
}
.badge.open { color:#d4b7ff; }
.badge.full { color:#fbbf24; }
.badge.live { color:#86efac; }
.stat-grid { display:grid; grid-template-columns: repeat(2, 1fr); gap:14px; }
.stat-grid.compact { margin-top:16px; }
.stat-grid > div {
  padding:14px; border:1px solid var(--stroke); border-radius:18px; background: rgba(255,255,255,.03);
}
.stat-grid span, .side-info span { color: var(--muted); display:block; font-size:.8rem; margin-bottom:4px; }
.stat-grid strong, .side-info strong { font-size:1rem; }
.split { display:grid; grid-template-columns: .8fr 1.2fr; gap:22px; align-items:start; }
.steps { display:grid; grid-template-columns: repeat(2, 1fr); gap:18px; }
.step span {
  width:44px; height:44px; border-radius:50%; display:grid; place-items:center; font-weight:800; margin-bottom:12px;
  background: rgba(143,61,255,.16); color: var(--purple-3);
}
.cta-banner {
  margin: 20px 0 40px; padding: 28px; display:flex; justify-content:space-between; gap:24px; align-items:center;
  border-radius: var(--radius); border:1px solid var(--stroke);
  background: linear-gradient(135deg, rgba(143,61,255,.18), rgba(255,255,255,.04));
}
.footer {
  padding: 26px 0 20px; color: var(--muted); display:flex; justify-content:space-between; gap:18px; flex-wrap:wrap;
}
.footer div { display:flex; gap:18px; flex-wrap:wrap; }
.page-hero.small-hero { padding: 54px 0 8px; }
.filters { padding-top: 8px; }
.filter-row {
  padding:16px; display:flex; justify-content:space-between; gap:18px; flex-wrap:wrap;
}
.chip-group { display:flex; gap:10px; flex-wrap:wrap; }
.chip {
  border:none; padding:12px 16px; border-radius:999px; background: rgba(255,255,255,.05); color: var(--muted); font-weight:800; cursor:pointer;
}
.chip.active { background: rgba(143,61,255,.2); color: #fff; border: 1px solid rgba(180,108,255,.35); }
.detail-layout { display:grid; grid-template-columns: 1.25fr .75fr; gap:18px; }
.side-panel h3 { margin-top: 0; }
.side-info { display:grid; gap:12px; margin-top:16px; }
.bracket-wrap { padding:22px; overflow:auto; }
.bracket-grid { display:grid; grid-template-columns: repeat(4, minmax(180px, 1fr)); gap:18px; min-width: 820px; }
.round-col { display:grid; gap:14px; }
.match-box {
  padding:14px; border-radius:18px; border:1px solid var(--stroke); background: rgba(255,255,255,.04);
}
.match-box p { margin:0 0 10px; color:var(--muted); font-size:.8rem; text-transform:uppercase; letter-spacing:.08em; }
.match-box strong { display:block; margin:8px 0; }
.auth-shell { display:grid; place-items:center; min-height:100vh; }
.auth-layout { display:grid; grid-template-columns: 1fr 1fr; gap:22px; width:min(1100px, 100%); }
.auth-brand, .auth-card { padding:30px; }
.auth-logo { width:140px; margin-bottom:18px; }
.form-stack { display:grid; gap:14px; }
.form-stack label { display:grid; gap:8px; color:var(--muted); font-weight:600; }
input, select, textarea {
  width:100%; border-radius:16px; border:1px solid var(--stroke); background: rgba(255,255,255,.04); color:#fff;
  padding:14px 16px; font: inherit; outline:none;
}
input::placeholder, textarea::placeholder { color: #8e82aa; }
.alert {
  margin-top:14px; padding:14px; border-radius:16px; border:1px solid rgba(180,108,255,.3); background: rgba(143,61,255,.12);
}
.hidden { display:none; }
.dashboard-grid { grid-template-columns: repeat(2, 1fr); }
.panel-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:16px; }
.list-stack { display:grid; gap:12px; }
.list-item {
  padding:16px; border-radius:18px; border:1px solid var(--stroke); background: rgba(255,255,255,.03);
}
.list-item strong { display:block; margin-bottom:4px; }
.list-item p { margin:6px 0 0; color:var(--muted); }
.reveal { animation: fadeUp .6s ease both; }
.reveal-delay { animation: fadeUp .8s ease both; }
@keyframes fadeUp { from { opacity:0; transform: translateY(14px);} to {opacity:1; transform:none;} }
@media (max-width: 980px) {
  .hero, .split, .detail-layout, .auth-layout, .dashboard-grid { grid-template-columns: 1fr; }
  .cards-3, .metrics, .game-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .site-shell { padding: 14px; }
  .topbar { border-radius: 26px; padding: 14px 16px; }
  .burger { display:grid; place-items:center; }
  .nav {
    display:none; position:absolute; top:calc(100% + 10px); left:0; right:0; padding:14px;
    background: rgba(10,7,18,.96); border:1px solid var(--stroke); border-radius: 24px; flex-direction:column; align-items:stretch;
    z-index: 55;
  }
  .nav.open { display:flex; }
  .nav a, .nav .btn { width:100%; text-align:center; }
  .cards-3, .metrics, .game-grid, .steps { grid-template-columns: 1fr; }
  .cta-banner, .section-header, .hero-actions { flex-direction:column; align-items:stretch; }
  .hero { min-height: auto; padding-top: 26px; }
  .hero-copy h1, .page-hero h1 { font-size: 2.4rem; }
}


/* Mobile menu hardening */
@media (max-width: 760px) {
  .topbar { overflow: visible; }
  .nav { box-shadow: 0 22px 60px rgba(0,0,0,.45); }
  .nav.is-open { display: flex !important; }
}
