:root {
  --bg: #07111f;
  --bg2: #0c1a2e;
  --card: rgba(14, 28, 48, 0.88);
  --line: rgba(120, 190, 220, 0.16);
  --text: #e8f2f8;
  --muted: #8aa3b8;
  --accent: #2fd3c8;
  --accent2: #3aa0ff;
  --warn: #f0b429;
  --danger: #ff6b6b;
  --ok: #3dcf8e;
  --radius: 14px;
  --font-display: "Syne", "Segoe UI", sans-serif;
  --font-body: "Manrope", "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(1200px 700px at 12% -10%, rgba(47, 211, 200, 0.18), transparent 55%),
    radial-gradient(900px 600px at 95% 8%, rgba(58, 160, 255, 0.16), transparent 50%),
    linear-gradient(180deg, #07111f 0%, #0a1628 45%, #07111f 100%);
  min-height: 100vh;
}
body.landing {
  background: #040a14;
  overflow-x: hidden;
}
.attack-map {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
.map-veil {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 55% at 50% 35%, transparent 20%, rgba(4, 10, 20, 0.55) 70%, rgba(4, 10, 20, 0.88) 100%),
    linear-gradient(180deg, rgba(4, 10, 20, 0.35) 0%, transparent 25%, transparent 55%, rgba(4, 10, 20, 0.75) 100%);
}
body.landing .wrap { position: relative; z-index: 2; }
body.landing .nav {
  background: rgba(4, 10, 20, 0.55);
}
body.landing .hero-panel,
body.landing .card,
body.landing .cta-band {
  backdrop-filter: blur(10px);
  background: rgba(10, 22, 40, 0.72);
}
body.landing .hero-panel {
  background:
    linear-gradient(160deg, rgba(47,211,200,.12), transparent 40%),
    rgba(10, 22, 40, 0.78);
}
body.landing .cta-band {
  background:
    linear-gradient(120deg, rgba(58,160,255,.18), transparent 45%),
    linear-gradient(300deg, rgba(47,211,200,.14), transparent 40%),
    rgba(10, 22, 40, 0.78);
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: #7df0e8; }
.wrap { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 0; position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(12px); background: rgba(7, 17, 31, 0.72);
  border-bottom: 1px solid transparent;
}
.brand {
  font-family: var(--font-display); font-weight: 800; font-size: 22px;
  letter-spacing: 0.02em; color: var(--text);
}
.brand span { color: var(--accent); }
.nav-actions { display: flex; gap: 10px; align-items: center; }
.btn, button {
  appearance: none; border: 0; cursor: pointer;
  font-family: var(--font-body); font-weight: 700;
  border-radius: 999px; padding: 10px 18px; font-size: 14px;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover, button:hover { transform: translateY(-1px); }
.btn-primary, button.primary {
  background: linear-gradient(135deg, var(--accent), #1fb8c8 55%, var(--accent2));
  color: #042028; box-shadow: 0 8px 24px rgba(47, 211, 200, 0.25);
}
.btn-ghost, button.ghost {
  background: transparent; color: var(--text);
  border: 1px solid var(--line);
}
.btn-danger { background: rgba(255,107,107,.15); color: var(--danger); border: 1px solid rgba(255,107,107,.35); }

.hero {
  padding: 72px 0 56px;
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 40px; align-items: center;
}
.hero h1 {
  font-family: var(--font-display); font-size: clamp(34px, 5vw, 56px);
  line-height: 1.08; margin: 0 0 18px; letter-spacing: -0.02em;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p { color: var(--muted); font-size: 17px; line-height: 1.7; margin: 0 0 28px; max-width: 34em; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-panel {
  border: 1px solid var(--line); border-radius: 22px; padding: 22px;
  background:
    linear-gradient(160deg, rgba(47,211,200,.12), transparent 40%),
    linear-gradient(0deg, rgba(12,26,46,.9), rgba(12,26,46,.9));
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
  min-height: 320px;
}
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.stat {
  border: 1px solid var(--line); border-radius: 14px; padding: 14px;
  background: rgba(7,17,31,.45);
}
.stat b { display: block; font-size: 22px; font-family: var(--font-display); margin-bottom: 4px; }
.stat span { color: var(--muted); font-size: 13px; }

.section { padding: 56px 0; }
.section h2 {
  font-family: var(--font-display); font-size: 30px; margin: 0 0 10px;
}
.section .lead { color: var(--muted); margin: 0 0 28px; max-width: 40em; line-height: 1.6; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; min-height: 160px;
}
.card h3 { margin: 0 0 10px; font-family: var(--font-display); font-size: 18px; }
.card p { margin: 0; color: var(--muted); line-height: 1.65; font-size: 14px; }
.card .tag {
  display: inline-block; margin-bottom: 12px; font-size: 12px; color: var(--accent);
  border: 1px solid rgba(47,211,200,.35); border-radius: 999px; padding: 3px 10px;
}
.price-table-wrap { max-width: 1180px; margin: 0 auto; }
.price-table-scroll {
  overflow-x: auto; border-radius: 12px;
  border: 1px solid rgba(86,180,255,.22);
  background: rgba(10,18,36,.88);
  backdrop-filter: blur(8px);
  box-shadow: 0 12px 40px rgba(0,0,0,.28);
}
.price-table {
  width: 100%; min-width: 980px; border-collapse: collapse;
  background: transparent; color: #d7e3f4; font-size: 14px;
}
.price-table th {
  background: rgba(20,32,56,.95); color: #9fb4d0; font-weight: 700; text-align: center;
  padding: 14px 10px; border-bottom: 1px solid rgba(86,180,255,.18); white-space: nowrap;
}
.price-table td {
  text-align: center; padding: 16px 10px;
  border-bottom: 1px solid rgba(86,180,255,.12);
  background: rgba(12,22,42,.55);
}
.price-table tbody tr:nth-child(even) td { background: rgba(16,28,52,.72); }
.price-table tbody tr:hover td { background: rgba(30,52,88,.55); }
.price-table .col-name { text-align: left; padding-left: 18px; font-weight: 600; color: #f2f7ff; }
.price-table .col-price {
  color: #ff5a6a; font-weight: 800; font-size: 18px; white-space: nowrap;
}
.price-table .btn-buy {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 88px; height: 34px; padding: 0 14px; border-radius: 6px;
  background: rgba(58,160,255,.16); color: #7ec8ff; border: 1px solid rgba(58,160,255,.45);
  font-size: 13px; font-weight: 600; text-decoration: none;
}
.price-table .btn-buy:hover {
  background: rgba(58,160,255,.28); color: #fff; border-color: rgba(62,198,255,.7);
}

.cta-band {
  margin: 20px 0 60px; border-radius: 22px; padding: 36px;
  border: 1px solid var(--line);
  background:
    linear-gradient(120deg, rgba(58,160,255,.18), transparent 45%),
    linear-gradient(300deg, rgba(47,211,200,.14), transparent 40%),
    rgba(10,22,40,.9);
  display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap;
}
.cta-band h3 { margin: 0 0 8px; font-family: var(--font-display); font-size: 26px; }
.cta-band p { margin: 0; color: var(--muted); }

.footer {
  border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: 13px;
}

/* console */
.app-shell { min-height: 100vh; }
.app-top {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 0; border-bottom: 1px solid var(--line); margin-bottom: 22px;
}
.console {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 100vh;
}
.sidebar {
  position: sticky; top: 0; align-self: start; height: 100vh;
  display: flex; flex-direction: column;
  padding: 22px 16px;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(47,211,200,.08), transparent 28%),
    rgba(8, 16, 28, 0.96);
}
.side-brand { display: inline-block; margin-bottom: 28px; }
.side-nav { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.side-item {
  width: 100%; text-align: left; border-radius: 12px !important;
  padding: 12px 14px !important; font-weight: 600 !important;
  background: transparent; color: var(--muted);
  border: 1px solid transparent !important;
}
.side-item:hover { background: rgba(47,211,200,.08); color: var(--text); transform: none; }
.side-item.on {
  background: rgba(47,211,200,.14);
  color: var(--accent);
  border-color: rgba(47,211,200,.35) !important;
}
.side-foot {
  padding-top: 16px; border-top: 1px solid var(--line);
}
.side-copy { margin-top: 14px; color: var(--muted); font-size: 12px; }
.console-main {
  padding: 24px 28px 40px;
  min-width: 0;
}
.panel {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px;
}
.panel + .panel { margin-top: 16px; }
.panel h2 { margin: 0 0 14px; font-size: 18px; font-family: var(--font-display); }
.meta { color: var(--muted); font-size: 13px; margin-bottom: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 600; font-size: 12px; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.auth-box {
  width: min(420px, 100%); margin: 60px auto; padding: 28px;
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
}
.auth-box h1 { margin: 0 0 8px; font-family: var(--font-display); font-size: 28px; }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.field input, .field select, .field textarea,
.toolbar input, .toolbar select,
.rule-row input, .rule-row select {
  border-radius: 10px; border: 1px solid var(--line);
  background: rgba(7, 17, 31, 0.72); color: var(--text);
  padding: 10px 12px; font: inherit;
  outline: none; color-scheme: dark;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input, .field select, .field textarea { width: 100%; }
.toolbar input, .toolbar select {
  min-height: 38px;
}
.field input:focus, .field select:focus, .field textarea:focus,
.toolbar input:focus, .toolbar select:focus,
.rule-row input:focus, .rule-row select:focus {
  border-color: rgba(47, 211, 200, 0.45);
  box-shadow: 0 0 0 3px rgba(47, 211, 200, 0.12);
}
.field input::placeholder, .toolbar input::placeholder, .rule-row input::placeholder {
  color: rgba(138, 163, 184, 0.7);
}
.field select option, .toolbar select option, .rule-row select option {
  background: #0d1b2f; color: var(--text);
}
.rule-row input, .rule-row select {
  width: 100%; min-width: 0; padding: 8px 10px;
}
.tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.tabs button { border-radius: 10px; padding: 8px 14px; }
.tabs button.on { background: rgba(47,211,200,.18); color: var(--accent); border: 1px solid rgba(47,211,200,.35); }
.msg { margin-top: 10px; font-size: 13px; }
.msg.ok { color: var(--ok); }
.msg.err { color: var(--danger); }
.badge {
  display: inline-block; border-radius: 999px; padding: 2px 8px; font-size: 12px;
  border: 1px solid var(--line);
}
.badge.on { color: var(--ok); border-color: rgba(61,207,142,.4); }
.badge.off { color: var(--danger); border-color: rgba(255,107,107,.4); }
.badge.wait { color: var(--warn); border-color: rgba(240,180,41,.4); }
.dlg-mask {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,.55);
  align-items: center; justify-content: center; z-index: 50; padding: 20px;
}
.dlg-mask.show { display: flex; }
.dlg {
  width: min(720px, 100%); max-height: 90vh; overflow: auto;
  background: #0d1b2f; border: 1px solid var(--line); border-radius: 16px; padding: 18px;
}
.dlg.dlg-sm { width: min(420px, 100%); }
.dlg-mask.show { z-index: 60; }
#editMask.show { z-index: 50; }
#ruleMask.show, #batchMask.show, #pwdMask.show { z-index: 70; }
.dlg h3 { margin: 0 0 12px; font-family: var(--font-display); }
.dlg-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.rule-row {
  display: grid;
  grid-template-columns: 1.2fr 1.4fr 0.8fr 0.6fr auto;
  gap: 8px; margin-bottom: 8px; align-items: center;
}
.hide { display: none !important; }
.key { font-family: ui-monospace, Consolas, monospace; font-size: 12px; }

/* 右侧客服浮窗 */
.support-dock {
  position: fixed; right: 0; top: 42%; z-index: 80;
  transform: translateY(-50%);
  width: 64px; background: #121a2e; border: 1px solid #2a3650;
  border-right: 0; border-radius: 12px 0 0 12px;
  box-shadow: -6px 8px 24px rgba(0,0,0,.28);
  padding: 18px 0 10px; display: flex; flex-direction: column; gap: 2px;
}
.support-close {
  position: absolute; top: 2px; right: 6px; width: 20px; height: 20px;
  border: 0; background: transparent; color: #8b9bb8; cursor: pointer; font-size: 16px; line-height: 1;
}
.support-item {
  position: relative; display: flex; flex-direction: column; align-items: center;
  gap: 4px; padding: 10px 6px; color: #c9d7ea; cursor: pointer;
  background: transparent; border: 0; width: 100%; font: inherit;
}
.support-item:hover { color: #3ec6ff; background: rgba(62,198,255,.08); }
.support-ico { font-size: 18px; line-height: 1; }
.support-lab { font-size: 11px; writing-mode: horizontal-tb; text-align: center; line-height: 1.2; }
.support-pop {
  display: none; position: absolute; right: calc(100% + 10px); top: 50%;
  transform: translateY(-50%); min-width: 180px; max-width: 260px;
  background: #fff; color: #1d2733; border-radius: 10px; padding: 12px 14px;
  box-shadow: 0 10px 28px rgba(0,0,0,.22); text-align: left; z-index: 2;
}
.support-pop::after {
  content: ""; position: absolute; right: -6px; top: 50%; transform: translateY(-50%);
  border: 6px solid transparent; border-left-color: #fff;
}
.support-item:hover .support-pop { display: block; }
.support-pop b { display: block; font-size: 13px; margin-bottom: 8px; }
.support-link {
  display: block; color: #1a6dff; text-decoration: none; font-size: 13px;
  padding: 4px 0; word-break: break-all;
}
.support-link:hover { text-decoration: underline; }
.support-empty { color: #8893a4; font-size: 12px; }
.support-msg { border-top: 1px solid #2a3650; margin-top: 4px; padding-top: 12px; }
#msgMask label { display: block; font-size: 12px; color: var(--muted); margin: 8px 0 4px; }
#msgMask input[type=text] {
  width: 100%; height: 40px; border-radius: 10px; border: 1px solid var(--line);
  background: rgba(7,17,31,.72); color: var(--text); padding: 0 12px; font: inherit;
}

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 40px; }
  .cards { grid-template-columns: 1fr; }
  .rule-row { grid-template-columns: 1fr 1fr; }
  .console { grid-template-columns: 1fr; }
  .sidebar {
    position: relative; height: auto;
    border-right: 0; border-bottom: 1px solid var(--line);
  }
  .side-nav { flex-direction: row; flex-wrap: wrap; }
  .side-item { width: auto; }
  .console-main { padding: 16px; }
}
