:root {
  color-scheme: light;
  --ink: #101114;
  --muted: #6f737b;
  --line: #e5e6e9;
  --surface: rgba(255, 255, 255, 0.86);
  --accent: #1473e6;
  --accent-strong: #075fcb;
  --success: #0c9b68;
  --danger: #d24343;
  --warning: #a36b00;
  --shadow: 0 20px 60px rgba(16, 17, 20, 0.08);
  font-family: Inter, "SF Pro Display", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: #f5f6f8;
  overflow-x: hidden;
}

button, textarea, input { font: inherit; }
button { cursor: pointer; }

.ambient {
  position: fixed;
  z-index: -1;
  filter: blur(1px);
  pointer-events: none;
  border-radius: 999px;
}

.ambient-one {
  width: 520px;
  height: 520px;
  top: 80px;
  right: -180px;
  background: radial-gradient(circle, rgba(20, 115, 230, 0.15), rgba(20, 115, 230, 0));
}

.ambient-two {
  width: 460px;
  height: 460px;
  top: 520px;
  left: -220px;
  background: radial-gradient(circle, rgba(139, 149, 168, 0.13), rgba(139, 149, 168, 0));
}

.topbar {
  height: 76px;
  padding: 0 max(28px, calc((100vw - 1180px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(16, 17, 20, 0.08);
  background: rgba(255, 255, 255, 0.74);
  backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand { display: flex; align-items: center; color: var(--ink); text-decoration: none; }
.brand-mark { font-weight: 900; font-size: 23px; letter-spacing: -1.5px; font-style: italic; }
.brand-divider { height: 22px; width: 1px; background: #c7c9ce; margin: 0 16px; }
.brand-product { font-size: 12px; letter-spacing: 2px; font-weight: 650; }

.system-state {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  color: var(--muted);
}

.state-dot { width: 7px; height: 7px; border-radius: 50%; background: #b4b7bd; box-shadow: 0 0 0 5px rgba(180, 183, 189, 0.15); }
.state-dot.ready { background: var(--success); box-shadow: 0 0 0 5px rgba(12, 155, 104, 0.12); }
.state-dot.warning { background: #e2a323; box-shadow: 0 0 0 5px rgba(226, 163, 35, 0.13); }

main { width: min(1180px, calc(100% - 48px)); margin: 0 auto; }

.hero { padding: 84px 0 48px; max-width: 760px; }
.eyebrow { color: var(--accent); font-size: 11px; font-weight: 750; letter-spacing: 3px; margin: 0 0 23px; }
.hero h1 { margin: 0; font-size: clamp(44px, 6vw, 74px); line-height: 1.03; letter-spacing: -4px; font-weight: 680; }
.hero h1 span { color: #9da1aa; font-weight: 480; }
.hero-copy { max-width: 610px; color: var(--muted); font-size: 16px; line-height: 1.8; margin: 28px 0 0; }

.stats-grid { display: grid; grid-template-columns: 1.35fr 1fr 1fr; gap: 14px; margin-bottom: 18px; }
.stat-card { background: var(--surface); border: 1px solid rgba(16, 17, 20, 0.08); border-radius: 18px; padding: 23px 24px 21px; box-shadow: 0 8px 30px rgba(16, 17, 20, 0.035); backdrop-filter: blur(14px); }
.stat-primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.stat-label { font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; gap: 10px; }
.stat-primary .stat-label { color: #aeb2bb; }
.stat-label span { font-size: 10px; text-transform: uppercase; letter-spacing: .8px; }
.stat-value { display: flex; align-items: baseline; gap: 8px; margin-top: 10px; }
.stat-value strong { font-size: 40px; font-weight: 620; letter-spacing: -2px; }
.stat-value span { font-size: 12px; color: var(--muted); }
.stat-primary .stat-value span { color: #aeb2bb; }
.stat-card p { margin: 8px 0 0; font-size: 11px; color: #969aa2; }
.progress { height: 2px; background: #36383c; margin-top: 16px; overflow: hidden; }
.progress div { height: 100%; width: 0; background: var(--accent); transition: width .5s ease; }

.workspace-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(320px, .9fr); gap: 18px; }
.panel { background: var(--surface); border: 1px solid rgba(16, 17, 20, 0.08); border-radius: 22px; padding: 28px; box-shadow: var(--shadow); backdrop-filter: blur(14px); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 26px; }
.panel-heading > div { display: flex; align-items: center; gap: 12px; }
.panel h2 { font-size: 17px; margin: 0; font-weight: 650; }
.step-number { color: var(--accent); font-weight: 750; font-size: 11px; letter-spacing: 1px; }
.counter { background: #f0f1f3; padding: 6px 9px; border-radius: 7px; font-size: 11px; color: var(--muted); }

label { display: block; font-size: 12px; color: #52565d; margin-bottom: 10px; font-weight: 560; }
.textarea-wrap { position: relative; }
textarea, input {
  width: 100%;
  border: 1px solid #d9dbe0;
  background: rgba(248, 249, 250, 0.85);
  color: var(--ink);
  border-radius: 12px;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
textarea { padding: 17px 72px 17px 17px; min-height: 200px; line-height: 1.65; resize: vertical; font-family: "SFMono-Regular", Consolas, monospace; font-size: 12px; }
input { height: 46px; padding: 0 14px; }
textarea:focus, input:focus { border-color: var(--accent); background: #fff; box-shadow: 0 0 0 4px rgba(20, 115, 230, 0.09); }
textarea::placeholder, input::placeholder { color: #a9adb4; }
.paste-button { position: absolute; right: 10px; top: 10px; border: 0; background: #fff; color: #555a63; border-radius: 7px; padding: 7px 10px; font-size: 11px; box-shadow: 0 2px 9px rgba(16, 17, 20, .08); }
.field-help { margin: 9px 0 20px; font-size: 11px; color: #92969d; }
.access-row { margin: 4px 0 18px; }

.notice { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; margin: 0 0 16px; border-radius: 10px; font-size: 12px; background: rgba(20, 115, 230, .08); color: var(--accent-strong); }
.notice strong { font-size: 12px; }
.notice.warning { background: #fff7e5; color: var(--warning); }
.notice.success { background: #ecfaf5; color: #087f56; }
.notice.error { background: #fff0f0; color: var(--danger); }

.submit-button { width: 100%; height: 52px; border: 0; border-radius: 10px; color: #fff; background: var(--ink); display: flex; align-items: center; justify-content: center; gap: 14px; font-size: 13px; font-weight: 620; transition: transform .18s ease, background .18s ease; }
.submit-button:hover { background: #25272b; transform: translateY(-1px); }
.submit-button:disabled { cursor: not-allowed; opacity: .45; transform: none; }
.submit-button svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; }

.history-panel { min-height: 482px; }
.icon-button { width: 32px; height: 32px; border: 1px solid var(--line); background: #fff; border-radius: 8px; color: #747880; display: grid; place-items: center; }
.icon-button svg { width: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.history-list { display: flex; flex-direction: column; gap: 1px; }
.history-empty { min-height: 310px; display: grid; place-content: center; text-align: center; color: #8f939b; }
.history-empty span { font-size: 13px; }
.history-empty p { margin: 7px 0 0; font-size: 11px; }
.history-item { display: grid; grid-template-columns: 8px minmax(0, 1fr); gap: 12px; padding: 13px 2px; border-bottom: 1px solid #eceef0; }
.history-item:last-child { border-bottom: 0; }
.history-status { width: 7px; height: 7px; margin-top: 5px; border-radius: 50%; background: var(--success); }
.history-status.failed { background: var(--danger); }
.history-url { font-size: 11px; color: #34383e; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.history-meta { margin-top: 5px; display: flex; justify-content: space-between; gap: 8px; color: #a0a4aa; font-size: 9px; }

.guide-strip { margin: 18px 0 70px; padding: 22px 28px; border: 1px solid rgba(16, 17, 20, .07); border-radius: 18px; background: rgba(255,255,255,.58); display: flex; align-items: center; justify-content: space-between; }
.guide-strip > div:not(.guide-line) { display: flex; align-items: center; gap: 12px; }
.guide-strip span { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid #d8dae0; border-radius: 50%; font-size: 10px; color: var(--accent); }
.guide-strip p { margin: 0; font-size: 10px; color: #9a9ea5; line-height: 1.55; }
.guide-strip strong { display: block; color: #4d5158; font-size: 11px; }
.guide-line { width: 8%; height: 1px; background: #dfe1e5; }

footer { border-top: 1px solid rgba(16,17,20,.08); padding: 28px max(28px, calc((100vw - 1180px) / 2)); display: flex; justify-content: space-between; color: #9ca0a7; font-size: 10px; letter-spacing: .7px; }

@media (max-width: 820px) {
  .topbar { height: 66px; padding: 0 20px; }
  .brand-product { display: none; }
  .brand-divider { display: none; }
  main { width: min(100% - 30px, 620px); }
  .hero { padding: 54px 0 36px; }
  .hero h1 { font-size: clamp(41px, 12vw, 58px); letter-spacing: -3px; }
  .hero-copy { font-size: 14px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat-primary { grid-column: 1 / -1; }
  .workspace-grid { grid-template-columns: 1fr; }
  .guide-strip { align-items: flex-start; gap: 16px; flex-direction: column; }
  .guide-line { width: 1px; height: 14px; margin-left: 14px; }
}

@media (max-width: 500px) {
  main { width: calc(100% - 22px); }
  .system-state span:last-child { display: none; }
  .hero { padding-top: 42px; }
  .stats-grid { grid-template-columns: 1fr; }
  .stat-primary { grid-column: auto; }
  .panel { padding: 21px; border-radius: 17px; }
  .stat-card { padding: 19px; }
  footer { padding: 24px 18px; flex-direction: column; gap: 8px; }
}
