:root {
  --bg: #0f1115;
  --bg-2: #161a21;
  --bg-3: #1d222b;
  --line: #2a313c;
  --text: #e8e6e1;
  --text-dim: #9aa3af;
  --gold: #C9A961;
  --gold-soft: #e3c989;
  --green: #4caf7d;
  --red: #d65a5a;
  --radius: 10px;
  --sidebar-w: 225px;   /* 2026-08-13 宝爸：sidebar 200→150→225，导航字放大1.5倍后仍不溢出 */
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
}
.hidden { display: none !important; }

/* ---------------- 登录 ---------------- */
.login-modal {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 30%, #1a1f29, #0b0d11);
}
.login-card {
  width: 360px; padding: 40px 32px; text-align: center;
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.brand { font-size: 30px; font-weight: 800; color: var(--gold); letter-spacing: 4px; }
.brand-sub { color: var(--text-dim); font-size: 12px; margin: 8px 0 28px; }
.login-form { display: flex; flex-direction: column; gap: 12px; }
.login-form input {
  background: var(--bg-3); border: 1px solid var(--line); color: var(--text);
  padding: 11px 14px; border-radius: 8px; font-size: 15px; outline: none;
}
.login-form input:focus { border-color: var(--gold); }
.login-msg { color: var(--red); font-size: 13px; min-height: 16px; }
.password-wrap { position: relative; }
.password-wrap input { width: 100%; padding-right: 38px; }
.toggle-pass {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--text-dim);
  font-size: 14px; cursor: pointer; padding: 4px;
}
.toggle-pass.active { color: var(--gold); }

/* ---------------- 框架 ---------------- */
.app { display: flex; height: 100vh; }
.app.sidebar-hidden .sidebar { display: none; }
.app.sidebar-hidden .content { width: 100%; }
.app.sidebar-hidden .topbar { display: none; }  /* 项目四页隐藏全局顶栏，统一用 #studio-head */
.sidebar {
  width: var(--sidebar-w); flex: 0 0 var(--sidebar-w);
  background: var(--bg-2); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 0;
}
.logo {
  color: var(--gold); font-weight: 800; font-size: 27px; letter-spacing: 3px;
  height: 90px; display: flex; align-items: center; justify-content: center;
  padding: 0 30px; border-bottom: 1px solid var(--line);
  /* 2026-08-13 宝爸：logo 与顶部 topbar 标题同高居中，底部线与 topbar 底边对齐 */
}
.nav { flex: 1; display: flex; flex-direction: column; padding: 27px 15px 21px; gap: 6px; }
.nav a {
  color: var(--text-dim); text-decoration: none; padding: 15px 21px;
  border-radius: 12px; font-size: 23px; transition: .15s;
  text-align: center;   /* 2026-08-13 宝爸：导航文字在 sidebar 内居中 */
}
.nav a:hover { background: var(--bg-3); color: var(--text); }
.nav a.active { background: linear-gradient(90deg, rgba(201,169,97,.18), transparent); color: var(--gold-soft); font-weight: 600; }
/* 2026-08-13 宝爸：导航项全部居中；"AI 群聊"加 letter-spacing 使其视觉宽度与 4 字项一致 */
.nav a[data-route="chat"] { letter-spacing: 1.5px; }
.sidebar-foot { padding: 18px 24px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; font-size: 20px; color: var(--text-dim); }

.content { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.topbar {
  height: 60px; flex: 0 0 60px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px; border-bottom: 1px solid var(--line); background: var(--bg-2);
}
.topbar h1 { font-size: 18px; font-weight: 700; margin: 0; }
.topbar-actions { display: flex; gap: 10px; }
.wallet-balance {
  margin-left: auto; font-size: 15px; font-weight: 700; color: var(--gold);
  background: color-mix(in srgb, var(--gold) 12%, transparent);
  padding: 6px 14px; border-radius: 999px; white-space: nowrap; user-select: none;
}
.view { flex: 1; overflow-y: auto; padding: 28px; }

/* ---------------- 按钮 ---------------- */
.btn {
  border: none; border-radius: 8px; padding: 11px 20px; font-size: 15px;
  cursor: pointer; font-weight: 600; transition: .15s;
}
.btn-gold { background: var(--gold); color: #1a1308; }
.btn-gold:hover { background: var(--gold-soft); }
/* 一键多模型并行生成：电光蓝紫，醒目区分于单模型金色 */
.btn-electric { background: linear-gradient(135deg, #4f7cff, #7b5cff); color: #fff; box-shadow: 0 2px 12px rgba(91, 110, 255, .35); }
.btn-electric:hover { filter: brightness(1.1); box-shadow: 0 4px 16px rgba(91, 110, 255, .5); }
.btn-electric:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; filter: none; }
.btn-ghost { background: transparent; color: var(--text-dim); border: 1px solid var(--line); }
.btn-ghost:hover { color: var(--text); border-color: var(--gold); }
.btn-mini { background: transparent; color: var(--text-dim); border: 1px solid var(--line); border-radius: 6px; padding: 5px 12px; font-size: 13px; cursor: pointer; }
.btn-mini:hover { color: var(--text); }
.btn-xs { padding: 4px 10px; font-size: 12px; border-radius: 6px; white-space: nowrap; }
.save-status { font-size: 12px; color: var(--green); }

/* ---------------- 卡片/网格 ---------------- */
.grid { display: grid; gap: 16px; }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; transition: .15s;
}
.card:hover { border-color: var(--gold); }
.stat { display: flex; flex-direction: column; gap: 6px; }
.stat .num { font-size: 28px; font-weight: 800; color: var(--gold); }
.stat .lbl { color: var(--text-dim); font-size: 13px; }

.section-title { font-size: 17px; font-weight: 700; margin: 0 0 14px; color: var(--text); }
.muted { color: var(--text-dim); }
.empty { color: var(--text-dim); text-align: center; padding: 60px 0; }

/* ---------------- 缩略图 ---------------- */
.thumb { width: 100%; aspect-ratio: 9/16; object-fit: cover; border-radius: 8px; background: var(--bg-3); border: 1px solid var(--line); }
.thumb-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.thumb-row img, .thumb-row video { width: 48px; height: 64px; object-fit: cover; border-radius: 5px; border: 1px solid var(--line); }
.golden-badge { color: var(--gold); font-size: 12px; }

/* ---------------- 表单 ---------------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 920px; }
.field { display: flex; flex-direction: column; gap: 10px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 18px; color: var(--text-dim); font-weight: 600; }
.field input, .field select, .field textarea {
  width: 100%; box-sizing: border-box;
  background: var(--bg-3); border: 1px solid var(--line); color: var(--text);
  padding: 14px 18px; border-radius: 8px; font-size: 18px; outline: none; font-family: inherit;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--gold); }
.field textarea { resize: vertical; min-height: 120px; }

/* 类型卡片选择（对标剧创比例选择器） */
.type-card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.type-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; padding: 16px 8px;
  background: var(--bg-3); border: 1px solid var(--line); border-radius: 10px;
  cursor: pointer; transition: all .15s ease;
  user-select: none;
}
.type-card:hover { border-color: rgba(201,169,97,.5); background: rgba(201,169,97,.05); }
.type-card.selected {
  border-color: var(--gold); background: rgba(201,169,97,.12);
  box-shadow: 0 0 0 1px var(--gold);
}
.type-card-icon { font-size: 28px; line-height: 1; }
.type-card-label { font-size: 13px; color: var(--text); font-weight: 500; }
@media (max-width: 720px) {
  .type-card-grid { grid-template-columns: repeat(2, 1fr); }
}

/* 剧本大纲文本框（深色统一） */
.script-outline {
  background: var(--bg-2) !important;
  color: var(--text) !important;
  border-color: var(--line) !important;
  min-height: 240px;
  line-height: 1.8;
  font-size: 14px;
  padding: 16px;
  border-radius: 10px;
  font-family: inherit;
  letter-spacing: 0.3px;
}
.script-outline::placeholder { color: var(--text-dim); }
.script-outline:focus {
  border-color: var(--gold) !important;
  box-shadow: 0 0 0 3px rgba(201,169,97,.15) !important;
}

/* 剧本信息表单（一行 6 列：标题占 2 份，AI 分析占 2 份） */
.script-form-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr 2fr;
  gap: 8px;
  max-width: 1100px;
  margin-bottom: 12px;
  align-items: end;
}
@media (max-width: 900px) {
  .script-form-row { grid-template-columns: 2fr 1fr 1fr; }
  .script-form-row .ai-field { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .script-form-row { grid-template-columns: 1fr 1fr; }
  .script-form-row .ai-field { grid-column: 1 / -1; }
}

/* AI 分析紧凑状态条（放在分辨率后面） */
.ai-status-bar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  min-height: 38px; padding: 6px 10px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px;
  font-size: 13px;
}
.ai-status-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.ai-status-text { font-weight: 600; margin-right: 4px; white-space: nowrap; }
.ai-stat-pill {
  padding: 2px 8px; border-radius: 12px;
  background: rgba(201,169,97,.10); border: 1px solid rgba(201,169,97,.25);
  color: var(--gold); font-size: 12px; white-space: nowrap;
}

/* 剧本信息下拉（对标剧创紫色高亮下拉） */
.script-select {
  appearance: none;
  -webkit-appearance: none;
  background-color: var(--bg-2) !important;
  color: var(--text) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23a78bfa' d='M6 8L0 0h12z'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 10px center !important;
  background-size: 10px !important;
  border: 1.5px solid var(--line) !important;
  border-radius: 8px !important;
  padding: 8px 28px 8px 12px !important;
  font-size: 13px !important;
  font-family: inherit !important;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.script-select:hover { border-color: rgba(167,139,250,.4) !important; }
.script-select:focus {
  outline: none;
  border-color: #a78bfa !important;
  box-shadow: 0 0 0 3px rgba(167,139,250,.18) !important;
}
.script-select option { background: var(--bg-2); color: var(--text); }
.script-outline:focus { border-color: var(--gold) !important; }

/* AI 人物小传卡片 */
.char-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.char-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
}
.char-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.char-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), rgba(201,169,97,.3));
  color: var(--bg-1);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; flex-shrink: 0;
}
.char-name { font-size: 15px; font-weight: 600; color: var(--text); }
.char-alias { font-size: 12px; color: var(--text-dim); font-weight: 400; margin-left: 4px; }
.char-meta { font-size: 12px; color: var(--text-dim); margin-top: 2px; }
.char-bio { font-size: 13px; color: var(--text); line-height: 1.6; margin-bottom: 8px; }
.char-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.char-prompt { font-size: 12px; color: var(--text-dim); line-height: 1.5; padding-top: 8px; border-top: 1px solid var(--line); }

/* AI 分集剧情分页 */
.ep-pagination {
  display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px;
}
.ep-page-btn {
  min-width: 32px; height: 32px; padding: 0 10px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 6px;
  color: var(--text); font-size: 13px; cursor: pointer; transition: .15s;
}
.ep-page-btn:hover { border-color: var(--gold); color: var(--gold); }
.ep-page-btn.active { background: var(--gold); color: var(--bg-1); border-color: var(--gold); }
.ep-card {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 16px;
}
.ep-title { font-size: 15px; font-weight: 600; color: var(--gold); margin-bottom: 8px; }
.ep-summary { font-size: 13px; color: var(--text-dim); line-height: 1.6; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.ep-section { margin-bottom: 12px; }
.ep-section-title { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.ep-section-body { font-size: 13px; color: var(--text-dim); line-height: 1.7; }

/* ---------------- 表格/任务 ---------------- */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 14px; }
th { color: var(--text-dim); font-weight: 600; }
.pill { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.pill.pending { background: rgba(154,163,175,.18); color: var(--text-dim); }
.pill.running { background: rgba(201,169,97,.18); color: var(--gold-soft); }
.pill.succeeded { background: rgba(76,175,125,.18); color: var(--green); }
.pill.failed { background: rgba(214,90,90,.18); color: var(--red); }
.pill.canceled { background: rgba(154,163,175,.12); color: var(--text-dim); }

.progress { height: 6px; background: var(--bg-3); border-radius: 4px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--gold); transition: width .3s; }

.job-line { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.job-line .t { flex: 0 0 150px; }
.job-line .bar { flex: 1; }

/* ---------------- Toast ---------------- */
.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%);
  background: var(--bg-3); border: 1px solid var(--gold); color: var(--text);
  padding: 12px 22px; border-radius: 10px; z-index: 60; box-shadow: 0 10px 30px rgba(0,0,0,.4);
}

.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.tag { font-size: 12px; color: var(--text-dim); border: 1px solid var(--line); padding: 3px 10px; border-radius: 6px; }

/* ==================== 移动端适配 (≤768px) ==================== */
/* 桌面端默认隐藏汉堡菜单按钮（移动端媒体查询内再显示） */
.menu-toggle { display: none; }

@media (max-width: 768px) {

  /* ---- 汉堡菜单按钮 ---- */
  .menu-toggle {
    display: flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; background: none; border: 1px solid var(--line);
    border-radius: 8px; color: var(--text-dim); font-size: 18px; cursor: pointer;
    transition: .15s; flex-shrink: 0;
  }
  .menu-toggle:hover { border-color: var(--gold); color: var(--gold); }

  /* ---- 侧栏：默认隐藏，点击展开为全屏覆盖 ---- */
  .app.sidebar-hidden .sidebar { display: none !important; }
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 100;
    width: 300px !important;
    transform: translateX(-100%); transition: transform .28s cubic-bezier(.4,0,.2,1);
    box-shadow: none;
  }
  .sidebar.open { transform: translateX(0); box-shadow: 20px 0 60px rgba(0,0,0,.6); }

  /* 遮罩层（JS 动态插入） */
  .sidebar-overlay {
    position: fixed; inset: 0; z-index: 99;
    background: rgba(0,0,0,.5); backdrop-filter: blur(4px);
    opacity: 0; pointer-events: none; transition: opacity .28s;
  }
  .sidebar-overlay.show { opacity: 1; pointer-events: auto; }

  /* ---- 内容区：全宽 ---- */
  .content { width: 100%; }
  .topbar { padding: 0 16px; height: 52px; flex-shrink: 0; }
  .topbar h1 { font-size: 16px; }
  .view { padding: 16px 14px; }

  /* ---- 项目内页头部（#studio-head）：标题不挤压、导航可横向滚动 ---- */
  #studio-head { padding: 12px 14px 0; }
  #studio-head .wb-head-top { flex-direction: column; align-items: flex-start; gap: 8px; margin-bottom: 8px; }
  #studio-head .wb-back { margin-right: 0; }
  #studio-head .wb-head-title { flex-wrap: wrap; gap: 6px; min-width: 0; }
  #studio-head .wb-head-title strong { font-size: 15px; word-break: break-word; }
  #studio-head .wb-step-links { width: 100%; overflow-x: auto; gap: 0; padding-bottom: 4px; }
  #studio-head .wb-step-link { white-space: nowrap; font-size: 14px; padding: 4px 10px; }
  #studio-head .wb-step-sep { white-space: nowrap; }

  /* ---- 网格：自动缩减列数 ---- */
  .grid.cols-4 { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .grid.cols-3 { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .grid.cols-2 { grid-template-columns: 1fr 1fr; gap: 12px; }

  /* ---- 统计卡片：紧凑横向 ---- */
  .stat { flex-direction: row; align-items: center; gap: 10px; }
  .stat .num { font-size: 22px; }
  .stat .lbl { font-size: 11px; }

  /* ---- 表单：单列 ---- */
  .form-grid { grid-template-columns: 1fr; gap: 12px; }

  /* ---- 表格：横向滚动 ---- */
  table { font-size: 12px; display: block; overflow-x: auto; white-space: nowrap; }
  th, td { padding: 8px 10px; }

  /* ---- 任务行 ---- */
  .job-line { flex-wrap: wrap; gap: 8px; padding: 10px 0; }
  .job-line .t { flex: 0 0 auto; font-size: 12px; min-width: 70px; }

  /* ---- 登录框 ---- */
  .login-card { width: 90%; max-width: 340px; padding: 32px 24px; }
  .brand { font-size: 26px; }

  /* ---- 缩略图行 ---- */
  .thumb-row img, .thumb-row video { width: 40px; height: 54px; }

  /* ---- 按钮 ---- */
  .btn { padding: 9px 14px; font-size: 13px; }
}

/* 超小屏 (≤480px) */
@media (max-width: 480px) {
  .grid.cols-4, .grid.cols-3, .grid.cols-2 { grid-template-columns: 1fr; }
  .stat { flex-direction: column; align-items: flex-start; gap: 4px; }
  .view { padding: 14px 12px; }
}

/* ---- 剧本 Tab（全宽单板块流式排布，对标剧创） ---- */
.script-detail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
}
.script-detail > * { width: 100%; max-width: 1100px; }
.shot-card { transition: border-color .15s; }
.shot-card:hover { border-color: var(--gold); }
.shot-idx {
  display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;
  border-radius:50%;background:var(--bg-3);color:var(--text-dim);font-size:13px;font-weight:700;
  flex-shrink:0;
}
/* （script-detail 已改为 flex 纵向，无需断点覆盖） */

/* ==================== 首页（Vidu 风格全屏视频 Hero + 双赛道分轮） ==================== */
.cover { max-width: 100%; margin: 0; padding: 0 0 60px; }

/* ---- 全屏视频 Hero ---- */
.vidu-hero {
  position: relative; height: 72vh; min-height: 480px; max-height: 680px;
  overflow: hidden; display: flex; align-items: center; justify-content: center;
  border-radius: 0 0 20px 20px; margin-bottom: 8px;
}
.vidu-hero-bg {
  position: absolute; inset: 0;
  background:
    linear-gradient(135deg, #0a0c10 0%, #141a24 25%, #1a1520 50%, #0f1a1a 75%, #0a1018 100%);
  background-size: cover; background-position: center;
}
.vidu-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg,
    rgba(6,8,12,.55) 0%,
    rgba(6,8,12,.35) 45%,
    rgba(6,8,12,.65) 80%,
    rgba(6,8,12,.92) 100%
  );
}
.vidu-hero-content {
  position: relative; z-index: 2;
  text-align: center; padding: 40px 24px; max-width: 720px;
}
.vidu-brand {
  color: var(--gold); letter-spacing: 4px; font-size: 13px; font-weight: 700;
  text-transform: uppercase; opacity: .9;
}
.vidu-slogan {
  font-size: clamp(30px, 5vw, 52px); font-weight: 900;
  margin: 18px 0 14px; letter-spacing: 3px; line-height: 1.15;
  background: linear-gradient(180deg, #fff 20%, var(--gold-soft) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.vidu-sub {
  color: rgba(255,255,255,.6); font-size: 16px; max-width: 520px;
  margin: 0 auto 28px; line-height: 1.7;
}

/* 赛道 Tab 按钮（横排 pill） */
.vidu-tabs { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 28px; }
.vidu-tab {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 11px 26px; border-radius: 999px;
  font-size: 15px; font-weight: 600;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.14);
  color: rgba(255,255,255,.6); cursor: pointer;
  transition: all .22s ease;
  backdrop-filter: blur(6px);
}
.vidu-tab:hover {
  background: rgba(255,255,255,.1);
  border-color: rgba(255,255,255,.28);
  color: rgba(255,255,255,.85);
  transform: translateY(-1px);
}
.vidu-tab.active {
  background: linear-gradient(135deg, rgba(201,169,97,.28), rgba(201,169,97,.1));
  border-color: var(--gold); color: var(--gold-soft);
  box-shadow: 0 4px 24px rgba(201,169,97,.18), inset 0 1px 0 rgba(255,255,255,.08);
}

/* CTA + 状态 */
.vidu-ctas { margin-bottom: 16px; }
.vidu-cta-create {
  padding: 14px 40px; font-size: 17px; border-radius: 999px;
  box-shadow: 0 6px 32px rgba(201,169,97,.35), 0 2px 8px rgba(0,0,0,.3);
  transition: all .22s ease;
}
.vidu-cta-create:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 10px 44px rgba(201,169,97,.45), 0 4px 12px rgba(0,0,0,.35);
}
.vidu-status { font-size: 13px; color: rgba(255,255,255,.38); }

/* ---- 瀑布流区域 ---- */
.showcase { max-width: 1180px; margin: 0 auto; padding: 0 16px; margin-top: 36px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; }
.section-title { font-size: 20px; font-weight: 700; margin: 0; }
.waterfall { columns: 4; column-gap: 14px; }
.wf-card { break-inside: avoid; margin-bottom: 14px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; transition: transform .2s, box-shadow .2s; }
.wf-card:hover { transform: translateY(-3px); box-shadow: 0 10px 32px rgba(0,0,0,.35); border-color: var(--gold); }
.wf-thumb { position: relative; background-size: cover; display: flex; align-items: center; justify-content: center; }
.wf-thumb::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,.45)); }
.wf-play { position: relative; z-index: 1; width: 42px; height: 42px; border-radius: 50%; background: rgba(201,169,97,.85); color: #1a1308; display: flex; align-items: center; justify-content: center; font-size: 16px; transition: transform .2s; }
.wf-card:hover .wf-play { transform: scale(1.15); }
.wf-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.wf-card:hover .wf-video { transform: scale(1.04); transition: transform .4s ease; }
.wf-meta { display: flex; align-items: center; justify-content: space-between; padding: 9px 11px; gap: 8px; }
.wf-title { font-size: 13px; font-weight: 600; }
.wf-tag { font-size: 11px; color: var(--text-dim); white-space: nowrap; }
.wf-card.g1 .wf-thumb { background: linear-gradient(135deg, #3a2f1c, #6b4f1d); }
.wf-card.g2 .wf-thumb { background: linear-gradient(135deg, #2a2113, #4a3a1d); }
.wf-card.g3 .wf-thumb { background: linear-gradient(135deg, #1d3a4a, #2f6b7a); }
.wf-card.g4 .wf-thumb { background: linear-gradient(135deg, #2f2a1a, #5c4a22); }
.wf-card.g5 .wf-thumb { background: linear-gradient(135deg, #1d2f4a, #2f4a7a); }
.wf-card.g6 .wf-thumb { background: linear-gradient(135deg, #243a2a, #3a6b4a); }
.wf-card.g7 .wf-thumb { background: linear-gradient(135deg, #3a1d2f, #6b2f4a); }
.wf-card.g8 .wf-thumb { background: linear-gradient(135deg, #1a2f3a, #2f5c6b); }
.wf-card.g9 .wf-thumb { background: linear-gradient(135deg, #2a3a1d, #4a6b2f); }
.wf-card.g10 .wf-thumb { background: linear-gradient(135deg, #3a2a1d, #6b4a2f); }
.wf-card.g11 .wf-thumb { background: linear-gradient(135deg, #1d1d3a, #3a3a6b); }
.wf-card.g12 .wf-thumb { background: linear-gradient(135deg, #1d3a3a, #2f6b6b); }

.recent-strip { max-width: 1180px; margin: 40px auto 0; padding: 0 16px; }

/* 短剧创作页：Hero 下方的剧本工作区 */
.studio-work { max-width: 1180px; margin: 36px auto 0; padding: 0 16px 48px; }
.studio-work .section-title { font-size: 18px; font-weight: 700; }
.studio-work .section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.studio-work .empty { background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; }

/* 上传区域（空状态时替代按钮列表，点击直接传文档） */
.upload-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  background: var(--bg-2);
  border: 2px dashed var(--gold-dim, rgba(201,169,97,.35));
  border-radius: 16px;
  transition: border-color .2s, background .2s;
}
.upload-zone:hover { border-color: var(--gold); background: rgba(201,169,97,.06); }
.upload-icon { font-size: 48px; margin-bottom: 12px; }
.upload-title { font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.upload-hint { font-size: 13px; color: var(--text-dim); margin-bottom: 16px; }
.upload-track { font-size: 14px; color: var(--gold); }

/* 脚本列表页的赛道筛选 Tab */
.track-tabs { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.track-tab { display: inline-flex; align-items: center; gap: 7px; padding: 8px 16px; border-radius: 999px; text-decoration: none; font-size: 14px; background: var(--bg-2); border: 1px solid var(--line); color: var(--text-dim); transition: .15s; }
.track-tab:hover { color: var(--text); border-color: var(--gold); }
.track-tab.active { background: linear-gradient(90deg, rgba(201,169,97,.22), rgba(201,169,97,.06)); color: var(--gold-soft); font-weight: 700; border-color: var(--gold); }
.tt-cnt { font-size: 11px; background: var(--bg-3); border-radius: 999px; padding: 1px 7px; color: var(--text-dim); }
.track-banner { font-size: 13px; color: var(--text-dim); margin-bottom: 14px; padding: 9px 14px; background: var(--bg-3); border-radius: 8px; border: 1px solid var(--line); }
.track-banner strong { color: var(--gold-soft); }
.track-pill.engineering { background: rgba(201,169,97,.16); color: var(--gold-soft); border: 1px solid rgba(201,169,97,.4); }
.track-pill.citycard { background: rgba(143,208,232,.14); color: #8fd0e8; border: 1px solid rgba(143,208,232,.4); }

@media (max-width: 900px) {
  .vidu-hero { height: 60vh; min-height: 400px; }
  .vidu-slogan { font-size: clamp(24px, 6vw, 36px); letter-spacing: 1px; }
  .vidu-tabs { gap: 8px; }
  .vidu-tab { padding: 9px 18px; font-size: 13px; }
  .waterfall { columns: 2; }
  .showcase, .recent-strip { padding: 0 12px; }
}

/* 上传前视觉风格选择条（对标剧创：传剧本前先定风格） */
.home-style-bar {
  max-width: 1180px;
  margin: 22px auto 0;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.hsb-label { font-size: 14px; font-weight: 600; color: var(--text); white-space: nowrap; }
.hsb-sep { width: 1px; height: 20px; background: var(--line); margin: 0 4px; }
.hsb-select {
  padding: 7px 12px;
  border-radius: 8px;
  background: var(--bg-3);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 13px;
  outline: none;
}
.hsb-select:focus { border-color: var(--gold); }
.hsb-input {
  display: none;
  padding: 7px 12px;
  border-radius: 8px;
  background: var(--bg-3);
  border: 1px solid var(--gold);
  color: var(--text);
  font-size: 13px;
  width: 280px;
  outline: none;
}
.hsb-hint { font-size: 12px; color: var(--text-dim); margin-left: auto; }

/* 我的项目页 —— 剧创风格海报卡网格 */
.proj-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 32px;
}
.proj-card {
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
  border: 1px solid var(--line);
  background: var(--bg-2);
}
.proj-card:hover { transform: translateY(-8px); box-shadow: 0 16px 48px rgba(0,0,0,.35); }

/* 封面区（16:9 比例） */
.pc-cover {
  position: relative;
  padding-bottom: 56%;
  overflow: hidden;
}
.pc-cover-placeholder {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 84px; font-weight: 700; color: #2a3040; opacity: .5;
  letter-spacing: -4px;
}
.pc-cover-tags {
  position: absolute; bottom: 16px; left: 16px;
  display: flex; gap: 8px;
}
.pc-track { font-size: 20px; padding: 4px 12px; border-radius: 8px; background:rgba(201,169,97,.18); color:var(--gold-soft); }

/* 状态标签 */
.pc-status { font-size: 20px; padding: 4px 12px; border-radius: 8px; white-space: nowrap; }
.pc-status-done { background: rgba(76,175,80,.15); color: #4caf90; }
.pc-status-wait { background: rgba(201,169,97,.15); color: var(--gold); }
.pc-status-todo { background: rgba(100,150,255,.15); color: #6496ff; }
.pc-status-empty { background: var(--bg-3); color: var(--text-dim); opacity: .6; }

/* 信息体 */
.pc-body { padding: 20px 24px; }
.pc-title { font-size: 26px; font-weight: 600; line-height: 1.3; max-height: 2.6em; overflow: hidden; color: var(--text); }
.pc-meta { font-size: 22px; color: var(--text-dim); margin-top: 8px; }

/* 卡片底部常驻操作栏（删除剧本） */
.pc-footer { display: flex; gap: 16px; padding: 16px 24px; border-top: 1px solid var(--line); }
.pc-foot-btn { flex: 1; padding: 14px; border: 1px solid var(--line); background: transparent; color: var(--text-dim); border-radius: 12px; font-size: 24px; cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.pc-foot-btn:hover { color: var(--text); background: rgba(255,255,255,.04); }
.pc-foot-btn.member { color: #C9A961; border-color: rgba(201,169,97,.5); font-weight: 500; }
.pc-foot-btn.member:hover { background: rgba(201,169,97,.12); color: #e0c98f; }
.pc-foot-btn.danger { color: #ff6b6b; border-color: rgba(239,111,111,.35); }
.pc-foot-btn.danger:hover { background: rgba(239,111,111,.12); color: #ff6b6b; }
/* 回收站卡片：虚线边框 + 弱化标题，与正常项目区分 */
.proj-card.trashed { border-style: dashed; opacity: .9; }
.proj-card.trashed .pc-title { color: var(--text-dim); }

/* 项目卡片「⋯ 更多」菜单 */
.pc-more-wrap { position: absolute; top: 16px; right: 16px; z-index: 5; }
.pc-more-btn {
  width: 56px; height: 56px; border: none; border-radius: 12px;
  background: rgba(0,0,0,.35); color: var(--text); font-size: 36px; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .15s, color .15s, transform .15s;
}
.pc-more-btn:hover { background: rgba(0,0,0,.55); color: var(--gold); transform: scale(1.05); }
.pc-more-menu {
  display: none; position: absolute; top: calc(100% + 8px); right: 0; min-width: 220px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0,0,0,.4); overflow: hidden; padding: 8px 0;
}
.pc-more-menu.open { display: block; }
.pc-more-item {
  display: block; width: 100%; padding: 16px 24px; border: none; background: transparent;
  color: var(--text); font-size: 24px; text-align: left; cursor: pointer;
  transition: background .15s, color .15s;
}
.pc-more-item:hover { background: rgba(255,255,255,.06); color: var(--gold); }
.pc-more-item.danger { color: #e08e8e; }
.pc-more-item.danger:hover { background: rgba(239,111,111,.1); color: #ff6b6b; }

/* ──── 项目工作台（四步飞轮总览） ──── */
.wb-page { padding: 20px 24px; }
.wb-head {
  display: flex; align-items: center; justify-content: center; gap: 40px;
  padding-bottom: 16px; border-bottom: 0.5px solid var(--line); margin-bottom: 16px;
}

/* 持久化项目头部（#studio-head 在 index.html，切页不销毁） */
#studio-head {
  padding: 16px 20px 0;
}
#studio-head .wb-head {
  margin-bottom: 0;
  border-bottom: none;
}
.wb-head-top { display: flex; align-items: center; margin-bottom: 10px; }
.wb-back {
  display: inline-flex; align-items: center;
  font-size: 13px; color: var(--text-dim); text-decoration: none;
  padding: 4px 10px; border-radius: 6px; margin-right: 12px;
  border: 1px solid var(--line); background: var(--bg-2);
  transition: color .15s, border-color .15s, background .15s;
}
.wb-back:hover { color: var(--gold); border-color: var(--gold); background: rgba(201,169,97,.08); }
.wb-head-title { display: flex; align-items: center; }
.wb-head-meta { font-size: 12px; color: var(--text-dim); margin-top: 4px; }

/* 步骤文字导航（和标题同行左对齐） */
.wb-step-links {
  display: flex; align-items: center;
  gap: 0;
}
.wb-step-link {
  font-size: 15px; color: var(--text-dim); cursor: pointer;
  text-decoration: none; padding: 4px 14px; border-radius: 6px;
  transition: color .15s, background .15s, transform .15s;
}
.wb-step-link:hover { color: var(--text); background: rgba(255,255,255,.06); transform: translateY(-1px); }
.wb-step-link.active { color: var(--gold); font-weight: 600; }
.wb-step-sep { color: rgba(201,169,97,.35); font-size: 13px; margin: 0 6px; user-select: none; }

/* 2×2 步骤卡网格 */
.wb-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}

/* 单张步骤卡 */
.wb-card {
  background: var(--bg-2); border: 0.5px solid var(--line);
  border-radius: 10px; padding: 16px;
  transition: border-color .2s, box-shadow .2s;
}
.wb-card:hover { border-color: #3a4556; }
.wb-card-next {
  border-color: rgba(201,169,97,.35);
  box-shadow: 0 0 12px rgba(201,169,97,.06);
}
.wb-card-head {
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 10px; font-size: 14px; font-weight: 500;
}
.wb-card-head strong { color: var(--text); }
.wb-card-body { margin-bottom: 12px; }
.wb-card-ops { display: flex; gap: 8px; flex-wrap: wrap; }

/* 状态 pill */
.wb-pill { font-size: 11px; padding: 2px 8px; border-radius: 10px; white-space: nowrap; }
.wb-pill-done { background: rgba(76,175,80,.15); color: #4caf90; }
.wb-pill-wait { background: rgba(201,169,97,.15); color: var(--gold); }
.wb-pill-todo { background: rgba(100,150,255,.15); color: #6496ff; }
.wbpill-empty { background: var(--bg-3); color: var(--text-dim); }

/* 统计文字 */
.wb-stat { font-size: 12px; color: var(--text-dim); line-height: 1.6; }

@media (max-width: 700px) {
  .wb-grid { grid-template-columns: 1fr !important; }
}

@media (max-width: 700px) {
  .home-style-bar { margin-top: 16px; }
  .hsb-hint { margin-left: 0; width: 100%; }
  .hsb-input { width: 100%; }
  .proj-grid { grid-template-columns: 1fr !important; }
}

