/* ============================================================
   极昼网络 · 前端样式
   ============================================================ */

:root {
  --bg: #FFFFFF;
  --ink: #0B1220;
  --ink-2: #334155;
  --muted: #5B6B82;
  --muted-bg: #F6F8FA;
  --border: #E4E9F0;
  --border-2: #EEF2F7;
  --blue: #2563EB;
  --blue-soft: #EFF4FF;
  --blue-line: #C7DAFF;
  --green: #16A34A;
  --green-soft: #F0FDF4;
  --green-line: #BBF7D0;
  --amber: #D97706;
  --amber-soft: #FFFBEB;
  --amber-line: #FDE68A;
  --red: #DC2626;
  --red-soft: #FEF2F2;
  --dark: #0B1220;
  --dark-2: #121C2E;
  --dark-3: #1B2942;
  --radius: 12px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  letter-spacing: -.011em;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select { font-family: inherit; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.topbar-in {
  display: flex; align-items: center; gap: 28px; height: 62px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; font-size: 16px; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(145deg, #2563EB, #4F46E5);
  display: grid; place-items: center;
  color: #fff; font-size: 15px; font-weight: 700;
  box-shadow: 0 4px 12px -4px rgba(37,99,235,.45);
}
.nav-links { display: flex; gap: 24px; font-size: 14px; color: var(--muted); }
.nav-links a:hover { color: var(--ink); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 38px; padding: 0 16px;
  border-radius: 9px; font-size: 14px; font-weight: 550;
  border: 1px solid transparent;
  transition: all .15s; white-space: nowrap;
}
.btn-p { background: var(--ink); color: #fff; }
.btn-p:hover { background: #1E293B; }
.btn-o { background: #fff; border-color: var(--border); color: var(--ink); }
.btn-o:hover { background: var(--muted-bg); }
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover { background: #1D4ED8; }
.btn-lg { height: 46px; padding: 0 24px; font-size: 15px; border-radius: 10px; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-block { width: 100%; }

/* ---------- Hero ---------- */
.hero {
  padding: 72px 0 60px; position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(700px 320px at 12% -10%, rgba(37,99,235,.09), transparent 70%),
    radial-gradient(600px 300px at 88% 110%, rgba(79,70,229,.07), transparent 70%);
  pointer-events: none;
}
.hero-in { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.tag {
  display: inline-flex; align-items: center; gap: 7px;
  height: 28px; padding: 0 11px; border-radius: 20px;
  background: var(--blue-soft); border: 1px solid var(--blue-line);
  color: var(--blue); font-size: 12.5px; font-weight: 600; margin-bottom: 20px;
}
.tag i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(22,163,74,.16); }
h1 { font-size: 44px; font-weight: 700; letter-spacing: -.038em; line-height: 1.15; margin-bottom: 16px; }
h1 em { font-style: normal; background: linear-gradient(120deg,#2563EB,#4F46E5); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { font-size: 16px; color: var(--muted); max-width: 520px; margin-bottom: 26px; }
.hero-btns { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.hero-meta { display: flex; gap: 22px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.hero-meta b { color: var(--ink); font-weight: 600; }

/* 终端卡 */
.term {
  background: var(--dark); border-radius: 14px; padding: 18px;
  border: 1px solid var(--dark-3);
  box-shadow: 0 20px 48px -18px rgba(11,18,32,.42);
}
.term-bar { display: flex; gap: 6px; margin-bottom: 14px; }
.term-bar i { width: 9px; height: 9px; border-radius: 50%; background: #2C3E5C; }
.term-code {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 12.5px; line-height: 1.95; color: #93A4BF;
  overflow-x: auto; white-space: pre; tab-size: 2;
}
.term-code .k { color: #7C93B8; }
.term-code .v { color: #8FD9A8; }
.term-code .c { color: #4A5D7E; }

/* ---------- 区块 ---------- */
.section { padding: 56px 0; }
.section.alt { background: var(--muted-bg); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.sec-head { text-align: center; margin-bottom: 36px; }
.sec-head h2 { font-size: 29px; font-weight: 680; letter-spacing: -.032em; margin-bottom: 9px; }
.sec-head p { color: var(--muted); max-width: 560px; margin: 0 auto; }

/* ---------- 产品卡 ---------- */
.cat-tabs { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-bottom: 30px; }
.cat-tab {
  height: 34px; padding: 0 15px; border-radius: 8px;
  font-size: 13.5px; font-weight: 500;
  background: #fff; border: 1px solid var(--border); color: var(--ink-2);
  transition: all .13s;
}
.cat-tab:hover { border-color: var(--blue-line); background: var(--blue-soft); }
.cat-tab.active { background: var(--ink); border-color: var(--ink); color: #fff; }

.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.plan {
  border: 1px solid var(--border); border-radius: 14px;
  padding: 24px 22px; background: #fff;
  display: flex; flex-direction: column;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.plan:hover { border-color: var(--blue-line); box-shadow: 0 12px 32px -16px rgba(37,99,235,.24); transform: translateY(-2px); }
.plan.hot { border-color: var(--ink); box-shadow: 0 14px 36px -16px rgba(11,18,32,.28); }
.plan-badge {
  align-self: flex-start;
  background: var(--ink); color: #fff;
  font-size: 11px; font-weight: 600;
  padding: 3px 10px; border-radius: 20px; margin-bottom: 12px;
}
.plan h3 { font-size: 15.5px; font-weight: 640; margin-bottom: 4px; line-height: 1.4; }
.plan-sub { font-size: 12.5px; color: var(--muted); margin-bottom: 16px; }
.plan-price { font-size: 34px; font-weight: 700; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.plan-price small { font-size: 14px; font-weight: 450; color: var(--muted); letter-spacing: 0; }
.plan-unit { font-size: 12.5px; color: var(--muted); margin-top: 6px; margin-bottom: 18px; }
.plan ul { list-style: none; display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; flex: 1; }
.plan li { display: flex; gap: 8px; font-size: 13px; color: #334155; align-items: flex-start; }
.plan li::before { content: '✓'; color: var(--green); font-weight: 700; flex: 0 0 auto; }

/* ---------- 特性 ---------- */
.feats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.feat { display: flex; gap: 14px; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; background: #fff; }
.feat-i {
  width: 36px; height: 36px; flex: 0 0 36px; border-radius: 9px;
  background: var(--blue-soft); border: 1px solid var(--blue-line);
  color: var(--blue); display: grid; place-items: center; font-size: 15px;
}
.feat h3 { font-size: 14.5px; font-weight: 620; margin-bottom: 4px; }
.feat p { font-size: 13px; color: var(--muted); line-height: 1.6; }

/* ---------- 表单 ---------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 550; color: var(--ink-2); margin-bottom: 7px; }
.input, .select {
  width: 100%; height: 42px; padding: 0 13px;
  font-size: 14px; color: var(--ink);
  background: #fff; border: 1px solid var(--border); border-radius: 9px;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37,99,235,.12); outline: none; }
.input::placeholder { color: #9AA7B8; }

/* ---------- 认证页 ---------- */
.auth-wrap {
  min-height: calc(100vh - 62px);
  display: grid; place-items: center; padding: 40px 24px;
  background:
    radial-gradient(900px 420px at 15% -10%, rgba(37,99,235,.09), transparent 70%),
    radial-gradient(800px 400px at 85% 110%, rgba(79,70,229,.07), transparent 70%),
    #F7F9FC;
}
.auth-card {
  width: 100%; max-width: 410px;
  background: #fff; border: 1px solid var(--border);
  border-radius: 16px; padding: 36px 32px 30px;
  box-shadow: 0 1px 2px rgba(11,18,32,.04), 0 20px 48px -20px rgba(11,18,32,.18);
}
.auth-mark {
  width: 46px; height: 46px; margin: 0 auto 16px;
  border-radius: 13px;
  background: linear-gradient(145deg,#2563EB,#4F46E5);
  display: grid; place-items: center;
  color: #fff; font-size: 22px; font-weight: 700;
  box-shadow: 0 8px 22px -6px rgba(37,99,235,.48);
}
.auth-card h2 { font-size: 20px; font-weight: 650; text-align: center; margin-bottom: 22px; letter-spacing: -.02em; }
.auth-tabs { display: flex; border-bottom: 1px solid var(--border); margin-bottom: 22px; }
.auth-tab {
  flex: 1; text-align: center; padding: 11px 0;
  font-size: 14px; font-weight: 550; color: var(--muted);
  border-bottom: 2px solid transparent; background: none; border-top: none;
  border-left: none; border-right: none;
}
.auth-tab.active { color: var(--ink); border-bottom-color: var(--ink); }
.auth-foot { text-align: center; margin-top: 18px; font-size: 13px; color: var(--muted); }
.auth-foot a { color: var(--blue); font-weight: 550; }
.auth-msg { padding: 11px 14px; border-radius: 9px; font-size: 13px; margin-bottom: 16px; }
.auth-msg.err { background: var(--red-soft); border: 1px solid #FECACA; color: #B91C1C; }
.auth-msg.ok { background: var(--green-soft); border: 1px solid var(--green-line); color: #15803D; }

/* ---------- 购买页 ---------- */
.buy-layout { display: grid; grid-template-columns: 1fr 380px; gap: 24px; padding: 32px 0 64px; }
.panel { background: #fff; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.panel-head {
  padding: 16px 20px; border-bottom: 1px solid var(--border-2);
  font-size: 14.5px; font-weight: 620;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.panel-body { padding: 20px; }

.area-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.area-btn {
  height: 32px; padding: 0 13px; border-radius: 8px;
  font-size: 12.5px; font-weight: 500;
  background: #fff; border: 1px solid var(--border); color: var(--ink-2);
  transition: all .13s;
}
.area-btn:hover { border-color: var(--blue-line); background: var(--blue-soft); }
.area-btn.active { background: var(--ink); border-color: var(--ink); color: #fff; }

.node-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.node-card {
  border: 1px solid var(--border); border-radius: 10px; padding: 12px;
  transition: border-color .13s;
}
.node-card:hover { border-color: var(--blue-line); }
.node-card.picked { border-color: var(--blue); background: var(--blue-soft); }
.node-name { font-size: 13px; font-weight: 600; margin-bottom: 3px; }
.node-meta { font-size: 11.5px; color: var(--muted); margin-bottom: 8px; }
.node-qty { display: flex; align-items: center; gap: 6px; }
.qty-btn {
  width: 26px; height: 26px; border-radius: 7px;
  background: var(--muted-bg); border: 1px solid var(--border);
  color: var(--ink-2); font-weight: 600; font-size: 15px; line-height: 1;
  display: grid; place-items: center;
}
.qty-btn:hover { background: #E9EEF6; }
.qty-val { width: 40px; height: 26px; text-align: center; border: 1px solid var(--border); border-radius: 7px; font-size: 12.5px; }

/* 订单摘要 */
.summary-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; font-size: 13px; }
.summary-row + .summary-row { border-top: 1px solid var(--border-2); }
.summary-row .k { color: var(--muted); }
.summary-row .v { color: var(--ink); font-weight: 550; text-align: right; }
.total-row { display: flex; justify-content: space-between; align-items: baseline; padding-top: 16px; margin-top: 10px; border-top: 1px solid var(--border); }
.total-row .label { font-size: 13px; color: var(--muted); }
.total-row .amount { font-size: 30px; font-weight: 700; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.total-row .amount small { font-size: 14px; font-weight: 450; color: var(--muted); }

/* ---------- 节点列表 ---------- */
.node-list { display: flex; flex-direction: column; gap: 12px; }
.node-item {
  border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  background: #fff;
}
.node-item:hover { border-color: var(--blue-line); }
.node-item .main { flex: 1; min-width: 240px; }
.node-item .title { font-size: 14px; font-weight: 620; margin-bottom: 3px; }
.node-item .sub { font-size: 12.5px; color: var(--muted); }
.node-item code {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 12.5px; background: var(--muted-bg);
  padding: 5px 9px; border-radius: 7px; border: 1px solid var(--border);
  display: inline-block; margin-top: 8px; word-break: break-all;
  color: var(--ink-2);
}

/* ---------- 空状态 ---------- */
.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty h3 { font-size: 16px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.empty p { font-size: 13.5px; margin-bottom: 20px; }

/* ---------- 提示条 ---------- */
.notice {
  padding: 13px 16px; border-radius: 10px; font-size: 13px;
  display: flex; gap: 10px; align-items: flex-start;
}
.notice.info { background: var(--blue-soft); border: 1px solid var(--blue-line); color: #1E40AF; }
.notice.warn { background: var(--amber-soft); border: 1px solid var(--amber-line); color: #92400E; }
.notice.err { background: var(--red-soft); border: 1px solid #FECACA; color: #991B1B; }
.notice.ok { background: var(--green-soft); border: 1px solid var(--green-line); color: #166534; }

/* ---------- 弹窗 ---------- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(11,18,32,.42);
  backdrop-filter: blur(3px); z-index: 100;
  display: grid; place-items: center; padding: 24px;
}
.modal {
  background: #fff; border-radius: 16px; width: 100%; max-width: 460px;
  box-shadow: 0 24px 64px -20px rgba(11,18,32,.34);
  overflow: hidden; max-height: 88vh; display: flex; flex-direction: column;
}
.modal-head {
  padding: 18px 22px; border-bottom: 1px solid var(--border-2);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-head h3 { font-size: 15.5px; font-weight: 640; }
.modal-close { background: none; border: none; font-size: 20px; color: var(--muted); line-height: 1; padding: 4px; }
.modal-body { padding: 22px; overflow-y: auto; }
.modal-foot { padding: 16px 22px; border-top: 1px solid var(--border-2); background: #FBFCFE; display: flex; gap: 10px; justify-content: flex-end; }

/* ---------- 表格 ---------- */
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th {
  text-align: left; font-size: 12px; font-weight: 550; color: var(--muted);
  background: #FAFBFD; padding: 11px 16px; border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.tbl td { padding: 12px 16px; border-bottom: 1px solid var(--border-2); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tr:hover td { background: #FCFDFF; }
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  height: 22px; padding: 0 9px; border-radius: 6px;
  font-size: 11.5px; font-weight: 550; border: 1px solid; white-space: nowrap;
}
.pill.g { background: var(--green-soft); color: #15803D; border-color: var(--green-line); }
.pill.a { background: var(--amber-soft); color: #B45309; border-color: var(--amber-line); }
.pill.b { background: var(--blue-soft); color: var(--blue); border-color: var(--blue-line); }
.pill.r { background: var(--red-soft); color: #B91C1C; border-color: #FECACA; }

/* ---------- 页脚 ---------- */
.footer { border-top: 1px solid var(--border); padding: 32px 0; font-size: 12.5px; color: var(--muted); }
.footer-in { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer-note { max-width: 640px; line-height: 1.8; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }

/* ---------- 加载 ---------- */
.spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.3); border-top-color: #fff;
  animation: spin .7s linear infinite; display: inline-block;
}
.spinner.dark { border-color: rgba(11,18,32,.15); border-top-color: var(--ink); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .hero-in { grid-template-columns: 1fr; gap: 36px; }
  h1 { font-size: 32px; }
  .plans { grid-template-columns: 1fr; }
  .feats { grid-template-columns: 1fr; }
  .buy-layout { grid-template-columns: 1fr; }
  .node-grid { grid-template-columns: repeat(2, 1fr); }
  .nav-links { display: none; }
  .section { padding: 40px 0; }
  .hero { padding: 40px 0 36px; }
  .wrap { padding: 0 16px; }
}


/* ============================================================
   购买页：区块标题更醒目
   ============================================================ */
.field-title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14.5px;
  font-weight: 650;
  color: var(--ink);
  margin-bottom: 10px;
  letter-spacing: -.01em;
}
.field-title .num {
  width: 20px; height: 20px;
  border-radius: 6px;
  background: var(--ink);
  color: #fff;
  font-size: 11.5px;
  font-weight: 600;
  display: grid; place-items: center;
  flex: 0 0 20px;
}
.field-title .hint {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}

/* 购买页的三个区块之间拉开距离 */
.buy-step { padding: 18px 0; }
.buy-step + .buy-step { border-top: 1px solid var(--border-2); }
.buy-step:first-child { padding-top: 4px; }

/* 项目选择输入框：加下拉箭头，让它看起来能点 */
.proj-wrap { position: relative; }
.proj-wrap .input { padding-right: 38px; cursor: pointer; }
.proj-wrap::after {
  content: "";
  position: absolute;
  right: 15px; top: 50%;
  width: 7px; height: 7px;
  border-right: 2px solid #94A3B8;
  border-bottom: 2px solid #94A3B8;
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

/* 时长按钮：选中态更明显 */
.area-btn[data-plan-index] {
  height: 38px;
  padding: 0 16px;
  font-size: 13.5px;
  font-weight: 550;
  border-radius: 9px;
}
.area-btn[data-plan-index].active {
  box-shadow: 0 6px 16px -8px rgba(11,18,32,.4);
}
