:root {
  --bg: #0a0a0f;
  --surface: #12121a;
  --surface-2: #1a1a26;
  --border: #2a2a3a;
  --text: #e8e8f0;
  --text-muted: #8888a0;
  --accent: #7c5cff;
  --accent-glow: rgba(124, 92, 255, 0.35);
  --accent-2: #00d4aa;
  --danger: #ff5c7c;
  --radius: 12px;
  --radius-sm: 8px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html {
  font-size: 15px;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% -10%, rgba(124, 92, 255, 0.12), transparent),
    radial-gradient(ellipse 60% 40% at 90% 100%, rgba(0, 212, 170, 0.08), transparent);
  pointer-events: none;
  z-index: 0;
}

.app {
  position: relative;
  z-index: 1;
  max-width: 1680px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2.5rem;
}

.header {
  margin-bottom: 1.75rem;
}

.header-bar {
  padding: 0.85rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem 2rem;
}

.header-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  flex: 0 1 auto;
  min-width: 0;
}

.header-site-url {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--accent-2);
  text-decoration: none;
  letter-spacing: -0.01em;
  word-break: break-all;
}

.header-site-url:hover {
  text-decoration: underline;
  color: #9ef5e0;
}

.header-beta-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #1a1028;
  background: linear-gradient(135deg, #ffd56a, #ff9f43);
  border-radius: 4px;
}

.header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex: 1 1 50%;
  min-width: 0;
  text-align: right;
}

.header-brand {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 0.65rem;
}

.logo-icon {
  font-size: 1.5rem;
  color: var(--accent);
  filter: drop-shadow(0 0 12px var(--accent-glow));
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.header-brand-text h1 {
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.tagline {
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-top: 0.3rem;
  line-height: 1.4;
  max-width: 28rem;
}

.status-banner {
  margin-top: 0.75rem;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  max-width: 100%;
}

@media (max-width: 720px) {
  .header-main {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .header-left {
    align-items: center;
    text-align: center;
  }

  .header-right {
    align-items: center;
    text-align: center;
  }

  .header-brand {
    flex-direction: column;
    align-items: center;
  }

  .header-brand-text .tagline {
    max-width: none;
  }
}

.status-banner.error {
  background: rgba(255, 92, 124, 0.15);
  border: 1px solid var(--danger);
  color: #ffb3c4;
}

.status-banner.ok {
  background: rgba(0, 212, 170, 0.22);
  border: 2px solid var(--accent-2);
  color: #c8fff2;
  font-weight: 600;
  box-shadow: 0 0 24px rgba(0, 212, 170, 0.2);
  animation: status-pop 0.35s ease;
}

@keyframes status-pop {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.layout {
  display: grid;
  gap: 1.25rem;
  align-items: start;
}

.layout--balanced {
  /* Narrow side columns — preview takes the remaining space */
  grid-template-columns: minmax(220px, 260px) minmax(0, 2.2fr) minmax(220px, 260px);
}

.preview-column {
  min-width: 0;
}

@media (max-width: 1100px) {
  .layout--balanced {
    grid-template-columns: 1fr;
  }

  .controls-panel,
  .effects-panel,
  .preview-column {
    max-height: none;
  }
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
}

.controls-panel {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
  position: sticky;
  top: 0.75rem;
  padding: 0.85rem;
}

.control-group {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
}

.control-group:last-child {
  border-bottom: none;
}

.control-group h2 {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.65rem;
}

.section-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  padding: 0;
  margin-bottom: 0.65rem;
}

.section-toggle h2 {
  margin-bottom: 0;
}

.chevron {
  font-size: 0.65rem;
  color: var(--text-muted);
  transition: transform 0.2s;
}

.collapsible:not(.open) .section-body,
.collapsible:not(.open) .add-layer,
.collapsible:not(.open) .section-intro {
  display: none;
}

.section-intro {
  margin-bottom: 0.5rem;
  font-size: 0.78rem;
  line-height: 1.45;
}

.collapsible:not(.open) .chevron {
  transform: rotate(-90deg);
}

.file-btn {
  display: block;
  cursor: pointer;
}

/* Input covers the full button — reliable click on mobile and desktop */
.file-btn {
  position: relative;
  display: block;
  cursor: pointer;
}

.file-input-native {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.file-btn-label {
  position: relative;
  z-index: 1;
  pointer-events: none;
}

.file-btn-label {
  display: block;
  text-align: center;
  padding: 0.7rem 1rem;
  background: linear-gradient(135deg, var(--accent), #5a3fd4);
  border-radius: var(--radius-sm);
  font-weight: 500;
  transition: transform 0.15s, box-shadow 0.15s;
}

.file-btn.secondary .file-btn-label {
  background: var(--surface-2);
  border: 1px dashed var(--border);
}

.file-btn:hover .file-btn-label {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px var(--accent-glow);
}

.file-btn.secondary:hover .file-btn-label {
  border-color: var(--accent);
  box-shadow: none;
}

.transport {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.65rem;
}

.btn {
  flex: 1;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.btn:hover:not(:disabled) {
  border-color: var(--accent);
  background: #222233;
}

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

.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  font-weight: 500;
}

.btn.primary:hover:not(:disabled) {
  background: #6b4ee6;
}

.btn.ghost {
  flex: none;
  width: 100%;
  margin-top: 0.5rem;
  background: transparent;
}

.btn.export {
  width: 100%;
  background: linear-gradient(135deg, var(--accent-2), #00a888);
  border: none;
  color: #0a0a0f;
  font-weight: 600;
  margin-top: 0.25rem;
}

.btn.export:hover:not(:disabled) {
  filter: brightness(1.08);
}

.btn.download {
  display: block;
  text-align: center;
  text-decoration: none;
  margin-top: 0.5rem;
  background: var(--accent);
  border-color: var(--accent);
}

.progress-wrap {
  margin-top: 0.65rem;
}

.progress-wrap input[type="range"] {
  width: 100%;
}

.time-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.6rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.field input[type="range"],
.field select,
.field input[type="color"],
.field input[type="number"],
.field input[type="text"] {
  width: 100%;
}

.field input[type="text"] {
  padding: 0.5rem 0.6rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
}

.field input[type="text"]:focus {
  outline: none;
  border-color: var(--accent);
}

.clip-name-wrap {
  margin-bottom: 0.65rem;
}

.clip-name-reset {
  margin-top: 0.35rem;
  font-size: 0.82rem;
  padding: 0.4rem 0.6rem;
}

.clip-name-hint {
  margin-top: 0.35rem;
  margin-bottom: 0;
  font-size: 0.75rem;
}

select {
  width: 100%;
  padding: 0.5rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
}

.hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.export-status {
  font-size: 0.85rem;
  color: var(--accent-2);
  margin-top: 0.5rem;
}

.export-status.recording {
  animation: pulse 1.2s ease infinite;
}

@keyframes pulse {
  50% { opacity: 0.6; }
}

.layer-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.6rem;
  margin-bottom: 0.5rem;
}

.layer-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}

.layer-name {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  min-width: 0;
}

.toggle {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
  flex-shrink: 0;
}

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

.toggle-ui {
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.2s;
}

.toggle-ui::before {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: transform 0.2s;
}

.toggle input:checked + .toggle-ui {
  background: var(--accent);
}

.toggle input:checked + .toggle-ui::before {
  transform: translateX(16px);
}

.btn-icon {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  border-radius: 4px;
  line-height: 1;
}

.btn-icon:hover {
  color: var(--danger);
  background: rgba(255, 92, 124, 0.15);
}

.layer-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem 0.6rem;
}

.layer-fields label {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.layer-fields label.full {
  grid-column: 1 / -1;
}

.layer-fields input[type="color"] {
  height: 28px;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  cursor: pointer;
}

.layer-fields input[type="range"],
.layer-fields select {
  width: 100%;
}

.add-layer {
  width: 100%;
  margin-top: 0.25rem;
}

.effects-panel {
  padding: 0.85rem 1rem;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
  position: sticky;
  top: 0.75rem;
}

.effects-panel .control-group:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.effects-panel .layer-fields {
  grid-template-columns: 1fr;
}

@media (min-width: 1200px) {
  .effects-panel .layer-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.preview-area {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem;
  position: sticky;
  top: 0.75rem;
  z-index: 10;
}

.preview-heading {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
  text-align: center;
}

.preview-column .canvas-wrap {
  width: 100%;
  margin: 0 auto;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.55);
}

.preview-column #visualizer {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  max-height: min(58vh, 560px);
  object-fit: contain;
}

.preview-column .preview-hint {
  font-size: 0.75rem;
  margin-top: 0.45rem;
  text-align: center;
}

.canvas-wrap {
  position: relative;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

.pip-video {
  /* Video ascuns, folosit doar pentru Picture-in-Picture */
  position: absolute;
  inset: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.preview-toolbar {
  position: absolute;
  right: 0.65rem;
  bottom: 0.65rem;
  z-index: 5;
  display: flex;
  gap: 0.5rem;
  pointer-events: auto;
}

.preview-toolbar .btn {
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 0;
  padding: 0.45rem 0.6rem;
  font-size: 0.85rem;
}

#visualizer {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
}

.canvas-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  pointer-events: none;
  transition: opacity 0.3s;
}

.canvas-overlay.hidden {
  opacity: 0;
}

.canvas-overlay p {
  color: var(--text-muted);
  font-size: 1rem;
}

.preview-hint {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.pip-scroll-sentinel {
  height: 1px;
  width: 100%;
  pointer-events: none;
  visibility: hidden;
}

input[type="range"] {
  -webkit-appearance: none;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  background: var(--accent);
  border-radius: 50%;
  cursor: pointer;
}

/* Disclaimer footer */
.disclaimer {
  margin-top: 2.5rem;
  padding: 1.5rem 1.25rem 2rem;
  border-top: 1px solid var(--border);
  background: rgba(18, 18, 26, 0.6);
  border-radius: var(--radius);
}

.disclaimer-beta {
  max-width: 52rem;
  margin: 0 auto 1.35rem;
  padding: 0.85rem 1rem;
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--text-muted);
  background: rgba(255, 159, 67, 0.1);
  border: 1px solid rgba(255, 159, 67, 0.35);
  border-radius: var(--radius-sm);
  text-align: center;
}

.disclaimer-beta-label {
  display: inline-block;
  margin-right: 0.35rem;
  padding: 0.1rem 0.45rem;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #1a1028;
  background: linear-gradient(135deg, #ffd56a, #ff9f43);
  border-radius: 4px;
  vertical-align: middle;
}

.disclaimer-title {
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 1.25rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.disclaimer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.disclaimer-grid h3 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-2);
  margin-bottom: 0.4rem;
}

.disclaimer-grid p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.disclaimer-grid a {
  color: var(--accent);
  text-decoration: none;
}

.disclaimer-grid a:hover {
  text-decoration: underline;
}

.disclaimer-note {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  opacity: 0.85;
}

/* Export ready popup */
.export-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.export-modal.is-open {
  display: flex;
}

.export-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(6px);
}

.export-modal-box {
  position: relative;
  width: 100%;
  max-width: 420px;
  padding: 1.75rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-height: calc(100vh - 2.5rem);
  overflow: auto;
  box-shadow:
    0 0 0 1px rgba(124, 92, 255, 0.2),
    0 24px 60px rgba(0, 0, 0, 0.55);
  text-align: center;
  animation: modalIn 0.35s ease;
}

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

.export-modal-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-2), #00a888);
  color: #0a0a0f;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 56px;
  box-shadow: 0 0 24px rgba(0, 212, 170, 0.4);
}

.export-modal-title {
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.export-modal-message {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}

.export-modal-filename {
  font-size: 0.85rem;
  color: var(--accent-2);
  word-break: break-all;
  margin-bottom: 1.25rem;
  padding: 0.5rem 0.75rem;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
}

.export-modal-download {
  display: block;
  width: 100%;
  margin-bottom: 0.6rem;
  text-decoration: none;
  text-align: center;
}

.export-modal-box .btn.ghost {
  width: 100%;
}

.settings-saved-panel {
  background: linear-gradient(145deg, rgba(124, 92, 255, 0.14), rgba(0, 212, 170, 0.08));
  border: 2px solid rgba(124, 92, 255, 0.45);
  border-radius: var(--radius);
  padding: 0.85rem !important;
  margin-bottom: 0.25rem;
}

.settings-saved-panel.highlight-restored {
  border-color: var(--accent-2);
  box-shadow: 0 0 0 2px rgba(0, 212, 170, 0.25), 0 8px 28px rgba(0, 212, 170, 0.15);
  animation: settings-glow 1.2s ease 2;
}

@keyframes settings-glow {
  0%,
  100% {
    box-shadow: 0 0 0 2px rgba(0, 212, 170, 0.25), 0 8px 28px rgba(0, 212, 170, 0.15);
  }
  50% {
    box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.45), 0 8px 36px rgba(0, 212, 170, 0.28);
  }
}

.settings-saved-panel h2 {
  color: var(--accent-2);
  margin-bottom: 0.5rem;
}

.settings-restored-badge {
  display: block;
  padding: 0.45rem 0.65rem;
  margin-bottom: 0.55rem;
  border-radius: var(--radius-sm);
  background: rgba(0, 212, 170, 0.2);
  border: 1px solid var(--accent-2);
  color: #b8fff0;
  font-size: 0.8rem;
  font-weight: 600;
  text-align: center;
}

.settings-restored-badge.fade-out {
  opacity: 0;
  transition: opacity 0.6s ease;
}

.settings-saved-lead {
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--text-muted);
  margin-bottom: 0.65rem;
}

.settings-saved-lead strong {
  color: #ffb3c4;
}

.settings-saved-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}

.settings-action-btn {
  width: 100%;
  font-size: 0.75rem;
  padding: 0.45rem 0.35rem;
  text-align: center;
}

.settings-import-label {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
}

.settings-reset-prominent {
  width: 100%;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.55rem 0.75rem;
  border: 2px solid rgba(255, 92, 124, 0.55);
  background: rgba(255, 92, 124, 0.12);
  color: #ffc8d4;
}

.settings-reset-prominent:hover {
  background: rgba(255, 92, 124, 0.22);
  border-color: var(--danger);
  color: #fff;
}

.settings-persist-hint {
  margin-top: 1rem;
  max-width: 52rem;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  font-size: 0.78rem;
}

/* --- Post-processing effects panel --- */
.postfx-body {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.effect-search {
  width: 100%;
  padding: 0.45rem 0.6rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.8rem;
}

.effect-search:focus {
  outline: none;
  border-color: var(--accent);
}

.effect-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.fx-preset-btn {
  padding: 0.25rem 0.5rem;
  font-size: 0.68rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-muted);
  cursor: pointer;
}

.fx-preset-btn:hover {
  border-color: var(--accent);
  color: var(--text);
}

.effect-button-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-height: 300px;
  overflow-y: auto;
  scrollbar-width: thin;
  padding: 0.1rem 0;
}

.effect-btn {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.4rem 0.55rem;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  font: inherit;
}

.effect-btn:hover {
  border-color: var(--border);
  background: rgba(124, 92, 255, 0.08);
}

.effect-btn.selected {
  border-color: var(--accent);
  background: rgba(124, 92, 255, 0.18);
  box-shadow: 0 0 0 1px rgba(124, 92, 255, 0.35);
}

.effect-btn[hidden] {
  display: none;
}

.effect-btn .effect-thumb {
  width: 52px;
  height: 28px;
  flex-shrink: 0;
}

.effect-btn-label {
  font-size: 0.78rem;
  line-height: 1.25;
  color: var(--text-muted);
}

.effect-btn.selected .effect-btn-label {
  color: var(--text);
  font-weight: 500;
}

.effect-thumb {
  display: block;
  width: 100%;
  height: 28px;
  border-radius: 4px;
  position: relative;
  overflow: hidden;
}

.effect-thumb::after {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  top: 50%;
  height: 3px;
  margin-top: -1.5px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 8px rgba(0, 212, 170, 0.5);
}

.effect-options-panel {
  margin-top: 0.5rem;
  padding: 0.7rem 0.75rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.fx-options-title {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-2);
  margin: 0 0 0.6rem;
}

.fx-options-fields {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.fx-options-fields .field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.fx-options-fields input[type="range"],
.fx-options-fields input[type="color"] {
  width: 100%;
}

.fx-thumb-none {
  background: repeating-linear-gradient(45deg, #1a1a24, #1a1a24 4px, #22222e 4px, #22222e 8px);
}

.fx-thumb-none::after {
  opacity: 0.2;
}

.fx-thumb-blur-fill {
  background: linear-gradient(90deg, #1a1030, #3d2a6e, #1a1030);
  filter: blur(0.5px);
}

.fx-thumb-color-shift {
  background: linear-gradient(90deg, #ff6ad5, #7c5cff, #00e5ff);
}

.fx-thumb-chromatic {
  background: #12121a;
  box-shadow: inset -6px 0 12px rgba(255, 0, 80, 0.35), inset 6px 0 12px rgba(0, 200, 255, 0.35);
}

.fx-thumb-flash {
  background: linear-gradient(180deg, #fff 0%, #333 100%);
}

.fx-thumb-pulse {
  background: radial-gradient(circle at 50% 50%, #7c5cff 0%, #12121a 70%);
}

.fx-thumb-vhs {
  background: repeating-linear-gradient(0deg, #1a1a28 0 2px, #0d0d14 2px 4px);
}

.fx-thumb-vaporwave {
  background: linear-gradient(180deg, #ff6ad5, #7c5cff 50%, #00e5ff);
}

.fx-thumb-crash-zoom,
.fx-thumb-slow-zoom {
  background: radial-gradient(ellipse at center, #7c5cff 0%, #0a0a12 80%);
}

.fx-thumb-green-screen {
  background: linear-gradient(90deg, #00ff66, #1a3a20);
}

.fx-thumb-bw {
  background: linear-gradient(90deg, #000, #888, #fff);
}

.fx-thumb-blur {
  background: #2a2a3a;
  filter: blur(2px);
}

.fx-thumb-filmic {
  background: radial-gradient(ellipse at center, #4a4035 0%, #0a0806 85%);
}

.fx-thumb-glitch {
  background: #12121a;
}

.fx-thumb-glitch::after {
  box-shadow: 4px 0 0 #f0f, -4px 0 0 #0ff;
}

.fx-thumb-disco {
  background: linear-gradient(90deg, red, yellow, lime, cyan, blue, magenta);
}

.fx-thumb-glass {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(120, 180, 255, 0.15));
}

.fx-thumb-comic {
  background: #fff;
  border: 2px solid #000;
}

.fx-thumb-retro {
  background: repeating-conic-gradient(#7c5cff 0 25%, #00d4aa 0 50%);
  image-rendering: pixelated;
}

.fx-thumb-vertical {
  background: linear-gradient(90deg, #7c5cff 33%, #00d4aa 33% 66%, #7c5cff 66%);
}

.fx-thumb-radial {
  background: repeating-conic-gradient(from 0deg, #7c5cff, #12121a, #00d4aa, #12121a);
}

.fx-thumb-smoke {
  background: radial-gradient(circle at 30% 60%, rgba(200, 180, 255, 0.5), transparent 60%);
}

.fx-thumb-kaleidoscope {
  background: conic-gradient(from 0deg, #7c5cff, #00d4aa, #ff6ad5, #7c5cff);
}

.fx-thumb-glow,
.fx-thumb-diffusion {
  background: #12121a;
  box-shadow: inset 0 0 16px rgba(0, 229, 255, 0.6);
}

.effect-beat-row,
.bg-pulse-row {
  flex-direction: row !important;
  align-items: center;
  justify-content: space-between;
}

.bg-pulse-row input[type="checkbox"] {
  width: auto;
}

.effect-beat-row input[type="checkbox"] {
  width: auto;
}

