:root {
  --bg: #0d0b14;
  --surface: #16131f;
  --surface-2: #1f1b2e;
  --line: #2a2438;
  --text: #ece9f4;
  --muted: #9a92ad;
  --accent: #7c3aed;
  --accent-2: #14b8a6;
  --gold: #f4b740;
  --danger: #ef4444;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0; font-family: var(--font); color: var(--text);
  background:
    radial-gradient(1100px 600px at 80% -10%, rgba(124,58,237,.18), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(20,184,166,.12), transparent 55%),
    var(--bg);
  min-height: 100vh; -webkit-font-smoothing: antialiased;
}

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; backdrop-filter: blur(10px);
  background: rgba(13,11,20,.7); z-index: 10;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text); text-decoration: none; }
.brand-mark { width: 34px; height: 34px; border-radius: 9px; object-fit: cover; box-shadow: var(--shadow); }
.brand-name { font-size: 18px; letter-spacing: .2px; }
.userbox { font-size: 14px; color: var(--muted); display: flex; gap: 12px; align-items: center; }

.app { max-width: 1040px; margin: 0 auto; padding: 28px 20px 80px; }
.foot { text-align: center; color: var(--muted); font-size: 13px; padding: 24px; }

/* hero / login */
.hero { text-align: center; padding: 70px 16px; }
.hero h1 { font-size: clamp(2rem, 1rem + 5vw, 3.4rem); margin: 0 0 12px; letter-spacing: -.02em; }
.hero p { color: var(--muted); font-size: 18px; max-width: 560px; margin: 0 auto 28px; }

/* ============ marketing landing ============ */
.btn.sm { padding: 7px 14px; font-size: 14px; }
.app.landing-wrap { max-width: none; padding: 0 0 60px; }
.landing-wrap .lp-hero,
.landing-wrap .lp-section,
.landing-wrap .lp-final { max-width: 1120px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }

.grad { background: linear-gradient(100deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }

.lp-hero { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; padding-top: 56px; padding-bottom: 56px; }
.lp-eyebrow { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-2); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; margin-bottom: 18px; background: rgba(20,184,166,.06); }
.lp-hero h1 { font-size: clamp(2.4rem, 1rem + 5vw, 4rem); line-height: 1.04; letter-spacing: -.03em; margin: 0 0 18px; }
.lp-sub { color: var(--muted); font-size: clamp(1rem, .9rem + .4vw, 1.2rem); line-height: 1.6; max-width: 540px; margin: 0 0 26px; }
.lp-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.lp-btn { font-size: 16px; padding: 13px 22px; box-shadow: 0 10px 30px rgba(124,58,237,.35); }
.lp-trust { color: var(--muted); font-size: 13px; margin-top: 18px; }

/* hero mock card */
.lp-hero-visual { display: flex; justify-content: center; }
.mock { width: 100%; max-width: 400px; }
.mock-ping { font-size: 13px; color: var(--muted); margin: 0 4px 8px; }
.mock-mention { color: #c4b5fd; background: rgba(124,58,237,.25); border-radius: 4px; padding: 1px 5px; }
.mock-card { display: flex; background: #1e1f24; border-radius: 8px; overflow: hidden; box-shadow: 0 30px 60px rgba(0,0,0,.5); }
.mock-accent { width: 4px; background: linear-gradient(180deg, var(--accent), var(--accent-2)); }
.mock-inner { padding: 14px 16px; }
.mock-title { font-weight: 700; margin-bottom: 10px; }
.mock-meta { font-size: 14px; color: #d4d2dc; margin: 3px 0; }
.mock-meta b { color: #fff; }
.mock-conf { margin-top: 10px; font-size: 14px; color: #d4d2dc; }
.mock-conf-h { font-weight: 700; color: #fff; font-size: 13px; margin-bottom: 2px; }
.mock-actions { display: flex; gap: 8px; margin: 10px 0 0 4px; }
.mock-join, .mock-leave { font-size: 14px; font-weight: 600; padding: 8px 18px; border-radius: 6px; }
.mock-join { background: #248046; color: #fff; }
.mock-leave { background: #3a3c43; color: #fff; }

/* sections */
.lp-section { padding: 56px 24px; text-align: center; }
.lp-section h2, .lp-final h2 { font-size: clamp(1.7rem, 1rem + 2.4vw, 2.6rem); letter-spacing: -.02em; margin: 0 0 12px; }
.lp-lead { color: var(--muted); font-size: 17px; max-width: 640px; margin: 0 auto 36px; line-height: 1.6; }

.lp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 18px; text-align: left; }
.lp-feature { background: linear-gradient(180deg, var(--surface), #13101c); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; transition: border-color .15s ease, transform .15s ease; }
.lp-feature:hover { border-color: var(--accent); transform: translateY(-3px); }
.lp-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 14px; background: linear-gradient(135deg, rgba(124,58,237,.25), rgba(20,184,166,.2)); border: 1px solid var(--line); color: #fff; }
.lp-ico svg { width: 22px; height: 22px; }
.lp-feature h3 { margin: 0 0 6px; font-size: 18px; }
.lp-feature p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.55; }
.lp-feature b { color: var(--text); font-weight: 600; }

.lp-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; text-align: left; }
.lp-step { padding: 8px 4px; }
.lp-num { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; font-weight: 800; font-size: 18px; margin-bottom: 12px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; }
.lp-step h3 { margin: 0 0 6px; }
.lp-step p { margin: 0; color: var(--muted); line-height: 1.55; }

/* pricing */
.lp-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; max-width: 1040px; margin: 0 auto; text-align: left; }
.lp-plan { position: relative; background: linear-gradient(180deg, var(--surface), #13101c); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.lp-plan.featured { border-color: var(--accent); box-shadow: 0 20px 50px rgba(124,58,237,.25); }
.lp-flag { position: absolute; top: -11px; right: 18px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.lp-plan-name { font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-size: 13px; }
.lp-price { font-size: 40px; font-weight: 800; letter-spacing: -.02em; margin: 6px 0 16px; }
.lp-price span { font-size: 16px; color: var(--muted); font-weight: 600; }
.lp-plan ul { list-style: none; padding: 0; margin: 0 0 20px; }
.lp-plan li { position: relative; padding: 7px 0 7px 26px; color: var(--text); font-size: 15px; border-bottom: 1px solid var(--line); }
.lp-plan li:before { content: "✓"; position: absolute; left: 0; color: var(--accent-2); font-weight: 800; }
.lp-plan .btn { width: 100%; justify-content: center; }

.lp-final { text-align: center; margin: 20px auto 0; padding: 56px 24px; background: radial-gradient(700px 300px at 50% 0%, rgba(124,58,237,.18), transparent 70%); border-top: 1px solid var(--line); }

@media (max-width: 860px) {
  .lp-hero { grid-template-columns: 1fr; gap: 36px; }
  .lp-hero-visual { order: -1; }
}

.btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  border: 1px solid transparent; border-radius: 11px; padding: 11px 18px;
  font: inherit; font-weight: 600; color: #fff; text-decoration: none;
  background: linear-gradient(135deg, var(--accent), #6d28d9); transition: transform .12s ease, filter .12s ease;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.08); }
.btn.secondary { background: var(--surface-2); border-color: var(--line); color: var(--text); }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.card {
  background: linear-gradient(180deg, var(--surface), #13101c);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 18px;
  box-shadow: var(--shadow);
}
.card.click { cursor: pointer; transition: border-color .15s ease, transform .15s ease; }
.card.click:hover { border-color: var(--accent); transform: translateY(-2px); }

.server-head { display: flex; align-items: center; gap: 12px; }
.server-icon { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; background: var(--surface-2); }
.server-name { font-weight: 700; }
.server-sub { color: var(--muted); font-size: 13px; }

.badge { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); }
.badge.paid { color: #0a0a0a; background: linear-gradient(135deg, var(--gold), #e0941f); border-color: transparent; }
.badge.free { color: var(--muted); }

.section-title { display: flex; align-items: center; justify-content: space-between; margin: 28px 0 14px; }
.section-title h2 { margin: 0; font-size: 20px; }
.back { color: var(--muted); cursor: pointer; font-size: 14px; }
.back:hover { color: var(--text); }

label { display: block; font-size: 13px; color: var(--muted); margin: 14px 0 6px; font-weight: 600; }
input[type=text], input[type=url], input[type=number], select {
  width: 100%; padding: 10px 12px; border-radius: 10px; background: var(--surface-2);
  border: 1px solid var(--line); color: var(--text); font: inherit;
}
input:focus, select:focus { outline: none; border-color: var(--accent); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.toggle { display: inline-flex; align-items: center; gap: 8px; color: var(--text); }

.locked { position: relative; }
.locked-overlay {
  margin-top: 10px; font-size: 13px; color: var(--gold);
  border: 1px dashed rgba(244,183,64,.4); border-radius: 10px; padding: 10px 12px;
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 999px; padding: 5px 10px; font-size: 13px; }
.chip b { cursor: pointer; color: var(--muted); }
.chip b:hover { color: var(--danger); }

.stats { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.stat .n { font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.stat .l { color: var(--muted); font-size: 13px; margin-top: 2px; }
.stat .n.accent { color: var(--accent-2); }

.bars { display: flex; align-items: flex-end; gap: 3px; height: 120px; margin-top: 12px; }
.bars > div { flex: 1; background: linear-gradient(180deg, var(--accent), #4c1d95); border-radius: 3px 3px 0 0; min-height: 2px; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--surface-2); border: 1px solid var(--line); padding: 12px 18px;
  border-radius: 12px; box-shadow: var(--shadow); }
.muted { color: var(--muted); }
.savebar { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }

/* premium block — visually distinct from the free settings above it */
.premium-box {
  margin-top: 8px; padding: 16px; border-radius: 12px;
  background: linear-gradient(180deg, rgba(244,183,64,.08), rgba(124,58,237,.06));
  border: 1px solid rgba(244,183,64,.35);
}
.premium-box h3 { margin-top: 0; }
.premium-head { display: flex; align-items: center; gap: 10px; }
.badge.add { color: var(--accent-2); border-color: rgba(20,184,166,.5); }
.badge.setup { color: var(--gold); border-color: rgba(244,183,64,.5); }

.addbtn { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; }
.adminbtns { display: flex; gap: 6px; }
.adminbtns .btn { padding: 6px 10px; font-size: 13px; }
.notice { color: var(--gold); font-size: 13px; margin-top: 8px; }
.game-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.game-row > input[type=text], .game-row > input[type=url], .game-row > select { flex: 1 1 150px; min-width: 120px; width: auto; }
.game-row .gx { flex: 0 0 auto; padding: 8px 12px; }
.game-row input[type=color] { flex: 0 0 46px; width: 46px; height: 40px; padding: 2px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); cursor: pointer; }
@media (max-width: 560px) { .row, .game-row { grid-template-columns: 1fr; } }
