:root {
  --bg: #081018;
  --bg-elev: #0f1a24;
  --line: rgba(180, 210, 230, 0.12);
  --text: #e8f0f5;
  --muted: #8fa3b3;
  --accent: #3ee0b0;
  --accent-2: #f0c35a;
  --danger: #ff6b6b;
  --radius: 18px;
  --font-display: "Syne", system-ui, sans-serif;
  --font-body: "Manrope", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--font-body);
  background: var(--bg);
  line-height: 1.55;
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(62, 224, 176, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(62, 224, 176, 0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 50% 20%, black 10%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.bg-glow {
  position: fixed;
  inset: -20% auto auto 40%;
  width: 55vw;
  height: 55vw;
  background: radial-gradient(circle, rgba(62, 224, 176, 0.18), transparent 65%);
  filter: blur(20px);
  pointer-events: none;
  z-index: 0;
  animation: drift 14s ease-in-out infinite alternate;
}
@keyframes drift {
  from { transform: translate(-8%, 0) scale(1); }
  to { transform: translate(6%, 10%) scale(1.08); }
}

.topbar, main, footer { position: relative; z-index: 1; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px clamp(16px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  background: rgba(8, 16, 24, 0.72);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  background: linear-gradient(145deg, var(--accent), #1a9f7a);
  color: #04120e;
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.02em;
}
.nav {
  display: flex;
  gap: 18px;
}
.nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
}
.nav a:hover { color: var(--text); }
.top-actions { display: flex; gap: 10px; }

.btn {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 10px 16px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn.primary {
  background: var(--accent);
  color: #042018;
}
.btn.ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}
.btn.lg { padding: 14px 22px; font-size: 1rem; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

.hero {
  min-height: calc(100vh - 90px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(40px, 8vh, 100px) clamp(16px, 4vw, 48px) 64px;
  max-width: 980px;
}
.eyebrow {
  color: var(--accent);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 700;
  margin: 0 0 18px;
  animation: fadeUp .7s ease both;
}
.hero-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(4.2rem, 14vw, 8.5rem);
  line-height: 0.9;
  letter-spacing: -0.04em;
  animation: fadeUp .8s ease .05s both;
}
.brand-hero {
  background: linear-gradient(120deg, #fff 20%, var(--accent) 70%, var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  max-width: 34rem;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
  animation: fadeUp .8s ease .12s both;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
  animation: fadeUp .8s ease .18s both;
}
.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 140px));
  gap: 18px;
  margin-top: 48px;
  animation: fadeUp .8s ease .25s both;
}
.hero-metrics strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.6rem;
}
.hero-metrics span { color: var(--muted); font-size: 0.85rem; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

.section {
  padding: 56px clamp(16px, 4vw, 48px) 80px;
  max-width: 1100px;
  margin: 0 auto;
}
.section-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}
.section-head p {
  color: var(--muted);
  max-width: 36rem;
}

.plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 28px;
}
.plan {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color .2s ease, transform .2s ease;
}
.plan:hover { border-color: rgba(62, 224, 176, 0.45); transform: translateY(-2px); }
.plan.featured { border-color: rgba(240, 195, 90, 0.55); box-shadow: inset 0 0 0 1px rgba(240, 195, 90, 0.15); }
.plan h3 { margin: 0; font-family: var(--font-display); font-size: 1.25rem; }
.plan .price {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
}
.plan .price small {
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 500;
  margin-left: 6px;
  text-decoration: line-through;
}
.plan .desc { color: var(--muted); margin: 0; min-height: 2.6em; }
.plan ul {
  margin: 8px 0 16px;
  padding-left: 18px;
  color: var(--muted);
  flex: 1;
}
.plan li { margin: 4px 0; }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 16px;
}
.chip {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  font: inherit;
}
.chip.active {
  color: #042018;
  background: var(--accent);
  border-color: var(--accent);
}

.nodes {
  display: grid;
  gap: 10px;
}
.node {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.7fr 0.7fr;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 26, 36, 0.85);
}
.node .name { font-weight: 700; }
.node .meta { color: var(--muted); font-size: 0.9rem; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
}
.badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}
.badge.online { color: var(--accent); }
.badge.offline { color: var(--danger); }
.badge.busy { color: var(--accent-2); }

.steps {
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}
.steps li {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  background: var(--bg-elev);
  counter-increment: step;
}
.steps li strong {
  display: block;
  font-family: var(--font-display);
  margin-bottom: 4px;
}
.steps li span { color: var(--muted); }

.demo-box {
  margin-top: 24px;
  padding: 20px;
  border-radius: var(--radius);
  border: 1px dashed rgba(62, 224, 176, 0.35);
  background: rgba(62, 224, 176, 0.06);
}
.demo-box h3 { margin: 0 0 8px; font-family: var(--font-display); }
.demo-box code {
  background: rgba(0, 0, 0, 0.35);
  padding: 2px 8px;
  border-radius: 6px;
}

.account-card {
  margin-top: 20px;
  padding: 22px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg-elev);
}
.account-card dl {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 10px 16px;
  margin: 0;
}
.account-card dt { color: var(--muted); }
.account-card dd { margin: 0; font-weight: 600; }

.footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 24px clamp(16px, 4vw, 48px) 40px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
}
.footer-link { color: var(--muted); }

.modal {
  border: none;
  padding: 0;
  background: transparent;
  max-width: 420px;
  width: calc(100% - 32px);
}
.modal::backdrop { background: rgba(0, 0, 0, 0.62); }
.modal-card {
  background: #101b26;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  display: grid;
  gap: 12px;
}
.modal-tabs { display: flex; gap: 8px; }
.tab {
  flex: 1;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 10px;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
}
.tab.active {
  background: rgba(62, 224, 176, 0.15);
  color: var(--accent);
  border-color: rgba(62, 224, 176, 0.35);
}
.modal-card label {
  display: grid;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--muted);
}
.modal-card input {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #0a131b;
  color: var(--text);
  padding: 12px 14px;
  font: inherit;
}
.modal-actions { display: flex; gap: 10px; margin-top: 4px; }
.modal-error { color: var(--danger); margin: 0; font-size: 0.9rem; }

.panel[hidden] { display: none !important; }

@media (max-width: 760px) {
  .nav { display: none; }
  .node {
    grid-template-columns: 1fr 1fr;
  }
  .hero-metrics { grid-template-columns: repeat(3, 1fr); }
}

.modal-wide { max-width: 520px; }
.pay-card { gap: 16px; }
.pay-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.pay-head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
}
.icon-close {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}
.pay-summary {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  background: #0a131b;
}
.pay-summary .row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 6px 0;
  color: var(--muted);
  font-size: 0.95rem;
}
.pay-summary .row strong { color: var(--text); }
.pay-amount {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--accent-2);
}
.pay-methods {
  display: grid;
  gap: 10px;
}
.pay-method {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  cursor: pointer;
  background: transparent;
  color: var(--text);
  text-align: left;
  font: inherit;
}
.pay-method.active {
  border-color: rgba(62, 224, 176, 0.55);
  background: rgba(62, 224, 176, 0.08);
}
.pay-method .pm-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.85rem;
}
.pay-method.wechat .pm-icon { background: #09b66d; color: #fff; }
.pay-method.alipay .pm-icon { background: #1677ff; color: #fff; }
.pay-method .pm-meta { color: var(--muted); font-size: 0.85rem; }

.cashier {
  text-align: center;
  padding: 8px 0 4px;
}
.cashier.wechat { --cash: #09b66d; }
.cashier.alipay { --cash: #1677ff; }
.cashier-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--cash);
  margin-bottom: 8px;
}
.cashier-amount {
  font-family: var(--font-display);
  font-size: 2rem;
  margin: 4px 0 14px;
}
.qr-box {
  width: 200px;
  height: 200px;
  margin: 0 auto 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background:
    linear-gradient(45deg, #0b1520 25%, transparent 25%) -8px 0 / 16px 16px,
    linear-gradient(-45deg, #0b1520 25%, transparent 25%) -8px 0 / 16px 16px,
    linear-gradient(45deg, transparent 75%, #0b1520 75%) -8px 0 / 16px 16px,
    linear-gradient(-45deg, transparent 75%, #0b1520 75%) -8px 0 / 16px 16px,
    #102030;
  position: relative;
  overflow: hidden;
}
.qr-box::after {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: 8px;
  background:
    repeating-linear-gradient(0deg, #111 0 6px, #1c2a38 6px 12px),
    repeating-linear-gradient(90deg, #111 0 6px, #1c2a38 6px 12px);
  opacity: 0.9;
  mix-blend-mode: screen;
}
.qr-logo {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #fff;
  background: var(--cash);
  box-shadow: 0 0 0 4px #0f1a24;
}
.cashier-tip { color: var(--muted); font-size: 0.9rem; margin: 0 0 14px; }
.cashier-actions { display: grid; gap: 10px; }
.pay-success {
  text-align: center;
  padding: 18px 8px;
}
.pay-success .ok {
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(62, 224, 176, 0.15);
  color: var(--accent);
  font-size: 2rem;
}

.orders { display: grid; gap: 12px; margin-top: 8px; }
.order {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg-elev);
  padding: 16px;
}
.order-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}
.order-no { font-weight: 700; }
.order-meta { color: var(--muted); font-size: 0.88rem; margin-top: 4px; }
.order-status {
  font-size: 0.82rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.order-status.pending { background: rgba(240, 195, 90, 0.15); color: var(--accent-2); }
.order-status.paid { background: rgba(62, 224, 176, 0.15); color: var(--accent); }
.order-status.cancelled { background: rgba(255, 107, 107, 0.12); color: var(--danger); }
.order-status.refunded { background: rgba(143, 163, 179, 0.15); color: var(--muted); }
.order-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.order-actions { display: flex; gap: 8px; flex-wrap: wrap; }
