:root {
  --bg: #070c16;
  --bg-soft: #0d1524;
  --panel: rgba(19, 29, 46, .86);
  --panel-solid: #131d2e;
  --ink: #eaf1fb;
  --muted: #8fa1bd;
  --line: rgba(120, 150, 190, .18);
  --brand: #3d8bff;
  --brand-2: #24d3a5;
  --amber: #f0b348;
  --red: #f0666b;
  --radius: 14px;
  --shadow: 0 18px 50px rgba(0, 0, 0, .45);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(900px 520px at 82% -10%, rgba(61, 139, 255, .22), transparent 65%),
    radial-gradient(700px 420px at 5% 8%, rgba(36, 211, 165, .14), transparent 60%),
    var(--bg);
  color: var(--ink);
  font: 15px/1.65 "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
p { margin: 0; }
code { font-family: "JetBrains Mono", Consolas, monospace; font-size: 12.5px; color: #a8c6ff; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 26px;
  padding: 14px 32px;
  background: rgba(7, 12, 22, .82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; }
.mark {
  width: 34px; height: 34px; display: grid; place-items: center;
  border-radius: 10px; font-weight: 800; font-size: 13px; letter-spacing: .06em;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #06101f;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 15px; }
.brand-text small { color: var(--muted); font-size: 11.5px; letter-spacing: .18em; }
.topnav { display: flex; gap: 22px; margin-left: 8px; }
.topnav a { color: var(--muted); font-size: 14px; transition: color .18s; }
.topnav a:hover { color: var(--ink); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }

.badge {
  padding: 5px 11px; border-radius: 999px; font-size: 12px;
  border: 1px solid var(--line); color: var(--muted);
  background: rgba(255, 255, 255, .03);
}
.badge.on { color: var(--brand-2); border-color: rgba(36, 211, 165, .4); }
.badge.warn { color: var(--amber); border-color: rgba(240, 179, 72, .4); }

/* ---------- buttons ---------- */
.primary-btn, .ghost-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 11px; font-size: 14px; font-weight: 600;
  border: 1px solid transparent; cursor: pointer; transition: transform .12s, box-shadow .2s, background .2s;
}
.primary-btn {
  background: linear-gradient(135deg, var(--brand), #2f7bef);
  color: #fff; box-shadow: 0 10px 26px rgba(61, 139, 255, .32);
}
.primary-btn:hover { transform: translateY(-1px); box-shadow: 0 14px 32px rgba(61, 139, 255, .42); }
.primary-btn:disabled { opacity: .6; cursor: progress; transform: none; }
.ghost-btn { background: rgba(255, 255, 255, .04); border-color: var(--line); color: var(--ink); }
.ghost-btn:hover { background: rgba(255, 255, 255, .08); }
.ghost-btn.small { padding: 7px 13px; font-size: 13px; }
.wide { width: 100%; }
.mini-btn {
  padding: 8px 12px; border-radius: 9px; font-size: 12.5px; cursor: pointer;
  background: rgba(255, 255, 255, .06); border: 1px solid var(--line); color: var(--ink);
}
.mini-btn:hover { background: rgba(255, 255, 255, .12); }

/* ---------- hero ---------- */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: 44px; align-items: center;
  padding: 74px 32px 54px; max-width: 1240px; margin: 0 auto;
}
.eyebrow {
  font-size: 12px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--brand-2); margin-bottom: 16px;
}
.hero h1 { font-size: clamp(30px, 4vw, 46px); font-weight: 800; }
.hero h1 span {
  background: linear-gradient(120deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lead { margin-top: 18px; color: var(--muted); font-size: 15.5px; max-width: 560px; }
.hero-actions { display: flex; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 34px; margin-top: 38px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat-value { font-size: 24px; font-weight: 700; }
.stat-label { font-size: 12.5px; color: var(--muted); letter-spacing: .04em; }

.hero-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 18px;
  padding: 20px 22px; box-shadow: var(--shadow); backdrop-filter: blur(10px);
}
.card-head { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand-2); box-shadow: 0 0 0 4px rgba(36, 211, 165, .16); }
.dot.off { background: var(--red); box-shadow: 0 0 0 4px rgba(240, 102, 107, .16); }
.line-list { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.line-list li {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 13px; border-radius: 11px; font-size: 13.5px;
  background: rgba(255, 255, 255, .035); border: 1px solid var(--line);
}
.line-list .port { font-family: Consolas, monospace; color: #a8c6ff; font-size: 13px; }
.card-foot { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }

/* ---------- sections ---------- */
.section { max-width: 1240px; margin: 0 auto; padding: 46px 32px; }
.section-head { margin-bottom: 22px; }
.section-head h2 { font-size: 23px; font-weight: 700; }
.section-head p { color: var(--muted); font-size: 14px; margin-top: 6px; }
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 30px; }

.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
}
.table-wrap { padding: 6px 4px; overflow-x: auto; }
table.grid { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.grid th, table.grid td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); }
table.grid th { color: var(--muted); font-weight: 600; font-size: 12.5px; letter-spacing: .04em; }
table.grid tr:last-child td { border-bottom: none; }
.pill {
  display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11.5px;
  border: 1px solid rgba(36, 211, 165, .4); color: var(--brand-2); background: rgba(36, 211, 165, .1);
}
.pill.off { border-color: rgba(240, 102, 107, .4); color: var(--red); background: rgba(240, 102, 107, .1); }
.pill.warn { border-color: rgba(240, 179, 72, .4); color: var(--amber); background: rgba(240, 179, 72, .1); }

/* ---------- plans ---------- */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.plan {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; display: flex; flex-direction: column; gap: 10px;
  transition: transform .15s, border-color .2s;
}
.plan:hover { transform: translateY(-3px); border-color: rgba(61, 139, 255, .45); }
.plan h3 { font-size: 17px; }
.plan .desc { color: var(--muted); font-size: 13px; min-height: 38px; }
.plan .meta { display: flex; gap: 14px; font-size: 12.5px; color: var(--muted); }
.plan .price { font-size: 22px; font-weight: 700; color: var(--brand-2); }
.plan .price small { font-size: 12px; color: var(--muted); font-weight: 400; }

/* ---------- form ---------- */
.form { display: flex; flex-direction: column; gap: 16px; }
.form label { display: flex; flex-direction: column; gap: 7px; font-size: 13px; color: var(--muted); }
.form input {
  width: 100%; padding: 11px 13px; border-radius: 10px; font-size: 14px;
  background: rgba(7, 12, 22, .72); border: 1px solid var(--line); color: var(--ink);
  font-family: inherit; transition: border-color .18s, box-shadow .18s;
}
.form input:focus { outline: none; border-color: rgba(61, 139, 255, .65); box-shadow: 0 0 0 3px rgba(61, 139, 255, .14); }
.form input[readonly] { color: #a8c6ff; letter-spacing: .04em; }
.hint { font-size: 11.5px; color: #6f819c; }
.inline { display: flex; gap: 8px; }
.msg { font-size: 13px; min-height: 18px; }
.msg.error { color: var(--red); }
.msg.ok { color: var(--brand-2); }

/* ---------- account ---------- */
.form.compact { padding: 15px 16px; margin-bottom: 14px; gap: 8px; }
.form.compact .msg { min-height: 0; }

.account { display: flex; flex-direction: column; gap: 14px; }
.account-row { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; padding-bottom: 11px; border-bottom: 1px dashed var(--line); }
.account-row:last-of-type { border-bottom: none; }
.account-row span:first-child { color: var(--muted); }
.account-row strong { font-weight: 600; }
.remaining { font-size: 26px; font-weight: 800; color: var(--brand-2); }
.remaining small { font-size: 13px; color: var(--muted); font-weight: 400; margin-left: 6px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.chip { padding: 5px 11px; border-radius: 999px; font-size: 12px; border: 1px solid var(--line); color: var(--muted); background: rgba(255, 255, 255, .03); }
.account-actions { display: flex; gap: 10px; margin-top: 4px; flex-wrap: wrap; }

/* ---------- downloads ---------- */
.download-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.download-card {
  display: flex; flex-direction: column; gap: 7px; padding: 20px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  transition: transform .15s, border-color .2s;
}
.download-card:hover { transform: translateY(-3px); border-color: rgba(36, 211, 165, .5); }
.download-card small { color: var(--muted); font-size: 12.5px; }
.dl-icon {
  width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px;
  background: rgba(36, 211, 165, .12); color: var(--brand-2); font-size: 13px; margin-bottom: 4px;
}
.steps { margin: 26px 0 0; padding-left: 20px; color: var(--muted); font-size: 13.5px; display: flex; flex-direction: column; gap: 8px; }

/* ---------- faq ---------- */
.faq details {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 18px; margin-bottom: 10px;
}
.faq summary { cursor: pointer; font-size: 14.5px; font-weight: 600; }
.faq details p { color: var(--muted); font-size: 13.5px; margin-top: 10px; }

/* ---------- footer / toast ---------- */
.footer {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  max-width: 1240px; margin: 0 auto; padding: 30px 32px 46px;
  color: var(--muted); font-size: 12.5px; border-top: 1px solid var(--line);
}
.footer-links { display: flex; gap: 18px; }
.footer-links a:hover { color: var(--ink); }

.toast {
  position: fixed; left: 50%; bottom: 34px; transform: translate(-50%, 20px);
  padding: 11px 20px; border-radius: 11px; font-size: 13.5px;
  background: rgba(19, 29, 46, .96); border: 1px solid var(--line); color: var(--ink);
  box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: all .22s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { border-color: rgba(240, 102, 107, .55); color: #ffd3d4; }
.muted { color: var(--muted); }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 48px; }
  .topnav { display: none; }
  .topbar { padding: 12px 18px; }
  .section, .footer { padding-left: 18px; padding-right: 18px; }
}
