/* ==========================================================================
   PlasmaVisualizer – Milkdrop Studio & Video Recorder
   ========================================================================== */

:root {
  --bg-main: #07080c;
  --bg-surface: rgba(18, 21, 31, 0.75);
  --bg-surface-elevated: rgba(28, 33, 48, 0.85);
  --bg-card: rgba(22, 26, 38, 0.95);

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(99, 102, 241, 0.5);
  --border-glow: rgba(129, 140, 248, 0.35);

  --accent-primary: #6366f1;
  --accent-primary-hover: #4f46e5;
  --accent-glow: rgba(99, 102, 241, 0.4);

  --accent-cyan: #06b6d4;
  --accent-cyan-glow: rgba(6, 182, 212, 0.35);

  --accent-rec: #ef4444;
  --accent-rec-glow: rgba(239, 68, 68, 0.55);

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --transition-fast: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  user-select: none;
  background-image:
    radial-gradient(circle at 15% 15%, rgba(99, 102, 241, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(6, 182, 212, 0.07) 0%, transparent 40%);
}

/* App Layout */
.app-container { display: flex; flex-direction: column; height: 100vh; overflow: hidden; position: relative; }

/* ---------- Header ---------- */
.app-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 24px; background: var(--bg-surface);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle); z-index: 50; gap: 16px;
}

.logo-area { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.logo-icon {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #06b6d4);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: #fff; box-shadow: 0 0 20px var(--accent-glow);
}
.logo-title { font-size: 1.15rem; font-weight: 800; letter-spacing: 1px; line-height: 1.1; color: #fff; }
.logo-title span { background: linear-gradient(90deg, #818cf8, #38bdf8); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.logo-subtitle { font-size: 0.72rem; color: var(--text-muted); font-weight: 500; letter-spacing: 0.5px; }

/* Format Nav */
.format-nav {
  display: flex; align-items: center; gap: 6px;
  background: rgba(10, 12, 18, 0.6); padding: 4px 6px;
  border-radius: var(--radius-full); border: 1px solid var(--border-subtle); overflow-x: auto;
}
.format-label {
  font-size: 0.75rem; color: var(--text-dim); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.6px; padding: 0 8px;
  display: flex; align-items: center; gap: 6px;
}
.format-btn {
  background: transparent; border: none; outline: none; color: var(--text-muted);
  padding: 6px 14px; font-size: 0.8rem; font-family: var(--font-sans); font-weight: 500;
  border-radius: var(--radius-full); cursor: pointer;
  display: flex; align-items: center; gap: 7px; transition: all var(--transition-fast); white-space: nowrap;
}
.format-btn i { font-size: 0.9rem; }
.format-btn strong { font-family: var(--font-mono); font-size: 0.75rem; opacity: 0.8; font-weight: 600; }
.format-btn:hover { color: var(--text-main); background: rgba(255, 255, 255, 0.05); }
.format-btn.active {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.9), rgba(6, 182, 212, 0.85));
  color: #fff; box-shadow: 0 2px 14px var(--accent-glow);
}

/* Header Actions */
.header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.action-btn {
  background: rgba(255, 255, 255, 0.06); border: 1px solid var(--border-subtle);
  color: var(--text-main); padding: 7px 14px; border-radius: var(--radius-md);
  font-family: var(--font-sans); font-size: 0.82rem; font-weight: 600;
  cursor: pointer; display: flex; align-items: center; gap: 8px; transition: all var(--transition-fast);
}
.action-btn i { color: var(--accent-cyan); }
.action-btn:hover { background: rgba(255, 255, 255, 0.12); border-color: var(--border-glow); transform: translateY(-1px); }
.action-btn.icon-only { padding: 8px 10px; }

/* ---------- Stage ---------- */
.stage-container {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 16px; position: relative; overflow: hidden;
  background: radial-gradient(circle at center, #0c0e17 0%, #050609 100%);
}
.canvas-wrapper {
  position: relative; max-width: 100%; max-height: 100%; height: 100%;
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7), 0 0 0 1px var(--border-subtle);
  transition: aspect-ratio 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), max-width 0.4s ease;
  display: flex; align-items: center; justify-content: center; background: #000;
}
.canvas-wrapper.format-tiktok     { aspect-ratio: 9 / 16; }
.canvas-wrapper.format-ig-reel    { aspect-ratio: 9 / 16; }
.canvas-wrapper.format-ig-square  { aspect-ratio: 1 / 1;  }
.canvas-wrapper.format-ig-portrait{ aspect-ratio: 4 / 5;  }
.canvas-wrapper.format-yt-landscape { aspect-ratio: 16 / 9; width: 100%; height: auto; max-height: 100%; }
.canvas-wrapper.format-yt-shorts  { aspect-ratio: 9 / 16; }

#visualizerCanvas { width: 100%; height: 100%; display: block; object-fit: cover; }
#overlayCanvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: block; pointer-events: none; z-index: 10;
}

/* Drag & Drop */
.dropzone-overlay {
  position: absolute; inset: 0;
  background: rgba(10, 13, 22, 0.88); backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity var(--transition-normal);
  border: 3px dashed var(--accent-primary); border-radius: inherit; z-index: 30;
}
.dropzone-overlay.drag-over { opacity: 1; pointer-events: auto; }
.dropzone-content { text-align: center; }
.dropzone-content i { font-size: 3.5rem; color: var(--accent-cyan); margin-bottom: 14px; }
.dropzone-content h3 { font-size: 1.4rem; font-weight: 700; margin-bottom: 6px; }
.dropzone-content p  { color: var(--text-muted); font-size: 0.9rem; }

/* HUD Pill */
.hud-pill {
  position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%);
  background: rgba(15, 20, 32, 0.82); backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle); border-radius: var(--radius-full);
  padding: 6px 16px; display: flex; align-items: center; gap: 16px;
  font-size: 0.78rem; z-index: 25; max-width: 90%; white-space: nowrap;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}
.hud-item { display: flex; align-items: center; gap: 7px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; }
.hud-item i { color: var(--accent-cyan); }
.hud-track span { font-weight: 600; color: #fff; max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.hud-preset span { color: #cbd5e1; max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
.hud-fps {
  font-family: var(--font-mono); font-size: 0.72rem; color: #4ade80;
  background: rgba(74, 222, 128, 0.1); padding: 2px 7px;
  border-radius: var(--radius-sm); border: 1px solid rgba(74, 222, 128, 0.2);
}

/* ---------- Controls Footer ---------- */
.controls-panel {
  background: var(--bg-surface); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid var(--border-subtle); padding: 12px 24px 16px;
  z-index: 50; display: flex; flex-direction: column; gap: 12px;
}
.timeline-row { display: flex; align-items: center; gap: 14px; width: 100%; }
.time-label { font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-muted); min-width: 44px; }
.seek-bar-container { flex: 1; position: relative; height: 6px; background: rgba(255, 255, 255, 0.1); border-radius: var(--radius-full); display: flex; align-items: center; cursor: pointer; }
.seek-bar { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; z-index: 10; }
.seek-progress {
  position: absolute; left: 0; top: 0; height: 100%; width: 0%;
  background: linear-gradient(90deg, #6366f1, #06b6d4);
  border-radius: var(--radius-full); box-shadow: 0 0 10px var(--accent-cyan-glow); pointer-events: none;
}

.controls-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.controls-group { display: flex; align-items: center; gap: 10px; }
.controls-group.left   { flex: 1; justify-content: flex-start; }
.controls-group.center { flex: 0 0 auto; gap: 18px; }
.controls-group.right  { flex: 1; justify-content: flex-end; }

/* Buttons */
.btn {
  font-family: var(--font-sans); font-weight: 600; font-size: 0.85rem;
  border-radius: var(--radius-md); border: none; outline: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px;
  transition: all var(--transition-fast); text-decoration: none;
}
.btn-upload { background: rgba(255, 255, 255, 0.08); border: 1px solid var(--border-subtle); color: var(--text-main); }
.btn-upload:hover { background: rgba(255, 255, 255, 0.14); border-color: var(--border-focus); }

.current-file-badge {
  display: flex; align-items: center; gap: 6px;
  background: rgba(10, 13, 20, 0.5); border: 1px solid var(--border-subtle);
  padding: 6px 12px; border-radius: var(--radius-md); font-size: 0.78rem;
  color: var(--text-muted); max-width: 220px;
}
.current-file-badge i { color: var(--accent-primary); }
.current-file-badge span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Play button */
.btn-circle {
  width: 48px; height: 48px; border-radius: 50%; padding: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.15rem; color: #fff; cursor: pointer;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
}
.btn-play { background: linear-gradient(135deg, #6366f1, #4f46e5); border: 1px solid rgba(255, 255, 255, 0.2); }
.btn-play:hover { transform: scale(1.06); box-shadow: 0 0 24px var(--accent-glow); }
.btn-play:active { transform: scale(0.96); }

/* Record / Render button */
.btn-record {
  background: linear-gradient(135deg, #1e131d, #2d141e);
  border: 1px solid rgba(239, 68, 68, 0.4); color: #fff;
  padding: 10px 20px; border-radius: var(--radius-full);
  box-shadow: 0 2px 14px rgba(239, 68, 68, 0.2); gap: 10px; font-size: 0.88rem;
}
.btn-record:hover {
  background: linear-gradient(135deg, #2b1424, #3d1525);
  border-color: rgba(239, 68, 68, 0.7); box-shadow: 0 0 22px var(--accent-rec-glow); transform: translateY(-1px);
}
.rec-icon-ring { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #ef4444; display: flex; align-items: center; justify-content: center; }
.rec-inner-dot { width: 8px; height: 8px; border-radius: 50%; background: #ef4444; }

/* Volume */
.volume-container {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255, 255, 255, 0.04); padding: 6px 12px;
  border-radius: var(--radius-full); border: 1px solid var(--border-subtle);
}
.volume-slider { width: 75px; accent-color: var(--accent-cyan); cursor: pointer; height: 4px; }

/* Icon buttons */
.btn-icon {
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--border-subtle);
  color: var(--text-main); width: 36px; height: 36px; border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: all var(--transition-fast);
}
.btn-icon:hover { background: rgba(255, 255, 255, 0.12); border-color: var(--border-glow); color: #fff; transform: translateY(-1px); }

/* Preset Select */
.preset-select-wrapper { position: relative; max-width: 260px; }
.preset-select {
  background: rgba(10, 13, 20, 0.7); border: 1px solid var(--border-subtle);
  color: var(--text-main); padding: 8px 12px; border-radius: var(--radius-md);
  font-family: var(--font-sans); font-size: 0.8rem; width: 100%;
  cursor: pointer; outline: none; transition: border-color var(--transition-fast);
}
.preset-select:focus { border-color: var(--accent-primary); box-shadow: 0 0 12px var(--accent-glow); }
.preset-select option { background: #111420; color: #f1f5f9; }

.btn-toggle {
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--border-subtle);
  color: var(--text-muted); padding: 7px 12px; border-radius: var(--radius-md);
  font-family: var(--font-sans); font-size: 0.78rem; font-weight: 600;
  cursor: pointer; display: flex; align-items: center; gap: 6px; transition: all var(--transition-fast);
}
.btn-toggle.active { background: rgba(6, 182, 212, 0.18); border-color: var(--accent-cyan); color: #38bdf8; box-shadow: 0 0 14px var(--accent-cyan-glow); }

/* ---------- Modals ---------- */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(4, 6, 10, 0.92); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  display: flex; align-items: center; justify-content: center;
  z-index: 100; padding: 20px; animation: fadeIn 0.25s ease;
}
.modal-overlay.hidden { display: none !important; }

.modal-card {
  background: var(--bg-card); border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg); width: 100%; max-width: 580px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 40px var(--accent-glow);
  overflow: hidden; display: flex; flex-direction: column;
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px; border-bottom: 1px solid var(--border-subtle);
}
.modal-title { display: flex; align-items: center; gap: 10px; }
.modal-title i { color: #4ade80; font-size: 1.3rem; }
.modal-title .render-spin { color: var(--accent-cyan); animation: spin 1.5s linear infinite; }
.modal-close { background: transparent; border: none; color: var(--text-dim); font-size: 1.6rem; cursor: pointer; line-height: 1; }
.modal-close:hover { color: #fff; }

.modal-body { padding: 20px 24px; display: flex; flex-direction: column; gap: 18px; }

.video-preview-wrapper {
  background: #000; border-radius: var(--radius-md); overflow: hidden;
  max-height: 340px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border-subtle);
}
.video-preview-wrapper video { max-width: 100%; max-height: 340px; display: block; }

.video-details {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
  background: rgba(10, 12, 18, 0.6); padding: 12px 16px;
  border-radius: var(--radius-md); border: 1px solid var(--border-subtle);
}
.detail-item { display: flex; align-items: center; justify-content: space-between; font-size: 0.82rem; }
.detail-label { color: var(--text-muted); }
.detail-value { font-family: var(--font-mono); font-weight: 600; color: #fff; }

.modal-footer {
  display: flex; align-items: center; justify-content: flex-end; gap: 12px;
  padding: 16px 24px; border-top: 1px solid var(--border-subtle);
  background: rgba(15, 18, 28, 0.5);
}
.btn-secondary { background: rgba(255, 255, 255, 0.08); color: var(--text-main); border: 1px solid var(--border-subtle); }
.btn-secondary:hover { background: rgba(255, 255, 255, 0.14); }
.btn-primary { background: linear-gradient(135deg, #6366f1, #06b6d4); color: #fff; box-shadow: 0 4px 20px var(--accent-glow); }
.btn-primary:hover { box-shadow: 0 0 25px var(--accent-cyan-glow); transform: translateY(-1px); }

/* ---------- Quality Selector ---------- */
.render-quality-section { display: flex; flex-direction: column; gap: 10px; }
.quality-section-label {
  font-size: 0.82rem; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.6px;
}
.quality-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quality-btn {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  border: 2px solid var(--border-subtle); color: var(--text-main);
  cursor: pointer; font-family: var(--font-sans); text-align: left;
  transition: all var(--transition-fast);
}
.quality-btn i { font-size: 1.3rem; color: var(--text-dim); transition: color var(--transition-fast); }
.quality-text { display: flex; flex-direction: column; gap: 2px; }
.quality-text strong { font-size: 0.92rem; }
.quality-text span { font-size: 0.75rem; color: var(--text-dim); font-family: var(--font-mono); }
.quality-btn:hover { border-color: rgba(255, 255, 255, 0.2); background: rgba(255, 255, 255, 0.07); }
.quality-btn.active {
  border-color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.12);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.15);
}
.quality-btn.active i { color: var(--accent-cyan); }
.render-progress-section.hidden { display: none !important; }

/* ---------- Render Progress ---------- */
.render-progress-section { display: flex; flex-direction: column; gap: 10px; }
.render-progress-bar-track {
  width: 100%; height: 14px;
  background: rgba(255, 255, 255, 0.08); border-radius: var(--radius-full);
  overflow: hidden; border: 1px solid var(--border-subtle);
}
.render-progress-bar-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, #6366f1, #06b6d4, #22d3ee);
  background-size: 200% 100%;
  border-radius: var(--radius-full);
  transition: width 0.15s ease;
  animation: progressShimmer 2s linear infinite;
  box-shadow: 0 0 12px var(--accent-cyan-glow);
}
.render-progress-stats {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 0.88rem;
}
.render-stat { font-family: var(--font-mono); font-weight: 700; color: #fff; }
.render-stat-dim { font-weight: 500; color: var(--text-muted); }
.render-eta { font-size: 0.82rem; color: var(--text-muted); text-align: center; margin-top: 2px; }

/* ---------- Animations ---------- */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes progressShimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ---------- Scroll-Text Config & Modal ---------- */
.badge-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #10b981; box-shadow: 0 0 6px #10b981;
  display: inline-block; margin-left: 2px;
}
.badge-dot.inactive { background: #64748b; box-shadow: none; }

.scroll-text-card { max-width: 560px; }
.switch-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md); padding: 12px 16px;
}
.switch-info { display: flex; flex-direction: column; gap: 2px; }
.switch-info strong { font-size: 0.95rem; color: #fff; }
.switch-info span { font-size: 0.78rem; color: var(--text-dim); }

/* iOS style toggle switch */
.toggle-switch { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute; cursor: pointer; inset: 0;
  background: rgba(255, 255, 255, 0.15); border: 1px solid var(--border-subtle);
  transition: .25s ease; border-radius: 24px;
}
.slider:before {
  position: absolute; content: ""; height: 18px; width: 18px;
  left: 2px; bottom: 2px; background: white;
  transition: .25s ease; border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}
.toggle-switch input:checked + .slider {
  background: linear-gradient(135deg, #06b6d4, #6366f1);
  border-color: transparent; box-shadow: 0 0 10px rgba(6, 182, 212, 0.4);
}
.toggle-switch input:checked + .slider:before {
  transform: translateX(20px);
}

.form-group { display: flex; flex-direction: column; gap: 8px; }
.input-label { font-size: 0.84rem; font-weight: 600; color: var(--text-muted); }

.input-with-actions { display: flex; gap: 8px; align-items: center; }
.text-input {
  flex: 1; background: rgba(10, 12, 18, 0.8);
  border: 1px solid var(--border-subtle); border-radius: var(--radius-md);
  padding: 10px 14px; color: #fff; font-family: var(--font-sans); font-size: 0.9rem;
  outline: none; transition: all var(--transition-fast);
}
.text-input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px var(--accent-cyan-glow);
}
.btn-action-pill {
  white-space: nowrap; background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle); color: var(--text-main);
  border-radius: var(--radius-md); padding: 9px 12px; font-size: 0.8rem;
  cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  transition: all var(--transition-fast);
}
.btn-action-pill:hover { background: rgba(255, 255, 255, 0.15); border-color: var(--accent-cyan); }

.config-grid-3 {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
}
.config-col { display: flex; flex-direction: column; gap: 6px; }

/* Segmented Control Buttons */
.segmented-control {
  display: flex; background: rgba(10, 12, 18, 0.8);
  border: 1px solid var(--border-subtle); border-radius: var(--radius-md);
  padding: 3px; gap: 2px;
}
.segment-btn {
  flex: 1; background: transparent; border: none; outline: none;
  color: var(--text-dim); font-size: 0.78rem; font-weight: 600;
  padding: 6px 4px; border-radius: var(--radius-sm); cursor: pointer;
  transition: all var(--transition-fast); text-align: center;
}
.segment-btn:hover { color: #fff; background: rgba(255, 255, 255, 0.05); }
.segment-btn.active {
  background: rgba(99, 102, 241, 0.25); color: var(--accent-cyan);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

/* Scroll Preview Marquee Box */
.scroll-preview-box {
  background: #080a14; border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md); padding: 12px 14px;
  display: flex; flex-direction: column; gap: 8px;
}
.preview-header { display: flex; align-items: center; justify-content: space-between; }
.preview-tag { font-size: 0.75rem; color: var(--text-dim); font-family: var(--font-mono); }
.preview-marquee-wrapper {
  overflow: hidden; white-space: nowrap; width: 100%;
  padding: 8px 12px; border-radius: var(--radius-sm);
  background: rgba(8, 10, 20, 0.75); border: 1px solid rgba(0, 240, 255, 0.3);
  position: relative; box-shadow: 0 0 10px rgba(0, 240, 255, 0.1);
}
.preview-marquee-inner {
  display: inline-block; animation: marqueeScroll 10s linear infinite;
  font-weight: 600; font-size: 0.88rem; color: #fff;
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.8);
}
@keyframes marqueeScroll {
  from { transform: translateX(100%); }
  to { transform: translateX(-100%); }
}

/* Render Modal summary row */
.render-scroll-summary-row {
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md); padding: 8px 14px; font-size: 0.82rem;
}
.render-scroll-info { display: flex; align-items: center; gap: 8px; color: var(--text-muted); }
.render-scroll-info i { color: var(--accent-cyan); }
.render-scroll-info span { color: #cbd5e1; }
.btn-link {
  background: none; border: none; color: var(--accent-cyan);
  font-size: 0.78rem; font-weight: 600; cursor: pointer; text-decoration: underline;
}
.btn-link:hover { color: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .format-label { display: none; }
  .controls-row { flex-wrap: wrap; gap: 12px; }
  .controls-group.left { order: 1; width: auto; }
  .controls-group.center { order: 2; width: auto; margin: 0 auto; }
  .controls-group.right { order: 3; width: 100%; justify-content: center; }
  .preset-select-wrapper { max-width: 180px; }
}

@media (max-width: 640px) {
  .app-header { padding: 8px 12px; flex-wrap: wrap; }
  .logo-title { font-size: 1rem; }
  .logo-subtitle { display: none; }
  .format-nav { order: 3; width: 100%; }
  .controls-panel { padding: 8px 12px 12px; }
  .current-file-badge { display: none; }
  .hud-pill { display: none; }
}
