:root {
  color-scheme: dark;
  --bg: #090b0f;
  --panel: #11151b;
  --panel-2: #171c24;
  --line: #282f3a;
  --text: #f5f7fa;
  --muted: #8d97a6;
  --accent: #61e294;
  --accent-2: #9ef1bc;
  --danger: #ff7d7d;
  --warn: #f3c969;
  --radius: 20px;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 50% -10%, rgba(97,226,148,.12), transparent 32rem),
    linear-gradient(180deg, #090b0f 0%, #0c1015 100%);
  color: var(--text);
}
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.page-shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.topbar { height: 92px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; gap: 12px; align-items: center; color: var(--text); text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--accent); color: #071109; font-weight: 900; }
.brand strong, .brand small { display: block; }
.brand strong { letter-spacing: -.02em; }
.brand small { margin-top: 2px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .12em; }
.top-actions { display: flex; gap: 8px; align-items: center; }
.top-actions form { margin: 0; }
.hero { padding: 100px 0 38px; text-align: center; }
.eyebrow { color: var(--accent); font-size: 12px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
h1 { margin: 14px 0 14px; font-size: clamp(40px, 7vw, 76px); line-height: .98; letter-spacing: -.055em; }
.hero > p { max-width: 650px; margin: 0 auto; color: var(--muted); line-height: 1.7; }
.parser-box { width: min(840px, 100%); margin: 42px auto 0; padding: 12px; border: 1px solid var(--line); background: rgba(17,21,27,.88); border-radius: 24px; box-shadow: 0 28px 80px rgba(0,0,0,.35); text-align: left; }
.url-label { display: block; padding: 8px 10px 10px; color: var(--muted); font-size: 12px; }
.url-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.url-row input, .stack-form input, .stack-form textarea, dialog textarea {
  width: 100%; border: 1px solid var(--line); background: #0b0f14; color: var(--text); border-radius: 14px; padding: 15px 16px; outline: none;
}
.url-row input { min-height: 54px; }
input:focus, textarea:focus { border-color: #4e8c67; box-shadow: 0 0 0 3px rgba(97,226,148,.08); }
.primary-button, .secondary-button, .ghost-button, .text-button, .variant-button, .icon-button {
  border: 0; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; transition: .18s ease;
}
.primary-button { min-height: 48px; padding: 0 22px; border-radius: 14px; background: var(--accent); color: #071109; font-weight: 800; }
.primary-button:hover { background: var(--accent-2); transform: translateY(-1px); }
.primary-button:disabled { opacity: .55; cursor: wait; transform: none; }
.secondary-button, .ghost-button { min-height: 42px; padding: 0 16px; border-radius: 12px; background: var(--panel-2); color: var(--text); border: 1px solid var(--line); }
.secondary-button:hover, .ghost-button:hover { background: #202631; }
.text-button { margin-left: auto; background: transparent; color: var(--accent); padding: 4px 0; }
.parser-meta { display: flex; align-items: center; gap: 8px; padding: 12px 10px 4px; color: var(--muted); font-size: 12px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--warn); box-shadow: 0 0 0 4px rgba(243,201,105,.08); }
.status-dot.ok { background: var(--accent); box-shadow: 0 0 0 4px rgba(97,226,148,.08); }
.message-area { width: min(840px, 100%); margin: 0 auto 22px; }
.alert { border: 1px solid var(--line); border-radius: 14px; padding: 13px 15px; background: var(--panel); color: var(--muted); }
.alert-error { border-color: rgba(255,125,125,.3); color: #ffc0c0; background: rgba(255,125,125,.06); }
.alert-success { border-color: rgba(97,226,148,.25); color: #baf7cf; background: rgba(97,226,148,.06); }
.alert-info { color: #b6c1cf; }
.result-card { display: grid; grid-template-columns: minmax(260px, 380px) 1fr; gap: 0; width: min(980px, 100%); margin: 14px auto 64px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: 0 30px 90px rgba(0,0,0,.32); }
.hidden { display: none !important; }
.cover-panel { min-height: 470px; position: relative; background: #050709; display: grid; place-items: center; overflow: hidden; }
.cover-panel img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.cover-fallback { font-size: 56px; letter-spacing: -.06em; color: #29313d; font-weight: 900; transform: rotate(-8deg); }
.result-body { padding: 34px; }
.result-topline { display: flex; justify-content: space-between; gap: 14px; align-items: center; }
.pill { font-size: 11px; color: #baf7cf; border: 1px solid rgba(97,226,148,.22); background: rgba(97,226,148,.08); padding: 6px 9px; border-radius: 999px; }
.muted { color: var(--muted); font-size: 12px; }
.result-body h2 { margin: 18px 0 14px; font-size: clamp(25px, 4vw, 42px); line-height: 1.12; letter-spacing: -.035em; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.author-row { display: flex; align-items: center; gap: 10px; color: #c7ced8; }
.author-row img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; background: var(--panel-2); }
.variant-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0 14px; }
.variant-button { border: 1px solid var(--line); background: transparent; color: var(--muted); border-radius: 999px; padding: 8px 12px; }
.variant-button.active { border-color: rgba(97,226,148,.5); background: rgba(97,226,148,.09); color: var(--accent-2); }
.video-wrap { width: 100%; aspect-ratio: 16 / 9; background: #050608; border: 1px solid #202631; border-radius: 14px; overflow: hidden; }
.video-wrap video { width: 100%; height: 100%; object-fit: contain; }
.result-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.fine-print { color: var(--muted); font-size: 12px; line-height: 1.6; margin: 14px 0 0; }
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 0 auto 100px; }
.info-grid article { border: 1px solid var(--line); background: rgba(17,21,27,.58); padding: 24px; border-radius: 16px; }
.info-grid article > span { color: var(--accent); font-size: 11px; font-weight: 800; }
.info-grid h3 { margin: 28px 0 8px; font-size: 18px; }
.info-grid p { color: var(--muted); margin: 0; line-height: 1.6; font-size: 13px; }
.auth-card { width: min(620px, 100%); margin: 80px auto 120px; padding: 38px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel); }
.auth-card.compact { width: min(480px, 100%); }
.auth-card h1 { font-size: 42px; margin-top: 10px; }
.auth-card > p { color: var(--muted); line-height: 1.65; }
.stack-form { display: grid; gap: 16px; margin-top: 26px; }
.stack-form label, dialog label { color: #c6ced8; font-size: 13px; display: grid; gap: 8px; }
.stack-form textarea, dialog textarea { resize: vertical; min-height: 100px; }
footer { border-top: 1px solid var(--line); padding: 28px 0 46px; color: #626d7b; font-size: 12px; text-align: center; }
dialog { width: min(680px, calc(100% - 28px)); padding: 0; border: 1px solid var(--line); border-radius: 18px; background: #11151b; color: var(--text); box-shadow: 0 30px 100px rgba(0,0,0,.6); }
dialog::backdrop { background: rgba(0,0,0,.72); backdrop-filter: blur(5px); }
.dialog-card { padding: 28px; }
.dialog-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; }
.dialog-head h2 { margin: 7px 0 0; }
.dialog-card > p { color: var(--muted); line-height: 1.65; font-size: 13px; }
.icon-button { width: 36px; height: 36px; border-radius: 10px; background: var(--panel-2); color: var(--muted); font-size: 24px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.diagnostics { margin-top: 13px; border: 1px solid var(--line); background: #0b0f14; padding: 12px; border-radius: 10px; color: var(--muted); font-size: 12px; }
@media (max-width: 760px) {
  .page-shell { width: min(100% - 24px, 1180px); }
  .topbar { height: 74px; }
  .hero { padding-top: 62px; }
  .url-row { grid-template-columns: 1fr; }
  .url-row .primary-button { width: 100%; }
  .result-card { grid-template-columns: 1fr; }
  .cover-panel { min-height: 300px; aspect-ratio: 16 / 11; }
  .result-body { padding: 22px; }
  .info-grid { grid-template-columns: 1fr; }
  .auth-card { padding: 24px; margin-top: 44px; }
  .top-actions .ghost-button { padding: 0 11px; }
}
