:root {
  --bg: #0c0d10;
  --bg2: #111218;
  --sidebar: #0e0f14;
  --panel: #16171e;
  --panel2: #1c1d26;
  --panel3: #22232e;
  --line: rgba(255, 255, 255, 0.08);
  --line2: rgba(255, 255, 255, 0.12);
  --text: #f2f3f7;
  --muted: #9a9eae;
  --muted2: #6e7285;
  --accent: #7c5cff;
  --accent-soft: rgba(124, 92, 255, 0.18);
  --accent-border: rgba(124, 92, 255, 0.45);
  --accent2: #3dd6c6;
  --warn: #f0b429;
  --danger: #ff6b7a;
  --ok: #3dd68c;
  --radius: 14px;
  --radius-lg: 16px;
  --sidebar-w: 240px;
  --font: "Inter", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; min-height: 100%;
  background: var(--bg); color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
button, .btn {
  appearance: none; border: 0; cursor: pointer;
  background: var(--accent); color: #fff; font-weight: 600;
  padding: 10px 16px; border-radius: 12px; font-size: 14px;
  font-family: inherit; transition: background .15s, border-color .15s, opacity .15s;
}
button:hover, .btn:hover { filter: brightness(1.06); }
button.ghost, .btn.ghost {
  background: transparent; border: 1px solid var(--line2); color: var(--text);
}
button.secondary, .btn.secondary {
  background: var(--panel2); border: 1px solid var(--line); color: var(--text);
}
button.white, .btn.white {
  background: #fff; color: #111; font-weight: 700;
}
button:disabled { opacity: .45; cursor: not-allowed; filter: none; }

/* —— App shell —— */
#app { min-height: 100vh; }
.shell {
  display: flex; min-height: 100vh;
  background: var(--bg);
}
.sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  background: var(--sidebar);
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
  padding: 14px 12px 12px;
  position: sticky; top: 0; height: 100vh;
  z-index: 30;
}
.main {
  flex: 1; min-width: 0;
  overflow-x: hidden;
  background:
    radial-gradient(ellipse 80% 40% at 50% -10%, rgba(124, 92, 255, 0.12), transparent 55%),
    var(--bg);
}

.ws-switch {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 12px;
  background: var(--panel); border: 1px solid var(--line);
  cursor: pointer; margin-bottom: 16px;
}
.ws-switch:hover { border-color: var(--line2); }
.ws-logo {
  width: 28px; height: 28px; border-radius: 8px;
  background: linear-gradient(135deg, #7c5cff, #a78bfa 50%, #3dd6c6);
  display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #fff;
}
.ws-meta { flex: 1; min-width: 0; }
.ws-name { font-weight: 700; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws-sub { font-size: 11px; color: var(--muted2); margin-top: 1px; }
.ws-chev { color: var(--muted2); font-size: 12px; }

.nav-section {
  font-size: 11px; color: var(--muted2); text-transform: uppercase;
  letter-spacing: .04em; padding: 8px 12px 6px; font-weight: 600;
}
.nav {
  display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 10px;
  color: var(--muted); font-size: 13.5px; font-weight: 500;
  background: transparent; border: 0; width: 100%;
  text-align: left; cursor: pointer;
}
.nav-item:hover { background: rgba(255,255,255,.04); color: var(--text); }
.nav-item.active {
  background: var(--accent-soft);
  color: #fff;
  box-shadow: inset 0 0 0 1px var(--accent-border);
}
.nav-ico {
  width: 18px; height: 18px; display: grid; place-items: center;
  opacity: .9; flex-shrink: 0;
}
.nav-ico svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.sidebar-foot {
  margin-top: auto; padding-top: 10px;
  border-top: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 10px;
}
.credits-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 10px; border-radius: 12px;
  background: var(--panel); border: 1px solid var(--line);
}
.credits-bar .label { font-size: 12px; color: var(--muted); }
.credits-wrap { position: relative; display: inline-flex; align-items: center; }
.credits-num {
  cursor: help; color: var(--accent2); font-weight: 700; font-size: 14px;
  border-bottom: 1px dashed rgba(61,214,198,.45); padding-bottom: 1px;
}
.credits-pop {
  position: absolute; bottom: calc(100% + 10px); left: 0;
  width: min(300px, 78vw); max-height: 340px; overflow: auto;
  background: #171a24; border: 1px solid var(--line2); border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0,0,0,.55); padding: 10px;
  opacity: 0; pointer-events: none; transform: translateY(4px);
  transition: .15s ease; z-index: 50;
}
.credits-wrap:hover .credits-pop,
.credits-wrap:focus-within .credits-pop {
  opacity: 1; pointer-events: auto; transform: translateY(0);
}
.credits-pop-title { font-size: 12px; color: var(--muted); margin: 2px 6px 8px; }
.ledger-row {
  display: flex; justify-content: space-between; gap: 12px; align-items: flex-start;
  padding: 8px 6px; border-radius: 8px;
}
.ledger-row:hover { background: rgba(255,255,255,.03); }
.ledger-label { font-size: 13px; color: var(--text); }
.ledger-time { font-size: 11px; color: var(--muted); margin-top: 2px; }
.ledger-delta { font-size: 13px; font-weight: 700; white-space: nowrap; }
.ledger-delta.minus { color: #ff8a96; }
.ledger-delta.plus { color: var(--accent2); }
.ledger-empty { padding: 12px; color: var(--muted); font-size: 13px; }
.credits-pop-tip { font-size: 11px; color: var(--muted); margin: 8px 6px 2px; }

.user-chip {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 12px;
}
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, #7c5cff, #3dd6c6);
  display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #fff;
  flex-shrink: 0;
}
.user-meta { flex: 1; min-width: 0; }
.user-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-tag {
  display: inline-block; font-size: 10px; padding: 1px 6px; border-radius: 999px;
  background: var(--accent-soft); color: #c4b5ff; margin-top: 2px;
}
.user-actions { display: flex; gap: 4px; }

.mobile-toggle {
  display: none;
  position: fixed; top: 12px; left: 12px; z-index: 40;
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--panel); border: 1px solid var(--line2); color: var(--text);
  align-items: center; justify-content: center;
}

/* —— Landing —— */
.home {
  padding: 18px 28px 64px;
  max-width: 1120px; margin: 0 auto;
}
.promo {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px; border-radius: 12px;
  background: linear-gradient(90deg, #f5d76e 0%, #c084fc 45%, #7c5cff 100%);
  color: #1a1028; font-size: 13px; font-weight: 600; margin-bottom: 18px;
}
.promo .promo-btn {
  background: #fff; color: #1a1028; padding: 6px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 700; white-space: nowrap; border: 0; cursor: pointer;
}
.feat-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  margin-bottom: 36px;
}
.feat-card {
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); background: var(--panel);
  cursor: default;
}
.feat-thumb {
  height: 88px;
  background-size: cover; background-position: center;
}
.feat-thumb.f1 { background: linear-gradient(135deg, #2a1a5e, #7c5cff 60%, #f5d76e); }
.feat-thumb.f2 { background: linear-gradient(135deg, #0f2a3a, #3dd6c6 55%, #7c5cff); }
.feat-thumb.f3 { background: linear-gradient(145deg, #1a1030, #ff6b9d 50%, #7c5cff); }
.feat-thumb.f4 { background: linear-gradient(145deg, #101820, #4f46e5, #22d3ee); }
.feat-label {
  padding: 10px 12px; font-size: 12px; color: var(--muted); line-height: 1.35;
}

.hero-center {
  text-align: center; padding: 12px 0 8px;
}
.hero-center h1 {
  margin: 0 0 6px;
  font-size: clamp(32px, 5.2vw, 52px);
  font-weight: 800; letter-spacing: -.02em; line-height: 1.15;
}
.hero-en {
  font-size: clamp(12px, 1.6vw, 15px);
  letter-spacing: .18em; color: var(--muted2);
  font-weight: 600; margin: 0 0 28px;
}

.cmd-box {
  max-width: 720px; margin: 0 auto;
  background: var(--panel);
  border: 1px solid var(--line2);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0,0,0,.35), 0 0 0 1px rgba(124,92,255,.08);
  overflow: hidden; text-align: left;
}
.cmd-tabs {
  display: flex; gap: 4px; padding: 10px 12px 0;
  border-bottom: 1px solid var(--line);
}
.cmd-tab {
  background: transparent; border: 0; color: var(--muted);
  padding: 10px 14px; font-size: 13px; font-weight: 600;
  border-radius: 10px 10px 0 0; cursor: pointer;
  position: relative;
}
.cmd-tab.active { color: #fff; }
.cmd-tab.active::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: -1px;
  height: 2px; background: var(--accent); border-radius: 2px;
}
.cmd-body { padding: 14px 16px 12px; }
.cmd-body textarea {
  width: 100%; min-height: 110px; resize: vertical;
  background: transparent; border: 0; color: var(--text);
  font: inherit; line-height: 1.55; padding: 4px 2px; outline: none;
}
.cmd-body textarea::placeholder { color: var(--muted2); }
.cmd-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 12px 12px; flex-wrap: wrap;
}
.cmd-pills { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.model-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px; border-radius: 999px;
  background: var(--panel2); border: 1px solid var(--line);
  font-size: 12px; color: var(--muted); cursor: default;
}
.model-pill .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
}
.cmd-submit {
  width: 40px; height: 40px; border-radius: 50%;
  background: #fff; color: #111; border: 0;
  display: grid; place-items: center; cursor: pointer;
  font-size: 18px; font-weight: 700; flex-shrink: 0;
}
.cmd-submit:hover { background: #f0f0f0; }

.skill-row {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 8px;
  margin: 16px auto 36px; max-width: 720px;
}
.skill-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 999px;
  background: rgba(255,255,255,.04); border: 1px solid var(--line);
  font-size: 12.5px; color: var(--muted); cursor: pointer;
}
.skill-pill:hover { border-color: var(--accent-border); color: #fff; background: var(--accent-soft); }

.model-cards {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  margin-bottom: 40px;
}
.mcard {
  border-radius: var(--radius-lg); padding: 18px 16px;
  border: 1px solid var(--line); min-height: 120px;
  display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden;
}
.mcard.hl {
  background: linear-gradient(145deg, #6d4aff, #9b7bff 55%, #c4b5fd);
  border-color: transparent; color: #fff;
}
.mcard.d1 { background: linear-gradient(160deg, #1a1b24, #252636); }
.mcard.d2 { background: linear-gradient(160deg, #14182a, #1e2440); }
.mcard.d3 { background: linear-gradient(160deg, #121820, #1a2830); }
.mcard-title { font-size: 16px; font-weight: 700; }
.mcard-sub { font-size: 12px; opacity: .8; margin-top: 6px; }
.mcard-badge {
  align-self: flex-start; margin-top: 14px;
  font-size: 11px; font-weight: 700; letter-spacing: .04em;
  padding: 4px 8px; border-radius: 6px;
  background: rgba(0,0,0,.2);
}

.section-title {
  text-align: center; font-size: 20px; font-weight: 700;
  margin: 0 0 18px; color: var(--text);
}
.section-title span { color: var(--muted2); display: block; font-size: 12px; font-weight: 500; margin-top: 6px; letter-spacing: .08em; }

.poster-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
}
.poster {
  aspect-ratio: 3/4; border-radius: var(--radius);
  border: 1px solid var(--line); overflow: hidden;
  position: relative; background: var(--panel);
}
.poster .bg {
  position: absolute; inset: 0;
}
.poster .cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 12px; font-size: 12px; font-weight: 600;
  background: linear-gradient(transparent, rgba(0,0,0,.75));
}
.p1 .bg { background: linear-gradient(160deg, #1a1040, #7c5cff88 40%, #0c0d10), radial-gradient(circle at 30% 30%, #a78bfa55, transparent 50%); }
.p2 .bg { background: linear-gradient(160deg, #0a2030, #3dd6c666 45%, #0c0d10); }
.p3 .bg { background: linear-gradient(160deg, #2a1020, #ff6b9d66 40%, #0c0d10); }
.p4 .bg { background: linear-gradient(160deg, #101828, #4f46e566 40%, #22d3ee44); }
.p5 .bg { background: linear-gradient(160deg, #1a1808, #f5d76e55 40%, #0c0d10); }
.p6 .bg { background: linear-gradient(160deg, #0e1a28, #60a5fa55 40%, #0c0d10); }
.p7 .bg { background: linear-gradient(160deg, #1a0e28, #c084fc55 40%, #0c0d10); }
.p8 .bg { background: linear-gradient(160deg, #0c1814, #34d39955 40%, #0c0d10); }

.footer-note {
  margin-top: 36px; font-size: 12px; color: var(--muted2); text-align: center;
}

/* —— Interior pages —— */
.wrap {
  max-width: 980px; margin: 0 auto;
  padding: 28px 24px 60px;
}
.page-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 18px;
}
.page-head h2 { margin: 0; font-size: 22px; }
.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px;
}
.grid { display: grid; gap: 14px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.muted { color: var(--muted); }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
input, textarea, select {
  width: 100%; background: var(--panel2); border: 1px solid var(--line);
  color: var(--text); border-radius: 12px; padding: 12px 14px; font: inherit;
}
textarea { min-height: 220px; resize: vertical; line-height: 1.5; }
label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.field { margin-bottom: 14px; }
.tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.tab {
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: transparent; color: var(--muted); font-size: 13px; cursor: pointer;
}
.tab.active {
  background: var(--accent-soft); color: #fff; border-color: var(--accent-border);
}
.shot-card { display: grid; grid-template-columns: 120px 1fr; gap: 12px; }
.thumb {
  width: 120px; height: 160px; border-radius: 10px;
  background: #0f1422; border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: var(--muted); text-align: center; padding: 6px;
  overflow: hidden; position: relative;
}
.thumb.has-img {
  background-image:
    linear-gradient(145deg, #473bff88, #1ec8b888),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='160'%3E%3Crect fill='%23121826' width='120' height='160'/%3E%3C/svg%3E");
  background-size: cover; color: transparent;
}
.thumb.has-video {
  padding: 0;
  background-image: none;
  background: #0f1422;
}
.thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: block;
  background: #0f1422;
}
.video-error {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--muted);
  max-width: 100%;
  word-break: break-word;
}
.status {
  display: inline-block; font-size: 11px; padding: 2px 8px;
  border-radius: 999px; border: 1px solid var(--line);
}
.status.pending { color: var(--muted); }
.status.running { color: var(--warn); border-color: #6a5520; }
.status.img { color: var(--accent2); border-color: #1f5f58; }
.status.vid { color: var(--ok); border-color: #1f5f3d; }
.progress {
  height: 8px; background: #0f1422; border-radius: 999px; overflow: hidden; margin: 10px 0;
}
.progress > i {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transition: width .4s;
}
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: #1e2230; border: 1px solid var(--line2);
  padding: 10px 16px; border-radius: 10px;
  font-size: 13px; opacity: 0; pointer-events: none; transition: .2s; z-index: 100;
}
.toast.show { opacity: 1; }
.price { font-size: 28px; font-weight: 700; }
.tag { font-size: 11px; color: var(--accent2); }
.phone {
  width: min(260px, 70vw); aspect-ratio: 9/16; margin: 0 auto;
  border-radius: 24px; border: 1px solid var(--line);
  background: linear-gradient(160deg, #1b2233, #0f1320);
  box-shadow: 0 20px 60px rgba(0,0,0,.45); overflow: hidden; position: relative;
}
.phone .bar {
  height: 28px; background: #0a0c12;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; color: var(--muted);
}
.phone .shot {
  margin: 12px; border-radius: 12px; height: calc(100% - 80px);
  background:
    radial-gradient(circle at 30% 20%, #5b4dff55, transparent 40%),
    radial-gradient(circle at 70% 60%, #3dd6c655, transparent 35%),
    #121826;
  display: flex; align-items: flex-end; padding: 14px; color: #fff; font-size: 13px;
}
.login-wrap { max-width: 420px; margin: 0 auto; padding: 48px 24px 60px; }

@media (max-width: 960px) {
  .feat-row, .model-cards { grid-template-columns: repeat(2, 1fr); }
  .poster-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 800px) {
  .grid.cols-2, .grid.cols-3 { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; left: 0; top: 0; transform: translateX(-105%);
    transition: transform .2s ease; box-shadow: 8px 0 32px rgba(0,0,0,.4);
  }
  .shell.nav-open .sidebar { transform: translateX(0); }
  .mobile-toggle { display: flex; }
  .main { padding-top: 8px; }
  .home { padding: 56px 16px 48px; }
  .wrap { padding: 56px 16px 48px; }
  .promo { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 520px) {
  .feat-row, .model-cards, .poster-grid { grid-template-columns: 1fr; }
  .hero-center h1 { font-size: 28px; }
}

/* —— Shot settings capsule (TopView-style, MVP 三项) —— */
.shot-actions {
  display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px;
  margin-top: 4px;
}
.shot-actions-main { display: flex; gap: 8px; flex-wrap: wrap; }
.shot-settings { position: relative; z-index: 5; }
.settings-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: 999px;
  background: var(--panel2); border: 1px solid var(--line2);
  color: var(--muted); font-size: 12px; font-weight: 600;
  cursor: pointer; font-family: inherit;
  transition: border-color .15s, color .15s, background .15s;
}
.settings-pill:hover, .shot-settings.open .settings-pill {
  border-color: var(--accent-border);
  color: var(--text);
  background: var(--accent-soft);
}
.settings-pill-ico { font-size: 12px; opacity: .85; }
.settings-pill-text { letter-spacing: .02em; }
.settings-pill-chev { font-size: 10px; color: var(--muted2); }
.settings-panel {
  position: absolute; top: calc(100% + 8px); left: 0;
  min-width: min(320px, 86vw);
  background: #171a24;
  border: 1px solid var(--line2);
  border-radius: 14px;
  box-shadow: 0 18px 48px rgba(0,0,0,.55);
  padding: 12px 12px 14px;
  z-index: 20;
}
.settings-panel-head {
  font-size: 11px; color: var(--muted2); font-weight: 600;
  letter-spacing: .04em; text-transform: uppercase;
  margin: 0 2px 10px;
}
.settings-group { margin-bottom: 10px; }
.settings-group:last-child { margin-bottom: 0; }
.settings-group.dimmed { opacity: .45; }
.settings-label {
  font-size: 12px; color: var(--muted); margin: 0 2px 6px;
  display: flex; align-items: center; gap: 8px;
}
.settings-label .hint { font-size: 11px; color: var(--muted2); font-weight: 400; }
.settings-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.set-chip {
  padding: 6px 11px; border-radius: 999px;
  background: var(--panel3); border: 1px solid var(--line);
  color: var(--muted); font-size: 12px; font-weight: 600;
  cursor: pointer; font-family: inherit;
}
.set-chip:hover:not(:disabled) {
  border-color: var(--accent-border); color: var(--text);
}
.set-chip.on {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: #fff;
}
.set-chip:disabled { opacity: .4; cursor: not-allowed; }



/* 自定义秒数输入 */
.duration-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.duration-input {
  width: 72px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.35);
  color: #e8e8f0;
  font: inherit;
  font-size: 13px;
}
.duration-input:focus {
  outline: none;
  border-color: #7c5cff;
  box-shadow: 0 0 0 2px rgba(124,92,255,.25);
}
.duration-input:disabled {
  opacity: .45;
  cursor: not-allowed;
}
.duration-unit { font-size: 13px; color: #b8b8c8; }
.chip-note {
  display: block;
  font-size: 10px;
  font-weight: 400;
  opacity: .65;
  margin-top: 2px;
  line-height: 1.2;
}
.set-chip { flex-direction: column; align-items: flex-start; }


.set-chip.disabled,
.set-chip:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}
