/* Shared styles for the boosting platform
   Layout: dark arena. Ink-blue ground, boost-orange primary (CTA), team-blue secondary, rank tiers (per game) as the only other colour.
   Type: Chakra Petch (display/numbers) + Barlow (body). */
:root {
  --bg: #0a0d16;
  --bg-2: #0f1422;
  --surface: #151b2c;
  --surface-2: #1c2438;
  --line: #273046;
  --line-2: #34405c;
  --fg: #e8ecf5;
  --fg-2: #a4adc4;
  --fg-3: #6f7a96;
  --orange: #ff7a1a;
  --orange-2: #ffa054;
  --orange-ink: #1a0d02;
  --blue: #3b9dff;
  --blue-2: #7fc0ff;
  --good: #3ddc84;
  --warn: #ffc24b;
  --bad: #ff5c6c;
  --display: 'Chakra Petch', 'Segoe UI', system-ui, sans-serif;
  --body: 'Barlow', 'Segoe UI', system-ui, sans-serif;
  --radius: 10px;
  --radius-s: 6px;
  --shadow: 0 20px 50px rgba(0, 0, 0, .45);
  --gutter: max(16px, env(safe-area-inset-left, 0px));
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--fg); font-family: var(--body); font-size: 16px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(1200px 500px at 85% -10%, rgba(59, 157, 255, .12), transparent 60%),
    radial-gradient(900px 400px at 0% 10%, rgba(255, 122, 26, .10), transparent 60%);
  background-attachment: fixed;
}
a { color: var(--blue-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.1; margin: 0; text-wrap: balance; letter-spacing: .01em; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 600; }
p { margin: 0; }
small, .muted { color: var(--fg-2); }
.dim { color: var(--fg-3); }
.num { font-family: var(--display); font-variant-numeric: tabular-nums; }
.eyebrow { font-family: var(--display); text-transform: uppercase; letter-spacing: .14em; font-size: .72rem; color: var(--orange-2); font-weight: 600; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
[hidden] { display: none !important; }
.wrap { max-width: 1180px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
section { padding-block: 64px; }
.stack { display: grid; gap: 14px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1 1 auto; min-width: 0; }

/* ---------- nav ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(10, 13, 22, .85); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 1.15rem; color: var(--fg); letter-spacing: .02em; }
.logo:hover { text-decoration: none; }
.logo-mark { width: 30px; height: 30px; border-radius: 8px; background: linear-gradient(135deg, var(--orange), var(--orange-2)); display: grid; place-items: center; color: var(--orange-ink); font-weight: 800; box-shadow: 0 0 24px rgba(255, 122, 26, .35); }
.nav-links { display: flex; gap: 22px; margin-left: auto; align-items: center; }
.nav-links a { color: var(--fg-2); font-weight: 500; font-size: .95rem; }
.nav-links a:hover { color: var(--fg); text-decoration: none; }
@media (max-width: 760px) { .nav-links a.hide-m { display: none; } }

/* ---------- buttons & forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--fg);
  font-family: var(--display); font-weight: 600; font-size: .95rem; letter-spacing: .02em; padding: 11px 18px; border-radius: var(--radius-s); cursor: pointer; transition: .15s;
  white-space: nowrap;
}
.btn:hover { border-color: var(--fg-3); text-decoration: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: linear-gradient(180deg, var(--orange-2), var(--orange)); color: var(--orange-ink); border-color: transparent; box-shadow: 0 6px 24px rgba(255, 122, 26, .3); }
.btn-primary:hover { filter: brightness(1.06); border-color: transparent; }
.btn-blue { background: var(--blue); color: #061222; border-color: transparent; }
.btn-ghost { background: transparent; }
.btn-danger { color: var(--bad); border-color: rgba(255, 92, 108, .4); }
.btn-sm { padding: 7px 12px; font-size: .85rem; }
.btn-lg { padding: 15px 26px; font-size: 1.05rem; }
.btn-discord { background: #5865f2; color: #fff; border-color: transparent; }
label.field { display: grid; gap: 6px; font-size: .9rem; color: var(--fg-2); font-weight: 500; }
input, select, textarea {
  font: inherit; color: var(--fg); background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--radius-s); padding: 10px 12px; width: 100%; min-width: 0;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(59, 157, 255, .2); }
textarea { resize: vertical; min-height: 80px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-s); cursor: pointer; background: var(--bg-2); transition: .15s; }
.check:hover { border-color: var(--line-2); }
.check input { width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--orange); flex: none; }
.check .t { font-weight: 600; }
.check .d { font-size: .85rem; color: var(--fg-2); }
.check .pct { margin-left: auto; font-family: var(--display); color: var(--orange-2); font-size: .85rem; white-space: nowrap; }
.check:has(input:checked) { border-color: var(--orange); background: rgba(255, 122, 26, .07); }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card-tight { padding: 16px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.seg { display: inline-flex; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 3px; gap: 3px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; color: var(--fg-2); font: inherit; font-weight: 600; padding: 8px 14px; border-radius: 4px; cursor: pointer; }
.seg button.on { background: var(--surface-2); color: var(--fg); box-shadow: inset 0 0 0 1px var(--line-2); }
.pill { display: inline-flex; align-items: center; gap: 6px; font-family: var(--display); font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--fg-2); white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.pending_payment { color: var(--warn); border-color: rgba(255, 194, 75, .4); }
.pill.paid { color: var(--blue-2); border-color: rgba(59, 157, 255, .4); }
.pill.in_progress { color: var(--orange-2); border-color: rgba(255, 122, 26, .45); }
.pill.completed { color: var(--good); border-color: rgba(61, 220, 132, .4); }
.pill.cancelled { color: var(--bad); border-color: rgba(255, 92, 108, .4); }
.pill.pending { color: var(--warn); } .pill.active { color: var(--good); } .pill.disabled { color: var(--bad); }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--surface-2); border: 1px solid var(--line-2); color: var(--fg); padding: 12px 18px; border-radius: var(--radius-s); box-shadow: var(--shadow); z-index: 100; max-width: min(92vw, 480px); font-weight: 500; }
.toast.err { border-color: var(--bad); }
.toast.ok { border-color: var(--good); }

/* ---------- rank badges ---------- */
.rank-badge { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 600; }
.rank-icon { width: 38px; height: 38px; flex: none; display: grid; place-items: center; position: relative; }
.rank-icon svg { width: 100%; height: 100%; }
.rank-badge .rk { font-size: 1rem; line-height: 1.15; }
.rank-badge .dv { font-size: .78rem; color: var(--fg-2); font-weight: 500; text-transform: uppercase; letter-spacing: .08em; }
.rank-icon.lg { width: 64px; height: 64px; }
/* game chip (short name on an accent colour) */
.game-chip { display: inline-flex; align-items: center; font-family: var(--display); font-size: .7rem; font-weight: 700; letter-spacing: .08em; padding: 2px 7px; border-radius: 4px; color: var(--g, var(--fg)); border: 1px solid color-mix(in srgb, var(--g, var(--fg)) 50%, transparent); background: color-mix(in srgb, var(--g, var(--fg)) 12%, transparent); white-space: nowrap; }

/* rank picker */
.picker { display: grid; gap: 10px; }
.tiers { display: grid; grid-template-columns: repeat(var(--cols, 4), 1fr); gap: 6px; }
.tiers button, .subs button {
  border: 1px solid var(--line); background: var(--bg-2); color: var(--fg-2); font-family: var(--display); font-weight: 600; font-size: .8rem; padding: 9px 6px; border-radius: var(--radius-s); cursor: pointer; transition: .12s;
  text-transform: uppercase; letter-spacing: .04em;
}
.tiers button { border-left: 3px solid var(--tier); }
.tiers button:hover, .subs button:hover { border-color: var(--line-2); color: var(--fg); }
.tiers button.on, .subs button.on { background: var(--surface-2); color: var(--fg); border-color: var(--tier, var(--blue)); box-shadow: 0 0 0 1px var(--tier, var(--blue)) inset; }
.subs { display: grid; grid-template-columns: repeat(var(--cols, 4), 1fr); gap: 6px; }
.subs-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; color: var(--fg-3); font-weight: 600; margin-top: 4px; }

/* progress */
.progress { height: 10px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), var(--orange)); border-radius: 999px; transition: width .6s ease; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.timeline li { display: grid; grid-template-columns: 22px 1fr; gap: 12px; padding-bottom: 18px; position: relative; }
.timeline li::before { content: ""; position: absolute; left: 10px; top: 20px; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline .dot { width: 22px; height: 22px; border-radius: 50%; background: var(--surface-2); border: 2px solid var(--line-2); display: grid; place-items: center; font-size: .7rem; }
.timeline li.done .dot { border-color: var(--good); color: var(--good); }
.timeline li.now .dot { border-color: var(--orange); background: var(--orange); color: var(--orange-ink); box-shadow: 0 0 0 5px rgba(255, 122, 26, .2); }
.timeline .tt { font-weight: 600; }
.timeline .ts { font-size: .8rem; color: var(--fg-3); }

/* chat */
.chat { display: grid; grid-template-rows: 1fr auto; height: 420px; max-height: 60vh; }
.chat-log { overflow-y: auto; padding: 14px; display: grid; gap: 10px; align-content: start; background: var(--bg-2); border-radius: var(--radius-s) var(--radius-s) 0 0; border: 1px solid var(--line); border-bottom: 0; }
.msg { max-width: 80%; padding: 9px 12px; border-radius: 10px; font-size: .95rem; line-height: 1.4; word-break: break-word; }
.msg .who { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--fg-3); margin-bottom: 3px; font-family: var(--display); }
.msg.me { justify-self: end; background: rgba(255, 122, 26, .16); border: 1px solid rgba(255, 122, 26, .35); border-bottom-right-radius: 2px; }
.msg.them { justify-self: start; background: var(--surface-2); border: 1px solid var(--line-2); border-bottom-left-radius: 2px; }
.msg.system { justify-self: center; max-width: 92%; background: transparent; border: 1px dashed var(--line-2); color: var(--fg-2); font-size: .85rem; text-align: center; }
.chat-form { display: flex; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 0 0 var(--radius-s) var(--radius-s); background: var(--surface); }
.chat-form input { flex: 1; }

/* tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; font-size: .92rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
th { font-family: var(--display); font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--fg-3); background: var(--bg-2); position: sticky; top: 0; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: rgba(255, 255, 255, .02); }

/* stat tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.tile .v { font-family: var(--display); font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; }
.tile .k { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--fg-3); margin-top: 6px; font-weight: 600; }

/* modal / drawer */
.overlay { position: fixed; inset: 0; background: rgba(4, 6, 12, .7); backdrop-filter: blur(4px); z-index: 80; display: grid; place-items: center; padding: 16px; }
.modal { width: min(560px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal-body { padding: 22px; display: grid; gap: 14px; }
.x { background: transparent; border: 0; color: var(--fg-2); font-size: 1.4rem; cursor: pointer; line-height: 1; padding: 4px 8px; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(720px, 100%); background: var(--bg-2); border-left: 1px solid var(--line); z-index: 90; overflow-y: auto; box-shadow: var(--shadow); padding-right: env(safe-area-inset-right, 0px); }
.drawer-head { position: sticky; top: 0; background: var(--bg-2); padding: 16px 22px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; z-index: 1; }
.drawer-body { padding: 22px; display: grid; gap: 18px; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 6px 14px; font-size: .95rem; }
.kv dt { color: var(--fg-3); } .kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.secret { font-family: ui-monospace, Menlo, Consolas, monospace; background: var(--bg); border: 1px dashed var(--line-2); padding: 10px 12px; border-radius: var(--radius-s); display: grid; gap: 6px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tabs button { background: transparent; border: 0; color: var(--fg-2); font: inherit; font-family: var(--display); font-weight: 600; padding: 12px 16px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button.on { color: var(--fg); border-bottom-color: var(--orange); }
.tabs .count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; border-radius: 10px; background: var(--surface-2); font-size: .72rem; padding: 0 6px; margin-left: 6px; color: var(--fg-2); }
.order-card { display: grid; gap: 12px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); transition: .15s; }
.order-card:hover { border-color: var(--line-2); }
.order-card .price { font-family: var(--display); font-size: 1.25rem; font-weight: 700; }
.order-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.empty { padding: 40px 20px; text-align: center; color: var(--fg-3); border: 1px dashed var(--line-2); border-radius: var(--radius); }
.notice { padding: 12px 14px; border-radius: var(--radius-s); border: 1px solid; font-size: .92rem; }
.notice.info { border-color: rgba(59, 157, 255, .4); background: rgba(59, 157, 255, .08); }
.notice.warn { border-color: rgba(255, 194, 75, .4); background: rgba(255, 194, 75, .08); }
.notice.good { border-color: rgba(61, 220, 132, .4); background: rgba(61, 220, 132, .08); }
.stars { display: inline-flex; gap: 2px; }
.stars button { background: transparent; border: 0; font-size: 1.6rem; color: var(--fg-3); cursor: pointer; padding: 0 2px; }
.stars button.on { color: var(--gold); }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line-2); display: grid; place-items: center; font-family: var(--display); font-weight: 700; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
footer { border-top: 1px solid var(--line); padding-block: 32px; color: var(--fg-3); font-size: .9rem; }
/* accepted payment methods (text chips, no brand logos) */
.pay-methods { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.pay-methods .pm { font-family: var(--display); font-size: .78rem; font-weight: 600; letter-spacing: .02em; padding: 4px 10px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--fg-2); white-space: nowrap; }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } html { scroll-behavior: auto; } }
