:root {
  --bg: #0b0f17;
  --bg-soft: #121826;
  --card: rgba(255, 255, 255, 0.04);
  --line: rgba(255, 255, 255, 0.09);
  --text: #e8ecf4;
  --muted: #98a2b3;
  --brand: #ff6699;
  --brand-2: #7aa2ff;
  --ok: #35d07f;
  --warn: #ffb020;
  --danger: #ff5d5d;
  --radius: 14px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f7fb;
    --bg-soft: #ffffff;
    --card: #ffffff;
    --line: #e6e8ef;
    --text: #1a2233;
    --muted: #5f6b82;
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: radial-gradient(1200px 600px at 80% -10%, rgba(255, 102, 153, 0.18), transparent 60%),
              radial-gradient(900px 500px at 0% 0%, rgba(122, 162, 255, 0.16), transparent 55%),
              var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", sans-serif;
  min-height: 100vh;
  line-height: 1.6;
}

.hidden { display: none !important; }

.landing { display: flex; justify-content: center; padding: 48px 20px 80px; }
.landing-inner { width: min(920px, 100%); }

.badge {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--brand-2);
  border: 1px solid var(--line);
  background: var(--card);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 22px;
}

h1 {
  font-size: clamp(32px, 6vw, 52px);
  line-height: 1.15;
  margin: 0 0 16px;
  letter-spacing: -0.02em;
}
h1 span {
  background: linear-gradient(92deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead { color: var(--muted); font-size: 16px; max-width: 620px; margin: 0 0 36px; }

.feature-grid {
  list-style: none;
  margin: 0 0 36px;
  padding: 0;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.feature-grid li {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.feature-grid h3 { margin: 0 0 6px; font-size: 15px; }
.feature-grid p { margin: 0; color: var(--muted); font-size: 13.5px; }

.cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 48px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.12s ease;
  font-family: inherit;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.06); }
.btn:active { transform: translateY(0); }
.btn.primary {
  background: linear-gradient(92deg, var(--brand), var(--brand-2));
  border: none;
  color: #0b0f17;
}
.btn.ghost { color: var(--muted); }
.btn.small { padding: 7px 12px; font-size: 13px; }
.btn.danger { color: var(--danger); border-color: rgba(255, 93, 93, 0.4); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.risk {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 32px;
}
.risk h2 { font-size: 15px; margin: 0 0 10px; }
.risk ol { margin: 0; padding-left: 20px; color: var(--muted); font-size: 13.5px; }
.risk li { margin-bottom: 6px; }
.risk strong { color: var(--text); font-weight: 600; }

.foot { color: var(--muted); font-size: 12px; }

/* ---------- 登录后的控制台 ---------- */
.app { padding: 28px 20px 80px; display: flex; justify-content: center; }
.app-inner { width: min(1020px, 100%); }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.identity { display: flex; align-items: center; gap: 12px; }
.avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--bg-soft); border: 1px solid var(--line);
  object-fit: cover;
}
.identity .name { font-weight: 700; }
.identity .sub { color: var(--muted); font-size: 12px; }

.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
.card h2 { font-size: 14px; margin: 0 0 14px; letter-spacing: 0.02em; color: var(--muted); text-transform: uppercase; }
.card h3 { font-size: 15px; margin: 0 0 8px; }

.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.row:last-child { border-bottom: none; }
.row .label { color: var(--muted); font-size: 13px; }
.row .value { font-size: 13.5px; font-weight: 600; text-align: right; }

.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); }
.pill.ok { color: var(--ok); border-color: rgba(53, 208, 127, 0.35); background: rgba(53, 208, 127, 0.08); }
.pill.warn { color: var(--warn); border-color: rgba(255, 176, 32, 0.35); background: rgba(255, 176, 32, 0.08); }
.pill.bad { color: var(--danger); border-color: rgba(255, 93, 93, 0.35); background: rgba(255, 93, 93, 0.08); }
.pill.muted { color: var(--muted); }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field label { font-size: 13px; color: var(--muted); }
input[type="text"], textarea {
  width: 100%;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13.5px;
  font-family: inherit;
  resize: vertical;
}
textarea { font-family: var(--mono); font-size: 12.5px; min-height: 92px; }
input:focus, textarea:focus { outline: 2px solid rgba(122, 162, 255, 0.45); outline-offset: 1px; }

.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }

.hint { color: var(--muted); font-size: 12.5px; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.divider { height: 1px; background: var(--line); margin: 16px 0; }

.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0, 0, 0, 0.6);
  display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 50;
}
.modal {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  width: min(560px, 100%);
  max-height: 84vh;
  overflow: auto;
}
.modal h2 { margin: 0 0 12px; font-size: 17px; }
.modal pre {
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 13px;
  color: var(--muted);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  margin: 0 0 16px;
}

.qr-wrap { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.qr-wrap img { width: 148px; height: 148px; background: #fff; border-radius: 10px; padding: 6px; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; font-size: 12px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  background: #161d2c;
  color: #fff;
  border: 1px solid var(--line);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  z-index: 80;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}
.toast.error { border-color: rgba(255, 93, 93, 0.6); }
.toast.ok { border-color: rgba(53, 208, 127, 0.6); }
