/* VidGen 原型设计系统 —— 依据 docs/brand.md（BRAND v1）+ 竞品设计语言（即梦/可灵/TapNow） */
:root {
  --bg-0: #0A0A0B; --bg-1: #131316; --bg-2: #1B1C20; --bg-3: #24252B;
  --fg: #F5F6F7; --muted: #9CA0A8; --border: rgba(255,255,255,.07);
  --acc: #8BE34D; --acc-ink: #0B1A06; --grad-a: #A6EE54; --grad-b: #4ADE80;
  --violet: #735CE5; --gold: #E8B85C; --danger: #F0564A; --radius: 10px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg-0); color: var(--fg); font-family: Geist, -apple-system, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif; font-size: 14px; line-height: 1.55; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
.grad-text { background: linear-gradient(90deg, var(--grad-a), var(--grad-b)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.grad-primary { background: linear-gradient(90deg, var(--grad-a), var(--grad-b)); color: var(--acc-ink); }
.muted { color: var(--muted); }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; background: var(--bg-3); border: 1px solid var(--border); font-size: 12px; color: var(--muted); }
.chip.active { background: rgba(139,227,77,.14); color: var(--acc); border-color: rgba(139,227,77,.35); }
.chip.violet { color: #B3A6F5; background: rgba(115,92,229,.15); border-color: rgba(115,92,229,.4); }
.chip.gold { color: var(--gold); background: rgba(232,184,92,.12); border-color: rgba(232,184,92,.35); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 18px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--bg-2); color: var(--fg); font-weight: 600; }
.btn:hover { background: var(--bg-3); }
.btn-primary { background: linear-gradient(90deg, var(--grad-a), var(--grad-b)); color: var(--acc-ink); border: none; box-shadow: 0 8px 24px rgba(139,227,77,.25); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-sm { padding: 5px 12px; font-size: 13px; border-radius: 8px; }
.btn-danger { background: rgba(240,86,74,.12); color: var(--danger); border-color: rgba(240,86,74,.35); }
.card { background: var(--bg-1); border: 1px solid var(--border); border-radius: 14px; }
.input, textarea.input { width: 100%; background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 9px 12px; color: var(--fg); outline: none; resize: vertical; }
.input:focus { border-color: rgba(139,227,77,.5); }
label.field { display: block; font-size: 12px; color: var(--muted); margin: 12px 0 5px; font-weight: 600; }

/* ---------- 应用外壳：左侧图标栏（对标即梦/可灵） ---------- */
.shell { display: flex; min-height: 100vh; }
.rail { position: fixed; inset: 0 auto 0 0; width: 64px; background: var(--bg-1); border-right: 1px solid var(--border); display: flex; flex-direction: column; align-items: center; padding: 12px 0; gap: 4px; z-index: 50; }
.rail .logo { width: 34px; height: 34px; border-radius: 8px; background: linear-gradient(135deg, var(--grad-a), #34D399); display: flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.rail .logo svg { width: 18px; height: 18px; }
.rail a.nav { width: 52px; padding: 7px 0 5px; border-radius: 10px; display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--muted); font-size: 10.5px; }
.rail a.nav svg { width: 20px; height: 20px; }
.rail a.nav:hover { background: var(--bg-2); color: var(--fg); }
.rail a.nav.active { background: rgba(139,227,77,.12); color: var(--acc); }
.rail .spacer { flex: 1; }
.main { flex: 1; margin-left: 64px; display: flex; flex-direction: column; min-height: 100vh; }
.topbar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 14px; padding: 10px 22px; background: rgba(10,10,11,.75); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.topbar .title { font-weight: 700; font-size: 15px; }
.topbar .grow { flex: 1; }
.avatar { width: 30px; height: 30px; border-radius: 999px; background: linear-gradient(135deg, var(--violet), var(--grad-b)); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: #fff; }
.content { padding: 22px; max-width: 1280px; width: 100%; margin: 0 auto; }

/* ---------- 媒体占位（渐变缩略图） ---------- */
.thumb { position: relative; border-radius: 12px; overflow: hidden; background: var(--bg-2); border: 1px solid var(--border); }
.thumb::before { content: ""; display: block; padding-top: 56.25%; }
.thumb.p916::before { padding-top: 177%; }
.thumb .ph { position: absolute; inset: 0; }
.g1 { background: linear-gradient(135deg, #16351c, #0e5a3a 60%, #123); }
.g2 { background: linear-gradient(135deg, #2b1a4d, #143c56); }
.g3 { background: linear-gradient(135deg, #4d2a1a, #1a3d2b); }
.g4 { background: linear-gradient(135deg, #10222e, #34452a); }
.g5 { background: linear-gradient(135deg, #3d1f33, #1c2a4f); }
.g6 { background: linear-gradient(135deg, #223, #295c3f); }
.thumb .play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.thumb .play span { width: 40px; height: 40px; border-radius: 999px; background: rgba(0,0,0,.45); border: 1px solid rgba(255,255,255,.25); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 15px; }
.thumb .meta { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 10px 8px; background: linear-gradient(transparent, rgba(0,0,0,.72)); display: flex; align-items: center; gap: 6px; font-size: 12px; }
.badge { position: absolute; top: 8px; left: 8px; font-size: 11px; padding: 2px 8px; border-radius: 6px; background: rgba(0,0,0,.55); border: 1px solid rgba(255,255,255,.15); }

.grid { display: grid; gap: 14px; }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
.cols-5 { grid-template-columns: repeat(5, 1fr); }

/* ---------- 中央 Agent 输入框（对标即梦/TapNow） ---------- */
.hero-input { max-width: 860px; margin: 0 auto; background: var(--bg-1); border: 1px solid var(--border); border-radius: 18px; padding: 16px 18px; box-shadow: 0 20px 60px rgba(0,0,0,.4); }
.hero-input textarea { width: 100%; background: transparent; border: none; outline: none; color: var(--fg); font-size: 15px; min-height: 64px; resize: none; }
.hero-input .row { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.send { width: 36px; height: 36px; border-radius: 999px; border: none; background: linear-gradient(90deg, var(--grad-a), var(--grad-b)); color: var(--acc-ink); font-size: 16px; margin-left: auto; }

/* ---------- 表格 ---------- */
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; color: var(--muted); font-weight: 600; padding: 9px 12px; border-bottom: 1px solid var(--border); }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--border); }
.status { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; }
.dot { width: 7px; height: 7px; border-radius: 99px; }
.dot.ok { background: var(--grad-b); } .dot.run { background: var(--gold); animation: pulse 1.2s infinite; } .dot.err { background: var(--danger); } .dot.wait { background: var(--muted); }
@keyframes pulse { 50% { opacity: .35; } }
.bar { height: 6px; border-radius: 99px; background: var(--bg-3); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--grad-a), var(--grad-b)); }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 4px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 12px; padding: 4px; width: fit-content; }
.tabs button { padding: 7px 16px; border-radius: 9px; border: none; background: transparent; color: var(--muted); font-weight: 600; }
.tabs button.active { background: var(--bg-3); color: var(--acc); }

/* ---------- 时间线编辑器 ---------- */
.tl-wrap { background: var(--bg-1); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.tl-toolbar { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-bottom: 1px solid var(--border); background: var(--bg-2); font-size: 12.5px; }
.tl-ruler { display: flex; height: 22px; border-bottom: 1px solid var(--border); color: var(--muted); font-size: 10px; }
.tl-ruler i { flex: 1; border-left: 1px solid var(--border); padding: 3px 0 0 4px; font-style: normal; }
.tl-track { display: flex; align-items: center; gap: 0; border-bottom: 1px solid var(--border); min-height: 52px; position: relative; }
.tl-label { width: 92px; min-width: 92px; padding: 6px 10px; font-size: 11.5px; color: var(--muted); border-right: 1px solid var(--border); align-self: stretch; display: flex; flex-direction: column; justify-content: center; gap: 3px; }
.tl-lane { flex: 1; display: flex; align-items: center; gap: 4px; padding: 7px 8px; overflow-x: auto; }
.clip { position: relative; height: 38px; border-radius: 8px; min-width: 70px; border: 1px solid rgba(139,227,77,.45); background: linear-gradient(135deg, rgba(139,227,77,.2), rgba(74,222,128,.12)); font-size: 11px; display: flex; align-items: center; justify-content: center; padding: 0 12px; white-space: nowrap; }
.clip.audio { border-color: rgba(115,92,229,.5); background: repeating-linear-gradient(90deg, rgba(115,92,229,.28) 0 2px, rgba(115,92,229,.1) 2px 6px); }
.clip.sub { border-color: rgba(232,184,92,.5); background: rgba(232,184,92,.12); height: 28px; }
.clip .hnd { position: absolute; top: 4px; bottom: 4px; width: 5px; border-radius: 3px; background: rgba(255,255,255,.55); }
.clip .hnd.l { left: 3px; } .clip .hnd.r { right: 3px; }
.trans { width: 22px; height: 22px; min-width: 22px; border-radius: 99px; background: var(--bg-3); border: 1px solid var(--acc); color: var(--acc); font-size: 10px; display: flex; align-items: center; justify-content: center; z-index: 2; margin: 0 -8px; }
.playhead { position: absolute; top: 0; bottom: 0; left: 38%; width: 2px; background: var(--acc); z-index: 5; }
.playhead::before { content: ""; position: absolute; top: -1px; left: -5px; border: 6px solid transparent; border-top-color: var(--acc); }

/* ---------- 登录 ---------- */
.auth-split { display: grid; grid-template-columns: 1.1fr 1fr; min-height: 100vh; }
.auth-visual { background: radial-gradient(120% 120% at 20% 10%, rgba(139,227,77,.25), transparent 55%), linear-gradient(160deg, #10240f, var(--bg-0) 70%); display: flex; flex-direction: column; justify-content: center; padding: 8vw; }

/* ---------- 移动端适配（390px 基准） ---------- */
.bottom-nav { display: none; }
@media (max-width: 768px) {
  .rail { display: none; }
  .main { margin-left: 0; padding-bottom: 64px; }
  .content { padding: 14px; }
  .cols-3, .cols-4, .cols-5 { grid-template-columns: repeat(2, 1fr); }
  .cols-2 { grid-template-columns: 1fr; }
  .auth-split { grid-template-columns: 1fr; }
  .auth-visual { min-height: 30vh; padding: 24px; }
  .bottom-nav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: rgba(19,19,22,.92); backdrop-filter: blur(12px); border-top: 1px solid var(--border); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .bottom-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10px; color: var(--muted); }
  .bottom-nav a.active { color: var(--acc); }
  .bottom-nav svg { width: 20px; height: 20px; }
  .tl-label { width: 64px; min-width: 64px; }
  .hide-m { display: none !important; }
}
h1.page { font-size: 20px; font-weight: 800; margin-bottom: 4px; }
p.sub { color: var(--muted); margin-bottom: 18px; font-size: 13px; }
.section-title { display: flex; align-items: center; gap: 10px; margin: 26px 0 12px; font-size: 15px; font-weight: 700; }
.section-title .more { margin-left: auto; font-size: 12.5px; color: var(--muted); font-weight: 400; }
