
:root {
  --brand: #860bff; --brand-hi: #a855ff; --brand-lo: #5b00b8; --pink: #e040fb;
  --bg: #08060f; --bg-2: #110c1f; --card: rgba(24, 17, 42, .72); --card-solid: #18112a; --card-2: rgba(40, 28, 70, .55);
  --line: rgba(160, 120, 255, .16); --line-2: rgba(160, 120, 255, .30);
  --text: #f1ecff; --muted: #a99cc8; --faint: #7a6e98;
  --ok: #34d399; --warn: #fbbf24; --bad: #f87171;
  --bronze: #e0a36b; --silver: #d4dbe8; --gold: #f8c94a;
  --radius: 16px; --shadow: 0 20px 50px -20px rgba(0,0,0,.7), 0 0 0 1px var(--line);
  --glow: 0 0 0 1px rgba(134,11,255,.55), 0 10px 40px -10px rgba(134,11,255,.55);
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f7f4ff; --bg-2: #efe8ff; --card: rgba(255,255,255,.85); --card-solid: #ffffff; --card-2: rgba(134,11,255,.06);
    --line: rgba(90, 30, 180, .14); --line-2: rgba(90, 30, 180, .28);
    --text: #1a1030; --muted: #5d5279; --faint: #8a80a6;
    --bronze: #a0602a; --silver: #5b6577; --gold: #a87c00;
    --shadow: 0 12px 30px -16px rgba(60, 20, 120, .25), 0 0 0 1px var(--line);
  }
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0; color: var(--text); background: var(--bg); min-height: 100vh; position: relative; overflow-x: hidden;
  font: 15px/1.6 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased;
}
/* Background: purple glows + a faint grid that fades out */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(900px 600px at 12% -10%, rgba(134,11,255,.35), transparent 60%),
    radial-gradient(800px 500px at 100% 0%, rgba(224,64,251,.18), transparent 60%),
    radial-gradient(1000px 700px at 50% 120%, rgba(91,0,184,.30), transparent 60%),
    var(--bg);
}
body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .5;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
}
a { color: var(--brand-hi); text-decoration: none; }
a:hover { text-decoration: underline; }
code, .mono { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: .9em; }
code { background: var(--card-2); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; overflow-wrap: anywhere; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(30px, 5.4vw, 58px); letter-spacing: -.03em; }
h2 { font-size: 21px; } h3 { font-size: 16px; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: 13px; }
.grad { background: linear-gradient(120deg, #c49bff, var(--brand) 45%, var(--pink)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Layout */
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.topbar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); border-bottom: 1px solid var(--line); }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 12px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--text); font-size: 18px; white-space: nowrap; }
.logo:hover { text-decoration: none; }
.logo img { width: 38px; height: 38px; filter: drop-shadow(0 4px 14px rgba(134,11,255,.6)); }
.nav { display: flex; align-items: center; gap: 8px; }
.nav a.link { color: var(--muted); font-weight: 600; padding: 8px 10px; border-radius: 10px; }
.nav a.link:hover { color: var(--text); text-decoration: none; background: var(--card-2); }
.user { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--card-2); object-fit: cover; border: 1px solid var(--line-2); }
.footer { border-top: 1px solid var(--line); margin-top: 80px; padding: 32px 0; color: var(--faint); font-size: 13px; }
.footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }
.footer .brand { display: flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 700; }
.footer img { width: 22px; height: 22px; }

/* Buttons and forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line-2); background: var(--card-2); color: var(--text); padding: 9px 16px; border-radius: 11px; font: inherit; font-weight: 650; cursor: pointer; text-decoration: none; white-space: nowrap; transition: transform .12s ease, filter .12s ease, box-shadow .12s ease; }
.btn:hover { text-decoration: none; filter: brightness(1.12); transform: translateY(-1px); }
.btn:disabled, .btn.primary:disabled, .btn.ok:disabled, .btn.warn:disabled { opacity: 1; background: transparent; color: var(--faint); border: 1px dashed var(--line-2); box-shadow: none; cursor: not-allowed; filter: none; transform: none; }
.btn.primary { background: linear-gradient(135deg, var(--brand-hi), var(--brand) 55%, var(--brand-lo)); border-color: transparent; color: #fff; box-shadow: var(--glow); }
.btn.ok { background: linear-gradient(135deg, #34d399, #10b981); border-color: transparent; color: #04140d; }
.btn.warn { background: linear-gradient(135deg, #fcd34d, #f59e0b); border-color: transparent; color: #1c1300; }
.btn.bad { background: transparent; border-color: color-mix(in srgb, var(--bad) 55%, transparent); color: var(--bad); }
.btn.ghost { background: transparent; }
.btn.big { padding: 13px 24px; font-size: 16px; border-radius: 13px; }
.btn.sm { padding: 6px 11px; font-size: 13px; border-radius: 9px; }
.btn.discord { background: #5865f2; border-color: #5865f2; color: #fff; }
form.inline { display: inline; }
label { display: block; font-weight: 650; margin: 0 0 6px; font-size: 14px; }
.field { margin-bottom: 14px; }
.hint { color: var(--muted); font-size: 13px; margin-top: 6px; }
input[type=text], input[type=number], input[type=password], input[type=color], select, textarea {
  width: 100%; background: color-mix(in srgb, var(--bg-2) 85%, transparent); color: var(--text); border: 1px solid var(--line-2); border-radius: 11px; padding: 10px 12px; font: inherit;
}
input[type=color] { padding: 4px; height: 44px; cursor: pointer; }
input:disabled, select:disabled, textarea:disabled, textarea[readonly] { opacity: .55; cursor: not-allowed; }
textarea { min-height: 80px; resize: vertical; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 14px; }
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--brand) 70%, transparent); outline-offset: 1px; border-color: transparent; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.row > .grow { flex: 1 1 220px; }

/* Cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.card + .card { margin-top: 16px; }
.grid > .card + .card, .servers > .card + .card, .tiles > .card + .card { margin-top: 0; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h2, .card-head h3 { margin: 0; }
.card-head > .controls { margin-left: auto; align-items: center; }
.card-head form.inline.row { display: inline-flex; gap: 6px; align-items: center; margin: 0; }
.card-head form.inline.row input { margin: 0; }
.card.glow { box-shadow: var(--glow); border-color: transparent; }
.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.section-title { display: flex; align-items: center; gap: 10px; margin: 30px 0 12px; font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); font-weight: 800; }
.section-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* Pills and plan chips */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 750; border: 1px solid var(--line-2); background: var(--card-2); color: var(--muted); white-space: nowrap; }
.pill.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 45%, transparent); }
.pill.warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, transparent); }
.pill.bad { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, transparent); }
.pill.brand { color: #fff; background: var(--brand); border-color: transparent; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; border: 1px solid; }
.chip.bronze { color: var(--bronze); border-color: color-mix(in srgb, var(--bronze) 50%, transparent); background: color-mix(in srgb, var(--bronze) 10%, transparent); }
.chip.silver { color: var(--silver); border-color: color-mix(in srgb, var(--silver) 45%, transparent); background: color-mix(in srgb, var(--silver) 8%, transparent); }
.chip.gold { color: var(--gold); border-color: color-mix(in srgb, var(--gold) 50%, transparent); background: color-mix(in srgb, var(--gold) 10%, transparent); }
.chip.locked::before { content: "🔒"; font-size: 10px; margin-right: 2px; }
.flash { border-radius: 13px; padding: 13px 16px; margin-bottom: 18px; border: 1px solid var(--line-2); background: var(--card); white-space: pre-line; box-shadow: var(--shadow); }
.flash.ok { border-color: color-mix(in srgb, var(--ok) 55%, transparent); }
.flash.bad { border-color: color-mix(in srgb, var(--bad) 55%, transparent); }

/* Banner (setup questions) */
.banner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 16px 18px; margin-bottom: 18px; border-radius: 16px; background: linear-gradient(135deg, rgba(134,11,255,.40), rgba(224,64,251,.16)); border: 1px solid var(--line-2); box-shadow: var(--glow); }
.q { counter-increment: q; }
.q > .card-head h2::before { content: counter(q); display: inline-grid; place-items: center; width: 28px; height: 28px; margin-right: 10px; border-radius: 9px; background: var(--brand); color: #fff; font-size: 14px; vertical-align: 2px; }
.wizard { counter-reset: q; display: grid; gap: 16px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; margin: 8px 0; line-height: 1.45; }
.check span { flex: 1; }
.check input { margin-top: 2px; flex: none; }
.check input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--brand); }
.status-big { font-size: 28px; font-weight: 850; }

/* Locked */
.locked { position: relative; overflow: hidden; }
.locked::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(135deg, transparent 0 14px, rgba(134,11,255,.05) 14px 28px); pointer-events: none; }
.locked > * { position: relative; }
.lockbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: var(--card-2); border: 1px dashed var(--line-2); }
.lockbar span { color: var(--muted); font-size: 14px; }

/* Landing */
.hero { padding: 64px 0 36px; text-align: center; }
.hero .logo-big { width: 160px; height: 160px; margin: 0 auto 22px; display: block; filter: drop-shadow(0 16px 50px rgba(134,11,255,.7)); }
.hero p.lead { font-size: 18px; color: var(--muted); max-width: 660px; margin: 0 auto 30px; }
.hero .cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 750; color: var(--brand-hi); letter-spacing: .12em; text-transform: uppercase; font-size: 12px; margin-bottom: 16px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--card-2); }
.strip { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; margin: 34px auto 0; max-width: 820px; }
.strip .s { text-align: center; padding: 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.strip .n { font-size: 26px; font-weight: 850; } .strip .l { color: var(--muted); font-size: 13px; }
.section { padding: 48px 0 8px; }
.section > h2 { text-align: center; font-size: 30px; margin-bottom: 8px; }
.section > p.sub { text-align: center; color: var(--muted); margin: 0 auto 28px; max-width: 620px; }
.feature { display: flex; flex-direction: column; gap: 6px; }
.feature .top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.feature .icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 21px; background: linear-gradient(135deg, rgba(134,11,255,.35), rgba(224,64,251,.18)); border: 1px solid var(--line-2); }
.feature h3 { margin: 6px 0 0; }
.feature p { color: var(--muted); margin: 0; font-size: 14px; }
.steps { counter-reset: step; }
.step { position: relative; padding-left: 56px; }
.step::before { counter-increment: step; content: counter(step); position: absolute; left: 20px; top: 20px; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-weight: 800; color: #fff; background: var(--brand); }
.tier { display: flex; flex-direction: column; }
.tier.featured { box-shadow: var(--glow); border-color: transparent; }
.tier .price { font-size: 40px; font-weight: 850; margin: 6px 0 4px; letter-spacing: -.02em; }
.tier .price small { font-size: 14px; color: var(--muted); font-weight: 500; }
.tier .tag { color: var(--muted); font-size: 14px; min-height: 44px; }
.tier ul { list-style: none; padding: 0; margin: 14px 0 20px; flex: 1; }
.tier li { padding: 6px 0 6px 26px; position: relative; font-size: 14px; border-bottom: 1px solid var(--line); }
.tier li::before { content: "✓"; position: absolute; left: 4px; color: var(--brand-hi); font-weight: 900; }
.cta-band { margin-top: 56px; padding: 40px 24px; text-align: center; border-radius: 22px; background: linear-gradient(135deg, rgba(134,11,255,.45), rgba(224,64,251,.20)); border: 1px solid var(--line-2); box-shadow: var(--glow); }
details.faq { border-bottom: 1px solid var(--line); padding: 14px 0; }
details.faq summary { cursor: pointer; font-weight: 700; list-style: none; }
details.faq summary::after { content: "+"; float: right; color: var(--brand-hi); font-weight: 900; }
details.faq[open] summary::after { content: "–"; }
details.faq p { color: var(--muted); margin: 10px 0 0; }

/* Dashboard */
.servers { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.server { display: grid; grid-template-columns: 48px minmax(0, 1fr) 104px; align-items: center; gap: 12px; padding: 16px; }
.server .btn { width: 104px; }
.server .meta { min-width: 0; }
.server .name { font-weight: 750; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.server .sub { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gicon { width: 48px; height: 48px; border-radius: 14px; background: linear-gradient(135deg, var(--brand), var(--brand-lo)); color: #fff; display: grid; place-items: center; font-weight: 850; overflow: hidden; flex: none; }
.gicon img { width: 100%; height: 100%; object-fit: cover; }
.shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 28px; margin-top: 26px; }
.side { position: sticky; top: 88px; align-self: start; display: flex; flex-direction: column; gap: 2px; }
.side .guild { display: flex; align-items: center; gap: 10px; padding: 4px 4px 16px; font-weight: 800; }
.side .guild .gicon { width: 40px; height: 40px; border-radius: 12px; }
.side .grp { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); font-weight: 800; margin: 14px 10px 4px; }
.side a { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); padding: 8px 12px; border-radius: 11px; font-weight: 620; white-space: nowrap; }
.side a:hover { background: var(--card-2); color: var(--text); text-decoration: none; }
.side a.active { background: linear-gradient(90deg, rgba(134,11,255,.35), rgba(134,11,255,.08)); color: var(--text); box-shadow: inset 2px 0 0 var(--brand); }
.side .plan { margin-top: 16px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); font-size: 13px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h1 { font-size: 30px; margin: 0; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.tiles { display: grid; gap: 12px; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 16px; }
.tile { padding: 16px 18px; }
.tile .k { color: var(--faint); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; font-weight: 800; display: flex; justify-content: space-between; gap: 6px; }
.tile .v { font-size: 20px; font-weight: 800; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .d { color: var(--muted); font-size: 12px; }
.stat { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.stat .k { color: var(--faint); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; font-weight: 800; }
.stat .v { font-size: 17px; font-weight: 750; overflow-wrap: anywhere; }
.controls { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.card .controls + .controls, .card form + .controls, .card .controls + form { margin-top: 12px; }
.flags { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.flags .btn { width: 100%; justify-content: flex-start; }
.lapbar { height: 10px; border-radius: 99px; background: var(--card-2); overflow: hidden; border: 1px solid var(--line); margin: 8px 0 4px; }
.lapbar span { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--pink)); }
.msg { border-top: 1px solid var(--line); padding-top: 18px; margin-top: 18px; }
.msg:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.players { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px; max-height: 260px; overflow: auto; }
.players div { padding: 6px 10px; border-radius: 9px; background: var(--card-2); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--faint); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; }
tbody tr:hover { background: var(--card-2); }
.table-wrap { overflow-x: auto; }
.compare td, .compare th { text-align: center; }
.compare td:first-child, .compare th:first-child { text-align: left; }
.compare .cat td { text-align: left; font-weight: 800; color: var(--brand-hi); background: var(--card-2); }
.compare .yes { color: var(--ok); font-weight: 900; } .compare .no { color: var(--faint); }
.rank { font-weight: 850; width: 52px; }
details.edit > summary { cursor: pointer; color: var(--brand-hi); font-weight: 650; display: inline-block; }
details.edit[open] > summary { margin-bottom: 14px; }
.swatch { display: inline-block; width: 18px; height: 18px; border-radius: 6px; vertical-align: middle; border: 1px solid var(--line-2); }
.dev { box-shadow: 0 0 0 1px rgba(224,64,251,.6), 0 10px 40px -12px rgba(224,64,251,.5); }

@media (max-width: 980px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; flex-direction: row; overflow-x: auto; gap: 4px; padding-bottom: 6px; }
  .side .guild, .side .grp, .side .plan { display: none; }
  .grid.two, .grid.three { grid-template-columns: 1fr; }
  .strip { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 560px) {
  .user .small, .nav .hide-sm { display: none; }
  .nav .btn { padding: 8px 12px; }
  .servers { grid-template-columns: 1fr; }
  .server { grid-template-columns: 44px minmax(0,1fr) 92px; }
  .server .btn { width: 92px; }
  .tiles { grid-template-columns: 1fr 1fr; }
  .tile .v { font-size: 17px; }
  .hero .logo-big { width: 120px; height: 120px; }
}
