:root {
  --bg: #07070d;
  --bg-2: #0d0d17;
  --panel: rgba(255, 255, 255, 0.045);
  --panel-2: rgba(255, 255, 255, 0.07);
  --line: rgba(255, 255, 255, 0.1);
  --line-2: rgba(255, 255, 255, 0.18);
  --text: #f3f4f8;
  --muted: #9a9fb4;
  --violet: #7c3aed;
  --fuchsia: #e879f9;
  --cyan: #22d3ee;
  --lime: #a3e635;
  --warn: #fb7185;
  --grad: linear-gradient(120deg, #7c3aed 0%, #d946ef 50%, #22d3ee 100%);
  --radius: 16px;
  --display: "Space Grotesk", Inter, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { background: var(--bg); color: var(--text); font: 400 15.5px/1.55 Inter, "Segoe UI", sans-serif; scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body { margin: 0; overflow-x: hidden; }
a { color: var(--cyan); text-decoration: none; }
a:hover { color: #fff; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -0.02em; margin: 0; }
h1 { font-size: clamp(40px, 6.2vw, 76px); line-height: 1.02; }
h2 { font-size: clamp(26px, 3.2vw, 36px); }
h3 { font-size: 20px; }
.muted { color: var(--muted); }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
code, pre { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 13.5px; }
pre { background: rgba(0, 0, 0, 0.45); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; overflow-x: auto; margin: 10px 0 0; }
p code, li > span > code { background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 7px; }

/* ---- ambient background ---- */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; background:
  radial-gradient(1200px 600px at 80% -10%, rgba(124, 58, 237, 0.18), transparent 60%),
  radial-gradient(900px 500px at -10% 30%, rgba(34, 211, 238, 0.12), transparent 60%),
  var(--bg); }
.bg::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px); background-size: 48px 48px; mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 70%); }
.blob { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.55; animation: drift 24s ease-in-out infinite alternate; }
.b1 { width: 520px; height: 520px; left: 55%; top: -180px; background: #7c3aed; }
.b2 { width: 420px; height: 420px; left: -120px; top: 40vh; background: #22d3ee; animation-delay: -8s; opacity: 0.35; }
.b3 { width: 360px; height: 360px; right: -100px; top: 70vh; background: #d946ef; animation-delay: -16s; opacity: 0.3; }
@keyframes drift { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(60px, 40px, 0) scale(1.12); } }
@media (prefers-reduced-motion: reduce) { .blob { animation: none; } }

/* ---- layout ---- */
.top, main, footer { padding-left: max(20px, calc(50vw - 600px)); padding-right: max(20px, calc(50vw - 600px)); }
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 28px; padding-top: 14px; padding-bottom: 14px;
  background: rgba(7, 7, 13, 0.72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.logo { display: inline-flex; align-items: center; gap: 10px; color: #fff; font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: -0.02em; }
.logo img { width: 30px; height: 30px; border-radius: 8px; box-shadow: 0 0 0 1px rgba(255,255,255,0.08), 0 6px 18px rgba(124, 58, 237, 0.35); }
.logo em { font-style: normal; background: linear-gradient(90deg, var(--fuchsia), var(--cyan)); -webkit-background-clip: text; background-clip: text; color: transparent; margin-left: 2px; }
.top nav { display: flex; gap: 22px; margin-left: auto; }
.top nav a { color: var(--muted); font-weight: 500; font-size: 14px; }
.top nav a:hover { color: #fff; }
main { padding-bottom: 80px; }
section { margin-top: 96px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.section-head p { margin: 6px 0 0; max-width: 640px; }

.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 12px; font-weight: 600; font-size: 15px; border: 1px solid transparent; transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn.primary { color: #fff; background: var(--grad); box-shadow: 0 8px 28px rgba(217, 70, 239, 0.3); }
.btn.primary:hover { box-shadow: 0 12px 36px rgba(217, 70, 239, 0.45); }
.btn.ghost { color: #fff; background: var(--panel); border-color: var(--line-2); }
.btn.ghost:hover { background: var(--panel-2); }
.btn.small { padding: 9px 14px; font-size: 14px; }

.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px; font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 4px rgba(163, 230, 53, 0.18); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(163, 230, 53, 0.06); } }

/* ---- hero ---- */
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 48px; align-items: center; margin-top: 64px; min-height: 60vh; }
.lede { font-size: 18px; color: #c9cddb; max-width: 560px; margin: 22px 0 28px; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 0 0 18px; }
.counts { color: var(--muted); font-size: 14px; min-height: 1.4em; margin: 0; }
.hero-stage { position: relative; }
.hero-stage::before { content: ""; position: absolute; inset: -6% -4%; background: var(--grad); filter: blur(60px); opacity: 0.35; border-radius: 40px; z-index: -1; }
.frame { position: relative; border-radius: 20px; overflow: hidden; border: 1px solid var(--line-2); background: #000; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6); aspect-ratio: 16 / 9; }
.frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #07080a; }
.frame-cap { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; font-size: 13px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.75)); color: #e6e8f0; }
.frame-cap a { color: #fff; font-weight: 600; }

/* ---- games ---- */
.games { display: grid; grid-template-columns: 1.2fr 1fr; gap: 16px; margin-top: 72px; }
.game { display: flex; gap: 20px; align-items: center; padding: 22px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); }
.game.live { background: linear-gradient(135deg, rgba(124, 58, 237, 0.22), rgba(34, 211, 238, 0.08)); border-color: rgba(124, 58, 237, 0.4); }
.game p { margin: 6px 0 0; color: #c9cddb; }
.game .eyebrow { margin-bottom: 6px; }
.game-art { position: relative; flex: none; width: 92px; height: 92px; border-radius: 18px; background: rgba(0, 0, 0, 0.35); display: grid; place-items: center; }
.game-art img { position: absolute; inset: 14px; width: 64px; height: 64px; }
.game-art.mark img { position: static; width: 56px; height: 56px; }

/* ---- showcase ---- */
.showcase { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.duel { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; padding: 18px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); color: var(--text); position: relative; overflow: hidden; transition: transform 0.15s ease, border-color 0.15s ease; }
.duel::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, color-mix(in srgb, var(--a) 22%, transparent), transparent 45%, transparent 55%, color-mix(in srgb, var(--b) 22%, transparent)); pointer-events: none; }
.duel:hover { transform: translateY(-2px); border-color: var(--line-2); color: #fff; }
.duel .side { display: grid; justify-items: center; gap: 6px; text-align: center; position: relative; }
.duel .side.r { }
.duel .tank { position: relative; width: 56px; height: 56px; }
.duel .tank img { position: absolute; inset: 0; width: 56px; height: 56px; }
.duel .side.r .tank { transform: scaleX(-1); }
.duel .name { font-family: var(--display); font-weight: 700; font-size: 16px; }
.duel .side.l .name { color: var(--a); }
.duel .side.r .name { color: var(--b); }
.duel .tier { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.duel .mid { display: grid; justify-items: center; gap: 4px; position: relative; }
.duel .score { font-family: var(--display); font-weight: 700; font-size: 26px; letter-spacing: -0.02em; }
.duel .play { font-size: 12px; font-weight: 600; color: var(--muted); border: 1px solid var(--line-2); border-radius: 999px; padding: 3px 10px; }
.duel:hover .play { color: #fff; border-color: #fff; }
.showcase .pending { grid-column: 1 / -1; color: var(--muted); padding: 24px; border: 1px dashed var(--line); border-radius: var(--radius); text-align: center; }

/* ---- how ---- */
.how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.step { padding: 22px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); }
.step .num { font-family: var(--display); font-weight: 700; font-size: 13px; letter-spacing: 0.12em; color: var(--fuchsia); }
.step h3 { margin: 8px 0 8px; }
.step p { margin: 0; color: #c9cddb; }

/* ---- feed ---- */
.list { display: grid; gap: 10px; }
.match { display: grid; grid-template-columns: 1.5fr auto 1.2fr auto auto auto auto; gap: 14px; align-items: center; padding: 14px 18px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); color: var(--text); transition: transform 0.15s ease, border-color 0.15s ease; }
.match:hover { transform: translateY(-1px); border-color: var(--line-2); color: #fff; }
.match .who b { font-family: var(--display); font-weight: 700; }
.match .vs { font-family: var(--display); font-weight: 700; color: var(--muted); font-size: 12px; }
.match .ctrl { font-family: var(--display); font-weight: 700; color: var(--c); }
.match .score { font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: -0.02em; }
.match .rate { color: var(--muted); font-size: 13px; white-space: nowrap; }
.match .when { font-size: 12px; white-space: nowrap; }
.tag { display: inline-block; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; border: 1px solid var(--line-2); border-radius: 999px; padding: 2px 9px; color: var(--muted); }
.tag.ranked { color: var(--fuchsia); border-color: rgba(232, 121, 249, 0.5); }
.tag.lobby { color: var(--cyan); border-color: rgba(34, 211, 238, 0.5); }
.tag.clear { color: var(--lime); border-color: rgba(163, 230, 53, 0.5); }
.tag.warn { color: var(--warn); border-color: rgba(251, 113, 133, 0.5); }
.empty { color: var(--muted); padding: 24px; border: 1px dashed var(--line); border-radius: var(--radius); text-align: center; }

/* ---- ladder ---- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
.tiers { display: flex; gap: 5px; }
.tier-pip { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; font-size: 12px; font-weight: 700; border: 1px solid var(--line); color: var(--muted); }
.tier-pip.ok { background: var(--c); color: #0a0a0a; border-color: var(--c); }
.tier-pip.tried { color: var(--c); border-color: var(--c); }

/* ---- house bots ---- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.card { display: flex; gap: 16px; padding: 18px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); position: relative; overflow: hidden; }
.card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c); }
.card .art { position: relative; width: 72px; height: 72px; flex: none; border-radius: 14px; background: rgba(0, 0, 0, 0.35); }
.card .art img { position: absolute; inset: 4px; width: 64px; height: 64px; }
.card .tier { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.card h3 { margin: 2px 0 4px; color: var(--c); }
.card .motto { margin: 0 0 8px; color: var(--muted); font-style: italic; }
.card .build { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 8px; }
.card .build span { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); }
.card code { color: var(--muted); font-size: 12.5px; }

/* ---- enter ---- */
.enter-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 14px; }
.steps li { counter-increment: s; padding: 18px 18px 18px 56px; position: relative; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); }
.steps li::before { content: counter(s, decimal-leading-zero); position: absolute; left: 18px; top: 18px; font-family: var(--display); font-weight: 700; color: var(--fuchsia); font-size: 13px; letter-spacing: 0.1em; }
.steps li > span { display: block; font-weight: 500; }
.docs { padding: 18px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); display: grid; gap: 8px; align-content: start; }
.docs h3 { margin-bottom: 4px; }
.docs a { padding: 10px 12px; border-radius: 10px; background: rgba(0, 0, 0, 0.3); border: 1px solid var(--line); color: var(--text); font-weight: 500; }
.docs a:hover { border-color: var(--line-2); color: #fff; }

footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 24px; padding-bottom: 32px; border-top: 1px solid var(--line); font-size: 13px; }

/* ---- responsive ---- */
@media (max-width: 1000px) {
  .hero { grid-template-columns: 1fr; gap: 32px; min-height: 0; }
  .games, .how, .enter-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .top { gap: 14px; }
  .top nav { display: none; }
  section { margin-top: 64px; }
  .match { grid-template-columns: 1fr auto; }
  .match .vs, .match .rate, .match .when { display: none; }
  .section-head { flex-direction: column; align-items: start; }
  .game { flex-direction: column; align-items: start; }
  footer { flex-direction: column; align-items: start; }
}
