/* ============================================================
   闲时云 · AI 视频创作平台 — DeepSeek 风格设计系统
   主色：#4F6BFF  背景：#F5F6F8  卡片：#FFFFFF
   ============================================================ */

/* ---------- 设计变量 ---------- */
:root {
  --primary: #4f6bff;
  --primary-strong: #3b56f0;
  --primary-soft: rgba(79, 107, 255, 0.08);
  --gradient: linear-gradient(135deg, #4f6bff 0%, #7c5cff 100%);
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-soft: #f7f8fa;
  --border: #e6e8ee;
  --border-strong: #d7dae3;
  --text: #1f2329;
  --text-secondary: #4b5563;
  --text-muted: #8a9099;
  --success: #16a34a;
  --success-bg: rgba(22, 163, 74, 0.1);
  --warning: #d97706;
  --warning-bg: rgba(217, 119, 6, 0.1);
  --danger: #dc2626;
  --danger-bg: rgba(220, 38, 38, 0.08);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow: 0 4px 16px rgba(16, 24, 40, 0.06);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, 0.12);
  --sidebar-w: 216px;
  --topbar-h: 60px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

/* ---------- 基础 ---------- */
* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--primary);
  text-decoration: none;
}

button {
  font-family: inherit;
}

.hidden {
  display: none !important;
}

/* ---------- 通用表单 ---------- */
input,
select,
textarea {
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  width: 100%;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 107, 255, 0.14);
}

input:disabled,
select:disabled {
  background: var(--surface-soft);
  color: var(--text-muted);
  cursor: not-allowed;
}

textarea {
  resize: vertical;
}

.input-sm,
.select-sm {
  width: auto;
  min-width: 96px;
  padding: 7px 10px;
  font-size: 13px;
}

.input-sm {
  min-width: 120px;
}

select {
  cursor: pointer;
}

.file-input,
.file-input-sm {
  width: 0.1px;
  height: 0.1px;
  opacity: 0;
  overflow: hidden;
  position: absolute;
  z-index: -1;
}

.file-input-sm {
  display: none;
}

.field {
  margin-bottom: 12px;
}

.field-row {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  align-items: center;
}

.field-row .field {
  margin-bottom: 0;
}

.flex-1 {
  flex: 1;
  min-width: 0;
}

.field-hint {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 4px 12px rgba(79, 107, 255, 0.28);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(79, 107, 255, 0.36);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(79, 107, 255, 0.24);
}

.btn-ghost {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text-secondary);
}

.btn-ghost:hover:not(:disabled) {
  border-color: var(--border-strong);
  background: var(--surface-soft);
  color: var(--text);
}

.btn-outline {
  background: transparent;
  border-color: var(--primary);
  color: var(--primary);
}

.btn-outline:hover:not(:disabled) {
  background: var(--primary-soft);
}

.btn-amount {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
}

.btn-amount:hover:not(:disabled),
.btn-amount.active {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
}

.btn-full {
  width: 100%;
}

.btn-nowrap {
  white-space: nowrap;
}

.btn-text {
  background: none;
  border: none;
  padding: 0;
  color: var(--primary);
  font-size: inherit;
  cursor: pointer;
}

.btn-text:hover {
  text-decoration: underline;
}

/* ---------- 认证页 ---------- */
.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  background: var(--surface);
}

.auth-brand {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 64px;
  background:
    radial-gradient(1200px 500px at 10% 0%, rgba(79, 107, 255, 0.12), transparent 60%),
    radial-gradient(900px 420px at 90% 100%, rgba(124, 92, 255, 0.1), transparent 60%),
    var(--bg);
}

.auth-brand-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--gradient);
  color: #fff;
  font-size: 26px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  box-shadow: 0 8px 20px rgba(79, 107, 255, 0.35);
  animation: floatIn 0.5s ease both;
}

.auth-brand h1 {
  font-size: 30px;
  margin: 0 0 8px;
  letter-spacing: 0.5px;
}

.auth-brand-desc {
  color: var(--text-secondary);
  margin: 0 0 36px;
  font-size: 15px;
}

.auth-features {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-feature {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.auth-feature:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.af-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.auth-feature strong {
  display: block;
  font-size: 14px;
}

.auth-feature span:not(.af-icon) {
  font-size: 12px;
  color: var(--text-muted);
}

.auth-form-wrap {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 64px;
  max-width: 460px;
  width: 100%;
  margin: 0 auto;
}

.auth-tabs {
  display: flex;
  gap: 24px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.auth-tab {
  background: none;
  border: none;
  padding: 10px 4px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.auth-tab.active {
  color: var(--primary);
  border-color: var(--primary);
}

.auth-panel {
  display: none;
  animation: slideUp 0.3s ease both;
}

.auth-panel.active {
  display: block;
}

.auth-panel h3 {
  font-size: 20px;
  margin: 0 0 20px;
}

.auth-switch {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 6px;
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-muted);
}

/* 登录页底部管理入口：窄屏 / 大字体下允许换行且保持对齐，避免挤压 */
.auth-admin-link {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 6px;
  row-gap: 4px;
}

/* ---------- 应用外壳 ---------- */
.app-content {
  flex: 1;
  display: flex;
}

.app-shell {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

/* 侧边栏 */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 20;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--gradient);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(79, 107, 255, 0.3);
}

.sidebar-brand-name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.sidebar-nav {
  flex: 1;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 14px;
  border: none;
  background: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease;
  position: relative;
  text-align: left;
}

.nav-item:hover {
  background: var(--surface-soft);
  color: var(--text);
}

.nav-item.active {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 600;
}

.nav-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 20%;
  bottom: 20%;
  width: 3px;
  border-radius: 3px;
  background: var(--primary);
}

.nav-icon {
  font-size: 15px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.nav-label {
  flex: 1;
}

.sidebar-footer {
  padding: 14px;
  border-top: 1px solid var(--border);
}

.side-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: background 0.16s ease;
}

.side-user:hover {
  background: var(--surface-soft);
}

.side-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--gradient);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.side-user-meta {
  min-width: 0;
}

.side-user-name {
  display: block;
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side-user-credit {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
}

/* 主区域 */
.main-area {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: var(--topbar-h);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 15;
}

.topbar-title {
  font-size: 17px;
  font-weight: 700;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.credit-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 600;
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 999px;
}

.vip-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35);
}

/* 视图区 */
.views {
  flex: 1;
  padding: 20px 24px 48px;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
}

.view {
  display: none;
  animation: viewIn 0.28s ease both;
}

.view.active {
  display: block;
}

/* ---------- 概览栏 ---------- */
.stats-bar {
  display: flex;
  align-items: center;
  gap: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 22px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
}

.stat-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.stat-divider {
  width: 1px;
  height: 30px;
  background: var(--border);
}

/* ---------- 工作台 ---------- */
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.creation-panel,
.preview-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.model-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px 0;
}

.model-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.model-picker {
  max-width: 320px;
}

.mode-tabs {
  display: flex;
  gap: 6px;
  padding: 14px 18px 0;
}

.mode-tab {
  padding: 8px 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.16s ease;
}

.mode-tab:hover {
  border-color: var(--border-strong);
}

.mode-tab.active {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 600;
}

.prompt-area {
  padding: 14px 18px;
}

.prompt-area textarea {
  border-radius: var(--radius-sm);
  min-height: 96px;
}

/* 参数设置 */
.params-drawer {
  border-top: 1px solid var(--border);
}

.params-summary {
  padding: 13px 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  list-style: none;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.params-summary::-webkit-details-marker {
  display: none;
}

.params-summary::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

details[open] .params-summary::after {
  transform: rotate(-135deg);
}

.params-drawer[open] .params-grid,
.params-drawer[open] .params-row,
.params-drawer[open] .watermark-config,
.params-drawer[open] .script-content-wrap,
.params-drawer[open] .upload-row {
  animation: slideDown 0.25s ease both;
}

.params-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 2px 18px 6px;
}

.param-field label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 5px;
}

.params-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 8px 18px;
}

.voice-select {
  min-width: 220px;
  max-width: 280px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-primary);
  font-size: 13px;
}

.param-field.compact {
  flex: 1;
  min-width: 180px;
}

.toggle-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}

.toggle-label input {
  width: 15px;
  height: 15px;
  accent-color: var(--primary);
  cursor: pointer;
}

.watermark-config {
  padding: 4px 18px 12px;
  border-top: 1px dashed var(--border);
  margin-top: 8px;
  padding-top: 12px;
}

.script-content-wrap {
  padding: 8px 18px 0;
}

.script-upload-row,
.upload-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 0;
}

.upload-hint {
  font-size: 12px;
  color: var(--text-muted);
}

.upload-row {
  padding: 10px 18px 16px;
}

/* 操作栏 */
.action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 18px 18px;
  border-top: 1px solid var(--border);
  background: var(--surface-soft);
}

.cost-estimate {
  font-size: 13px;
  color: var(--text-secondary);
}

.cost-estimate strong {
  color: var(--warning);
  font-size: 15px;
}

.cost-detail {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
}

.action-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* 分镜面板 */
.script-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px 8px;
}

.script-toolbar-title {
  font-size: 14px;
  font-weight: 600;
}

.shot-list {
  padding: 6px 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.shot-row {
  display: grid;
  grid-template-columns: 52px 90px 150px minmax(120px, 1fr) minmax(120px, 0.9fr) 30px;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
  animation: slideUp 0.2s ease both;
}

.shot-row:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.shot-index {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  white-space: nowrap;
}

.shot-time {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

.shot-remove {
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.shot-remove:hover {
  color: var(--danger);
  background: var(--danger-bg);
}

.script-options {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 6px 18px 12px;
}

.script-options .param-field {
  min-width: 130px;
}

/* 预览 */
.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}

.preview-label {
  font-size: 14px;
  font-weight: 600;
}

.preview-ratio {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-soft);
  border: 1px solid rgba(79, 107, 255, 0.28);
  border-radius: 6px;
  padding: 1px 8px;
  margin-left: 8px;
  line-height: 1.9;
  white-space: nowrap;
}

.preview-status {
  font-size: 12px;
  color: var(--text-muted);
}

.preview-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0f1117;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: height 0.25s ease;
}

.preview-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.preview-placeholder {
  color: #6b7280;
  text-align: center;
  animation: pulse 2.4s ease-in-out infinite;
}

.pp-icon {
  width: 54px;
  height: 54px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #9ca3af;
}

.preview-placeholder p {
  font-size: 13px;
}

.script-result {
  padding: 14px 18px;
  border-top: 1px solid var(--border);
}

.script-result-header {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 10px;
}

.shot-result-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 10px;
  background: var(--surface-soft);
}

.shot-result-head {
  display: flex;
  gap: 12px;
  font-size: 12px;
  margin-bottom: 6px;
}

.shot-result-index {
  color: var(--primary);
  font-weight: 600;
}

.shot-result-time,
.shot-result-camera {
  color: var(--text-muted);
}

.shot-result-row {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 3px;
}

.shot-result-row.prompt {
  color: var(--text-muted);
  font-size: 11px;
}

/* ---------- 底部网格 ---------- */
.bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 18px;
}

.section-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 18px 20px;
  margin-bottom: 18px;
  transition: box-shadow 0.2s ease;
}

.section-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.section-card-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.section-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* 生成历史 */
.history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 80px;
}

.history-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  background: var(--surface);
  transition: box-shadow 0.18s ease, transform 0.18s ease;
  animation: slideUp 0.24s ease both;
}

.history-item:hover {
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.history-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.history-item-title {
  font-weight: 600;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-badges {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.status-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
}

.status-badge.is-pending {
  background: var(--warning-bg);
  color: var(--warning);
}

.status-badge.is-running {
  background: rgba(79, 107, 255, 0.1);
  color: var(--primary);
}

.status-badge.is-succeeded {
  background: var(--success-bg);
  color: var(--success);
}

.status-badge.is-failed {
  background: var(--danger-bg);
  color: var(--danger);
}

.status-badge.is-cancelled {
  background: var(--surface-soft);
  color: var(--text-muted);
}

.type-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(124, 92, 255, 0.1);
  color: #7c5cff;
}

.type-badge.is-script {
  background: rgba(217, 119, 6, 0.1);
  color: var(--warning);
}

.history-desc {
  font-size: 13px;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.history-meta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
}

.history-error {
  font-size: 12px;
  color: var(--danger);
  background: var(--danger-bg);
  border-radius: 6px;
  padding: 6px 10px;
  margin-top: 6px;
}

.history-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.history-progress {
  margin-top: 8px;
}
.history-progress-text {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.history-progress-track {
  height: 6px;
  background: rgba(127, 127, 127, 0.2);
  border-radius: 3px;
  overflow: hidden;
}
.history-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #4F6BFF, #7B93FF);
  border-radius: 3px;
  transition: width 0.5s ease;
}

.history-video {
  width: 100%;
  border-radius: var(--radius-sm);
  margin-top: 8px;
  background: #000;
  max-height: 300px;
}

.history-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 14px;
}

.history-page-info {
  font-size: 13px;
  color: var(--text-muted);
}

/* 参考图库 */
.subject-upload {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px;
  margin-bottom: 16px;
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--surface-soft);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.subject-upload.dragover {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.subject-upload-preview {
  position: relative;
  flex-shrink: 0;
  width: 120px;
  height: 120px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.subject-upload-preview:hover {
  border-color: var(--primary);
}

.subject-upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-align: center;
  padding: 10px;
  color: var(--text-muted);
}

.subject-upload-placeholder svg {
  color: var(--text-muted);
  opacity: 0.85;
}

.subject-upload-placeholder p {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
}

.subject-upload-placeholder span {
  font-size: 11px;
  color: var(--text-muted);
}

.subject-upload-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.subject-upload-clear {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  line-height: 20px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 15px;
  cursor: pointer;
}

.subject-upload-clear:hover {
  background: rgba(220, 53, 69, 0.9);
}

.subject-upload-form {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.subject-upload-form input[type="text"] {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  background: var(--surface);
  color: var(--text);
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.subject-upload-form input[type="text"]:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.subject-upload-tip {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

.subject-upload-form .btn {
  align-self: flex-start;
}

.subject-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}

.subject-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface);
  transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.subject-item:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
  border-color: var(--border-strong);
}

.subject-item-cover {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--surface-soft);
}

.subject-item-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.subject-item-delete {
  position: absolute;
  top: 6px;
  right: 6px;
  padding: 3px 8px;
  border: none;
  border-radius: 6px;
  font-size: 11px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  cursor: pointer;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.subject-item:hover .subject-item-delete {
  opacity: 1;
  transform: translateY(0);
}

.subject-item-delete:hover {
  background: rgba(220, 53, 69, 0.9);
}

.subject-item-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 8px 10px;
}

.subject-item-name {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.subject-item-use {
  flex-shrink: 0;
}

.subject-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 36px 16px;
  text-align: center;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--surface-soft);
  color: var(--text-muted);
}

.subject-empty svg {
  color: var(--text-muted);
  opacity: 0.7;
}

.subject-empty p {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-secondary);
}

.subject-empty span {
  font-size: 12px;
  color: var(--text-muted);
  max-width: 320px;
  line-height: 1.5;
}

/* ---------- 订单中心 ---------- */
.order-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.order-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  background: var(--surface);
  transition: box-shadow 0.18s ease, transform 0.18s ease;
  animation: slideUp 0.24s ease both;
}

.order-item:hover {
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.order-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.order-no {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  font-family: "SF Mono", Consolas, "Courier New", monospace;
  letter-spacing: 0.3px;
}

.order-amount {
  font-size: 17px;
  font-weight: 700;
  color: var(--primary);
}

.order-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-muted);
}

.order-meta b {
  color: var(--text-secondary);
  font-weight: 600;
}

.order-pay-status {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
}

.order-pay-status.paid {
  background: var(--success-bg);
  color: var(--success);
}

.order-pay-status.pending {
  background: var(--warning-bg);
  color: var(--warning);
}

.order-pay-status.refunded {
  background: var(--danger-bg);
  color: var(--danger);
}

.order-pay-status.expired {
  background: rgba(107, 114, 128, 0.12);
  color: #6b7280;
}

.order-status {
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--text-secondary);
}

.order-status .btn {
  margin-top: 4px;
}

/* ---------- 我的 ---------- */
.profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 18px;
}

.profile-card {
  position: relative;
  overflow: hidden;
}

.profile-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient);
}

.profile-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.profile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--gradient);
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(79, 107, 255, 0.3);
}

.profile-meta h3 {
  margin: 0 0 4px;
  font-size: 17px;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.profile-stat {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  background: var(--surface-soft);
  text-align: center;
}

.profile-stat-label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.profile-stat-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.profile-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}

/* VIP */
.vip-info {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  background: var(--surface-soft);
  margin-bottom: 12px;
}

.vip-current {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.vip-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.vip-detail {
  font-size: 13px;
  color: var(--text-secondary);
}

.vip-rules {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.vip-rules span {
  font-size: 11px;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 9px;
}

.vip-rules .vip-note {
  background: none;
  border: none;
  color: var(--text-muted);
  padding-left: 4px;
}

/* 充值区 */
.billing-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.redeem-row {
  margin-top: 4px;
}

/* ---------- 弹窗 ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 17, 23, 0.45);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  animation: fadeIn 0.2s ease both;
}

.modal {
  width: min(480px, calc(100vw - 32px));
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: modalIn 0.24s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.modal-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.modal-close {
  border: none;
  background: none;
  font-size: 22px;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.modal-close:hover {
  color: var(--text);
  background: var(--surface-soft);
}

.modal-body {
  padding: 18px 20px;
}

/* ---------- 页脚 ---------- */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 22px 24px;
  text-align: center;
}

.footer-container {
  max-width: 1280px;
  margin: 0 auto;
}

.footer-bottom p {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%);
  background: rgba(31, 35, 41, 0.92);
  color: #fff;
  font-size: 13px;
  padding: 10px 20px;
  border-radius: 999px;
  box-shadow: var(--shadow-lg);
  z-index: 200;
  animation: toastIn 0.25s ease both;
  max-width: 80vw;
  text-align: center;
}

/* ---------- 动画 ---------- */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes viewIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes floatIn {
  from {
    opacity: 0;
    transform: translateY(-12px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.94) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translate(-50%, 12px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.55;
  }
}

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-thumb {
  background: #d4d7df;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #b9bdc8;
}

::-webkit-scrollbar-track {
  background: transparent;
}

/* ---------- 响应式 ---------- */
@media (max-width: 1100px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .bottom-grid,
  .profile-grid {
    grid-template-columns: 1fr;
  }

  .params-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .auth-page {
    grid-template-columns: 1fr;
  }

  /* 移动端：品牌条改为紧凑居中的品牌头，替代整块隐藏（避免顶部空白无标识） */
  .auth-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 24px 20px 0;
    background: none;
  }

  .auth-brand-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    font-size: 20px;
    margin-bottom: 10px;
    box-shadow: 0 4px 14px rgba(79, 107, 255, 0.3);
  }

  .auth-brand h1 {
    font-size: 20px;
    margin: 0 0 4px;
    letter-spacing: 0.5px;
  }

  .auth-brand-desc {
    font-size: 12px;
    margin: 0;
    line-height: 1.4;
    max-width: 320px;
  }

  .auth-features {
    display: none;
  }

  .auth-form-wrap {
    padding: 20px 24px 32px;
  }

  /* ===== 移动端：侧边栏 → 底部 Tab 栏（随视口宽度自动切换） ===== */
  .sidebar {
    width: 100%;
    height: calc(60px + env(safe-area-inset-bottom));
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    flex-direction: row;
    border-right: none;
    border-top: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    z-index: 100;
    padding-bottom: env(safe-area-inset-bottom);
  }

  .sidebar-brand,
  .sidebar-footer {
    display: none;
  }

  .sidebar-nav {
    flex: 1;
    flex-direction: row;
    justify-content: space-around;
    align-items: stretch;
    padding: 4px 6px;
    overflow: visible;
  }

  .nav-item {
    flex: 1;
    width: auto;
    flex-direction: column;
    gap: 2px;
    justify-content: center;
    padding: 4px 6px;
    font-size: 10px;
    text-align: center;
    border-radius: 10px;
  }

  .nav-icon {
    font-size: 19px;
    width: auto;
    height: 22px;
    line-height: 22px;
  }

  .nav-label {
    display: block;
    font-size: 10px;
    line-height: 1;
  }

  .nav-item.active::before {
    display: none;
  }

  /* 移动端顶栏：按钮紧凑排布，保证退出按钮始终可见可用（避免用户找不到退出入口） */
  .topbar-right {
    gap: 6px;
  }

  .topbar-right .btn {
    padding: 6px 10px;
    font-size: 13px;
  }

  .topbar {
    padding: 0 14px;
  }

  .views {
    padding: 14px 14px 76px;
  }

  .shot-row {
    grid-template-columns: 44px 70px 1fr 28px;
  }

  .shot-duration,
  .shot-camera {
    display: none;
  }

  .stats-bar {
    gap: 16px;
    padding: 12px 16px;
  }
}

@media (max-width: 640px) {
  /* 移动端认证表单占满可用宽度，避免窄屏悬浮挤压 */
  .auth-form-wrap {
    max-width: 100%;
    padding: 20px;
  }

  .auth-brand {
    padding: 20px 20px 0;
  }

  /* 登录页底部管理入口在窄屏整行换行排列 */
  .auth-admin-link {
    column-gap: 8px;
    font-size: 13px;
  }

  .params-grid {
    grid-template-columns: 1fr;
  }

  /* 配音/音色选择：窄屏占满整行，避免长选项把选择器撑出视口 */
  .voice-select {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .param-field.compact {
    flex: 1 1 100%;
    min-width: 0;
  }

  .billing-row {
    flex-direction: column;
    align-items: stretch;
  }

  .billing-row .input-sm,
  .billing-row .select-sm {
    width: 100%;
  }

  .action-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .profile-stats {
    grid-template-columns: 1fr;
  }
}

/* ---------- 自研拼图滑块验证码（点击"进行验证"后弹出弹窗） ---------- */

/* 触发按钮容器 */
.captcha-trigger {
  margin-bottom: 14px;
}

/* 触发按钮 */
.captcha-btn {
  width: 100%;
  height: 44px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  background: #f9fafb;
  color: #374151;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  gap: 6px;
}

.captcha-btn:hover:not(:disabled) {
  background: #f3f4f6;
  border-color: #9ca3af;
}

.captcha-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.captcha-btn-idle {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #2563eb;
}

.captcha-btn-idle:hover:not(:disabled) {
  background: #dbeafe;
}

.captcha-btn-verified {
  background: #f0fdf4;
  border-color: #86efac;
  color: #16a34a;
  cursor: default;
}

.captcha-btn-verified:hover:not(:disabled) {
  background: #f0fdf4;
  border-color: #86efac;
}

.captcha-btn-error {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #dc2626;
}

.captcha-btn-error:hover:not(:disabled) {
  background: #fee2e2;
}

/* 弹窗遮罩 */
.captcha-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.captcha-modal.hidden {
  display: none;
}

.captcha-modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(15, 17, 21, 0.55);
  animation: captcha-fade-in 0.18s ease;
}

@keyframes captcha-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* 弹窗主体 */
.captcha-modal-box {
  position: relative;
  width: 360px;
  max-width: calc(100vw - 32px);
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
  padding: 16px 18px 18px;
  animation: captcha-pop-in 0.2s ease;
}

@keyframes captcha-pop-in {
  from {
    transform: translateY(10px) scale(0.97);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.captcha-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.captcha-modal-title {
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
}

.captcha-modal-close {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: #9ca3af;
  font-size: 15px;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.captcha-modal-close:hover {
  background: #f3f4f6;
  color: #4b5563;
}

.captcha-modal-tip {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 12px;
  min-height: 18px;
}

/* 拼图画布：背景图 + 可拖拽拼图块 */
.captcha-canvas {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 1;
  overflow: hidden;
  border-radius: 10px;
  background: #eef0f3;
  touch-action: none;
  user-select: none;
}

.captcha-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}

.captcha-piece {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  pointer-events: none;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.35));
}

/* 滑块轨道 */
.captcha-slider {
  position: relative;
  margin-top: 16px;
}

.captcha-slider-track {
  position: relative;
  height: 40px;
  border-radius: 20px;
  background: #eef0f3;
  overflow: hidden;
  touch-action: none;
  user-select: none;
}

.captcha-slider-bg {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #bfdbfe, #93c5fd);
  border-radius: 20px 0 0 20px;
  transition: width 0.05s linear;
}

.captcha-slider-tip {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #9ca3af;
  pointer-events: none;
  z-index: 1;
}

.captcha-slider-tip.hidden {
  visibility: hidden;
}

.captcha-slider-handle {
  position: absolute;
  left: 0;
  top: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #d1d5db;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  z-index: 2;
  transition: box-shadow 0.15s;
}

.captcha-slider-handle:active {
  cursor: grabbing;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.28);
}

.captcha-slider-arrow {
  font-size: 12px;
  color: #6b7280;
  line-height: 1;
}

/* 弹窗底部：换一张 + 错误提示 */
.captcha-modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
}

.captcha-modal-error {
  font-size: 12px;
  color: #ef4444;
}

.captcha-modal-error.hidden {
  display: none;
}

/* ================================================================
   一键导演模式
   ================================================================ */

.director-intro {
  margin: 14px 18px 4px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--primary-soft, #eff6ff);
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.director-intro strong {
  color: var(--primary);
}

.director-section {
  padding: 12px 18px 4px;
  border-top: 1px solid var(--border);
}

.director-section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.director-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.director-section textarea {
  width: 100%;
  margin-top: 10px;
  border-radius: var(--radius-sm);
  min-height: 96px;
}

.director-split-bar {
  margin: 10px 0 0;
}

.director-warn {
  color: #d97706;
  margin-top: 8px;
}

/* 音效上传 */
.sfx-upload-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.sfx-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}

.sfx-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.sfx-item-name {
  font-size: 13px;
  font-weight: 500;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sfx-item-size {
  font-size: 12px;
  color: var(--text-muted);
}

/* AI 切分结果 */
.director-episode-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.director-episode-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  overflow: hidden;
}

.director-episode-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  cursor: pointer;
  list-style: none;
  user-select: none;
  font-size: 13px;
}

.director-episode-head::-webkit-details-marker {
  display: none;
}

.director-episode-head::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-left: auto;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.director-episode-card[open] .director-episode-head::after {
  transform: rotate(-135deg);
}

.director-episode-no {
  font-weight: 600;
  color: var(--primary);
  flex-shrink: 0;
}

.director-episode-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.director-episode-len {
  font-size: 12px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.director-episode-body {
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.7;
  max-height: 260px;
  overflow: auto;
  white-space: normal;
  background: var(--bg);
}

/* 导演项目列表 */
.director-project-empty {
  padding: 18px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
}

.director-project-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 12px;
}

.director-project-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  overflow: hidden;
}

.director-project-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}

.director-project-name {
  font-size: 14px;
  font-weight: 600;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.director-project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  padding: 10px 14px;
  font-size: 12px;
  color: var(--text-secondary);
}

.director-progress {
  height: 6px;
  background: var(--bg);
  border-radius: 999px;
  margin: 0 14px;
  overflow: hidden;
}

.director-progress-bar {
  height: 100%;
  background: var(--primary, #2563eb);
  border-radius: 999px;
  transition: width 0.4s ease;
}

.director-episodes {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 14px 12px;
}

.director-ep-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  padding: 4px 0;
  flex-wrap: wrap;
}

.director-ep-no {
  font-weight: 600;
  color: var(--text-secondary);
  flex-shrink: 0;
  width: 46px;
}

.director-ep-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-secondary);
}

.director-ep-video {
  font-size: 12px;
  color: var(--primary);
  text-decoration: none;
  flex-shrink: 0;
}

.director-ep-video:hover {
  text-decoration: underline;
}

.director-ep-err {
  width: 100%;
  color: #dc2626;
  font-size: 12px;
}

.director-project-actions {
  padding: 0 14px 12px;
}

/* 长时长风险提示弹窗 */
.director-risk-body p {
  margin-bottom: 10px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.director-risk-body strong {
  color: #d97706;
}

.director-risk-countdown {
  font-size: 15px;
  color: var(--primary);
}

/* 自动选片样式 */
.auto-select-info {
  margin-top: 8px;
  padding: 10px 12px;
  background: rgba(99, 102, 241, 0.06);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: 8px;
}

.auto-select-badge {
  display: inline-block;
  padding: 2px 10px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border-radius: 10px;
  margin-bottom: 8px;
}

.auto-select-detail {
  margin: 0;
  padding: 0 0 0 16px;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.8;
}

.auto-select-detail li {
  margin-bottom: 2px;
}

.auto-select-detail strong {
  color: var(--primary);
}

.director-auto-select-body p {
  margin-bottom: 10px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.auto-select-benefit {
  padding: 6px 10px;
  background: rgba(99, 102, 241, 0.06);
  border-left: 3px solid #6366f1;
  border-radius: 4px;
}

.auto-select-discount {
  padding: 6px 10px;
  background: rgba(245, 158, 11, 0.06);
  border-left: 3px solid #f59e0b;
  border-radius: 4px;
}

.director-auto-select-body strong {
  color: #d97706;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

@media (max-width: 640px) {
  .director-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   新功能：AI 自动分析开关 / 预览层 / 主页 / 参考图库 / 会话编辑弹窗
   ============================================================ */

/* ---------- AI 自动分析开关 ---------- */
.param-ai-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.param-ai-row select,
.param-ai-row input[type="range"] {
  flex: 1 1 auto;
  min-width: 140px;
}

.ai-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-soft);
  border: 1px solid rgba(79, 107, 255, 0.28);
  border-radius: 999px;
  padding: 5px 10px;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  transition: all 0.16s ease;
  flex-shrink: 0;
}

/* 覆盖 .param-field label 的 display/color/margin，保持胶囊样式（特异性更高） */
.param-field .ai-checkbox {
  display: inline-flex;
  margin-bottom: 0;
  color: var(--primary);
}

.ai-checkbox:hover {
  border-color: var(--primary);
}

.ai-checkbox input {
  width: auto;
  flex-shrink: 0;
  accent-color: var(--primary);
  cursor: pointer;
}

/* ---------- 预览层（水印 / 台词实时预览） ---------- */
.preview-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.pv-watermark {
  position: absolute;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
  white-space: nowrap;
}

.pv-watermark.pv-pos-bottom-right { right: 12px; bottom: 10px; }
.pv-watermark.pv-pos-top-left { left: 12px; top: 10px; }
.pv-watermark.pv-pos-top-right { right: 12px; top: 10px; }
.pv-watermark.pv-pos-bottom-left { left: 12px; bottom: 10px; }
.pv-watermark.pv-pos-center { left: 50%; top: 50%; transform: translate(-50%, -50%); }
.pv-watermark.pv-pos-motion {
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  animation: pvWatermarkMove 6s linear infinite;
}

@keyframes pvWatermarkMove {
  0% { left: 12px; top: 50%; }
  25% { left: calc(100% - 90px); top: 12px; }
  50% { left: calc(100% - 90px); top: calc(100% - 34px); }
  75% { left: 12px; top: calc(100% - 34px); }
  100% { left: 12px; top: 50%; }
}

.pv-subtitle {
  position: absolute;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  max-width: 88%;
  padding: 4px 12px;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 15px;
  border-radius: 4px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pv-subtitle.pv-pos-top {
  bottom: auto;
  top: 28px;
}

/* 自由创作 · 台词样式配置区 */
.subtitle-config {
  margin-top: 10px;
  padding: 10px 12px;
  background: var(--surface-soft);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
}

.subtitle-config .params-grid {
  margin-bottom: 4px;
}

/* ---------- 主页 ---------- */
.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.home-status-tip {
  font-size: 12px;
  color: var(--text-muted);
}

.home-task-status {
  padding: 8px 0 4px;
}

.home-status-big {
  font-size: 30px;
  font-weight: 800;
  line-height: 1.3;
  color: var(--text);
}

.home-status-big.is-pending { color: var(--warning); }
.home-status-big.is-running { color: var(--primary); }
.home-status-big.is-succeeded { color: var(--success); }
.home-status-big.is-failed { color: var(--danger); }

.home-status-detail {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.home-current-task {
  margin-top: 16px;
  padding: 14px 16px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.home-current-task-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.home-current-task-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
}

.home-current-task-prompt {
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 8px;
}

.home-current-task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
}

.home-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.home-stat {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  text-align: center;
}

.home-stat-label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.home-stat-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
}

.home-quick-actions {
  display: flex;
  gap: 10px;
}

/* ---------- 创作上下文编辑弹窗 ---------- */
@media (max-width: 900px) {
  .home-grid {
    grid-template-columns: 1fr;
  }

  /* 参考图库：触屏设备始终显示删除按钮，避免悬停不可见 */
  .subject-item-delete {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================================
   SEO 落地内容区（登录/注册页下方，面向搜索引擎与访客）
   ============================================================ */
.seo-landing {
  grid-column: 1 / -1;
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 56px 64px 64px;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

/* Hero 区 */
.seo-hero {
  text-align: center;
  max-width: 860px;
  margin: 0 auto;
}

.seo-hero h2 {
  font-size: 30px;
  line-height: 1.4;
  margin: 0 0 14px;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--primary);
}

.seo-hero p {
  font-size: 15px;
  line-height: 1.9;
  color: var(--text-secondary);
  margin: 0 0 26px;
}

.seo-hero-btn {
  display: inline-block;
  border: none;
  cursor: pointer;
  background: var(--gradient);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  padding: 12px 30px;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(79, 107, 255, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.seo-hero-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(79, 107, 255, 0.38);
}

/* 通用区块 */
.seo-section {
  max-width: 1080px;
  margin: 0 auto;
  width: 100%;
}

.seo-section-title {
  font-size: 22px;
  text-align: center;
  margin: 0 0 28px;
  color: var(--text);
}

/* 功能卡片 */
.seo-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.seo-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.seo-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.seo-card-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: var(--primary-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 14px;
}

.seo-card h4 {
  font-size: 16px;
  margin: 0 0 8px;
  color: var(--text);
}

.seo-card p {
  font-size: 13px;
  line-height: 1.8;
  color: var(--text-secondary);
  margin: 0;
}

/* 使用流程 */
.seo-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.seo-step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.seo-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--gradient);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 12px;
}

.seo-step h4 {
  font-size: 15px;
  margin: 0 0 8px;
  color: var(--text);
}

.seo-step p {
  font-size: 13px;
  line-height: 1.8;
  color: var(--text-secondary);
  margin: 0;
}

/* FAQ */
.seo-faq {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 860px;
  margin: 0 auto;
}

.seo-faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 18px;
  box-shadow: var(--shadow-sm);
}

.seo-faq-item summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  padding: 14px 0;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.seo-faq-item summary::-webkit-details-marker {
  display: none;
}

.seo-faq-item summary::after {
  content: "+";
  font-size: 18px;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.seo-faq-item[open] summary::after {
  transform: rotate(45deg);
}

.seo-faq-item p {
  font-size: 13px;
  line-height: 1.9;
  color: var(--text-secondary);
  margin: 0 0 14px;
}

/* CTA 区 */
.seo-cta {
  max-width: 860px;
  margin: 0 auto;
  width: 100%;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  box-shadow: var(--shadow);
}

.seo-cta h3 {
  font-size: 20px;
  margin: 0 0 10px;
  color: var(--text);
}

.seo-cta p {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 22px;
}

/* SEO 区响应式 */
@media (max-width: 900px) {
  .seo-landing {
    padding: 40px 20px 48px;
    gap: 40px;
  }

  .seo-hero h2 {
    font-size: 22px;
  }

  .seo-cards,
  .seo-steps {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .seo-hero h2 {
    font-size: 19px;
  }

  .seo-hero p {
    font-size: 13px;
  }

  .seo-section-title {
    font-size: 18px;
  }
}

@media (max-width: 640px) {
  .home-stats {
    grid-template-columns: 1fr;
  }

  /* 参考图库：窄屏上传区上下堆叠，预览图居中，按钮占满 */
  .subject-upload {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .subject-upload-preview {
    width: 100%;
    height: 160px;
    align-self: center;
    max-width: 220px;
  }

  .subject-upload-form .btn {
    align-self: stretch;
  }

  .subject-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .subject-item-delete {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================================
   新增功能样式
   ============================================================ */

/* 场景参考图像列表 */
.scene-ref-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 8px 0;
}
.scene-ref-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 160px;
}
.scene-ref-upload {
  position: relative;
  width: 160px;
  height: 120px;
  border: 2px dashed #ccc;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s;
}
.scene-ref-upload:hover {
  border-color: #4F6BFF;
}
.scene-ref-preview {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.scene-ref-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: #999;
  font-size: 12px;
}
.scene-ref-placeholder span {
  font-size: 28px;
  color: #ccc;
  line-height: 1;
}
.scene-ref-placeholder p {
  margin: 0;
  font-size: 12px;
}
.scene-ref-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
}
.scene-ref-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: none;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.scene-ref-desc {
  width: 100%;
  padding: 4px 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 12px;
  color: #333;
  box-sizing: border-box;
}
.scene-ref-desc:focus {
  border-color: #4F6BFF;
  outline: none;
}
.scene-ref-desc::placeholder {
  color: #bbb;
  font-style: italic;
}

/* 多角度图片上传 */
.subject-angle-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 8px 0;
}
.subject-angle-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 130px;
}
.subject-angle-upload {
  width: 130px;
  height: 100px;
  border: 2px dashed #ccc;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s;
}
.subject-angle-upload:hover {
  border-color: #4F6BFF;
}
.subject-angle-upload .subject-upload-preview {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin: 0;
}
.subject-angle-upload .subject-upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: #999;
  font-size: 11px;
}
.subject-angle-upload .subject-upload-placeholder p {
  margin: 0;
}
.subject-angle-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
}
.subject-angle-desc {
  width: 100%;
  padding: 3px 6px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 11px;
  color: #333;
  box-sizing: border-box;
}
.subject-angle-desc:focus {
  border-color: #4F6BFF;
  outline: none;
}

/* 主体绑定 */
.subject-bindings {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0;
}
.subject-binding-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: #f8f9ff;
  border: 1px solid #e8eaff;
  border-radius: 6px;
}
.subject-binding-label {
  font-size: 12px;
  color: #666;
  white-space: nowrap;
}
.subject-binding-select {
  padding: 4px 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 12px;
}
.subject-binding-hint {
  font-size: 11px;
  color: #999;
}

/* 进度条 */
.progress-bar-wrap {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px 16px;
  background: rgba(0,0,0,0.7);
  z-index: 10;
}
.progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(255,255,255,0.2);
  border-radius: 3px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #4F6BFF, #7B93FF);
  border-radius: 3px;
  transition: width 0.5s ease;
}
.progress-bar-info {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 12px;
  color: rgba(255,255,255,0.8);
}

/* 主体列表选中状态 */
.subject-item {
  border: 2px solid transparent;
  transition: border-color 0.2s;
  position: relative;
}
.subject-item.selected {
  border-color: #4F6BFF;
}
.subject-angle-imgs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}
.subject-angle-thumb {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid #eee;
  cursor: pointer;
  transition: transform 0.2s;
}
.subject-angle-thumb:hover {
  transform: scale(1.1);
}
.subject-angle-label {
  font-size: 10px;
  color: #999;
  text-align: center;
  margin-top: 2px;
}
