:root {
  color-scheme: dark;
  --brand-500: #8b5cf6;
  --brand-400: #a78bfa;
  --brand-600: #7c3aed;
  --cyan-500: #06b6d4;
  --cyan-400: #22d3ee;
  --brand-grad: linear-gradient(135deg, #8b5cf6 0%, #06b6d4 100%);
  --ink-950: #08080f;
  --ink-900: #0c0c16;
  --ink-800: #12121f;
  --ink-700: #1a1a2b;
  --glass-bg: rgba(255, 255, 255, 0.04);
  --glass-border: rgba(255, 255, 255, 0.08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink-950);
  color: #e5e7eb;
  font-family: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--ink-900); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--brand-600), var(--cyan-500));
  border-radius: 8px;
}

/* ---------- layout helpers ---------- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section { position: relative; padding: 80px 0; }
.center { text-align: center; }
.muted { color: #9ca3af; }

.gradient-text {
  background: var(--brand-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
}
.glass-strong {
  background: rgba(18, 18, 31, 0.85);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px; border-radius: 12px;
  background: var(--brand-grad);
  color: #fff; font-weight: 600; font-size: 16px;
  border: none; cursor: pointer; transition: opacity .2s;
  box-shadow: 0 0 40px -8px rgba(139, 92, 246, 0.5);
}
.btn-primary:hover { opacity: .9; }
.btn-primary:disabled { opacity: .4; cursor: not-allowed; }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px; border-radius: 12px;
  background: var(--glass-bg); color: #e5e7eb; font-weight: 600; font-size: 16px;
  border: 1px solid var(--glass-border); cursor: pointer; transition: background .2s;
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 999px;
  background: var(--glass-bg); border: 1px solid var(--glass-border);
  font-size: 13px; color: #cbd5e1; cursor: pointer; transition: all .2s;
}
.chip:hover { color: #fff; }
.chip.active {
  background: var(--brand-grad);
  color: #fff; border-color: transparent;
}

.grid-bg {
  background-image:
    linear-gradient(rgba(139, 92, 246, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139, 92, 246, 0.06) 1px, transparent 1px);
  background-size: 44px 44px;
}

/* ---------- navbar ---------- */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  height: 64px; display: flex; align-items: center;
}
.navbar .container { display: flex; align-items: center; justify-content: space-between; }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 18px; }
.logo-mark {
  width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(135deg, var(--brand-500), var(--cyan-500));
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 18px -4px rgba(139, 92, 246, 0.6);
}
.logo-img { width: 32px; height: 32px; display: block; }
.nav-links { display: flex; align-items: center; gap: 28px; font-size: 14px; color: #cbd5e1; }
.nav-links a:hover { color: #fff; }
.nav-actions { display: flex; align-items: center; gap: 14px; }
.nav-actions .settings-btn { font-size: 14px; color: #cbd5e1; display: flex; align-items: center; gap: 6px; background: none; border: none; cursor: pointer; }
.nav-actions .settings-btn:hover { color: #fff; }
.nav-toggle { display: none; background: none; border: none; color: #fff; cursor: pointer; }
.mobile-menu { display: none; padding: 16px 20px; }
.mobile-menu a { display: block; padding: 10px 0; color: #cbd5e1; }

/* ---------- hero ---------- */
.hero { padding: 120px 0 80px; overflow: hidden; position: relative; }
.hero .container { position: relative; text-align: center; z-index: 2; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px; border-radius: 999px; font-size: 14px; color: #e5e7eb; margin-bottom: 24px;
}
h1.title { font-size: 44px; line-height: 1.15; font-weight: 800; margin: 0; }
@media (min-width: 768px) { h1.title { font-size: 60px; } }
.hero p.sub { font-size: 18px; color: #9ca3af; max-width: 640px; margin: 24px auto 0; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; margin-top: 36px; }
.platform-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; margin-top: 40px; font-size: 12px; color: #9ca3af; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; max-width: 720px; margin: 56px auto 0; }
@media (min-width: 768px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat-card { border-radius: 16px; padding: 20px; }
.stat-num { font-size: 28px; font-weight: 700; }
@media (min-width: 768px) { .stat-num { font-size: 32px; } }
.stat-label { font-size: 14px; color: #9ca3af; margin-top: 4px; }

/* ---------- generator ---------- */
.gen-grid { display: grid; gap: 32px; align-items: start; }
@media (min-width: 1024px) { .gen-grid { grid-template-columns: 1fr 1fr; } }
.panel { border-radius: 24px; padding: 24px; }
.panel.border { position: relative; }
.panel.border::before {
  content: ''; position: absolute; inset: 0; padding: 1px; border-radius: inherit;
  background: linear-gradient(135deg, rgba(139,92,246,.6), rgba(6,182,212,.4), transparent);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none;
}
.field-label { font-size: 14px; color: #cbd5e1; display: block; margin-bottom: 8px; }
.platform-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.prompt-box {
  width: 100%; margin-top: 8px; border-radius: 12px; resize: none;
  background: rgba(12, 12, 22, 0.7); border: 1px solid var(--glass-border);
  padding: 16px; color: #f3f4f6; font-size: 15px; font-family: inherit; line-height: 1.6;
}
.prompt-box:focus { outline: none; border-color: rgba(139, 92, 246, 0.6); }
.prompt-box::placeholder { color: #6b7280; }
.example-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* ---------- 素材库 ---------- */
.asset-lib { margin-top: 14px; border: 1px solid var(--glass-border); border-radius: 16px; padding: 14px; background: rgba(255,255,255,.02); }
.asset-lib-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.asset-title { font-size: 14px; color: #cbd5e1; font-weight: 600; }
.asset-tip { font-size: 12px; color: #6b7280; }
.asset-upload { margin-left: auto; background: rgba(139,92,246,.16); border: 1px solid rgba(139,92,246,.4); color: #c4b5fd; padding: 6px 12px; border-radius: 999px; font-size: 12px; cursor: pointer; transition: .15s; }
.asset-upload:hover { background: rgba(139,92,246,.28); }
.asset-list { display: flex; gap: 10px; flex-wrap: wrap; }
.asset-item { position: relative; width: 84px; border: none; background: none; padding: 0; cursor: pointer; border-radius: 12px; overflow: hidden; text-align: center; }
.asset-item img { width: 84px; height: 84px; object-fit: cover; border-radius: 12px; border: 1px solid rgba(255,255,255,.1); display: block; transition: .15s; }
.asset-item:hover img { border-color: #8b5cf6; transform: translateY(-2px); box-shadow: 0 8px 20px -8px rgba(139,92,246,.6); }
.asset-name { display: block; font-size: 11px; color: #9ca3af; margin-top: 4px; }
.asset-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.asset-chip { display: inline-flex; align-items: center; gap: 6px; background: rgba(6,182,212,.14); border: 1px solid rgba(6,182,212,.4); border-radius: 999px; padding: 4px 6px 4px 4px; font-size: 12px; color: #a5f3fc; }
.asset-chip img { width: 22px; height: 22px; border-radius: 6px; object-fit: cover; }
.asset-x { background: none; border: none; color: #a5f3fc; cursor: pointer; font-size: 14px; line-height: 1; padding: 0 2px; }
.asset-x:hover { color: #fff; }
.screen { position: relative; }
.screen-asset { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.example-chip { font-size: 12px; padding: 6px 12px; border-radius: 999px; background: var(--glass-bg); border: 1px solid var(--glass-border); color: #cbd5e1; cursor: pointer; transition: color .2s; }
.example-chip:hover { color: #fff; }
.gen-hint { display: flex; justify-content: space-between; font-size: 12px; color: #6b7280; margin-top: 12px; }
.gen-hint button { background: none; border: none; color: #9ca3af; text-decoration: underline; cursor: pointer; }

.result-min { min-height: 420px; }
.empty-state { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: #6b7280; padding: 64px 0; }
.empty-state svg { opacity: .4; margin-bottom: 16px; }
.loading-state { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 64px 0; }
.loading-state svg { color: var(--brand-400); margin-bottom: 16px; }
.bounce-dots { display: flex; gap: 6px; margin-top: 12px; }
.bounce-dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--brand-400); animation: bounce 1s infinite; }
.bounce-dots span:nth-child(2) { animation-delay: .15s; }
.bounce-dots span:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

@keyframes spin { to { transform: rotate(360deg); } }
.spin { animation: spin 1s linear infinite; }

/* preview player */
.preview-wrap { display: flex; flex-direction: column; gap: 16px; }
.screen-outer { display: flex; justify-content: center; }
.screen {
  position: relative; background: #000; border-radius: 16px; overflow: hidden;
  border: 1px solid rgba(255,255,255,.1); box-shadow: 0 20px 60px -20px rgba(0,0,0,.8);
}
.screen-grad { position: absolute; inset: 0; }
.screen-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.7), transparent 40%, rgba(0,0,0,.3)); }
.screen-badge { position: absolute; top: 8px; left: 8px; font-size: 10px; background: rgba(0,0,0,.5); backdrop-filter: blur(6px); padding: 2px 8px; border-radius: 6px; }
.screen-idx { position: absolute; top: 8px; right: 8px; font-size: 10px; background: rgba(0,0,0,.5); backdrop-filter: blur(6px); padding: 2px 8px; border-radius: 6px; }
.screen-text { position: absolute; left: 12px; right: 12px; top: 33%; transform: translateY(-50%); text-align: center; }
.screen-text p { color: #fff; font-weight: 700; font-size: 16px; line-height: 1.35; text-shadow: 0 2px 8px rgba(0,0,0,.6); margin: 0; }
.screen-sub { position: absolute; bottom: 36px; left: 12px; right: 12px; }
.screen-sub p { text-align: center; color: rgba(255,255,255,.95); font-size: 11px; line-height: 1.4; text-shadow: 0 1px 4px rgba(0,0,0,.6); background: rgba(0,0,0,.35); border-radius: 8px; padding: 4px 8px; margin: 0; }
.screen-play {
  position: absolute; bottom: 12px; right: 12px; width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.9); color: #000; display: flex; align-items: center; justify-content: center;
  border: none; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.4);
}
.progress { width: 100%; }
.progress-bar { height: 6px; border-radius: 999px; background: rgba(255,255,255,.1); overflow: hidden; }
.progress-fill { height: 100%; background: var(--brand-grad); width: 0%; transition: width .1s linear; }
.progress-meta { display: flex; justify-content: space-between; font-size: 11px; color: #9ca3af; margin-top: 4px; }
.progress-meta button { background: none; border: none; color: #9ca3af; cursor: pointer; display: flex; align-items: center; gap: 4px; }
.thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.thumb { position: relative; aspect-ratio: 9/16; border-radius: 8px; overflow: hidden; border: 1px solid rgba(255,255,255,.1); cursor: pointer; }
.thumb.active { border-color: var(--brand-400); }
.thumb span { position: absolute; bottom: 2px; right: 4px; font-size: 9px; color: rgba(255,255,255,.8); }

/* result header & script */
.result-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.result-title { font-size: 18px; font-weight: 700; margin: 0; }
.result-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; font-size: 12px; color: #9ca3af; }
.tag-pill { padding: 2px 10px; border-radius: 999px; background: var(--glass-bg); font-size: 11px; }
.tag-pill.llm { background: rgba(16,185,129,.2); color: #6ee7b7; }
.tag-pill.local { background: rgba(245,158,11,.2); color: #fcd34d; }
.regen-btn { flex-shrink: 0; padding: 6px 12px; border-radius: 8px; background: var(--glass-bg); border: 1px solid var(--glass-border); color: #e5e7eb; font-size: 13px; cursor: pointer; display: flex; align-items: center; gap: 4px; }
.regen-btn:hover { background: rgba(255,255,255,.1); }
.script-list { margin-top: 20px; display: flex; flex-direction: column; gap: 8px; }
.script-head { font-size: 14px; color: #cbd5e1; display: flex; align-items: center; gap: 4px; }
.scene-row { display: flex; gap: 12px; padding: 10px; border-radius: 12px; background: rgba(12,12,22,.5); border: 1px solid rgba(255,255,255,.05); }
.scene-thumb { width: 40px; height: 56px; border-radius: 6px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 12px; color: rgba(255,255,255,.8); }
.scene-info { min-width: 0; }
.scene-info .s-title { font-size: 14px; font-weight: 500; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scene-info .s-vo { font-size: 12px; color: #9ca3af; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scene-info .s-meta { font-size: 10px; color: #6b7280; margin-top: 2px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 16px; }
.tag-row .tag-pill { display: flex; align-items: center; gap: 4px; }
.export-btn { width: 100%; margin-top: 16px; padding: 12px; border-radius: 12px; background: var(--brand-grad); color: #fff; font-weight: 600; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; transition: opacity .2s; }
.export-btn:hover { opacity: .9; }

/* ---------- features ---------- */
.section-head { text-align: center; margin-bottom: 48px; }
.section-head h2 { font-size: 32px; font-weight: 700; margin: 0; }
@media (min-width: 768px) { .section-head h2 { font-size: 40px; } }
.section-head p { color: #9ca3af; margin-top: 12px; }
.cards { display: grid; gap: 20px; }
@media (min-width: 768px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card { border-radius: 16px; padding: 24px; transition: border-color .2s; }
.card:hover { border-color: rgba(139,92,246,.4); }
.card-icon { width: 44px; height: 44px; border-radius: 12px; background: linear-gradient(135deg, rgba(139,92,246,.3), rgba(6,182,212,.3)); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.card h3 { font-size: 18px; font-weight: 600; margin: 0 0 8px; }
.card p { font-size: 14px; color: #9ca3af; line-height: 1.7; margin: 0; }

/* ---------- templates ---------- */
.tpl-grid { display: grid; gap: 20px; }
@media (min-width: 640px) { .tpl-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .tpl-grid { grid-template-columns: repeat(3, 1fr); } }
.tpl-card { border-radius: 16px; overflow: hidden; transition: border-color .2s; }
.tpl-card:hover { border-color: rgba(139,92,246,.4); }
.tpl-thumb { position: relative; aspect-ratio: 16/9; display: flex; align-items: center; justify-content: center; }
.tpl-thumb .dark { position: absolute; inset: 0; background: rgba(0,0,0,.2); }
.tpl-play { position: relative; width: 48px; height: 48px; border-radius: 50%; background: rgba(255,255,255,.9); color: #000; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 16px rgba(0,0,0,.3); transition: transform .2s; }
.tpl-card:hover .tpl-play { transform: scale(1.1); }
.tpl-dur { position: absolute; bottom: 8px; right: 8px; font-size: 11px; background: rgba(0,0,0,.5); backdrop-filter: blur(6px); padding: 2px 8px; border-radius: 6px; display: flex; align-items: center; gap: 4px; }
.tpl-body { padding: 16px; }
.tpl-body h3 { font-size: 14px; font-weight: 500; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tpl-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tpl-tags span { font-size: 10px; padding: 2px 8px; border-radius: 999px; background: var(--glass-bg); color: #cbd5e1; }
.tpl-tags span.cat { background: rgba(139,92,246,.2); color: #c4b5fd; }

/* ---------- how it works ---------- */
.steps { display: grid; gap: 20px; }
@media (min-width: 768px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.step { position: relative; border-radius: 16px; padding: 24px; }
.step-num { position: absolute; top: 16px; right: 20px; font-size: 32px; font-weight: 700; color: rgba(255,255,255,.1); }
.step-icon { width: 44px; height: 44px; border-radius: 12px; background: linear-gradient(135deg, rgba(139,92,246,.3), rgba(6,182,212,.3)); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.step h3 { font-size: 18px; font-weight: 600; margin: 0 0 8px; }
.step p { font-size: 14px; color: #9ca3af; line-height: 1.7; margin: 0; }

/* ---------- pricing ---------- */
.plans { display: grid; gap: 24px; }
@media (min-width: 768px) { .plans { grid-template-columns: repeat(3, 1fr); } }
.plan { position: relative; border-radius: 24px; padding: 28px; }
.plan.highlight { box-shadow: 0 0 40px -8px rgba(139,92,246,.5); }
.plan-badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); padding: 4px 12px; border-radius: 999px; background: var(--brand-grad); color: #fff; font-size: 12px; display: flex; align-items: center; gap: 4px; }
.plan h3 { font-size: 20px; font-weight: 700; margin: 0; }
.plan .desc { font-size: 14px; color: #9ca3af; margin-top: 4px; }
.plan .price { display: flex; align-items: flex-end; gap: 4px; margin-top: 20px; }
.plan .price .num { font-size: 36px; font-weight: 800; }
.plan .price .per { color: #9ca3af; margin-bottom: 4px; }
.plan ul { margin-top: 24px; display: flex; flex-direction: column; gap: 12px; list-style: none; padding: 0; }
.plan li { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; color: #cbd5e1; }
.plan li svg { color: var(--cyan-400); margin-top: 2px; flex-shrink: 0; }
.plan-cta { margin-top: 28px; display: block; text-align: center; padding: 12px; border-radius: 12px; font-weight: 600; transition: opacity .2s; cursor: pointer; }
.plan-cta.primary { background: var(--brand-grad); color: #fff; }
.plan-cta.primary:hover { opacity: .9; }
.plan-cta.ghost { background: var(--glass-bg); color: #fff; border: 1px solid var(--glass-border); }
.plan-cta.ghost:hover { background: rgba(255,255,255,.1); }
.plan-contact { margin-top: 12px; width: 100%; display: block; text-align: center; padding: 10px; border-radius: 12px; font-weight: 600; font-size: 14px; cursor: pointer; color: var(--cyan-400); background: transparent; border: 1px dashed rgba(34,211,238,.5); transition: background .2s, color .2s; }
.plan-contact:hover { background: rgba(34,211,238,.12); color: #fff; }

/* ---------- CTA ---------- */
.cta-box { position: relative; border-radius: 24px; padding: 56px; text-align: center; overflow: hidden; background: var(--brand-grad); }
.cta-box h2 { font-size: 32px; font-weight: 700; margin: 0; }
@media (min-width: 768px) { .cta-box h2 { font-size: 40px; } }
.cta-box p { color: #e5e7eb; max-width: 640px; margin: 12px auto 0; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid rgba(255,255,255,.1); padding: 48px 0; }
.footer-grid { display: flex; flex-direction: column; gap: 32px; }
@media (min-width: 768px) { .footer-grid { flex-direction: row; justify-content: space-between; } }
.footer-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; font-size: 14px; }
.footer h4 { color: #fff; margin: 0 0 12px; }
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; color: #9ca3af; }
.footer-bottom { margin-top: 40px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.05); font-size: 12px; color: #6b7280; display: flex; flex-direction: column; gap: 8px; }
@media (min-width: 640px) { .footer-bottom { flex-direction: row; justify-content: space-between; } }

/* ---------- settings modal ---------- */
.modal-backdrop { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(0,0,0,.6); backdrop-filter: blur(4px); }
.modal-backdrop.hidden { display: none; }
.modal { position: relative; border-radius: 16px; width: 100%; max-width: 440px; padding: 24px; }
.modal-close { position: absolute; top: 16px; right: 16px; background: none; border: none; color: #9ca3af; cursor: pointer; }
.modal h3 { font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 8px; margin: 0; }
.modal h3 svg { color: var(--brand-400); }
.modal p.hint { font-size: 14px; color: #9ca3af; margin: 8px 0 0; }
.modal .form { margin-top: 20px; display: flex; flex-direction: column; gap: 16px; }
.modal label { font-size: 14px; color: #cbd5e1; display: block; }
.modal input { width: 100%; margin-top: 4px; border-radius: 8px; background: rgba(12,12,22,.7); border: 1px solid var(--glass-border); padding: 10px 12px; color: #f3f4f6; font-size: 14px; font-family: inherit; }
.modal input:focus { outline: none; border-color: rgba(139,92,246,.6); }
.modal .note { font-size: 11px; color: #6b7280; margin-top: 4px; }
.modal-save { margin-top: 24px; width: 100%; padding: 12px; border-radius: 12px; background: var(--brand-grad); color: #fff; font-weight: 600; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; }
.modal-save:hover { opacity: .9; }

/* 联系弹窗 */
.contact-modal { max-width: 420px; }
.contact-grid { margin-top: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.contact-item { background: rgba(139,92,246,.08); border: 1px solid rgba(139,92,246,.25); border-radius: 12px; padding: 14px; }
.contact-label { font-size: 12px; color: #9ca3af; letter-spacing: .5px; }
.contact-value { font-size: 18px; font-weight: 700; margin-top: 6px; color: #f3f4f6; }
.contact-value.link { color: var(--cyan-400); text-decoration: none; }
.contact-value.link:hover { text-decoration: underline; }
.qr-wrap { margin-top: 18px; }
.qr-box { margin-top: 8px; width: 160px; height: 160px; border-radius: 12px; border: 1px dashed rgba(34,211,238,.5); background: rgba(12,12,22,.6); display: flex; align-items: center; justify-content: center; cursor: pointer; overflow: hidden; }
.qr-box img { width: 100%; height: 100%; object-fit: contain; }
.qr-empty { font-size: 13px; color: #6b7280; text-align: center; padding: 0 12px; }
.qr-upload { display: inline-block; margin-top: 10px; font-size: 13px; color: var(--cyan-400); cursor: pointer; }
.qr-upload:hover { text-decoration: underline; }
.tts-head { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; color: #f3f4f6; }
.tts-head .switch { position: relative; display: inline-block; width: 42px; height: 24px; flex-shrink: 0; }
.tts-head .switch input { opacity: 0; width: 0; height: 0; }
.tts-head .slider { position: absolute; cursor: pointer; inset: 0; background: rgba(255,255,255,.15); border-radius: 999px; transition: .2s; }
.tts-head .slider::before { content: ""; position: absolute; height: 18px; width: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.tts-head .switch input:checked + .slider { background: var(--brand-grad); }
.tts-head .switch input:checked + .slider::before { transform: translateX(18px); }

/* 用户区 / 登录 / 用户管理 / 我的作品 */
.user-area { display: flex; align-items: center; }
.login-link { background: var(--brand-grad); color: #fff; border: none; border-radius: 10px; padding: 9px 16px; font-weight: 600; font-size: 14px; cursor: pointer; }
.login-link:hover { opacity: .9; }
.user-drop { position: relative; }
.user-trigger { display: flex; align-items: center; gap: 8px; background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: 10px; padding: 6px 10px; color: #e5e7eb; cursor: pointer; font-size: 14px; }
.user-trigger:hover { background: rgba(255,255,255,.08); }
.user-avatar { width: 24px; height: 24px; border-radius: 50%; background: var(--brand-grad); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; }
.user-name em { color: var(--cyan-400); font-style: normal; font-size: 11px; opacity: .9; }
.user-menu-list { position: absolute; right: 0; top: calc(100% + 8px); min-width: 160px; background: var(--ink-800); border: 1px solid var(--glass-border); border-radius: 12px; padding: 6px; display: none; flex-direction: column; z-index: 70; box-shadow: 0 20px 50px -10px rgba(0,0,0,.6); }
.user-menu-list.open { display: flex; }
.umen { background: none; border: none; color: #cbd5e1; text-align: left; padding: 9px 12px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.umen:hover { background: rgba(255,255,255,.08); color: #fff; }
.login-modal { max-width: 360px; }
.login-err { color: #f87171; font-size: 13px; margin-top: 12px; min-height: 16px; text-align: center; }
.login-tip { font-size: 12px; color: #6b7280; margin-top: 12px; text-align: center; }
.admin-modal { max-width: 560px; }
.admin-add { display: flex; gap: 8px; margin: 16px 0; }
.admin-add input { flex: 1; border-radius: 8px; background: rgba(12,12,22,.7); border: 1px solid var(--glass-border); padding: 10px 12px; color: #f3f4f6; font-size: 14px; font-family: inherit; }
.admin-add input:focus { outline: none; border-color: rgba(139,92,246,.6); }
.admin-add .modal-save { width: auto; margin-top: 0; padding: 10px 18px; white-space: nowrap; }
.user-table { display: flex; flex-direction: column; gap: 8px; max-height: 360px; overflow-y: auto; }
.admin-row { display: grid; grid-template-columns: 1.2fr .8fr .6fr 3fr 1.4fr; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 10px; background: rgba(139,92,246,.06); border: 1px solid rgba(139,92,246,.18); font-size: 13px; }
.admin-head { background: transparent; border: none; color: #9ca3af; font-size: 12px; }
.admin-row .u-name { font-weight: 700; color: #fff; }
.perm-cells { display: flex; flex-wrap: wrap; gap: 6px 10px; }
.perm-chk { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: #cbd5e1; cursor: pointer; }
.switch-min { position: relative; display: inline-block; width: 38px; height: 22px; }
.switch-min input { opacity: 0; width: 0; height: 0; }
.switch-min span { position: absolute; cursor: pointer; inset: 0; background: rgba(255,255,255,.18); border-radius: 999px; transition: .2s; }
.switch-min span::before { content: ""; position: absolute; height: 16px; width: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.switch-min input:checked + span { background: var(--brand-grad); }
.switch-min input:checked + span::before { transform: translateX(16px); }
.del-user { background: rgba(248,113,113,.12); color: #f87171; border: 1px solid rgba(248,113,113,.4); border-radius: 8px; padding: 6px 10px; font-size: 12px; cursor: pointer; }
.del-user:hover { background: rgba(248,113,113,.22); }
.revoke-user { background: rgba(34,211,238,.12); color: #22d3ee; border: 1px solid rgba(34,211,238,.4); border-radius: 8px; padding: 6px 10px; font-size: 12px; cursor: pointer; margin-right: 6px; }
.revoke-user:hover { background: rgba(34,211,238,.22); }
.projects-bar { margin-top: 28px; }
.proj-label { font-size: 14px; color: #9ca3af; margin-bottom: 10px; }
.proj-list { display: flex; flex-wrap: wrap; gap: 10px; }
.proj-chip { background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: 999px; padding: 8px 16px; color: #e5e7eb; font-size: 13px; cursor: pointer; transition: background .2s; }
.proj-chip:hover { background: rgba(139,92,246,.2); border-color: rgba(139,92,246,.5); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ---------- misc ---------- */
.glow { box-shadow: 0 0 40px -8px rgba(139, 92, 246, 0.5); }
.fade-in { animation: fadeIn .6s ease forwards; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 767px) {
  .nav-links, .nav-actions .settings-btn, .nav-actions .btn-primary { display: none; }
  .nav-toggle { display: block; }
  .mobile-menu.open { display: block; }
}

/* ---------- 发布 & 分享卡片 ---------- */
.publish-box { border: 1px solid rgba(255,255,255,.1); border-radius: 14px; padding: 16px; margin-top: 16px; background: rgba(255,255,255,.03); }
.pub-head { display: flex; align-items: center; gap: 6px; font-weight: 700; color: #e5e7eb; margin-bottom: 6px; }
.pub-head svg { color: var(--brand-400); }
.pub-tip { font-size: 12px; color: #9ca3af; margin: 0 0 12px; line-height: 1.5; }
.pub-copy { width: 100%; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 10px; border-radius: 10px; border: 1px solid rgba(139,92,246,.5); background: rgba(139,92,246,.15); color: #c4b5fd; font-size: 14px; cursor: pointer; font-family: inherit; }
.pub-copy:hover { background: rgba(139,92,246,.28); }
.pub-platforms { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.pub-p { flex: 1; min-width: 64px; padding: 9px 6px; border-radius: 9px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.05); color: #e5e7eb; font-size: 13px; cursor: pointer; transition: .15s; font-family: inherit; }
.pub-p:hover { border-color: var(--brand-500); background: rgba(139,92,246,.2); color: #fff; }

/* ---------- 预览字幕逐词高亮 ---------- */
.vs-done { color: #fff; }
.vs-now { color: #ffd166; font-weight: 700; }
.vs-pend { color: rgba(255,255,255,.45); }
