:root {
  --bg: #f5f7fb;
  --surface: rgba(255, 255, 255, 0.9);
  --line: #e7ecf4;
  --text: #0f172a;
  --muted: #64748b;
  --primary: #306cff;
  --primary-dark: #183fcb;
  --accent: #7c5cff;
  --success: #16a34a;
  --warning: #d97706;
  --danger: #dc2626;
  --shadow: 0 28px 80px rgba(15, 23, 42, 0.08);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 16px;
  --container: min(1180px, calc(100% - 32px));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(48, 108, 255, 0.12), transparent 28%),
    radial-gradient(circle at 90% 10%, rgba(124, 92, 255, 0.12), transparent 26%),
    linear-gradient(180deg, #f9fbff 0%, #f3f6fb 100%);
}

a { color: inherit; text-decoration: none; }
button, textarea { font: inherit; }
button { cursor: pointer; }
img, video { max-width: 100%; display: block; }

.container { width: var(--container); margin: 0 auto; }
.page-shell { min-height: 100vh; }
.surface,
.card,
.parser-panel {
  background: var(--surface);
  border: 1px solid rgba(231, 236, 244, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}
.card,
.surface,
.parser-panel { border-radius: var(--radius-lg); }
.hidden { display: none !important; }

.eyebrow,
.section-tag,
.panel-label,
.badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(48, 108, 255, 0.08);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 700;
}

.hero-text,
.section-copy p,
.panel-head p,
.faq-card p,
.feature-card p,
.scenario-list span,
.site-footer p,
.site-footer span,
.site-footer a,
.result-subtitle,
.hint-text {
  color: var(--muted);
  line-height: 1.8;
}
.eyebrow {
  width: fit-content;
  max-width: 100%;
  font-size: 11px;
  padding: 7px 11px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border: none;
  border-radius: 16px;
  font-weight: 700;
  transition: transform 180ms ease, opacity 180ms ease, box-shadow 180ms ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible { outline: 3px solid rgba(48, 108, 255, 0.2); outline-offset: 2px; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 20px 30px rgba(48, 108, 255, 0.22);
}
.btn-secondary { color: var(--text); background: #fff; border: 1px solid var(--line); }
.btn-ghost { color: var(--muted); background: rgba(241, 245, 249, 0.86); }
.btn-small { min-height: 40px; padding: 0 16px; }

.status { min-height: 24px; margin-top: 14px; font-weight: 700; }
.status.ok { color: var(--success); }
.status.warn { color: var(--warning); }
.status.err { color: var(--danger); }

.input-box {
  width: 100%;
  min-height: 136px;
  padding: 16px 18px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  resize: vertical;
  outline: none;
}
.input-box:focus {
  border-color: rgba(48, 108, 255, 0.5);
  box-shadow: 0 0 0 4px rgba(48, 108, 255, 0.12);
}

.cover-box,
#videoPlayer {
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #eef3fb;
}
.cover-box img,
#videoPlayer { width: 100%; }
#videoPlayer { max-height: 420px; background: #000; }
.cover-box {
  aspect-ratio: 16 / 10;
  max-height: 360px;
}
.cover-box img {
  width: 100%;
  height: 100%;
  max-height: 360px;
  object-fit: cover;
}

.image-item {
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
}
.image-preview {
  aspect-ratio: 16 / 10;
  background: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
}
.image-preview img,
.image-preview video { width: 100%; height: 100%; object-fit: cover; }

.raw-card pre {
  margin: 14px 0 0;
  padding: 14px;
  max-height: 380px;
  overflow: auto;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid var(--line);
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 13px;
  line-height: 1.7;
}

@media (max-width: 720px) {
  .container { width: min(100% - 24px, 1180px); }
  .image-preview { aspect-ratio: 4 / 3; }
}
