@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@500;700;900&family=Noto+Sans+SC:wght@400;500;700;900&family=JetBrains+Mono:wght@400;600&display=swap');

/* ============================================================
   Base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-deep: #05030f;
  --bg-base: #0a0719;
  --bg-card: #110a26;
  --bg-card-hover: #170f30;
  --bg-input: #08051a;
  --border: #1f1442;
  --border-hover: #3a2470;
  --text: #e8e6ff;
  --text-dim: #a89fd6;
  --text-muted: #6b6395;
  --accent: #b537ff;       /* neon magenta-purple */
  --accent2: #ff2bd1;      /* neon pink */
  --accent3: #00e5ff;      /* neon cyan */
  --accent-glow: rgba(181,55,255,.5);
  --accent2-glow: rgba(255,43,209,.45);
  --accent3-glow: rgba(0,229,255,.45);
  --green: #00ff9d;
  --red: #ff3366;
  --yellow: #ffcc00;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 3px rgba(0,0,0,.6);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.7);
  --neon-shadow: 0 0 8px var(--accent-glow), 0 0 24px rgba(181,55,255,.2);
  --neon-shadow-cyan: 0 0 8px var(--accent3-glow), 0 0 24px rgba(0,229,255,.18);
}

/* ============================================================
   Theme variants — only override accent palette, layout unchanged.
   Default (no attribute) keeps the original neon-purple look.
   ============================================================ */
body[data-theme="green"] {
  --accent: #22ff8b;
  --accent2: #00e5a8;
  --accent3: #c4ff4d;
  --accent-glow: rgba(34,255,139,.5);
  --accent2-glow: rgba(0,229,168,.45);
  --accent3-glow: rgba(196,255,77,.45);
  --bg-deep: #02100a;
  --bg-base: #051a13;
  --bg-card: #0a2419;
  --bg-card-hover: #0f3324;
  --bg-input: #021e14;
  --border: #143d2c;
  --border-hover: #1f6b4a;
}
body[data-theme="blue"] {
  --accent: #2a9bff;
  --accent2: #00e5ff;
  --accent3: #7c5cff;
  --accent-glow: rgba(42,155,255,.5);
  --accent2-glow: rgba(0,229,255,.45);
  --accent3-glow: rgba(124,92,255,.45);
  --bg-deep: #030914;
  --bg-base: #06101e;
  --bg-card: #0a1a2e;
  --bg-card-hover: #122339;
  --bg-input: #050d1a;
  --border: #14244a;
  --border-hover: #25457a;
}
body[data-theme="orange"] {
  --accent: #ff7a1a;
  --accent2: #ffcc00;
  --accent3: #ff3d6d;
  --accent-glow: rgba(255,122,26,.5);
  --accent2-glow: rgba(255,204,0,.45);
  --accent3-glow: rgba(255,61,109,.45);
  --bg-deep: #140803;
  --bg-base: #1a0d05;
  --bg-card: #2a160a;
  --bg-card-hover: #361d0e;
  --bg-input: #18090b;
  --border: #4a2810;
  --border-hover: #7a4520;
}
body[data-theme="rose"] {
  --accent: #ff5b9d;
  --accent2: #ffb84d;
  --accent3: #d4a3ff;
  --accent-glow: rgba(255,91,157,.5);
  --accent2-glow: rgba(255,184,77,.45);
  --accent3-glow: rgba(212,163,255,.45);
  --bg-deep: #140510;
  --bg-base: #1a0815;
  --bg-card: #2a0f24;
  --bg-card-hover: #36142e;
  --bg-input: #1a0712;
  --border: #4a1a3a;
  --border-hover: #7a2860;
}
body[data-theme="aurora"] {
  --accent: #00ffd1;
  --accent2: #b537ff;
  --accent3: #ffd84d;
  --accent-glow: rgba(0,255,209,.5);
  --accent2-glow: rgba(181,55,255,.45);
  --accent3-glow: rgba(255,216,77,.45);
}

body {
  font-family: "Noto Sans SC", -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg-deep);
  background-image:
    radial-gradient(ellipse at 15% 8%, var(--accent-glow) 0%, transparent 45%),
    radial-gradient(ellipse at 88% 92%, var(--accent3-glow) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, var(--accent2-glow) 0%, transparent 60%);
  background-size: auto, auto, auto;
  background-blend-mode: normal;
  color: var(--text); min-height: 100vh; overflow: hidden;
  font-size: 13px; line-height: 1.5; font-weight: 400;
  position: relative;
  transition: background-color .4s ease;
}

/* 流动光带：跟主题色同步，不影响主交互 */
body::before {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 20%, var(--accent-glow) 0%, transparent 18%),
    radial-gradient(circle at 80% 30%, var(--accent2-glow) 0%, transparent 18%),
    radial-gradient(circle at 50% 80%, var(--accent3-glow) 0%, transparent 22%);
  opacity: .35;
  filter: blur(40px);
  animation: themeFlow 14s ease-in-out infinite alternate;
  z-index: 0;
}
@keyframes themeFlow {
  0%   { transform: translate(-2%,-2%) scale(1);   opacity: .28; }
  50%  { transform: translate(2%,3%)  scale(1.08); opacity: .45; }
  100% { transform: translate(-1%,2%) scale(1.04); opacity: .32; }
}
#app, .topbar, .tab-nav, .tab-content { position: relative; z-index: 1; }

/* Headings */
h1, h2, h3 {
  font-family: "Orbitron", "Noto Sans SC", "PingFang SC", sans-serif;
  letter-spacing: .06em; font-weight: 700;
}
h1 { font-size: 18px; }
h2 { font-size: 20px; }
h3 { font-size: 15px; color: var(--text-dim); font-weight: 500; }

/* ============================================================
   Scrollbar
   ============================================================ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent), var(--accent2));
  border-radius: 4px;
  box-shadow: 0 0 6px var(--accent-glow);
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--accent2), var(--accent3));
}

/* ============================================================
   Login overlay
   ============================================================ */
.overlay {
  position: fixed; inset: 0; background: var(--bg-deep);
  background-image:
    radial-gradient(ellipse at 50% 30%, rgba(139,92,246,.06) 0%, transparent 60%),
    radial-gradient(ellipse at 50% 70%, rgba(236,72,153,.04) 0%, transparent 60%);
  display: flex; align-items: center; justify-content: center; z-index: 1000;
}
.login-box {
  background: linear-gradient(180deg, rgba(17,10,38,.85), rgba(10,7,25,.95));
  border-radius: 18px; padding: 44px 40px;
  text-align: center; min-width: 380px;
  border: 1px solid rgba(181,55,255,.35);
  box-shadow:
    0 0 0 1px rgba(0,229,255,.08),
    0 0 60px rgba(181,55,255,.18),
    0 0 120px rgba(0,229,255,.06),
    var(--shadow-lg);
  backdrop-filter: blur(8px);
}
.login-box h2 {
  margin-bottom: 8px; font-size: 26px; letter-spacing: .08em;
  background: linear-gradient(135deg, #b537ff 0%, #ff2bd1 50%, #00e5ff 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 12px rgba(181,55,255,.5));
}
.login-box input {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--bg-input); color: var(--text);
  font-size: 14px; margin-bottom: 12px; outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.login-box input:focus {
  border-color: var(--accent3);
  box-shadow: 0 0 0 2px rgba(0,229,255,.25), 0 0 20px var(--accent3-glow);
}
.login-box .link { color: var(--accent3); text-decoration: none; font-size: 12px; cursor: pointer; }
.login-box .link:hover { text-shadow: 0 0 8px var(--accent3-glow); }
.login-box .hint { color: var(--text-muted); font-size: 12px; margin: 4px 0 12px; }
.code-box {
  margin-top: 8px; padding: 14px; background: var(--bg-input); border-radius: var(--radius);
  border: 1px solid rgba(0,229,255,.25);
  box-shadow: inset 0 0 20px rgba(0,229,255,.05);
}
.code-text {
  font-size: 24px; font-weight: 900; letter-spacing: 4px;
  background: linear-gradient(135deg, #00e5ff, #b537ff, #ff2bd1);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  font-family: "Orbitron", "JetBrains Mono", Consolas, monospace;
  filter: drop-shadow(0 0 8px var(--accent3-glow));
}

/* Activation admin */
.activation-section { margin-bottom: 16px; }
.activation-section h4 { font-size: 13px; color: var(--accent3); margin-bottom: 8px; letter-spacing: .04em; text-shadow: 0 0 6px var(--accent3-glow); }
.activation-section table { width: 100%; font-size: 11px; border-collapse: collapse; }
.activation-section th { text-align: left; color: var(--text-muted); padding: 4px 8px; border-bottom: 1px solid var(--border); font-weight: 500; }
.activation-section td { padding: 6px 8px; border-bottom: 1px solid rgba(31,20,66,.5); color: var(--text); }
.activation-section td code { background: var(--bg-input); padding: 1px 6px; border-radius: 3px; font-size: 10px; color: var(--accent3); border: 1px solid rgba(0,229,255,.2); }
.activation-section .badge-active { color: var(--green); text-shadow: 0 0 6px rgba(0,255,157,.4); }
.activation-section .badge-expired { color: var(--red); }
.activation-section .badge-pending { color: var(--yellow); }
.activation-gen-form { background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; margin-top: 12px; }

/* ============================================================
   App shell
   ============================================================ */
#app { height: 100vh; display: flex; flex-direction: column; }

/* Topbar */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 24px; flex-shrink: 0;
  background: linear-gradient(180deg, rgba(17,10,38,.92), rgba(10,7,25,.85));
  border-bottom: 1px solid rgba(181,55,255,.25);
  box-shadow: 0 1px 0 rgba(0,229,255,.08), 0 4px 24px rgba(181,55,255,.06);
  backdrop-filter: blur(10px);
  position: relative;
}
.topbar::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), var(--accent3), transparent);
  opacity: .55;
}
.topbar h1 {
  font-size: 18px; font-weight: 900; letter-spacing: .08em;
  background: linear-gradient(135deg, #00e5ff 0%, #b537ff 50%, #ff2bd1 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 8px rgba(181,55,255,.45));
}
.topbar-center { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.topbar-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.project-select {
  background: rgba(31,20,66,.7);
  color: var(--text);
  border: 1px solid rgba(181,55,255,.35);
  border-radius: 6px;
  padding: 5px 26px 5px 12px;
  font-size: 12px;
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
  cursor: pointer;
  outline: none;
  max-width: 160px;
  appearance: none;
  -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--accent) 50%),
                    linear-gradient(135deg, var(--accent) 50%, transparent 50%);
  background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  backdrop-filter: blur(4px);
  transition: all .2s ease;
  letter-spacing: .3px;
}
.project-select:hover {
  background-color: rgba(58,36,112,.7);
  border-color: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
}
.project-select:focus {
  border-color: var(--accent3);
  box-shadow: 0 0 0 1px rgba(0,229,255,.35), 0 0 14px var(--accent3-glow);
}
.project-select option {
  background: var(--bg-card);
  color: var(--text);
  padding: 6px;
}
.badge {
  font-size: 11px; padding: 3px 12px; border-radius: 12px;
  background: linear-gradient(135deg, rgba(181,55,255,.18), rgba(0,229,255,.12));
  color: #e8e6ff;
  border: 1px solid rgba(181,55,255,.35);
  text-shadow: 0 0 8px var(--accent-glow);
}

/* Tab nav */
.tab-nav {
  display: flex; gap: 0; flex-shrink: 0;
  background: rgba(10,7,25,.7);
  border-bottom: 1px solid var(--border);
  padding: 0 24px; overflow-x: auto;
  position: relative;
}
.tab-btn {
  padding: 12px 20px; font-size: 12px; cursor: pointer; font-weight: 600;
  background: none; border: none; color: var(--text-muted);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  white-space: nowrap; transition: all .2s; letter-spacing: .04em;
  font-family: "Orbitron", "Noto Sans SC", sans-serif;
  position: relative;
}
.tab-btn:hover { color: var(--accent3); text-shadow: 0 0 8px var(--accent3-glow); }
.tab-btn.active {
  color: #fff;
  background: linear-gradient(180deg, transparent 50%, rgba(181,55,255,.10));
}
.tab-btn.active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent2), var(--accent3));
  box-shadow: 0 0 12px var(--accent-glow), 0 0 24px var(--accent2-glow);
}

/* Tab content */
.tab-content {
  display: none; flex: 1 1 auto; overflow-y: auto; overflow-x: hidden;
  padding: 18px 24px; min-height: 0;
}
.tab-content.active { display: flex; flex-direction: column; }
.tab-content > * { flex-shrink: 0; }

/* Custom wide scrollbar on the far right */
.tab-content::-webkit-scrollbar { width: 10px; }
.tab-content::-webkit-scrollbar-track { background: transparent; }
.tab-content::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent), var(--accent3));
  border-radius: 5px;
  box-shadow: 0 0 8px var(--accent-glow);
}
.tab-content::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--accent2), var(--accent3));
}

/* ============================================================
   Layout helpers
   ============================================================ */
.split-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; min-height: 0; }
@media(max-width:1100px){ .split-2 { grid-template-columns: 1fr; } }
.split-shots { display: flex; gap: 14px; align-items: flex-start; }
.shots-left { flex: 6; min-width: 0; padding-right: 4px; }
.shots-right { flex: 4; min-width: 0; position: sticky; top: 0; }

/* ============================================================
   Cards
   ============================================================ */
.card {
  background: linear-gradient(180deg, rgba(17,10,38,.85), rgba(10,7,25,.85));
  border-radius: var(--radius); padding: 18px;
  border: 1px solid var(--border); display: flex; flex-direction: column;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(181,55,255,.06);
  transition: border-color .25s, box-shadow .25s;
}
.card:hover {
  border-color: rgba(181,55,255,.4);
  box-shadow: var(--neon-shadow), inset 0 1px 0 rgba(0,229,255,.1);
}
.card h3 {
  font-size: 15px; color: var(--text-dim); margin-bottom: 12px; font-weight: 700;
  letter-spacing: .04em;
}

/* Ref list — vertical rows (ref libraries tabs ②③④) */
.ref-list {
  display: flex; flex-direction: column; gap: 14px;
}
.ref-row {
  background: linear-gradient(180deg, rgba(17,10,38,.85), rgba(10,7,25,.9));
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px; display: flex; gap: 16px;
  box-shadow: var(--shadow);
  transition: border-color .25s, box-shadow .25s, transform .15s;
}
.ref-row:hover {
  border-color: var(--accent);
  box-shadow: var(--neon-shadow);
  transform: translateY(-1px);
}
.ref-row .ref-img-wrap {
  flex-shrink: 0; width: 240px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  position: relative;
}
.ref-row .ref-checkbox-label {
  position: absolute; top: 6px; left: 6px; z-index: 5;
  width: 22px; height: 22px; cursor: pointer;
  background: rgba(0,0,0,.55); border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
}
.ref-row .ref-checkbox-label input { width: 16px; height: 16px; cursor: pointer; margin: 0; }
.ref-row.selected { outline: 2px solid var(--accent2); }
.ref-row .ref-img-wrap img {
  width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: var(--radius-sm);
  border: 1px solid var(--border); cursor: pointer; background: var(--bg-input);
  transition: border-color .2s, box-shadow .2s;
}
.ref-row .ref-img-wrap img:hover {
  border-color: var(--accent3);
  box-shadow: var(--neon-shadow-cyan);
}
.ref-row .ref-img-wrap img.selected {
  border: 3px solid var(--green) !important;
  box-shadow: 0 0 0 1px var(--green), 0 0 20px rgba(0,255,157,.55);
}
.ref-row .ref-img-placeholder {
  width: 100%; aspect-ratio: 3/4;
  background: var(--bg-input); border: 1px dashed var(--border); border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: 12px;
  text-align: center; line-height: 1.4;
}
.ref-row .ref-img-placeholder.clickable {
  cursor: pointer;
  transition: all .18s ease;
}
.ref-row .ref-img-placeholder.clickable:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, var(--bg-input));
  box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 30%, transparent);
}
.ref-row .ref-content {
  flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0;
}
.ref-row .ref-header {
  font-size: 14px; font-weight: 700; letter-spacing: .04em;
  background: linear-gradient(135deg, #ff2bd1, #b537ff, #00e5ff);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  display: flex; align-items: center; gap: 8px;
}
.ref-name-input {
  flex: 1; min-width: 0;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 6px;
  padding: 4px 8px;
  font: inherit; font-weight: 700;
  color: #fff; -webkit-text-fill-color: #fff;
  outline: none;
}
.ref-name-input:focus { border-color: #b537ff; background: rgba(181,55,255,0.08); }
.ref-row textarea {
  flex: 1; min-height: 120px; font-size: 11px; line-height: 1.5;
}
.ref-row .ref-btns { display: flex; gap: 5px; flex-wrap: wrap; }
.ref-row .ref-btns button { font-size: 11px; padding: 5px 10px; }

/* Empty / add rows */
.ref-row.empty-row {
  border: 2px dashed var(--border); justify-content: center; align-items: center;
  min-height: 120px; cursor: pointer;
  transition: border-color .25s, background .25s, box-shadow .25s;
}
.ref-row.empty-row:hover {
  border-color: var(--accent3); background: rgba(0,229,255,.04);
  box-shadow: var(--neon-shadow-cyan);
}
.ref-row.empty-row .empty-name { color: var(--text-dim); font-size: 14px; }
.ref-row.empty-row .empty-hint { color: var(--text-muted); font-size: 11px; margin-top: 4px; }
.ref-row.add-row {
  border: 2px dashed var(--border); justify-content: center; align-items: center;
  min-height: 80px; cursor: pointer;
  transition: border-color .25s, background .25s, box-shadow .25s;
}
.ref-row.add-row:hover {
  border-color: var(--accent2); background: rgba(255,43,209,.05);
  box-shadow: 0 0 16px var(--accent2-glow);
}
.ref-row.add-row .add-icon { font-size: 28px; color: var(--border-hover); }
.ref-row.add-row:hover .add-icon { color: var(--accent2); text-shadow: 0 0 12px var(--accent2-glow); }
.ref-row.add-row div { color: var(--text-muted); font-size: 12px; margin-top: 2px; }

/* Upload overlay on ref image */
.ref-row .ref-img-overlay {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,.5); display: none; align-items: center; justify-content: center;
  border-radius: var(--radius-sm); cursor: pointer;
}
.ref-row .ref-img-wrap:hover .ref-img-overlay { display: flex; }
.ref-row .ref-img-overlay span { color: #fff; font-size: 11px; }

/* ============================================================
   Textareas
   ============================================================ */
textarea {
  width: 100%; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg-input); color: var(--text); font-size: 12px;
  font-family: "JetBrains Mono", "Noto Sans SC", Consolas, monospace;
  line-height: 1.65; padding: 10px 12px; resize: vertical; outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.card > textarea { min-height: 280px; flex: 1; }
textarea:focus {
  border-color: var(--accent3);
  background: rgba(8,5,26,.95);
  box-shadow: 0 0 0 1px var(--accent3), 0 0 20px var(--accent3-glow);
}
#scriptInput { min-height: 300px; flex: 1; }
#storyboardOutput { min-height: 300px; flex: 1; }

/* Highlight preview for storyboard output (red 对应剧情 lines) */
.sb-preview {
  width: 100%; min-height: 300px; max-height: 60vh; flex: 1;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg-input); color: var(--text);
  font-size: 12px;
  font-family: "JetBrains Mono", "Noto Sans SC", Consolas, monospace;
  line-height: 1.65; padding: 10px 12px;
  white-space: pre-wrap; word-break: break-word;
  overflow: auto; margin: 0;
}
.sb-preview .sb-plot {
  color: #ff4d4f;
  font-weight: 600;
  background: rgba(255, 77, 79, .08);
  border-radius: 3px;
  padding: 0 2px;
}
.sb-preview .sb-group-header {
  color: var(--accent3);
  font-weight: 700;
}

/* ============================================================
   Buttons
   ============================================================ */
button {
  font-family: "Noto Sans SC", "Orbitron", inherit;
  font-size: 12px; padding: 8px 16px;
  border-radius: var(--radius-sm); cursor: pointer; border: none;
  transition: all .2s; font-weight: 600; letter-spacing: .03em;
  position: relative;
}
button:disabled { opacity: .35; cursor: not-allowed; filter: grayscale(.4); }

.btn-primary {
  background: linear-gradient(135deg, #b537ff 0%, #ff2bd1 50%, #00e5ff 100%);
  background-size: 200% 200%;
  color: #fff;
  box-shadow: 0 2px 12px rgba(181,55,255,.45), inset 0 1px 0 rgba(255,255,255,.15);
  text-shadow: 0 0 8px rgba(255,255,255,.35);
  animation: btnFlow 6s ease infinite;
}
@keyframes btnFlow {
  0%,100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.btn-primary:hover:not(:disabled) {
  box-shadow: 0 4px 20px rgba(181,55,255,.6), 0 0 30px var(--accent2-glow), inset 0 1px 0 rgba(255,255,255,.2);
  transform: translateY(-1px);
}
.btn-primary:active:not(:disabled) { transform: translateY(0); }

.btn-secondary {
  background: rgba(31,20,66,.7); color: var(--text);
  border: 1px solid rgba(181,55,255,.35);
  backdrop-filter: blur(4px);
}
.btn-secondary:hover:not(:disabled) {
  background: rgba(58,36,112,.7);
  border-color: var(--accent3);
  color: #fff;
  box-shadow: 0 0 12px var(--accent3-glow);
}
.btn-sm {
  background: transparent; color: var(--text-dim);
  border: 1px solid var(--border);
  font-size: 11px; padding: 5px 12px;
}
.btn-sm:hover {
  background: rgba(181,55,255,.08);
  border-color: var(--accent);
  color: var(--text);
  box-shadow: 0 0 8px var(--accent-glow);
}
.btn-danger {
  background: rgba(255,51,102,.12); color: #ff7a99;
  border: 1px solid rgba(255,51,102,.4);
}
.btn-danger:hover:not(:disabled) {
  background: rgba(255,51,102,.22);
  box-shadow: 0 0 14px rgba(255,51,102,.45);
  color: #fff;
}

/* ============================================================
 * Global stop button — floating bottom-right, only visible while
 * at least one long-running task is registered in _abortRegistry.
 * ============================================================ */
#globalStopBtn {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9999;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  border: 1px solid rgba(255,51,102,.5);
  background: linear-gradient(135deg, rgba(255,51,102,.92), rgba(220,30,60,.92));
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: .5px;
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(255,51,102,.45), 0 0 0 0 rgba(255,51,102,.6);
  animation: gs-pulse 2s ease-in-out infinite;
}
#globalStopBtn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(255,51,102,.6);
}
#globalStopBtn .gs-icon { font-size: 16px; }
#globalStopBtn .gs-count {
  display: inline-block;
  min-width: 22px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.25);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}
@keyframes gs-pulse {
  0%   { box-shadow: 0 8px 28px rgba(255,51,102,.45), 0 0 0 0 rgba(255,51,102,.55); }
  60%  { box-shadow: 0 8px 28px rgba(255,51,102,.45), 0 0 0 14px rgba(255,51,102,0); }
  100% { box-shadow: 0 8px 28px rgba(255,51,102,.45), 0 0 0 0 rgba(255,51,102,0); }
}

/* ============================================================
   Toolbar
   ============================================================ */
.ref-toolbar {
  display: flex; align-items: center; gap: 8px 8px; row-gap: 8px;
  margin-bottom: 14px; flex-wrap: wrap; flex-shrink: 0;
  position: relative; z-index: 1;
}
.ref-toolbar button { white-space: nowrap; }
.style-picker, .theme-picker {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px;
  background: rgba(31,20,66,.7);
  border: 1px solid rgba(181,55,255,.35);
  border-radius: 6px; white-space: nowrap;
  backdrop-filter: blur(4px);
  transition: all .2s ease;
}
.style-picker:hover, .theme-picker:hover {
  background: rgba(58,36,112,.7);
  border-color: var(--accent3);
  box-shadow: 0 0 10px var(--accent3-glow);
}
.style-picker .picker-label, .theme-picker .picker-label, .picker-label {
  color: var(--text-dim); font-size: 12px; letter-spacing: .5px;
}
.style-picker select, .theme-picker select {
  background: var(--bg-input);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 4px 26px 4px 10px;
  font-size: 12px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--accent) 50%),
                    linear-gradient(135deg, var(--accent) 50%, transparent 50%);
  background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.style-picker select:hover, .theme-picker select:hover {
  border-color: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
}
.style-picker select:focus, .theme-picker select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
}
.style-picker select option, .theme-picker select option {
  background: var(--bg-card);
  color: var(--text);
  padding: 6px;
}

/* 视频卡片底部小型 picker */
.sg-mini-pickers {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px;
  background: rgba(31,20,66,.5);
  border: 1px solid rgba(181,55,255,.25);
  border-radius: 5px;
  margin-right: 8px;
}
.sg-mini-label {
  color: var(--text-muted); font-size: 11px; margin-left: 2px;
}
.mini-picker {
  background: var(--bg-input);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 18px 2px 6px;
  font-size: 11px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--accent) 50%),
                    linear-gradient(135deg, var(--accent) 50%, transparent 50%);
  background-position: calc(100% - 10px) 50%, calc(100% - 6px) 50%;
  background-size: 4px 4px, 4px 4px;
  background-repeat: no-repeat;
}
.mini-picker:hover { border-color: var(--accent); box-shadow: 0 0 6px var(--accent-glow); }
.mini-picker:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 8px var(--accent-glow); }
.mini-picker option { background: var(--bg-card); color: var(--text); }

/* ============================================================
   Progress
   ============================================================ */
.progress-bar {
  height: 4px; background: var(--bg-input); border-radius: 2px;
  margin: 8px 0; overflow: hidden; flex-shrink: 0;
  border: 1px solid var(--border);
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent2), var(--accent3));
  background-size: 200% 100%;
  width: 0%; transition: width .3s; border-radius: 2px;
  box-shadow: 0 0 12px var(--accent-glow);
  animation: progressFlow 2s linear infinite;
}
@keyframes progressFlow {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}
.progress-msg { font-size: 11px; color: var(--text-muted); margin-bottom: 4px; flex-shrink: 0; }

/* ============================================================
   Empty hint
   ============================================================ */
.empty-hint { color: var(--text-muted); font-size: 13px; text-align: center; padding: 60px 20px; }

/* ============================================================
   Shot groups (left panel Tab⑤)
   ============================================================ */
.shot-group {
  background: linear-gradient(180deg, rgba(17,10,38,.85), rgba(10,7,25,.9));
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px; margin-bottom: 10px;
  box-shadow: var(--shadow);
  transition: border-color .25s, box-shadow .25s;
}
.shot-group:hover {
  border-color: rgba(0,229,255,.3);
  box-shadow: var(--neon-shadow-cyan);
}
.shot-group .sg-header {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px;
}
.shot-group .sg-header .sg-title {
  font-size: 13px; font-weight: 700; letter-spacing: .04em;
  font-family: "Orbitron", "Noto Sans SC", sans-serif;
  background: linear-gradient(135deg, #ff2bd1, #b537ff, #00e5ff);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.shot-group .sg-header .sg-btns { display: flex; gap: 4px; }
.shot-group .sg-header .sg-btns button { font-size: 10px; padding: 3px 8px; }
.shot-group textarea { min-height: 140px; font-size: 11px; line-height: 1.5; }
.shot-group .sg-footer { display: flex; align-items: center; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.shot-group .sg-footer button { font-size: 10px; padding: 5px 10px; }
.shot-group .sg-status { font-size: 10px; margin-left: auto; }

/* Shot group checkbox */
.sg-checkbox-label {
  display: flex; align-items: center; cursor: pointer; margin-right: 10px; flex-shrink: 0;
  user-select: none;
}
.sg-checkbox {
  position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none;
}
.sg-cb-mark {
  width: 18px; height: 18px; border-radius: 4px;
  border: 2px solid var(--border); background: var(--bg-input);
  display: flex; align-items: center; justify-content: center;
  transition: all .2s; flex-shrink: 0;
}
.sg-checkbox:checked + .sg-cb-mark {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-color: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
}
.sg-checkbox:checked + .sg-cb-mark::after {
  content: ''; width: 5px; height: 9px;
  border: solid #fff; border-width: 0 2px 2px 0;
  transform: rotate(45deg) translateY(-1px);
}
.sg-checkbox-label:hover .sg-cb-mark {
  border-color: var(--accent3);
  box-shadow: 0 0 8px var(--accent3-glow);
}

/* Selected shot group */
.shot-group.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 0 20px var(--accent-glow), 0 0 40px var(--accent2-glow);
}

/* Shot group selection bar — offset above the image selection bar */
#shotGroupSelBar {
  bottom: 98px;
}

/* Status badges */
.status-badge {
  font-size: 10px; padding: 2px 10px; border-radius: 10px; font-weight: 700;
  letter-spacing: .04em; font-family: "Orbitron", inherit;
  border: 1px solid transparent;
}
.status-raw { background: rgba(107,99,149,.15); color: var(--text-muted); border-color: rgba(107,99,149,.25); }
.status-converted {
  background: rgba(181,55,255,.15); color: #d990ff;
  border-color: rgba(181,55,255,.4);
  box-shadow: 0 0 8px rgba(181,55,255,.25);
}
.status-generating {
  background: rgba(255,204,0,.15); color: #ffe066;
  border-color: rgba(255,204,0,.4);
  box-shadow: 0 0 10px rgba(255,204,0,.3);
}
.status-done {
  background: rgba(0,255,157,.15); color: #5dffc7;
  border-color: rgba(0,255,157,.4);
  box-shadow: 0 0 8px rgba(0,255,157,.3);
}
.status-failed {
  background: rgba(255,51,102,.15); color: #ff7a99;
  border-color: rgba(255,51,102,.4);
  box-shadow: 0 0 8px rgba(255,51,102,.25);
}

/* Shot group prompt tabs */
.sg-prompt-area { margin-top: 6px; }
.sg-prompt-tabs { display: flex; gap: 0; margin-bottom: 4px; }
.sg-ptab {
  padding: 4px 12px; font-size: 10px; cursor: pointer;
  background: var(--bg-input); border: 1px solid var(--border); color: var(--text-muted);
  transition: all .15s;
}
.sg-ptab:first-child { border-radius: 4px 0 0 4px; }
.sg-ptab:last-child { border-radius: 0 4px 4px 0; }
.sg-ptab:hover { color: var(--accent3); }
.sg-ptab.active {
  background: rgba(181,55,255,.15);
  border-color: var(--accent);
  color: #fff;
  box-shadow: inset 0 0 8px rgba(181,55,255,.2);
}
.sg-prompt-ta, .sg-raw-ta { min-height: 140px; font-size: 11px; line-height: 1.5; }

/* Side-by-side text + image layout */
.sg-body { display: flex; gap: 12px; align-items: stretch; }
.sg-text-area { flex: 1; min-width: 0; min-height: 0; }
.sg-text-area textarea { width: 100%; min-height: 140px; }
.sg-image-area {
  width: 260px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  align-self: stretch;
}
.sg-image-area img {
  width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-sm);
  cursor: pointer; border: 1px solid var(--border);
  transition: border-color .2s, box-shadow .2s;
}
.sg-image-area img:hover {
  border-color: var(--accent3);
  box-shadow: var(--neon-shadow-cyan);
}
.sg-image-area img.selected {
  border: 3px solid var(--green) !important;
  box-shadow: 0 0 0 1px var(--green), 0 0 18px rgba(0,255,157,.5);
}
.sg-image-pending {
  width: 100%; height: 100%;
  background: var(--bg-input);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm); display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  color: var(--text-muted); font-size: 13px; gap: 8px;
}
.sg-click-gen {
  cursor: pointer; transition: all .25s;
}
.sg-click-gen:hover {
  border-color: var(--accent);
  color: #fff;
  background: rgba(181,55,255,.08);
  box-shadow: inset 0 0 30px rgba(181,55,255,.12), 0 0 16px var(--accent-glow);
}
.sg-spinner {
  width: 28px; height: 28px;
  border: 2px solid rgba(181,55,255,.2);
  border-top-color: var(--accent);
  border-right-color: var(--accent3);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  box-shadow: 0 0 12px var(--accent-glow);
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Inline ref thumbnails in shot group */
.sg-refs { display: flex; align-items: center; gap: 5px; margin-top: 8px; flex-wrap: wrap; }
.sg-ref-label { font-size: 11px; color: var(--text-muted); margin-right: 2px; }
.sg-ref-thumb {
  width: 36px; height: 36px; object-fit: cover; border-radius: 4px;
  border: 1px solid var(--border); cursor: pointer; background: var(--bg-input);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.sg-ref-thumb:hover {
  border-color: var(--accent3);
  box-shadow: 0 0 8px var(--accent3-glow);
  transform: scale(1.1);
}
.sg-ref-empty {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 4px;
  border: 1px dashed rgba(255,51,102,.4); color: #ff7a99; font-size: 10px;
  cursor: pointer; background: var(--bg-input);
  transition: all .15s;
}
.sg-ref-empty:hover {
  border-color: var(--red);
  box-shadow: 0 0 8px rgba(255,51,102,.4);
}
.sg-ref-section {
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
}
.sg-ref-add {
  width: 20px; height: 20px; border-radius: 50%; border: 1px dashed var(--border);
  background: transparent; color: var(--text-muted); font-size: 14px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all .15s; padding: 0; line-height: 1;
}
.sg-ref-add:hover {
  border-color: var(--accent3); color: var(--accent3);
  background: rgba(0,229,255,.08);
  box-shadow: 0 0 8px var(--accent3-glow);
}
.sg-ref-none {
  font-size: 10px; color: var(--text-muted); font-style: italic;
}

/* Insert button between groups */
.shot-insert { text-align: center; padding: 4px 0; margin-bottom: 8px; }
.shot-insert button {
  font-size: 10px; padding: 5px 14px; background: transparent; color: var(--text-muted);
  border: 1px dashed var(--border); border-radius: var(--radius-sm);
  transition: all .2s;
}
.shot-insert button:hover {
  color: var(--accent3);
  border-color: var(--accent3);
  background: rgba(0,229,255,.05);
  box-shadow: 0 0 10px var(--accent3-glow);
}

/* ============================================================
   Thumb wall (right panel Tab⑤)
   ============================================================ */
.thumb-wall { display: flex; gap: 6px; flex-wrap: wrap; }
.thumb-wall img {
  width: 70px; height: 70px; object-fit: cover; border-radius: var(--radius-sm);
  border: 1px solid var(--border); cursor: pointer; background: var(--bg-input);
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.thumb-wall img:hover {
  border-color: var(--accent3);
  transform: scale(1.08);
  box-shadow: 0 0 12px var(--accent3-glow);
}
.thumb-wall img.selected {
  border: 3px solid var(--green) !important;
  box-shadow: 0 0 0 1px var(--green), 0 0 14px rgba(0,255,157,.5);
}
.ref-section { margin-bottom: 14px; }
.ref-section h4 {
  font-size: 11px; color: var(--accent3); margin-bottom: 6px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  font-family: "Orbitron", "Noto Sans SC", sans-serif;
  text-shadow: 0 0 8px var(--accent3-glow);
}

/* ============================================================
   Settings
   ============================================================ */
.form-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.form-row label { width: 90px; font-size: 13px; color: var(--text-dim); text-align: right; flex-shrink: 0; }
.form-row input {
  flex: 1; padding: 9px 12px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--bg-input); color: var(--text); font-size: 13px; outline: none;
  transition: all .2s;
}
.form-row input:focus {
  border-color: var(--accent3);
  box-shadow: 0 0 0 1px var(--accent3), 0 0 16px var(--accent3-glow);
}

/* ============================================================
   Messages
   ============================================================ */
.msg { font-size: 11px; }
.msg:empty { display: none; }
#loginMsg { color: #ff7a99; text-shadow: 0 0 6px rgba(255,51,102,.4); }
#cfgMsg { color: var(--green); margin-left: 10px; text-shadow: 0 0 6px rgba(0,255,157,.4); }
.stat { font-size: 11px; color: var(--text-muted); margin-left: 10px; }

/* ============================================================
   Spinner
   ============================================================ */
.spinner {
  display: inline-block; width: 14px; height: 14px;
  border: 2px solid rgba(181,55,255,.2);
  border-top-color: var(--accent);
  border-right-color: var(--accent3);
  border-radius: 50%; animation: spin .8s linear infinite;
  margin-right: 6px; vertical-align: middle;
  box-shadow: 0 0 8px var(--accent-glow);
}

/* ============================================================
   Modals
   ============================================================ */
.modal {
  display: none; position: fixed; inset: 0; background: rgba(5,3,15,.85);
  z-index: 2000; align-items: center; justify-content: center;
  backdrop-filter: blur(6px);
}
.modal.show { display: flex; }
.modal-close {
  position: absolute; top: 16px; right: 20px;
  color: var(--text-dim); font-size: 26px; cursor: pointer;
  transition: color .2s, text-shadow .2s;
}
.modal-close:hover {
  color: var(--accent3);
  text-shadow: 0 0 12px var(--accent3-glow);
}
.modal-content {
  background: linear-gradient(180deg, rgba(17,10,38,.96), rgba(10,7,25,.98));
  border-radius: 14px; position: relative;
  max-height: 90vh; overflow-y: auto;
  border: 1px solid rgba(181,55,255,.4);
  box-shadow:
    0 0 0 1px rgba(0,229,255,.1),
    0 20px 60px rgba(0,0,0,.8),
    0 0 60px rgba(181,55,255,.18);
}
.modal-content h3 {
  font-size: 16px; color: #fff; margin-bottom: 14px; font-weight: 700;
  letter-spacing: .04em;
  font-family: "Orbitron", "Noto Sans SC", sans-serif;
}

/* Image detail modal */
.modal-detail { max-width: 800px; padding: 28px; }
.modal-body { display: flex; gap: 20px; }
.modal-img-wrap { flex-shrink: 0; }
.modal-img-wrap img { max-width: 350px; max-height: 500px; border-radius: var(--radius-sm); }

/* Lightbox — full-size image viewer */
.lightbox {
  display: none;
  position: fixed; inset: 0;
  background: rgba(5,3,15,0.96);
  z-index: 10000;
  align-items: center; justify-content: center;
  cursor: zoom-out;
  padding: 20px;
}
.lightbox.show { display: flex; }
.lightbox img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 0 80px rgba(181,55,255,.35), 0 0 160px rgba(0,229,255,.18);
  border: 1px solid rgba(181,55,255,.25);
}
.modal-info { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 250px; }
.modal-info textarea { flex: 1; min-height: 150px; font-size: 11px; }
.modal-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.modal-actions button { font-size: 12px; padding: 7px 14px; }

/* Edit modal */
.modal-edit { max-width: 700px; padding: 24px; }
.modal-edit textarea { min-height: 300px; font-size: 12px; }
.modal-edit .hint { color: var(--text-muted); font-size: 11px; margin-bottom: 8px; }

/* Group edit tabs */
.group-edit-tabs { display: flex; gap: 0; margin-bottom: 8px; }
.ge-tab {
  padding: 6px 14px; font-size: 11px; cursor: pointer;
  background: var(--bg-input); border: 1px solid var(--border); color: var(--text-muted);
  transition: all .15s;
}
.ge-tab:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.ge-tab:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.ge-tab:hover { color: var(--accent3); }
.ge-tab.active {
  background: rgba(181,55,255,.15);
  border-color: var(--accent);
  color: #fff;
  box-shadow: inset 0 0 8px rgba(181,55,255,.2);
}
.ge-textarea { min-height: 400px; font-size: 12px; }

/* Error log */
#errorLogContent {
  background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 12px; font-size: 11px; color: var(--text); white-space: pre-wrap;
  max-height: 400px; overflow: auto;
  font-family: "JetBrains Mono", Consolas, monospace;
}

/* ============================================================
   Settings grid & spec editor
   ============================================================ */
.settings-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px; height: 100%; min-height: 0;
}
@media(max-width:900px) { .settings-grid { grid-template-columns: 1fr; } }
.spec-tabs { display: flex; gap: 4px; margin-bottom: 8px; flex-wrap: wrap; }
.spec-tab {
  padding: 5px 12px; font-size: 11px; cursor: pointer;
  background: var(--bg-input); border: 1px solid var(--border); color: var(--text-muted);
  border-radius: 4px 4px 0 0; transition: all .2s;
}
.spec-tab:hover { color: var(--accent3); }
.spec-tab.active {
  background: rgba(181,55,255,.15);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 -2px 8px rgba(181,55,255,.2);
}
.spec-editor {
  flex: 1; min-height: 350px; font-size: 12px; line-height: 1.6;
  font-family: "JetBrains Mono", Consolas, "Noto Sans SC", monospace;
  margin-bottom: 8px;
}

/* ============================================================
   Image Selection Mode
   ============================================================ */
img.selectable { cursor: pointer; transition: border .15s, box-shadow .15s, outline .15s; }
img.selected {
  border: 3px solid var(--green) !important;
  box-shadow: 0 0 0 1px var(--green), 0 0 14px rgba(0,255,157,.5);
  outline: 2px solid rgba(0,255,157,.25);
}
.selection-bar {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(180deg, rgba(17,10,38,.95), rgba(10,7,25,.95));
  border: 1px solid var(--accent);
  border-radius: 14px; padding: 12px 24px; display: none; align-items: center; gap: 16px;
  z-index: 900;
  box-shadow:
    0 0 0 1px rgba(0,229,255,.15),
    0 8px 32px rgba(0,0,0,.7),
    0 0 30px var(--accent-glow);
  backdrop-filter: blur(8px);
}
.selection-bar.show { display: flex; }
.selection-bar .sel-count {
  font-size: 14px; font-weight: 700;
  background: linear-gradient(135deg, var(--accent3), var(--accent2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  font-family: "Orbitron", inherit; letter-spacing: .04em;
}
.selection-bar .sel-btns { display: flex; gap: 8px; }

/* ============================================================
   Responsive
   ============================================================ */
@media(max-width:900px) {
  .split-shots { flex-direction: column; }
  .modal-body { flex-direction: column; }
  .modal-img-wrap img { max-width: 100%; max-height: 300px; }
  .ref-list { gap: 10px; }
  .ref-row { flex-direction: column; }
  .ref-row .ref-img-wrap { width: 100%; max-width: 300px; }
  .shots-right { position: static; }
}

/* Art-style picker on ref-generation cards */
.art-style-picker {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600;
  color: #f8fafc;
  padding: 4px 10px; border-radius: 6px;
  background: rgba(167, 139, 250, 0.18);
  border: 1px solid rgba(167, 139, 250, 0.55);
}
.art-style-select {
  background: #1e293b; color: #f8fafc;
  border: 1px solid rgba(167, 139, 250, 0.6);
  border-radius: 4px; padding: 4px 8px; font-size: 13px;
  font-weight: 600;
  outline: none; cursor: pointer;
  min-width: 130px;
}
.art-style-select:hover { border-color: #a78bfa; background: #273449; }
.art-style-select:focus { border-color: #c4b5fd; box-shadow: 0 0 0 2px rgba(167, 139, 250, 0.35); }
.art-style-select option {
  background: #1e293b; color: #f8fafc;
  font-weight: 500;
}
