/* ═══════════════════════════════════════════════════
   MAROMYX CREATOR — style.css
   App desktop Electron
   ═══════════════════════════════════════════════════ */

:root {
  --bg:          #060610;
  --bg2:         #0e0e1c;
  --bg3:         #16162a;
  --bg4:         #1e1e38;
  --border:      #28284a;
  --accent:      #7c3aed;
  --accent-glow: rgba(124, 58, 237, 0.3);
  --cyan:        #22d3ee;
  --gold:        #f59e0b;
  --text:        #eeeef8;
  --text2:       #9090c0;
  --text3:       #606080;
  --danger:      #f43f5e;
  --success:     #10b981;
  --sidebar-w:   220px;
  --titlebar-h:  38px;
  --radius:      12px;
}

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

html, body {
  height: 100%;
  overflow: hidden;
  font-family: 'Outfit', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  user-select: none;
}

/* ─── TITLEBAR ─── */
#titlebar {
  height: var(--titlebar-h);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  -webkit-app-region: drag;
  padding: 0 12px;
  gap: 12px;
}

#titlebar::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--accent) 20%, var(--cyan) 50%, var(--gold) 80%, transparent 100%);
  opacity: 0.4;
  animation: titlebar-glow 6s ease-in-out infinite alternate;
}

@keyframes titlebar-glow {
  0%   { opacity: 0.2; filter: hue-rotate(0deg); }
  50%  { opacity: 0.5; }
  100% { opacity: 0.3; filter: hue-rotate(20deg); }
}

.titlebar-drag {
  flex: 1;
  padding-left: 16px;
  display: flex;
  align-items: center;
}

.titlebar-logo {
  font-family: 'Orbitron', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 3px;
  background: linear-gradient(90deg, var(--text2), var(--accent), var(--cyan), var(--text2));
  background-size: 200% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: logo-shimmer 8s ease-in-out infinite;
}

@keyframes logo-shimmer {
  0%, 100% { background-position: 0% center; }
  50%      { background-position: 100% center; }
}

.titlebar-controls {
  display: flex;
  -webkit-app-region: no-drag;
}

.titlebar-controls button {
  width: 46px;
  height: var(--titlebar-h);
  background: none;
  border: none;
  color: var(--text2);
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.titlebar-controls button:hover { background: rgba(255,255,255,0.06); color: var(--text); }
#btn-close:hover { background: var(--danger) !important; color: #fff !important; }

/* ─── APP LAYOUT ─── */
#app {
  display: flex;
  height: 100vh;
  padding-top: var(--titlebar-h);
}

/* ─── SIDEBAR ─── */
#sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

#sidebar::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(124,58,237,0.06) 0%, transparent 70%);
  pointer-events: none;
  animation: sidebar-ambient 10s ease-in-out infinite alternate;
}

@keyframes sidebar-ambient {
  0%   { opacity: 0.5; }
  100% { opacity: 1; }
}

.sidebar-brand {
  padding: 12px 14px 10px;
  border-bottom: 1px solid var(--border);
}

.brand-logo-wrap {
  width: 100%;
  padding: 4px 0;
}

/* ─── NAV ─── */
.sidebar-nav {
  flex: 1;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 10px;
  border: none;
  background: none;
  color: var(--text2);
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: all 0.25s ease;
  position: relative;
}

.nav-item:hover {
  background: rgba(255,255,255,0.04);
  color: var(--text);
  transform: translateX(3px);
}

.nav-item.active {
  background: rgba(124, 58, 237, 0.15);
  color: var(--text);
  box-shadow: inset 3px 0 0 var(--accent), 0 0 20px rgba(124,58,237,0.08);
}

.nav-item.active .nav-icon {
  color: var(--accent);
  filter: drop-shadow(0 0 6px rgba(124,58,237,0.5));
}

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

/* ─── SIDEBAR FOOTER ─── */
.sidebar-footer {
  padding: 14px 14px 18px;
  border-top: 1px solid var(--border);
}

.api-badges {
  display: flex;
  gap: 8px;
}

.api-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--text2);
  padding: 4px 10px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 20px;
  flex: 1;
  justify-content: center;
}

.badge-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
  transition: all 0.3s;
}

.badge-dot.ok {
  background: var(--success);
  box-shadow: 0 0 5px var(--success);
  animation: dot-breathe 3s ease-in-out infinite;
}

.badge-dot.missing { background: var(--danger); }

@keyframes dot-breathe {
  0%, 100% { box-shadow: 0 0 4px var(--success); }
  50%      { box-shadow: 0 0 10px var(--success), 0 0 20px rgba(16,185,129,0.15); }
}

/* ─── MAIN CONTENT ─── */
#main-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 28px 32px;
  position: relative;
}

#main-content::before {
  content: '';
  position: fixed;
  top: var(--titlebar-h);
  right: 0;
  width: calc(100% - var(--sidebar-w));
  height: 100%;
  background:
    radial-gradient(ellipse 50% 40% at 80% 10%, rgba(124,58,237,0.06) 0%, transparent 60%),
    radial-gradient(ellipse 40% 40% at 20% 90%, rgba(34,211,238,0.04) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* ─── PAGES ─── */
.page { display: none; position: relative; z-index: 1; }
.page.active { display: block; animation: pageIn 0.35s cubic-bezier(0.22, 1, 0.36, 1); }

@keyframes pageIn {
  from { opacity: 0; transform: translateY(12px) scale(0.99); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* fadeIn — used by overlay, vstep, help-section */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── PAGE HEADER ─── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
}

.page-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.page-sub {
  font-size: 13px;
  color: var(--text2);
}

/* ─── CARDS ─── */
.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 16px;
  transition: border-color 0.3s, box-shadow 0.3s;
  animation: cardIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.card:hover {
  border-color: rgba(124,58,237,0.2);
  box-shadow: 0 4px 24px rgba(0,0,0,0.2), 0 0 0 1px rgba(124,58,237,0.05);
}

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

.card-label {
  font-family: 'Orbitron', sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--cyan);
  text-transform: uppercase;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border), transparent);
}

/* ─── FORMS ─── */
.field { margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }

label {
  display: block;
  font-size: 10px;
  color: var(--text2);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 6px;
  font-weight: 600;
}

input[type="text"],
input[type="password"],
textarea,
select {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--text);
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  padding: 10px 13px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus, textarea:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow), 0 0 16px rgba(124,58,237,0.1);
}

textarea {
  resize: vertical;
  min-height: 72px;
  line-height: 1.6;
  user-select: text;
}

select { cursor: pointer; }
select option { background: var(--bg3); color: var(--text); }

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

.input-with-toggle {
  position: relative;
  display: flex;
}

.input-with-toggle input {
  padding-right: 44px;
  user-select: text;
}

.toggle-visibility {
  position: absolute;
  right: 10px;
  top: 50%; transform: translateY(-50%);
  background: none; border: none;
  color: var(--text2); cursor: pointer;
  font-size: 14px; padding: 4px;
  transition: color 0.2s;
}

.toggle-visibility:hover { color: var(--text); }

.field-help { font-size: 11px; color: var(--text2); margin-top: 5px; }
.field-help a { color: var(--cyan); cursor: pointer; }

/* ─── BUTTONS ─── */
.btn {
  padding: 10px 22px;
  border-radius: 9px;
  border: none;
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-sm { padding: 7px 16px; font-size: 12px; }

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, #4f46e5 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0; left: -100%; right: 0; bottom: 0;
  width: 200%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  animation: btn-shine 4s ease-in-out infinite;
}

@keyframes btn-shine {
  0%   { transform: translateX(-50%); }
  100% { transform: translateX(50%); }
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px var(--accent-glow), 0 0 40px rgba(124,58,237,0.15);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-ghost {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text2);
}

.btn-ghost:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--text);
  background: rgba(124,58,237,0.06);
  box-shadow: 0 0 12px rgba(124,58,237,0.08);
}

.btn-danger {
  background: rgba(244, 63, 94, 0.1);
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: var(--danger);
}

.btn-danger:hover:not(:disabled) {
  background: rgba(244, 63, 94, 0.2);
}

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

.btn-row {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}

.spinner {
  display: inline-block;
  width: 13px; height: 13px;
  border: 2px solid rgba(255,255,255,0.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ─── STUDIO RESULTS ─── */
.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
}

.result-title-display {
  font-family: 'Orbitron', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--gold);
  flex: 1;
}

.results-actions { display: flex; gap: 8px; flex-shrink: 0; }

.result-block {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 14px;
  transition: border-color 0.3s, box-shadow 0.3s;
  animation: resultIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

#block-titre         { animation-delay: 0.05s; }
#block-paroles       { animation-delay: 0.10s; }
#block-prompt-musical { animation-delay: 0.15s; }
#block-prompt-video  { animation-delay: 0.20s; }

@keyframes resultIn {
  from { opacity: 0; transform: translateX(-20px); }
  to   { opacity: 1; transform: translateX(0); }
}

.result-block:hover {
  border-color: rgba(124,58,237,0.4);
  box-shadow: 0 0 16px rgba(124,58,237,0.06);
}

.result-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--bg3);
  border-bottom: 1px solid var(--border);
}

.result-block-label {
  font-family: 'Orbitron', sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--cyan);
}

.result-block-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.char-counter {
  font-size: 11px;
  color: var(--text2);
}

.char-counter.over { color: var(--danger); }

.copy-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text2);
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 11px;
  font-family: 'Outfit', sans-serif;
  transition: all 0.15s;
}

.copy-btn:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.copy-btn.copied {
  border-color: var(--success);
  color: var(--success);
}

.result-content {
  padding: 16px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
  white-space: pre-wrap;
  user-select: text;
}

.result-lyrics {
  font-size: 13px;
  line-height: 2;
}

.result-prompt {
  font-family: 'Courier New', monospace;
  font-size: 12px;
  background: rgba(0,0,0,0.2);
  color: #a0f0a0;
  line-height: 1.6;
}

/* ─── PROJECTS ─── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.project-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
  animation: cardIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.project-card:nth-child(1)  { animation-delay: 0.00s; }
.project-card:nth-child(2)  { animation-delay: 0.05s; }
.project-card:nth-child(3)  { animation-delay: 0.10s; }
.project-card:nth-child(4)  { animation-delay: 0.15s; }
.project-card:nth-child(5)  { animation-delay: 0.20s; }
.project-card:nth-child(6)  { animation-delay: 0.25s; }
.project-card:nth-child(7)  { animation-delay: 0.30s; }
.project-card:nth-child(8)  { animation-delay: 0.35s; }
.project-card:nth-child(9)  { animation-delay: 0.40s; }

.project-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.4), 0 0 20px rgba(124,58,237,0.1);
}

.project-card:hover .project-card-title {
  text-shadow: 0 0 12px rgba(245,158,11,0.3);
}

.project-card-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-card-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.project-tag {
  background: var(--bg4);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2px 9px;
  font-size: 10px;
  color: var(--text2);
}

.project-card-date {
  font-size: 11px;
  color: var(--text2);
}

.project-card-actions {
  position: absolute;
  top: 12px; right: 12px;
  display: none;
  gap: 6px;
}

.project-card:hover .project-card-actions { display: flex; }

/* ─── EMPTY STATE ─── */
.empty-state {
  text-align: center;
  padding: 80px 24px;
}

.empty-icon  { font-size: 52px; margin-bottom: 16px; opacity: 0.4; }
.empty-title { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.empty-sub   { font-size: 13px; color: var(--text2); }

/* ─── MODAL ─── */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(12px);
  padding: var(--titlebar-h) 0 0;
  animation: fadeIn 0.2s ease;
}

.modal {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  width: 100%;
  max-width: 640px;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
}

.modal-large { max-width: 760px; }

.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  background: none; border: none;
  color: var(--text2); font-size: 16px; cursor: pointer;
  transition: color 0.2s; padding: 4px 8px;
}

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

/* ─── SETTINGS ABOUT ─── */
.about-info { font-size: 13px; }

.about-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.about-row:last-child { border-bottom: none; }
.about-row span:first-child { color: var(--text2); }
.about-row span:last-child  { color: var(--text); font-weight: 500; }

/* ─── TOAST ─── */
#toast-container {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 16px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 240px;
  animation: toastIn 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  backdrop-filter: blur(8px);
}

.toast.success { border-color: var(--success); box-shadow: 0 4px 16px rgba(0,0,0,0.4), 0 0 12px rgba(16,185,129,0.1); }
.toast.error   { border-color: var(--danger); box-shadow: 0 4px 16px rgba(0,0,0,0.4), 0 0 12px rgba(244,63,94,0.1); }

@keyframes toastIn {
  from { transform: translateX(80px) scale(0.9); opacity: 0; }
  to   { transform: translateX(0) scale(1);      opacity: 1; }
}

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar         { width: 5px; }
::-webkit-scrollbar-track   { background: transparent; }
::-webkit-scrollbar-thumb   { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text2); }

.hidden { display: none !important; }

/* ─── CHAT ─── */
.chat-card { margin-top: 8px; }

.chat-messages {
  min-height: 80px;
  max-height: 340px;
  overflow-y: auto;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-hint {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.6;
  padding: 8px 0;
}

.chat-hint span {
  font-style: italic;
  color: var(--text2);
  opacity: 0.7;
}

.chat-msg {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.chat-msg.user  { flex-direction: row-reverse; }

.chat-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
}

.chat-msg.user   .chat-avatar { background: linear-gradient(135deg, var(--accent), #4f46e5); color: #fff; }
.chat-msg.claude .chat-avatar { background: var(--bg4); color: var(--cyan); border: 1px solid var(--border); }

.chat-bubble {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1.6;
  max-width: 85%;
  white-space: pre-wrap;
  user-select: text;
}

.chat-msg.user   .chat-bubble { background: rgba(124,58,237,0.12); border-color: rgba(124,58,237,0.3); }
.chat-msg.claude .chat-bubble { background: var(--bg3); }

.chat-bubble.updated {
  border-color: var(--success);
  background: rgba(16,185,129,0.06);
}

.chat-bubble .update-tag {
  display: inline-block;
  font-size: 10px;
  color: var(--success);
  border: 1px solid rgba(16,185,129,0.3);
  border-radius: 4px;
  padding: 1px 6px;
  margin-bottom: 6px;
}

.chat-input-row {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}

.chat-input-row textarea {
  flex: 1;
  min-height: 42px;
  max-height: 100px;
  resize: none;
  padding: 10px 13px;
  font-size: 13px;
  line-height: 1.5;
}

.chat-typing {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 0;
}

.chat-typing span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--text2);
  animation: typingDot 1.2s infinite;
}

.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingDot {
  0%, 60%, 100% { opacity: 0.3; transform: scale(1); }
  30% { opacity: 1; transform: scale(1.3); }
}

/* ─── VIDEO STEPPER ─── */
.video-stepper {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 0 0 24px;
  overflow-x: auto;
  gap: 0;
}

.video-stepper .step-wrap {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.video-stepper .step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 70px;
}

/* reuse step-item / step-dot / step-lbl / step-line from sidebar stepper */
.vstep { animation: fadeIn 0.2s ease; }

#v-canvas {
  width: 100%;
  max-height: 260px;
  object-fit: contain;
  border-radius: 10px;
  background: #000;
  display: none;
  margin: 12px 0;
}

.video-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 16px;
  color: var(--gold);
  margin-bottom: 18px;
}

/* ─── HELP MODAL ─── */
.modal-help {
  max-width: 680px;
  max-height: 82vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 0;
}

.help-header {
  padding: 24px 28px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.help-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--cyan);
  margin-bottom: 4px;
}

.help-subtitle { font-size: 12px; color: var(--text2); }

.help-tabs {
  display: flex;
  gap: 4px;
  padding: 12px 28px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  flex-wrap: wrap;
}

.help-tab {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text2);
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.15s;
}

.help-tab:hover { color: var(--text); border-color: var(--text2); }

.help-tab.active {
  background: rgba(124,58,237,0.15);
  border-color: var(--accent);
  color: var(--text);
}

.help-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px 28px 28px;
}

.help-section { display: none; }
.help-section.active { display: block; animation: fadeIn 0.2s ease; }

.help-block {
  margin-bottom: 18px;
  padding: 14px 16px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.help-block:hover { border-color: rgba(124,58,237,0.3); }

.help-block-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--cyan);
  margin-bottom: 7px;
}

.help-block-text {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.7;
}

.help-block-text strong { color: var(--text); }

.help-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.help-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 13px;
  color: var(--text2);
  line-height: 1.6;
}

.help-step strong { color: var(--text); }

.help-step-num {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #4f46e5);
  color: #fff;
  font-family: 'Orbitron', sans-serif;
  font-size: 10px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 8px var(--accent-glow);
}

#btn-help {
  font-family: 'Orbitron', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: var(--text2);
  border-color: var(--border);
}

#btn-help:hover {
  background: rgba(124,58,237,0.15);
  color: var(--accent);
}

/* ─── COST DISPLAY ─── */
.session-cost {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  padding: 6px 10px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 11px;
}

.cost-label { color: var(--text2); }
.cost-value { color: var(--gold); font-weight: 600; font-family: 'Orbitron', sans-serif; font-size: 10px; }

.shortcuts-hint {
  font-size: 10px;
  color: var(--text2);
  text-align: center;
  margin-top: 8px;
  opacity: 0.6;
  letter-spacing: 0.3px;
}

/* ─── HELP MOCKUPS ─── */
.help-mockup {
  margin-bottom: 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.hm-label {
  font-family: 'Orbitron', sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--cyan);
  padding: 8px 14px;
  background: var(--bg4);
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
}

.hm-screen {
  padding: 14px;
  background: #1a1a2e;
}

.hm-card {
  background: #242438;
  border: 1px solid #2e2e50;
  border-radius: 8px;
  padding: 12px;
}

.hm-section-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #22d3ee;
  margin-bottom: 10px;
}

.hm-row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 8px; }
.hm-field { margin-bottom: 6px; }
.hm-flabel { font-size: 8px; color: #9090c0; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 4px; font-weight: 600; }

.hm-select, .hm-input, .hm-textarea {
  background: #2e2e4a;
  border: 1px solid #3e3e60;
  border-radius: 5px;
  color: #ddddf0;
  font-size: 9px;
  padding: 5px 8px;
  width: 100%;
}

.hm-select { display: flex; justify-content: space-between; }
.hm-textarea { min-height: 36px; line-height: 1.5; }

.hm-btnrow { display: flex; justify-content: flex-end; margin-top: 10px; }

.hm-btn-primary {
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.hm-btn-ghost {
  background: #12121e;
  border: 1px solid #1e1e36;
  color: #6868a0;
  font-size: 9px;
  padding: 5px 10px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
}

.hm-btn-success {
  background: linear-gradient(135deg, #059669, #047857);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.hm-btn-danger {
  background: rgba(244,63,94,0.1);
  border: 1px solid rgba(244,63,94,0.3);
  color: #f43f5e;
  font-size: 9px;
  padding: 4px 8px;
  border-radius: 5px;
}

.hm-arrows {
  padding: 10px 14px;
  background: rgba(124,58,237,0.05);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hm-arrow-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  color: #7070a0;
}

.hm-num {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.hm-results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 8px;
  flex-wrap: wrap;
}

.hm-gold { font-family: 'Orbitron', sans-serif; font-size: 12px; color: #f59e0b; }
.hm-cyan { font-family: 'Orbitron', sans-serif; font-size: 8px; font-weight: 700; letter-spacing: 1.5px; color: #22d3ee; }

.hm-result-block {
  background: #242438;
  border: 1px solid #2e2e50;
  border-radius: 6px;
  margin-bottom: 6px;
  overflow: hidden;
}

.hm-result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  background: #2e2e4a;
  border-bottom: 1px solid #3e3e60;
}

.hm-copy-btn {
  font-size: 9px;
  color: #9090c0;
  padding: 3px 7px;
  border: 1px solid #3e3e60;
  border-radius: 4px;
}

.hm-counter { font-size: 9px; color: #9090c0; }

.hm-result-body {
  padding: 8px 10px;
  font-size: 10px;
  color: #ddddf0;
  line-height: 1.6;
}

.hm-lyrics { font-size: 10px; line-height: 1.8; }
.hm-prompt { font-family: monospace; font-size: 9px; color: #a0f0a0; background: rgba(0,0,0,0.2); }

.hm-chat-section { }
.hm-chat-area { min-height: 70px; margin-bottom: 8px; display: flex; flex-direction: column; gap: 6px; }

.hm-chat-msg { display: flex; align-items: flex-start; gap: 6px; }
.hm-user { flex-direction: row-reverse; }

.hm-avatar-user {
  width: 20px; height: 20px; border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; flex-shrink: 0;
}

.hm-avatar-claude {
  width: 20px; height: 20px; border-radius: 50%;
  background: #1a1a2e; border: 1px solid #1e1e36;
  color: #22d3ee; display: flex; align-items: center; justify-content: center;
  font-size: 9px; flex-shrink: 0;
}

.hm-bubble-user {
  background: rgba(124,58,237,0.2);
  border: 1px solid rgba(124,58,237,0.4);
  border-radius: 7px; padding: 5px 9px;
  font-size: 9px; color: #ddddf0; max-width: 80%;
}

.hm-bubble-claude {
  background: #2e2e4a; border: 1px solid #22d3ee;
  border-radius: 7px; padding: 5px 9px;
  font-size: 9px; color: #ddddf0; max-width: 80%;
}

.hm-update-tag {
  font-size: 8px; color: #10b981;
  border: 1px solid rgba(16,185,129,0.3);
  border-radius: 3px; padding: 1px 5px;
  margin-bottom: 4px; display: inline-block;
}

.hm-chat-input-row { display: flex; gap: 6px; align-items: center; }
.hm-hint { font-size: 9px; color: #9090c0; margin-top: 6px; padding: 6px 8px; background: rgba(124,58,237,0.08); border-radius: 5px; border: 1px solid rgba(124,58,237,0.2); }

/* Stepper mockup */
.hm-stepper {
  display: flex; align-items: center; justify-content: center;
  padding: 10px 0; gap: 0;
}

.hm-step { display: flex; flex-direction: column; align-items: center; }
.hm-step-dot {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid #1e1e36; background: #04040a;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; color: #6868a0;
}

.hm-done { border-color: #22d3ee; background: #22d3ee; color: #04040a; font-weight: 700; }
.hm-active { border-color: #7c3aed; color: #7c3aed; box-shadow: 0 0 0 3px rgba(124,58,237,0.3); }

.hm-step-lbl { font-size: 8px; color: #6868a0; margin-top: 4px; }
.hm-lbl-active { color: #7c3aed; font-weight: 600; }

.hm-step-line { width: 30px; height: 2px; background: #1e1e36; margin: 0 2px; margin-bottom: 16px; }
.hm-line-done { background: #22d3ee; }

.hm-scene-card {
  background: #2e2e4a; border: 1px solid #3e3e60;
  border-radius: 6px; padding: 8px;
}

.hm-scene-num {
  width: 18px; height: 18px; border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  color: #fff; font-size: 8px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}

.hm-badge-cyan {
  background: rgba(34,211,238,0.1); border: 1px solid rgba(34,211,238,0.25);
  color: #22d3ee; font-size: 8px; padding: 2px 6px; border-radius: 10px;
}

/* Clips mockup */
.hm-clips-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin: 8px 0;
}

.hm-clip {
  aspect-ratio: 16/9; border-radius: 5px;
  background: linear-gradient(135deg, #12121e, #1a1a2e);
  border: 2px solid #1e1e36; position: relative;
  display: flex; align-items: center; justify-content: center;
}

.hm-clip-selected { border-color: #7c3aed; box-shadow: 0 0 0 2px rgba(124,58,237,0.3); }

.hm-clip-check {
  width: 20px; height: 20px; border-radius: 50%;
  background: #7c3aed; color: #fff;
  font-size: 10px; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 8px rgba(124,58,237,0.5);
}

/* Done box */
.hm-done-box { text-align: center; padding: 12px; }

/* Projects mockup */
.hm-projects-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.hm-project-card {
  background: #242438; border: 1px solid #2e2e50;
  border-radius: 8px; padding: 10px; position: relative;
}

.hm-tag {
  background: #2e2e4a; border: 1px solid #3e3e60;
  border-radius: 10px; padding: 2px 7px;
  font-size: 8px; color: #9090c0;
}

.hm-card-actions { display: flex; gap: 5px; margin-top: 8px; }

/* Spinner mockup */
.hm-spinner {
  display: inline-block; width: 10px; height: 10px;
  border: 1.5px solid #1e1e36; border-top-color: #7c3aed;
  border-radius: 50%; animation: spin 0.7s linear infinite;
}

/* Flow diagram */
.hm-flow { display: flex; flex-direction: column; align-items: center; gap: 0; }

.hm-flow-step {
  width: 100%; border-radius: 8px; padding: 10px 14px;
  display: flex; align-items: center; gap: 10px;
  border: 1px solid #1e1e36;
}

.hm-flow-studio { background: rgba(124,58,237,0.08); border-color: rgba(124,58,237,0.3); }
.hm-flow-chat   { background: rgba(34,211,238,0.06); border-color: rgba(34,211,238,0.2); }
.hm-flow-kie    { background: rgba(245,158,11,0.06); border-color: rgba(245,158,11,0.2); }
.hm-flow-save   { background: rgba(16,185,129,0.06); border-color: rgba(16,185,129,0.2); }
.hm-flow-video  { background: rgba(124,58,237,0.08); border-color: rgba(124,58,237,0.3); }
.hm-flow-capcut { background: rgba(244,63,94,0.06);  border-color: rgba(244,63,94,0.2); }

.hm-flow-row { display: flex; gap: 8px; width: 100%; }

.hm-flow-icon { font-size: 16px; flex-shrink: 0; }
.hm-flow-title { font-size: 11px; font-weight: 700; color: #e2e2f0; }
.hm-flow-desc  { font-size: 9px; color: #6868a0; margin-top: 2px; }

.hm-flow-arrow {
  font-size: 16px; color: #1e1e36; padding: 4px 0;
  line-height: 1;
}

/* ─── HELP STEP-BY-STEP LAYOUT ─── */
.hs-intro {
  font-size: 13px;
  color: var(--text2);
  margin-bottom: 18px;
  padding: 10px 14px;
  background: rgba(124,58,237,0.05);
  border: 1px solid rgba(124,58,237,0.15);
  border-radius: 8px;
  line-height: 1.6;
}

.hs-intro strong { color: var(--text); }

.hs-step {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 16px;
  padding: 14px;
  background: #12122a;
  border: 1px solid #252545;
  border-radius: 10px;
  transition: border-color 0.2s;
}

.hs-step:hover { border-color: rgba(124,58,237,0.3); }

.hs-step-left { display: flex; gap: 12px; align-items: flex-start; }

.hs-step-num {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #4f46e5);
  color: #fff;
  font-family: 'Orbitron', sans-serif;
  font-size: 11px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 10px var(--accent-glow);
}

.hs-num-cyan {
  background: linear-gradient(135deg, #0891b2, #22d3ee);
  box-shadow: 0 0 10px var(--accent-glow);
}

.hs-step-body { flex: 1; }

.hs-step-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.hs-optional {
  font-size: 9px;
  font-weight: 400;
  color: var(--text2);
  background: var(--bg4);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
}

.hs-step-desc {
  font-size: 12px;
  color: #9898c0;
  line-height: 1.65;
}

.hs-step-desc strong { color: #e2e2f0; }
.hs-step-desc em { color: var(--cyan); font-style: normal; }
.hs-step-desc code { background: #1a1a3a; padding: 1px 5px; border-radius: 4px; font-size: 11px; color: var(--gold); }

.hs-step-right { display: flex; flex-direction: column; justify-content: center; }

.hm-highlight {
  border-color: rgba(124,58,237,0.5) !important;
  box-shadow: 0 0 0 2px rgba(124,58,237,0.15) !important;
}

.hs-divider {
  font-family: 'Orbitron', sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--text2);
  text-transform: uppercase;
  text-align: center;
  padding: 8px 0;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hs-divider::before, .hs-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Stepper visual in help */
.hs-stepper-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 16px;
  gap: 0;
  overflow-x: auto;
}

.hsv-step { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; }

.hsv-dot {
  width: 30px; height: 30px; border-radius: 50%;
  border: 2px solid var(--border); background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Orbitron', sans-serif; font-size: 10px; color: var(--text2);
  transition: all 0.2s;
}

.hsv-step.hsv-done .hsv-dot  { border-color: var(--cyan); background: var(--cyan); color: var(--bg); font-weight: 700; }
.hsv-step.hsv-active .hsv-dot { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 0 4px var(--accent-glow); }

.hsv-lbl {
  font-size: 10px; color: var(--text2); margin-top: 5px;
  white-space: nowrap; text-transform: uppercase; letter-spacing: 0.5px;
}

.hsv-step.hsv-done .hsv-lbl  { color: var(--cyan); }
.hsv-step.hsv-active .hsv-lbl { color: var(--accent); font-weight: 600; }

.hsv-line { width: 50px; height: 2px; background: var(--border); margin: 0 4px; margin-bottom: 18px; flex-shrink: 0; }
.hsv-line.hsv-line-active { background: var(--cyan); }

/* Timeline for workflow */
.hs-flow-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.hs-tl-step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 14px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color 0.2s;
}

.hs-tl-step:hover { border-color: rgba(124,58,237,0.3); }

.hs-tl-line {
  width: 2px;
  height: 12px;
  background: var(--border);
  margin-left: 22px;
}

.hs-tl-marker {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  border: 2px solid var(--border);
}

.hs-tl-studio { background: rgba(124,58,237,0.1); border-color: rgba(124,58,237,0.4); }
.hs-tl-chat   { background: rgba(34,211,238,0.08); border-color: rgba(34,211,238,0.3); }
.hs-tl-save   { background: rgba(16,185,129,0.08); border-color: rgba(16,185,129,0.3); }
.hs-tl-kie   { background: rgba(245,158,11,0.08); border-color: rgba(245,158,11,0.3); }
.hs-tl-video  { background: rgba(124,58,237,0.1);  border-color: rgba(124,58,237,0.4); }
.hs-tl-capcut { background: rgba(244,63,94,0.08);  border-color: rgba(244,63,94,0.3); }

.hs-tl-content { flex: 1; }

.hs-tl-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.hs-tl-badge {
  font-size: 9px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 10px;
}

.hs-tl-desc {
  font-size: 12px;
  color: var(--text2);
  line-height: 1.6;
}

/* ─── RENDER OPTIONS ─── */
.render-options {
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.render-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.render-option-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.render-option-desc {
  font-size: 11px;
  color: var(--text2);
}

/* Toggle switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 24px;
  flex-shrink: 0;
  cursor: pointer;
}

.toggle-switch input { opacity: 0; width: 0; height: 0; }

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--bg4);
  border: 1px solid var(--border);
  border-radius: 24px;
  transition: all 0.25s;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  left: 3px; top: 3px;
  background: var(--text2);
  border-radius: 50%;
  transition: all 0.25s;
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(18px);
  background: #fff;
}

/* ─── STUDIO SOURCE BADGE ─── */
.studio-source-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(124,58,237,0.08);
  border: 1px solid rgba(124,58,237,0.25);
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
}

.studio-source-badge::before {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent-glow);
  flex-shrink: 0;
}

/* ─── STORYBOARD ─── */
.storyboard-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 14px;
}

.storyboard-scene {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  transition: border-color 0.2s;
}

.storyboard-scene:hover { border-color: rgba(124,58,237,0.4); }

.sb-scene-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 7px;
}

.sb-scene-num {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #4f46e5);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.sb-scene-section {
  font-size: 10px;
  font-weight: 700;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.sb-scene-timing {
  font-size: 9px;
  color: var(--text2);
  margin-left: auto;
}

.sb-scene-visuel {
  font-size: 11px;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 6px;
}

.sb-scene-footer {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sb-scene-humeur {
  font-size: 9px;
  padding: 2px 7px;
  border-radius: 10px;
  background: rgba(34,211,238,0.1);
  border: 1px solid rgba(34,211,238,0.2);
  color: var(--cyan);
}

.sb-scene-query {
  font-size: 9px;
  color: var(--text2);
  font-family: monospace;
  font-style: italic;
}

/* ─── VIDEO MODE TOGGLE ─── */
.video-mode-toggle {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 5px;
}

.vmode-btn {
  flex: 1;
  padding: 9px 14px;
  border-radius: 8px;
  border: none;
  background: none;
  color: var(--text2);
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.vmode-btn:hover { color: var(--text); }

.vmode-btn.active {
  background: linear-gradient(135deg, var(--accent), #4f46e5);
  color: #fff;
  box-shadow: 0 2px 10px var(--accent-glow);
}

/* Storyboard loaded state */
.storyboard-loaded-info {
  background: rgba(124,58,237,0.06);
  border: 1px solid rgba(124,58,237,0.2);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 12px;
}

.storyboard-loaded-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 13px;
  color: var(--gold);
  margin-bottom: 10px;
}

.storyboard-mini-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}

.storyboard-mini-scene {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 4px;
  text-align: center;
}

.storyboard-mini-num {
  font-size: 9px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 2px;
}

.storyboard-mini-section {
  font-size: 8px;
  color: var(--text2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.storyboard-empty {
  padding: 20px;
  text-align: center;
  font-size: 13px;
  color: var(--text2);
  background: var(--bg3);
  border: 1px dashed var(--border);
  border-radius: 10px;
  line-height: 1.6;
}

.storyboard-empty strong { color: var(--text); }

/* ─── STORYBOARD MANUAL EDITOR ─── */
.storyboard-manual-editor {
  margin-top: 14px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.storyboard-editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--bg4);
  border-bottom: 1px solid var(--border);
}

.storyboard-editor-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--cyan);
  text-transform: uppercase;
}

.sb-manual-scene {
  display: grid;
  grid-template-columns: 28px 1fr 1fr 1fr 32px;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}

.sb-manual-scene:last-child { border-bottom: none; }
.sb-manual-scene:hover { background: rgba(124,58,237,0.04); }

.sb-manual-num {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #4f46e5);
  color: #fff;
  font-family: 'Orbitron', sans-serif;
  font-size: 9px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.sb-manual-scene input {
  padding: 7px 10px;
  font-size: 12px;
  border-radius: 7px;
}

.sb-manual-scene input::placeholder { font-size: 11px; }

.sb-manual-delete {
  background: none;
  border: none;
  color: var(--text2);
  cursor: pointer;
  font-size: 14px;
  padding: 4px;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
  line-height: 1;
}

.sb-manual-delete:hover {
  color: var(--danger);
  background: rgba(244,63,94,0.1);
}

.sb-empty-scenes {
  padding: 16px;
  text-align: center;
  font-size: 12px;
  color: var(--text2);
}

/* ─── TITLEBAR STATS ─── */
.titlebar-stats {
  display: flex;
  align-items: center;
  gap: 20px;
  -webkit-app-region: drag;
}

.tbar-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  -webkit-app-region: no-drag;
}

.tbar-stat-label {
  font-family: 'Orbitron', sans-serif;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--text2);
  text-transform: uppercase;
}

.tbar-stat-val {
  font-family: 'Orbitron', sans-serif;
  font-size: 10px;
  font-weight: 700;
  color: var(--gold);
}

/* ─── STUDIO RECENT ─── */
.studio-recent {
  margin-bottom: 16px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.studio-recent-label {
  font-family: 'Orbitron', sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--cyan);
  padding: 10px 16px;
  background: var(--bg3);
  border-bottom: 1px solid var(--border);
}

.studio-recent-list {
  display: flex;
  flex-direction: column;
}

.studio-recent-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
  cursor: pointer;
}

.studio-recent-item:last-child { border-bottom: none; }
.studio-recent-item:hover { background: rgba(124,58,237,0.05); }

.sri-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--gold);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sri-meta {
  font-size: 11px;
  color: var(--text2);
  flex-shrink: 0;
}

.sri-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.sri-btn {
  background: var(--bg4);
  border: 1px solid var(--border);
  color: var(--text2);
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 11px;
  font-family: 'Outfit', sans-serif;
  transition: all 0.15s;
  white-space: nowrap;
}

.sri-btn:hover { border-color: var(--accent); color: var(--text); }
.sri-btn.sri-video:hover { border-color: var(--cyan); color: var(--cyan); }
.sri-btn.sri-del:hover { border-color: var(--danger); color: var(--danger); }

/* ═══════════════════════════════════════════════════════════════
   KIE MUSIC — Styles
   ═══════════════════════════════════════════════════════════════ */

/* Status */
.kie-status {
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text2);
}
.kie-status.thinking {
  color: var(--accent);
  border-color: rgba(124,58,237,0.3);
  background: rgba(124,58,237,0.06);
  animation: kie-pulse .8s ease-in-out infinite;
}
.kie-status.ok    { color: var(--success); border-color: rgba(16,185,129,0.3); }
.kie-status.error { color: #f43f5e;      border-color: rgba(244,63,94,0.3);  }
@keyframes kie-pulse { 0%,100%{opacity:1} 50%{opacity:.5} }

/* Track card */
.kie-track-card {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px 16px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color .2s;
}
.kie-track-card:hover { border-color: rgba(124,58,237,0.4); }

.kie-track-cover { width: 72px; height: 72px; border-radius: 8px; overflow: hidden; flex-shrink: 0; background: var(--bg3); }
.kie-track-cover img { width: 100%; height: 100%; object-fit: cover; }
.kie-cover-ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 28px; }

.kie-track-title { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 3px; }
.kie-track-dur   { font-size: 11px; color: var(--text2); margin-bottom: 3px; }
.kie-track-tags  { font-size: 10px; color: var(--accent); opacity: .7; }

.kie-track-btns { display: flex; flex-direction: column; gap: 6px; }
.kie-dl-btn     { text-decoration: none; text-align: center; }

/* Player bar */
.kie-player-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg2);
  border: 1px solid rgba(124,58,237,0.3);
  border-radius: 10px;
}
.kie-player-title {
  font-size: 12px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
  flex-shrink: 0;
}

/* Historique */
.kie-hist-item {
  padding: 8px 10px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  transition: border-color .2s;
}
.kie-hist-item:hover { border-color: rgba(124,58,237,0.4); }
.kie-hist-title { display: block; font-size: 12px; color: var(--text); font-weight: 500; margin-bottom: 2px; }
.kie-hist-meta  { display: block; font-size: 10px; color: var(--text2); }
.kie-hist-empty { font-size: 12px; color: var(--text2); padding: 10px 0; text-align: center; }

/* Gender buttons */
.kie-gender-btn.active {
  border-color: rgba(124,58,237,0.7) !important;
  background: rgba(124,58,237,0.2) !important;
  color: var(--accent) !important;
}

/* ═══════════════════════════════════════════════════
   ANIMATIONS & AMBIENT EFFECTS
   ═══════════════════════════════════════════════════ */

/* ─── Main content ambient ─── */
#main-content {
  background:
    radial-gradient(ellipse at 20% 0%, rgba(124,58,237,0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(34,211,238,0.03) 0%, transparent 50%);
}

/* ─── Titlebar stat values glow ─── */
.tbar-stat-val {
  text-shadow: 0 0 8px rgba(34,211,238,0.3);
}

/* ─── Studio recent items stagger ─── */
.studio-recent-item {
  animation: cardIn 0.35s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}
.studio-recent-item:nth-child(1) { animation-delay: 0.00s; }
.studio-recent-item:nth-child(2) { animation-delay: 0.05s; }
.studio-recent-item:nth-child(3) { animation-delay: 0.06s; }
.studio-recent-item:nth-child(4) { animation-delay: 0.09s; }
.studio-recent-item:nth-child(5) { animation-delay: 0.12s; }

/* ─── Storyboard scenes stagger ─── */
.storyboard-scene {
  animation: resultIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}
.storyboard-scene:nth-child(1) { animation-delay: 0.05s; }
.storyboard-scene:nth-child(2) { animation-delay: 0.10s; }
.storyboard-scene:nth-child(3) { animation-delay: 0.15s; }
.storyboard-scene:nth-child(4) { animation-delay: 0.20s; }
.storyboard-scene:nth-child(5) { animation-delay: 0.25s; }
.storyboard-scene:nth-child(6) { animation-delay: 0.30s; }

/* ─── Copy button flash ─── */
.copy-btn.copied {
  color: var(--success) !important;
  text-shadow: 0 0 8px rgba(16,185,129,0.4);
}

/* ─── Chat messages entrance ─── */
.chat-msg {
  animation: chatIn 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* ─── Chat updated bubble glow ─── */
.chat-bubble.updated {
  box-shadow: 0 0 12px rgba(16,185,129,0.1);
}

/* ─── Kie track cards stagger ─── */
.kie-track-card {
  animation: cardIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}
.kie-track-card:nth-child(1) { animation-delay: 0.05s; }
.kie-track-card:nth-child(2) { animation-delay: 0.10s; }
.kie-track-card:nth-child(3) { animation-delay: 0.15s; }
.kie-track-card:nth-child(4) { animation-delay: 0.20s; }

/* ─── Modal entrance ─── */
.modal {
  animation: modalIn 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* ─── Help section cards ─── */
.help-block {
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}

.help-block:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

/* ─── Page title entrance ─── */
.page-title {
  animation: titleIn 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes titleIn {
  from { opacity: 0; transform: translateX(-12px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ─── Results header entrance ─── */
.results-header {
  animation: resultIn 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ─── Spinner enhanced ─── */
.spinner {
  border-color: rgba(124,58,237,0.2);
  border-top-color: var(--accent);
  filter: drop-shadow(0 0 4px rgba(124,58,237,0.3));
}

/* ─── Format selector buttons ─── */
.format-btn {
  transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

.format-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.format-btn.active {
  box-shadow: 0 0 16px rgba(124,58,237,0.15);
}
