
:root {
  --bg: #060911;
  --fg: #f3f6fc;
  --muted: rgba(214, 224, 242, 0.72);
  --subtle: rgba(166, 182, 210, 0.56);
  --panel: rgba(12, 17, 29, 0.78);
  --panel-2: rgba(18, 25, 42, 0.66);
  --line: rgba(164, 190, 235, 0.16);
  --line-strong: rgba(164, 190, 235, 0.32);
  --accent: #dbe8ff;
  --accent-fg: #070c18;
  --mint: #7be0bf;
  --blue: #80b2ff;
  --amber: #f3be7a;
  --danger: #fca5a5;
  --shadow: 0 32px 80px rgba(0, 0, 0, 0.62), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
html[data-theme="light"] {
  --bg: #f6f8fc;
  --fg: #0d1526;
  --muted: rgba(25, 39, 66, 0.72);
  --subtle: rgba(45, 64, 98, 0.56);
  --panel: rgba(255, 255, 255, 0.84);
  --panel-2: rgba(243, 247, 254, 0.88);
  --line: rgba(25, 48, 88, 0.12);
  --line-strong: rgba(38, 77, 145, 0.26);
  --accent: #0f1b33;
  --accent-fg: #f8fafc;
  --mint: #167c64;
  --blue: #275eb8;
  --amber: #9c5b16;
  --danger: #b91c1c;
  --shadow: 0 28px 68px rgba(15, 28, 56, 0.11), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--fg);
  font: 400 15px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
#zero-g-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}
.shell {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: clamp(14px, 2.2vw, 26px) clamp(16px, 4vw, 48px);
  gap: 20px;
}
.mast {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--fg);
  text-decoration: none;
  font-weight: 600;
}
.brand svg { width: 22px; height: 22px; color: var(--blue); }
.brand b { font-size: 18px; letter-spacing: -0.02em; }
.brand span { font-size: 14px; color: var(--muted); font-weight: 500; margin-left: 4px; }
.tools { display: flex; align-items: center; gap: 10px; }
.tool, .ghost-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--fg);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  backdrop-filter: blur(18px);
  transition: border-color .18s, transform .18s;
}
.tool:hover, .ghost-btn:hover { border-color: var(--line-strong); }
.icon { width: 16px; height: 16px; flex-shrink: 0; }
html[data-theme="dark"] .moon-icon, html[data-theme="light"] .sun-icon { display: none; }

.stage-wrap {
  display: grid;
  place-items: center;
}
.console {
  width: min(560px, 100%);
  border-radius: 24px;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(28px);
  overflow: hidden;
}
.chrome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  font-size: 12.5px;
  color: var(--muted);
}
.lights { display: inline-flex; gap: 7px; }
.lights i { width: 10px; height: 10px; border-radius: 50%; opacity: 0.72; }
.lights i:nth-child(1) { background: #f87171; }
.lights i:nth-child(2) { background: #fbbf24; }
.lights i:nth-child(3) { background: #34d399; }
.sec-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(123, 224, 191, 0.28);
  background: rgba(123, 224, 191, 0.08);
  color: var(--mint);
  font-size: 11.5px;
  font-weight: 500;
}
.sec-pill i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.body { padding: clamp(22px, 4vw, 34px); }
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--mint);
  letter-spacing: 0.02em;
}
.kicker i { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); }
h1 {
  margin: 0 0 10px;
  font-size: clamp(24px, 3.6vw, 31px);
  line-height: 1.22;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.lead {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.65;
}
.field-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--fg);
}
.field-label small { color: var(--subtle); font-weight: 400; }
.code-input {
  width: 100%;
  height: 50px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: var(--panel-2);
  color: var(--fg);
  font: 500 14.5px/1 "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  letter-spacing: 0.02em;
  outline: none;
  transition: border-color .18s, box-shadow .18s;
}
.code-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(128, 178, 255, 0.18);
}
.code-input::placeholder {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif;
  letter-spacing: 0;
  color: var(--subtle);
}
.primary-cta {
  width: 100%;
  min-height: 50px;
  margin-top: 14px;
  padding: 12px 20px;
  border-radius: 14px;
  border: 0;
  background: var(--accent);
  color: var(--accent-fg);
  font-size: 15px;
  font-weight: 650;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s, opacity .15s;
}
.primary-cta:hover { transform: translateY(-1px); opacity: 0.95; }
.primary-cta:disabled { opacity: 0.55; cursor: progress; transform: none; }
.status-msg {
  margin: 12px 0 0;
  min-height: 22px;
  font-size: 13.5px;
  color: var(--blue);
}
.status-msg[data-kind="error"] { color: var(--danger); }
.status-msg[data-kind="ok"] { color: var(--mint); }
.result-box {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(123, 224, 191, 0.32);
  background: rgba(123, 224, 191, 0.08);
  font-size: 13.5px;
}
.result-box a { color: var(--mint); font-weight: 600; }

.warn-banner {
  margin: 0 0 16px;
  padding: 13px 15px;
  border-radius: 14px;
  border: 1px solid rgba(243, 190, 122, 0.38);
  background: rgba(243, 190, 122, 0.1);
  color: var(--amber);
  font-size: 13.5px;
  line-height: 1.58;
}
.warn-banner strong { color: var(--fg); }

.steps-grid {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.step-card {
  padding: 11px 12px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: var(--panel-2);
}
.step-card em {
  display: block;
  font-style: normal;
  font-size: 11px;
  font-weight: 600;
  color: var(--blue);
  margin-bottom: 3px;
}
.step-card b { display: block; font-size: 12.5px; margin-bottom: 2px; }
.step-card small { display: block; font-size: 11.5px; color: var(--muted); line-height: 1.45; }
@media (max-width: 560px) {
  .steps-grid { grid-template-columns: 1fr; }
}

.guide-card {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 15px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  font-size: 13px;
  color: var(--muted);
}
.guide-card b { color: var(--fg); display: block; margin-bottom: 6px; font-size: 13.5px; }
.guide-card ol { margin: 0; padding-left: 18px; }
.guide-card li { margin: 5px 0; }
.guide-card strong { color: var(--fg); }

.support-bar {
  margin-top: 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  padding: 10px 14px;
  font-size: 12.5px;
  color: var(--muted);
}
.support-bar summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-weight: 500;
  color: var(--fg);
}
.support-bar summary::-webkit-details-marker { display: none; }
.support-detail {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.support-detail code {
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  color: var(--fg);
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px;
}
.foot-note {
  text-align: center;
  font-size: 12px;
  color: var(--subtle);
}
