:root {
  --bg: #06152d;
  --bg-deep: #031022;
  --panel: rgba(7, 31, 61, 0.78);
  --line: rgba(91, 166, 218, 0.26);
  --line-strong: rgba(82, 187, 244, 0.48);
  --cyan: #39c6ff;
  --cyan-soft: #72dafd;
  --blue: #1975e9;
  --mint: #45efc2;
  --text: #f4f9ff;
  --muted: #86a6c6;
  --faint: #527495;
  --font: "Manrope", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
a { color: inherit; text-decoration: none; }

#signalField, .grid-layer, .scan-line { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }
#signalField { z-index: 0; opacity: .84; }
.grid-layer {
  z-index: 0;
  opacity: .34;
  background-image:
    linear-gradient(rgba(69, 141, 194, .08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(69, 141, 194, .08) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: linear-gradient(to right, #000 0%, rgba(0,0,0,.8) 48%, transparent 84%);
  mask-image: linear-gradient(to right, #000 0%, rgba(0,0,0,.8) 48%, transparent 84%);
}
.scan-line {
  z-index: 0;
  height: 180px;
  top: -180px;
  background: linear-gradient(to bottom, transparent, rgba(57,198,255,.035), transparent);
  animation: scan 10s linear infinite;
}
@keyframes scan { to { transform: translateY(calc(100vh + 360px)); } }

.shell {
  width: min(1380px, calc(100% - 72px));
  min-height: 100vh;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: 92px 1fr 66px;
}

.topbar, .footerbar { display: flex; align-items: center; justify-content: space-between; }
.topbar { border-bottom: 1px solid rgba(109, 169, 212, .12); }
.brand { display: flex; align-items: center; gap: 13px; }
.brand-mark { width: 38px; height: 38px; position: relative; display: block; }
.brand-mark i { position: absolute; width: 10px; border: 2px solid var(--cyan); transform: skewY(-30deg); }
.brand-mark i:nth-child(1) { height: 23px; left: 2px; top: 9px; border-right: 0; }
.brand-mark i:nth-child(2) { height: 30px; left: 13px; top: 4px; background: rgba(57,198,255,.15); }
.brand-mark i:nth-child(3) { height: 18px; left: 27px; top: 1px; border-left: 0; }
.brand-copy { display: flex; flex-direction: column; line-height: 1; }
.brand-copy strong { font-size: 20px; font-weight: 800; }
.brand-copy small { color: var(--cyan); font-size: 8px; letter-spacing: .19em; margin-top: 7px; font-weight: 800; }
.system-state { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 12px; }
.system-state b { margin-left: 16px; color: #c5d8e9; font-weight: 600; font-variant-numeric: tabular-nums; }
.live-dot, .trust-row i, .secure i { width: 6px; height: 6px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 14px var(--mint); }

.portal {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(420px, .75fr);
  gap: clamp(64px, 8vw, 132px);
  align-items: center;
  padding: 44px 0 38px;
}
.hero-copy { align-self: center; max-width: 720px; }
.eyebrow { display: flex; align-items: center; gap: 12px; color: var(--cyan); font-size: 11px; font-weight: 800; letter-spacing: .17em; }
.eyebrow span { color: var(--faint); font-size: 10px; }
.eyebrow.compact { margin-bottom: 17px; font-size: 9px; }
.hero-copy h1 {
  margin: 25px 0 19px;
  font-size: clamp(52px, 5.15vw, 78px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: 0;
  text-wrap: balance;
}
.hero-copy h1 em { color: var(--cyan); font-style: normal; position: relative; }
.hero-copy h1 em::after {
  content: ""; position: absolute; left: 2px; right: 2px; bottom: -8px; height: 1px;
  background: linear-gradient(90deg, var(--cyan), transparent 82%);
}
.lead { max-width: 620px; color: #91afca; font-size: 16px; line-height: 1.9; margin: 0; }

.mission-board { margin-top: 54px; width: min(100%, 660px); }
.board-head { display: flex; justify-content: space-between; color: #6384a4; font-size: 9px; letter-spacing: .17em; font-weight: 800; }
.board-head div { letter-spacing: 0; color: #82a5c3; }
.board-head i { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--mint); margin-right: 5px; box-shadow: 0 0 10px var(--mint); }
.mission-path { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 28px; }
.track { position: absolute; top: 6px; left: 6px; right: 20px; height: 1px; background: rgba(84, 143, 189, .28); }
.track::after {
  content: ""; position: absolute; height: 2px; left: 0; width: 53%; top: -1px;
  background: linear-gradient(90deg, var(--cyan), var(--mint)); box-shadow: 0 0 10px rgba(57,198,255,.6);
}
.node { position: relative; display: grid; gap: 7px; color: #6283a2; }
.node i { width: 12px; height: 12px; background: #0c2a4d; border: 2px solid #355e82; border-radius: 50%; z-index: 1; }
.node.done i { background: var(--cyan); border-color: #9ae9ff; box-shadow: 0 0 15px rgba(57,198,255,.8); }
.node.active i { background: var(--mint); border-color: #9bffe4; box-shadow: 0 0 15px rgba(69,239,194,.8); animation: pulse 1.7s ease infinite; }
.node b { font-size: 13px; color: #b9cee1; font-weight: 600; margin-top: 5px; }
.node small { font-size: 10px; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(69,239,194,0), 0 0 18px rgba(69,239,194,.8); } }

.stats-strip { display: flex; gap: 0; margin-top: 42px; border-top: 1px solid rgba(97,159,204,.14); width: min(100%, 660px); }
.stats-strip div { min-width: 130px; padding: 18px 34px 0 0; margin-right: 34px; border-right: 1px solid rgba(97,159,204,.14); display: flex; flex-direction: column; }
.stats-strip div:last-child { border: 0; }
.stats-strip strong { color: #e9f5ff; font-size: 17px; }
.stats-strip span { color: #5f81a1; font-size: 10px; margin-top: 4px; }

.auth-card {
  position: relative;
  width: 100%;
  max-width: 486px;
  justify-self: end;
  padding: 34px 36px 25px;
  background: linear-gradient(160deg, rgba(11,43,79,.84), rgba(4,25,50,.94));
  border: 1px solid rgba(75, 159, 218, .42);
  border-radius: 8px;
  box-shadow: 0 26px 80px rgba(0, 5, 20, .38), inset 0 1px rgba(255,255,255,.025);
  backdrop-filter: blur(18px);
  overflow: hidden;
}
.auth-card::before, .auth-card::after { content: ""; position: absolute; width: 18px; height: 18px; border-color: var(--cyan); opacity: .65; }
.auth-card::before { left: -1px; top: -1px; border-left: 2px solid; border-top: 2px solid; }
.auth-card::after { right: -1px; bottom: -1px; border-right: 2px solid; border-bottom: 2px solid; }
.card-glow { position: absolute; width: 230px; height: 230px; right: -105px; top: -120px; background: radial-gradient(circle, rgba(57,198,255,.13), transparent 68%); }
.card-top { display: flex; justify-content: space-between; align-items: flex-start; position: relative; }
.card-top h2 { margin: 0; font-size: 29px; line-height: 1.2; font-weight: 800; }
.card-top p { color: #7798b7; margin: 9px 0 0; font-size: 12px; }
.shield { width: 42px; height: 46px; display: grid; place-items: center; color: var(--cyan); }
.shield svg { width: 38px; fill: rgba(57,198,255,.05); stroke: currentColor; stroke-width: 1.2; }

.tabs { display: grid; grid-template-columns: 1fr 1fr; margin-top: 28px; border-bottom: 1px solid rgba(92,149,193,.27); }
.tab { position: relative; height: 44px; border: 0; background: transparent; color: #6688a8; cursor: pointer; font-size: 13px; font-weight: 600; }
.tab::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: linear-gradient(90deg, var(--cyan), #2585e7); transform: scaleX(0); transition: transform .25s ease; }
.tab.active { color: #fff; }
.tab.active::after { transform: scaleX(1); }
.auth-form { display: none; padding-top: 24px; }
.auth-form.active { display: block; animation: formIn .3s ease; }
@keyframes formIn { from { opacity: 0; transform: translateY(6px); } }
.field { display: block; margin-bottom: 16px; }
.field > span:first-child { display: block; color: #9bb6ce; font-size: 11px; font-weight: 600; margin-bottom: 8px; }
.input-wrap { display: flex; align-items: center; height: 48px; border: 1px solid rgba(85,145,190,.32); background: rgba(0,12,30,.43); border-radius: 5px; transition: border .2s, box-shadow .2s; }
.input-wrap:focus-within { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(57,198,255,.08); }
.input-wrap > svg { width: 17px; margin-left: 14px; stroke: #51799d; fill: none; stroke-width: 1.5; }
.input-wrap input { min-width: 0; flex: 1; height: 100%; border: 0; outline: 0; color: #e9f5ff; background: transparent; padding: 0 13px; font-size: 13px; letter-spacing: 0; }
.input-wrap input::placeholder { color: #426587; }
.captcha-row, .code-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.captcha-box {
  width: 112px; height: 48px; padding: 0; overflow: hidden; cursor: pointer;
  border: 1px solid rgba(82,187,244,.46); border-radius: 5px;
  background: rgba(13,52,87,.75);
}
.captcha-box.small { width: 96px; height: 42px; }
.captcha-box canvas { display: block; width: 100%; height: 100%; }
.captcha-box img { display: block; width: 100%; height: 100%; object-fit: cover; }
.send-code {
  width: 112px; height: 48px; padding: 0 12px; border-radius: 5px; cursor: pointer;
  color: var(--cyan-soft); border: 1px solid rgba(82,187,244,.38); background: rgba(16,63,104,.52);
  font-size: 11px; font-weight: 700; transition: border-color .2s, background .2s;
}
.send-code:hover { border-color: var(--cyan); background: rgba(22,83,135,.65); }
.send-code:disabled { color: #577894; cursor: default; border-color: rgba(82,145,190,.22); }
.eye { width: 42px; height: 100%; border: 0; background: transparent; color: #51799d; padding: 0; cursor: pointer; }
.eye svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.double-field { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field small { color: #4e7292; font-size: 9px; font-weight: 500; margin-left: 3px; }
.register-form { padding-top: 17px; }
.register-form .field { margin-bottom: 10px; }
.register-form .field > span:first-child { margin-bottom: 5px; }
.register-form .input-wrap, .register-form .send-code { height: 42px; }
.register-form .submit-btn { margin-top: 3px; }
.form-options { display: flex; justify-content: space-between; align-items: center; font-size: 11px; margin: 1px 0 20px; }
.form-options a { color: var(--cyan-soft); }
.check { color: #87a7c4; display: flex; align-items: center; gap: 8px; cursor: pointer; }
.check input { position: absolute; opacity: 0; }
.check span { width: 15px; height: 15px; display: inline-grid; place-items: center; border: 1px solid #48769c; border-radius: 2px; }
.check input:checked + span { background: var(--blue); border-color: #48bdff; }
.check input:checked + span::after { content: ""; width: 7px; height: 4px; border-left: 1.5px solid #fff; border-bottom: 1.5px solid #fff; transform: rotate(-45deg) translateY(-1px); }
.submit-btn { width: 100%; height: 49px; border: 0; border-radius: 5px; color: white; background: linear-gradient(90deg, #176ed6, #24a8ec); display: flex; align-items: center; justify-content: center; gap: 10px; font-weight: 700; font-size: 13px; cursor: pointer; box-shadow: 0 12px 30px rgba(22,116,218,.2); transition: transform .2s, filter .2s; }
.submit-btn:hover { transform: translateY(-1px); filter: brightness(1.08); }
.submit-btn:disabled { cursor: wait; opacity: .78; }
.submit-btn.loading span::after { content: " ···"; }
.submit-btn svg, .agent-link svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.trust-row { display: flex; justify-content: center; gap: 16px; margin-top: 18px; color: #557a9a; font-size: 9px; }
.trust-row span { display: flex; align-items: center; gap: 7px; }
.trust-row i { width: 4px; height: 4px; }
.agent-link { border-top: 1px solid rgba(89,150,196,.15); margin: 22px -36px -25px; padding: 17px 36px; display: flex; justify-content: center; gap: 7px; color: #6688a6; font-size: 11px; background: rgba(0,12,28,.18); }
.agent-link a { color: #a7cae5; display: inline-flex; align-items: center; gap: 3px; }
.agent-link svg { width: 13px; }

.footerbar { border-top: 1px solid rgba(109,169,212,.12); color: #4f7090; font-size: 9px; letter-spacing: .06em; }
.footerbar nav { display: flex; gap: 26px; }
.footerbar nav a:hover { color: var(--cyan); }
.secure { display: flex; align-items: center; gap: 8px; letter-spacing: .12em; }
.secure i { display: block; width: 4px; height: 4px; }
.toast {
  position: fixed; z-index: 30; left: 50%; top: 24px; transform: translate(-50%, -18px);
  padding: 11px 18px; min-width: 220px; max-width: calc(100vw - 32px); text-align: center;
  color: #dff3ff; background: rgba(8,31,57,.96); border: 1px solid rgba(82,187,244,.45);
  border-radius: 5px; box-shadow: 0 16px 50px rgba(0,5,20,.45); font-size: 12px;
  opacity: 0; visibility: hidden; transition: opacity .22s, transform .22s, visibility .22s;
}
.toast.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.toast.success { border-color: rgba(69,239,194,.55); color: #bfffea; }

@media (max-width: 1050px) {
  .shell { width: min(920px, calc(100% - 40px)); grid-template-rows: 78px auto 58px; }
  .portal { grid-template-columns: 1fr; gap: 48px; padding-top: 54px; }
  .hero-copy { max-width: none; }
  .auth-card { justify-self: stretch; max-width: none; }
  .mission-board, .stats-strip { width: 100%; }
}

@media (max-width: 640px) {
  .shell { width: calc(100% - 28px); }
  .system-state span:not(.live-dot), .system-state b { display: none; }
  .portal { gap: 36px; padding: 40px 0 28px; }
  .hero-copy h1 { font-size: clamp(40px, 12vw, 58px); }
  .lead { font-size: 14px; }
  .mission-board { margin-top: 40px; }
  .node b { font-size: 11px; }
  .stats-strip div { min-width: 0; flex: 1; margin-right: 14px; padding-right: 14px; }
  .auth-card { padding: 28px 22px 23px; }
  .agent-link { margin: 20px -22px -23px; }
  .trust-row { gap: 9px; flex-direction: column; align-items: center; }
  .footerbar nav { display: none; }
  .double-field { grid-template-columns: 1fr; gap: 0; }
  .verify-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}
