:root {
  --accent: #ff6a3d;
  --accent-alt: #7c5cff;
  --mint: #2bd4c4;
  --ink: #14161c;
  --ink-2: #4a5060;
  --ink-3: #8b93a7;
  --line: #e8eaf1;
  --bg: #f7f8fc;
  --card: #ffffff;
  --radius: 16px;
  --shadow: 0 18px 45px rgba(28, 33, 58, 0.08);
  --shadow-lg: 0 28px 70px rgba(28, 33, 58, 0.14);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0 0 12px; line-height: 1.25; }
h1 { font-size: 42px; letter-spacing: -0.5px; }
h2 { font-size: 26px; }
h3 { font-size: 18px; }
p { margin: 0 0 12px; color: var(--ink-2); }

/* ---------------------------------------------------------------- 顶栏 */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 12px 28px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-alt));
  color: #fff;
  font-weight: 700;
  font-size: 18px;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 17px; }
.brand-text small { color: var(--ink-3); font-size: 12px; }

.mainnav { display: flex; gap: 4px; margin-left: 12px; flex-wrap: wrap; }
.mainnav a {
  padding: 8px 14px;
  border-radius: 10px;
  color: var(--ink-2);
  font-size: 14px;
}
.mainnav a:hover { background: #f0f2f8; color: var(--ink); }
.mainnav a.active {
  background: linear-gradient(135deg, rgba(255, 106, 61, 0.12), rgba(124, 92, 255, 0.12));
  color: var(--accent);
  font-weight: 600;
}

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.mode-badge {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: #eef1f8;
  color: var(--ink-2);
}
.mode-badge.live { background: rgba(43, 212, 196, 0.16); color: #0f8f83; }
.mode-badge.demo { background: rgba(255, 106, 61, 0.14); color: #c2410c; }

/* ---------------------------------------------------------------- 布局 */

.view { max-width: 1240px; margin: 0 auto; padding: 28px 28px 72px; }

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 980px) { .split { grid-template-columns: 1fr; } }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.card.tight { padding: 16px; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.spacer { flex: 1; }

/* ---------------------------------------------------------------- 组件 */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--accent), #ff8a5c);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 12px 26px rgba(255, 106, 61, 0.28); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--ink-2); }
.btn-ghost:hover { box-shadow: var(--shadow); }
.btn-dark { background: #14161c; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 9px; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > label { font-size: 13px; font-weight: 600; color: var(--ink-2); display: flex; gap: 6px; align-items: center; }
.field .hint { font-size: 12px; color: var(--ink-3); }
input[type="text"], input[type="number"], select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  font: inherit;
  color: var(--ink);
  outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 106, 61, 0.12); }
textarea { resize: vertical; min-height: 96px; }
.checkbox { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); }
.checkbox input { width: 16px; height: 16px; accent-color: var(--accent); }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.tab {
  padding: 9px 15px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 14px;
  color: var(--ink-2);
  cursor: pointer;
}
.tab.active { background: #14161c; border-color: #14161c; color: #fff; font-weight: 600; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: #f0f2f8;
  color: var(--ink-2);
}
.badge.ok { background: rgba(43, 212, 196, 0.16); color: #0f8f83; }
.badge.warn { background: rgba(255, 176, 32, 0.18); color: #a15c00; }
.badge.err { background: rgba(255, 79, 79, 0.14); color: #c02626; }

.kv { display: grid; grid-template-columns: 132px 1fr; gap: 6px 14px; font-size: 13px; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; color: var(--ink); word-break: break-all; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--ink-3); font-weight: 600; background: #fafbfe; }

.progress { height: 8px; border-radius: 999px; background: #eef1f8; overflow: hidden; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-alt)); transition: width 0.4s ease; }

.poster { width: 100%; border-radius: 12px; border: 1px solid var(--line); display: block; }
.poster-wrap { max-width: 220px; }
.aspect { position: relative; padding-top: 177.78%; border-radius: 12px; overflow: hidden; background: #eef1f8; }
.aspect > * { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.timeline { display: flex; flex-direction: column; gap: 10px; }
.timeline-item { display: flex; gap: 12px; }
.timeline-dot { width: 10px; height: 10px; margin-top: 7px; border-radius: 50%; background: var(--accent); flex: none; }
.timeline-dot.ai { background: var(--accent-alt); }

.hero {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  padding: 56px 44px;
  background: radial-gradient(1100px 420px at 12% -10%, rgba(255, 106, 61, 0.22), transparent 60%),
    radial-gradient(900px 420px at 92% 8%, rgba(124, 92, 255, 0.24), transparent 62%),
    #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
}
.hero h1 { max-width: 720px; }
.hero .lede { max-width: 640px; font-size: 17px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }

.feature-icon {
  width: 38px; height: 38px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(255, 106, 61, 0.16), rgba(124, 92, 255, 0.16));
  font-size: 18px;
}

.steps { counter-reset: s; display: grid; gap: 14px; }
.step { display: flex; gap: 14px; align-items: flex-start; }
.step::before {
  counter-increment: s;
  content: counter(s);
  flex: none;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: #14161c;
  color: #fff;
  display: grid; place-items: center;
  font-size: 13px; font-weight: 700;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%);
  background: #14161c;
  color: #fff;
  padding: 12px 20px;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  z-index: 60;
  font-size: 14px;
  max-width: min(560px, 90vw);
}
.toast.error { background: #c02626; }

.footer {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 26px 28px;
  border-top: 1px solid var(--line);
  background: #fff;
  color: var(--ink-3);
  font-size: 13px;
}
.footer-links { display: flex; gap: 16px; }
.footer-links a:hover { color: var(--accent); }

.code {
  background: #14161c;
  color: #e6e8f0;
  border-radius: 12px;
  padding: 14px 16px;
  overflow-x: auto;
  font-size: 12.5px;
  line-height: 1.65;
  font-family: "Cascadia Code", Consolas, "Courier New", monospace;
  white-space: pre;
}
.code .c { color: #7f8aa3; }
