/* ==========================================================================
   SonicExtract / ExtractMP3 - SaaS Design System
   With Complete Google AdSense Legal Modals & SEO Styles
   ========================================================================== */

:root {
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Color System */
  --bg-app: #080b13;
  --bg-surface: #0f1423;
  --bg-card: rgba(17, 23, 38, 0.75);
  --bg-card-hover: rgba(23, 31, 52, 0.85);
  --bg-input: rgba(10, 14, 26, 0.8);

  /* Borders & Dividers */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(99, 102, 241, 0.5);
  --border-highlight: rgba(255, 255, 255, 0.14);

  /* Brand & Status Accents */
  --brand-primary: #e11d48;       /* Crimson Highlight */
  --brand-indigo: #6366f1;        /* WebAssembly Indigo */
  --brand-cyan: #06b6d4;          /* Modern Cyan */
  --brand-gradient: linear-gradient(135deg, #e11d48 0%, #a855f7 50%, #6366f1 100%);
  --brand-gradient-alt: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
  --brand-glow: rgba(225, 29, 72, 0.35);

  --success: #10b981;
  --success-glow: rgba(16, 185, 129, 0.3);
  --danger: #ef4444;
  --warning: #f59e0b;

  /* Text Colors */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-on-brand: #ffffff;

  /* Radii */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 30px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-card: 0 30px 70px -15px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.07);
  --shadow-btn: 0 10px 25px -5px var(--brand-glow);
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
  position: relative;
  line-height: 1.6;
  padding-bottom: 95px; /* Margin for bottom anchor ad */
}

/* Ambient Animated Glow Mesh */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
  animation: meshFloat 20s ease-in-out infinite alternate;
}

.glow-1 {
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, #e11d48 0%, rgba(225, 29, 72, 0) 70%);
  top: -150px;
  left: 20%;
}

.glow-2 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, #6366f1 0%, rgba(99, 102, 241, 0) 70%);
  bottom: 0px;
  right: 15%;
  animation-duration: 25s;
  animation-direction: alternate-reverse;
}

.glow-3 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, #06b6d4 0%, rgba(6, 182, 212, 0) 70%);
  top: 35%;
  left: 60%;
  animation-duration: 18s;
}

@keyframes meshFloat {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(50px, -40px) scale(1.1); }
  100% { transform: translate(-40px, 50px) scale(0.95); }
}

/* App Layout */
.app-layout {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1020px;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 2.5rem;
  display: flex;
  flex-direction: column;
}

/* Header & Format Ribbon */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0 1.75rem;
  gap: 1rem;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.logo-mark {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--brand-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 8px 20px -4px var(--brand-glow);
}

.logo-text {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.gradient-text {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.version-tag {
  font-size: 0.65rem;
  font-weight: 800;
  background: rgba(225, 29, 72, 0.15);
  color: #fb7185;
  border: 1px solid rgba(225, 29, 72, 0.3);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  letter-spacing: 0.05em;
}

/* Format Ribbon */
.format-ribbon {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(15, 20, 35, 0.6);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(12px);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
}

.ribbon-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 600;
}

.ribbon-select-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.82rem;
  font-weight: 700;
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.05);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  color: var(--text-secondary);
}

.ribbon-select-pill.active {
  background: rgba(225, 29, 72, 0.18);
  color: #fb7185;
  border: 1px solid rgba(225, 29, 72, 0.3);
}

.privacy-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #34d399;
  font-size: 0.8rem;
  font-weight: 600;
}

.status-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulseLight 1.8s infinite;
}

@keyframes pulseLight {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.3); }
}

/* Hero Section */
.hero-section {
  text-align: center;
  margin: 1rem 0 2rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #818cf8;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.25);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.85rem;
}

.hero-title {
  font-size: clamp(2.1rem, 4.5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.035em;
  margin-bottom: 0.75rem;
}

.hero-subtitle {
  font-size: clamp(0.95rem, 1.8vw, 1.1rem);
  color: var(--text-secondary);
  max-width: 620px;
  margin: 0 auto 1.75rem;
}

/* Trust Metrics & Benchmark Bar */
.trust-metrics-bar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 20, 35, 0.65);
  border: 1px solid var(--border-highlight);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--radius-full);
  padding: 0.5rem 1.5rem;
  gap: 1.25rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  max-width: 100%;
  flex-wrap: wrap;
}

.metric-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-align: left;
}

.metric-icon-wrap {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(225, 29, 72, 0.12);
  border: 1px solid rgba(225, 29, 72, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fb7185;
  flex-shrink: 0;
}

.metric-info {
  display: flex;
  flex-direction: column;
}

.metric-val {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
  font-family: var(--font-mono);
}

.metric-lbl {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 500;
}

.metric-divider {
  width: 1px;
  height: 24px;
  background: rgba(255, 255, 255, 0.1);
}

/* Sticky Header Convert CTA */
.btn-sticky-convert {
  background: var(--brand-gradient);
  color: #fff;
  border: none;
  border-radius: var(--radius-full);
  padding: 0.4rem 1rem;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  box-shadow: var(--shadow-btn);
  transition: all 0.25s ease;
  animation: fadeIn 0.3s ease;
}

.btn-sticky-convert:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Converter Box with Aurora Shimmer Border */
.converter-box {
  background: var(--bg-card);
  backdrop-filter: blur(28px) saturate(190%);
  -webkit-backdrop-filter: blur(28px) saturate(190%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
  margin-bottom: 3.5rem;
  transition: all 0.3s ease;
}

.converter-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #e11d48, #a855f7, #6366f1, transparent);
  z-index: 2;
}

/* Quick Format Selector Bar */
.quick-format-bar {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1.75rem;
  background: rgba(255, 255, 255, 0.015);
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}

.quick-format-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.quick-format-pills {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.quick-format-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.85rem;
  color: var(--text-secondary);
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.quick-format-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.quick-format-btn.active {
  background: rgba(225, 29, 72, 0.15);
  border-color: rgba(225, 29, 72, 0.4);
  color: #fff;
  box-shadow: 0 4px 15px rgba(225, 29, 72, 0.2);
}

.btn-main-tag {
  font-size: 0.82rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: inherit;
}

.btn-sub-tag {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.quick-format-btn.active .btn-sub-tag {
  color: #fb7185;
}

/* Floating Format Chips */
.floating-chips-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

.float-chip {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(4px);
  animation: floatChip 6s ease-in-out infinite alternate;
}

.chip-1 { top: 15%; left: 8%; animation-delay: 0s; }
.chip-2 { top: 22%; right: 9%; animation-delay: 1.2s; }
.chip-3 { bottom: 20%; left: 12%; animation-delay: 2.5s; }
.chip-4 { bottom: 25%; right: 14%; animation-delay: 3.8s; }
.chip-5 { top: 65%; left: 5%; animation-delay: 4.5s; }

@keyframes floatChip {
  0% { transform: translateY(0px) rotate(0deg); opacity: 0.25; }
  50% { opacity: 0.5; }
  100% { transform: translateY(-12px) rotate(3deg); opacity: 0.25; }
}

/* Converter Toolbar */
.converter-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.75rem;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.02);
}

.toolbar-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.engine-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.engine-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-muted);
}

.engine-dot.ready {
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
}

/* Converter View States */
.converter-view {
  padding: 1.75rem;
  transition: opacity 0.25s ease;
}

.hidden {
  display: none !important;
}

/* STATE 1: Drop Zone */
.drop-zone {
  border: 2px dashed rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-lg);
  padding: 3.5rem 1.5rem;
  text-align: center;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.015);
  transition: all 0.25s ease;
  position: relative;
}

.drop-zone:hover, .drop-zone.drag-active {
  border-color: var(--brand-primary);
  background: rgba(225, 29, 72, 0.06);
  box-shadow: inset 0 0 40px rgba(225, 29, 72, 0.1);
  transform: translateY(-2px);
}

.file-input-hidden {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.drop-zone-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  pointer-events: none;
}

.drop-icon-ring {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: rgba(225, 29, 72, 0.12);
  border: 1px solid rgba(225, 29, 72, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fb7185;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.drop-zone:hover .drop-icon-ring {
  transform: scale(1.1) translateY(-4px);
  color: #fff;
  box-shadow: 0 10px 25px -5px var(--brand-glow);
}

.drop-main-text {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.drop-sub-text {
  font-size: 0.92rem;
  color: var(--text-secondary);
}

.btn-select-file {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--brand-gradient);
  color: #fff;
  border: none;
  padding: 0.85rem 1.85rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  cursor: pointer;
  box-shadow: var(--shadow-btn);
  transition: all 0.2s;
  margin-top: 0.25rem;
}

.btn-select-file:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
  box-shadow: 0 15px 30px -5px var(--brand-glow);
}

.supported-formats {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 0.5rem;
}

.format-tag {
  font-size: 0.72rem;
  font-weight: 700;
  font-family: var(--font-mono);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
}

/* STATE 2: File Queue Card */
.file-queue-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.queue-item-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  gap: 1.25rem;
  flex-wrap: wrap;
  transition: border-color 0.2s;
}

.queue-item-card:hover {
  border-color: rgba(99, 102, 241, 0.4);
}

.queue-col-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
  min-width: 240px;
}

.queue-file-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: rgba(225, 29, 72, 0.15);
  border: 1px solid rgba(225, 29, 72, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fb7185;
  flex-shrink: 0;
}

.queue-meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.queue-filename {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 340px;
}

.queue-submeta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  font-family: var(--font-mono);
  color: var(--text-secondary);
}

.meta-separator {
  color: var(--text-muted);
}

.queue-orig-ext {
  color: #818cf8;
  font-weight: 700;
}

/* Center: Format dropdown pill */
.queue-col-target {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.target-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.custom-select-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.format-select-input {
  appearance: none;
  background: rgba(225, 29, 72, 0.12);
  border: 1px solid rgba(225, 29, 72, 0.35);
  border-radius: var(--radius-md);
  padding: 0.6rem 2.2rem 0.6rem 0.9rem;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  outline: none;
  transition: all 0.2s;
}

.format-select-input:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.25);
}

.format-select-input option {
  background-color: #0f1423;
  color: #fff;
}

.pill-arrow {
  position: absolute;
  right: 0.75rem;
  pointer-events: none;
  color: #fb7185;
}

/* Right: Actions */
.queue-col-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.btn-action-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.85rem;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-action-icon:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.2);
}

.settings-hint-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #818cf8;
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

/* Queue Footer */
.queue-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-decoration: none;
  border: none;
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 0.75rem 1.25rem;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

.btn-convert {
  background: var(--brand-gradient);
  color: #fff;
  padding: 0.95rem 2.25rem;
  font-size: 1.05rem;
  box-shadow: var(--shadow-btn);
}

.btn-convert:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
  box-shadow: 0 15px 30px -5px var(--brand-glow);
}

/* STATE 3: Progress */
.progress-panel {
  padding: 1.5rem 0.5rem;
}

.progress-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.progress-state-title {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.pulse-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand-primary);
  box-shadow: 0 0 10px var(--brand-primary);
  animation: pulseLight 1s infinite;
}

.progress-number {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: #fb7185;
}

.meter-track {
  width: 100%;
  height: 12px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
  margin-bottom: 0.85rem;
}

.meter-bar {
  height: 100%;
  background: var(--brand-gradient);
  border-radius: var(--radius-full);
  transition: width 0.2s ease-out;
  box-shadow: 0 0 15px rgba(225, 29, 72, 0.8);
  position: relative;
}

.meter-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  animation: shimmerMove 1.5s infinite;
}

@keyframes shimmerMove {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.progress-status-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.speed-msg {
  font-family: var(--font-mono);
  color: #34d399;
  font-weight: 600;
}

/* STATE 4: Completed with Waveform Player */
.completed-panel {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.success-banner {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
}

.success-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.success-headline {
  font-size: 1.1rem;
  font-weight: 800;
  color: #34d399;
  margin-bottom: 0.15rem;
}

.success-sub {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Waveform Player Box */
.waveform-player-box {
  background: rgba(10, 14, 26, 0.6);
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.player-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.player-file-info {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.player-track-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.badge-format {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  font-weight: 700;
  background: rgba(225, 29, 72, 0.15);
  color: #fb7185;
  border: 1px solid rgba(225, 29, 72, 0.3);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}

.player-filesize {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: #34d399;
  background: rgba(16, 185, 129, 0.12);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
}

/* Canvas Waveform */
.waveform-canvas-wrapper {
  position: relative;
  width: 100%;
  height: 64px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex;
  align-items: center;
}

#waveformCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

.waveform-scrubber {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 10;
}

.player-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.btn-player-play {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--brand-gradient);
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 20px -3px var(--brand-glow);
  transition: transform 0.2s, filter 0.2s;
  flex-shrink: 0;
}

.btn-player-play:hover {
  transform: scale(1.08);
  filter: brightness(1.1);
}

.time-display {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.time-divider {
  color: var(--text-muted);
}

/* Playback Speed Controller */
.speed-toggle-group {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 0.2rem 0.35rem;
}

.speed-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.2rem 0.45rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s;
}

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

.speed-btn.active {
  background: rgba(225, 29, 72, 0.25);
  color: #fb7185;
  box-shadow: 0 0 8px rgba(225, 29, 72, 0.3);
}

.volume-control {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
}

.volume-slider {
  width: 80px;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fb7185;
  cursor: pointer;
}

/* Completed Actions */
.completed-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-download-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  background: var(--brand-gradient);
  color: #fff;
  padding: 1rem 2.4rem;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 800;
  border-radius: var(--radius-md);
  text-decoration: none;
  box-shadow: var(--shadow-btn);
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.btn-glow::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -60%;
  width: 40%;
  height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transform: rotate(25deg);
  animation: sheenSweep 4.5s infinite;
}

@keyframes sheenSweep {
  0%, 75% { left: -60%; }
  100% { left: 160%; }
}

.btn-download-primary:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
  box-shadow: 0 15px 30px -5px var(--brand-glow);
}

.btn-secondary-reset {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 0.95rem 1.75rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary-reset:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

/* AI Audio Toolkit (Affiliate Monetization Section) */
.ai-toolkit-section {
  margin-top: 2rem;
  padding: 1.75rem 1.25rem 1.5rem;
  background: rgba(15, 20, 35, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(16px);
  text-align: left;
}

.ai-toolkit-header {
  margin-bottom: 1.25rem;
}

.toolkit-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(225, 29, 72, 0.15);
  border: 1px solid rgba(225, 29, 72, 0.3);
  color: #fb7185;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.5rem;
}

.toolkit-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.toolkit-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.toolkit-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.toolkit-card {
  position: relative;
  background: rgba(23, 31, 52, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  overflow: hidden;
}

.toolkit-card:hover {
  transform: translateY(-3px);
  border-color: rgba(99, 102, 241, 0.5);
  background: rgba(30, 41, 69, 0.85);
  box-shadow: 0 12px 25px -8px rgba(0, 0, 0, 0.6), 0 0 15px -3px rgba(99, 102, 241, 0.25);
}

.toolkit-card.featured {
  border-color: rgba(225, 29, 72, 0.35);
  background: linear-gradient(145deg, rgba(30, 20, 35, 0.7) 0%, rgba(20, 25, 45, 0.7) 100%);
}

.toolkit-card.featured:hover {
  border-color: rgba(225, 29, 72, 0.7);
  box-shadow: 0 12px 25px -8px rgba(0, 0, 0, 0.6), 0 0 20px -3px rgba(225, 29, 72, 0.3);
}

.card-pill {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  background: rgba(225, 29, 72, 0.2);
  color: #fb7185;
  border: 1px solid rgba(225, 29, 72, 0.35);
}

.card-pill.pill-subtle {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.toolkit-card-body {
  display: flex;
  gap: 0.85rem;
  margin-bottom: 0.95rem;
}

.toolkit-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.icon-descript {
  background: rgba(225, 29, 72, 0.15);
  color: #fb7185;
  border: 1px solid rgba(225, 29, 72, 0.3);
}

.icon-otter {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.icon-cleaner {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.icon-eleven {
  background: rgba(6, 182, 212, 0.15);
  color: #22d3ee;
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.toolkit-info {
  flex: 1;
  padding-right: 2rem;
}

.toolkit-name-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
  flex-wrap: wrap;
}

.toolkit-name {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-primary);
}

.toolkit-tag-free {
  font-size: 0.65rem;
  font-weight: 700;
  color: #34d399;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 0.08rem 0.4rem;
  border-radius: 4px;
}

.toolkit-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.toolkit-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.82rem;
  font-weight: 700;
  color: #fb7185;
  transition: color 0.2s ease;
}

.toolkit-card:hover .toolkit-action {
  color: #fff;
}

@media (max-width: 680px) {
  .toolkit-grid {
    grid-template-columns: 1fr;
  }
}

/* STATE 5: Error */
.error-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2.5rem 1rem;
}

.error-icon-box {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.15);
  border: 2px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.error-headline {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.error-reason {
  font-size: 0.92rem;
  color: var(--text-secondary);
  max-width: 440px;
  margin-bottom: 1.5rem;
}

/* ==========================================================================
   SEO CONTENT MODULES
   ========================================================================== */
.section-title {
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  font-weight: 800;
  text-align: center;
  letter-spacing: -0.025em;
  margin-bottom: 2rem;
  color: var(--text-primary);
}

.seo-guide-section {
  margin-bottom: 3.5rem;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.step-card {
  background: rgba(15, 20, 35, 0.5);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  position: relative;
  transition: transform 0.25s, border-color 0.25s;
}

.step-card:hover {
  transform: translateY(-3px);
  border-color: rgba(225, 29, 72, 0.35);
}

.step-number {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--brand-gradient);
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  box-shadow: 0 4px 15px -2px var(--brand-glow);
}

.step-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.step-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.comparison-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3.5rem;
}

.comp-card {
  background: rgba(15, 20, 35, 0.5);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  backdrop-filter: blur(16px);
  transition: transform 0.25s, border-color 0.25s;
}

.comp-card:hover {
  transform: translateY(-3px);
  border-color: rgba(225, 29, 72, 0.35);
}

.comp-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.1rem;
}

.icon-shield { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.icon-zap { background: rgba(225, 29, 72, 0.15); color: #fb7185; }
.icon-hq { background: rgba(99, 102, 241, 0.15); color: #818cf8; }

.comp-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: var(--text-primary);
}

.comp-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.formats-spec-section {
  margin-bottom: 3.5rem;
}

.formats-table-wrapper {
  background: rgba(15, 20, 35, 0.5);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow-x: auto;
}

.formats-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.formats-table th {
  background: rgba(255, 255, 255, 0.03);
  padding: 1rem 1.25rem;
  font-weight: 700;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.formats-table td {
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
}

.formats-table tbody tr:last-child td {
  border-bottom: none;
}

.formats-table code {
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.06);
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  color: #fb7185;
  font-size: 0.82rem;
}

.faq-section {
  margin-bottom: 3.5rem;
}

.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  background: rgba(15, 20, 35, 0.5);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.4rem;
  transition: all 0.25s ease;
}

.faq-item[open] {
  border-color: rgba(225, 29, 72, 0.35);
  background: rgba(22, 28, 48, 0.6);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
  list-style: none;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-chevron {
  color: var(--text-muted);
  transition: transform 0.25s ease;
}

.faq-item[open] .faq-chevron {
  transform: rotate(180deg);
  color: #fb7185;
}

.faq-answer {
  margin-top: 0.85rem;
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* Footer & Legal Links */
.app-footer {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 2.5rem 0 1.5rem;
  border-top: 1px solid var(--border-subtle);
}

.footer-social-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.social-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  transition: all 0.2s ease;
  text-decoration: none;
}

.social-icon-btn:hover {
  background: var(--brand-gradient);
  border-color: transparent;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px var(--brand-glow);
}

.footer-links-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.footer-link-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  transition: color 0.2s;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(255, 255, 255, 0.2);
}

.footer-link-btn:hover {
  color: #fb7185;
  text-decoration-color: #fb7185;
}

.footer-bullet {
  color: var(--text-muted);
  opacity: 0.5;
}

.footer-copy {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.footer-sub {
  font-size: 0.76rem;
  margin-top: 0.35rem;
  color: var(--text-muted);
}

/* ==========================================================================
   MODAL DIALOG (Audio Options & Legal Modals)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.modal-card {
  width: 100%;
  max-width: 480px;
  background: #0f1423;
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9);
  overflow: hidden;
  animation: modalPop 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  flex-direction: column;
}

.modal-card-large {
  max-width: 640px;
  max-height: 85vh;
}

@keyframes modalPop {
  0% { transform: scale(0.92); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.02);
}

.modal-title-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.modal-icon {
  color: #fb7185;
}

.modal-title-group h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

.btn-close-modal {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: var(--radius-xs);
  transition: color 0.2s;
}

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

.modal-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.modal-scrollable {
  overflow-y: auto;
  max-height: 55vh;
}

.modal-scrollable h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 0.5rem;
  margin-bottom: -0.5rem;
}

.modal-scrollable p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.modal-scrollable a {
  color: #818cf8;
}

.contact-info-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 0.5rem;
}

.contact-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.88rem;
}

.contact-item strong {
  color: var(--text-primary);
}

.contact-item code {
  font-family: var(--font-mono);
  color: #fb7185;
  background: rgba(225, 29, 72, 0.12);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  align-self: flex-start;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.range-val-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: #fb7185;
  background: rgba(225, 29, 72, 0.15);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

.form-select, .form-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}

.form-select:focus, .form-input:focus {
  border-color: var(--brand-primary);
}

.form-select option {
  background-color: #0f1423;
  color: #fff;
}

.form-range {
  width: 100%;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}

.form-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fb7185;
  border: 2px solid #fff;
  cursor: pointer;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: flex-end;
}

.btn-primary-save {
  background: var(--brand-gradient);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.75rem 1.5rem;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: filter 0.2s;
}

.btn-primary-save:hover {
  filter: brightness(1.1);
}

/* ==========================================================================
   AD CONTAINERS (In-Feed & Fixed Bottom Anchor)
   ========================================================================== */
.ad-container {
  width: 100%;
  border-radius: var(--radius-md);
  background: rgba(10, 14, 26, 0.5);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  padding: 0.75rem 1rem;
  box-sizing: border-box;
  margin-top: 1.5rem;
}

.ad-label-bar {
  display: flex;
  align-items: center;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.ad-placeholder-box {
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.03);
  padding: 0.75rem;
}

.ad-icon-tag {
  color: #fb7185;
  opacity: 0.85;
  flex-shrink: 0;
}

.ad-copy {
  display: flex;
  flex-direction: column;
}

.ad-main-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.ad-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Sticky Bottom Anchor Ad */
.anchor-ad-wrapper {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 999;
  background: rgba(10, 13, 23, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-subtle);
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  padding: 0.35rem 1rem;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.anchor-ad-wrapper.collapsed {
  transform: translateY(100%);
  pointer-events: none;
  opacity: 0;
}

.anchor-ad-bar {
  width: 100%;
  max-width: 1020px;
  display: flex;
  flex-direction: column;
}

.anchor-ad-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.btn-ad-close {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-ad-close:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.anchor-ad-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  padding: 0.45rem 1rem;
}

.ad-pill-badge {
  font-size: 0.7rem;
  font-weight: 800;
  background: rgba(225, 29, 72, 0.2);
  color: #fb7185;
  border: 1px solid rgba(225, 29, 72, 0.4);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

.anchor-text {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* Responsive Mobile */
@media (max-width: 768px) {
  .app-header {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .header-left, .header-center, .header-right {
    display: flex;
    justify-content: center;
  }

  .trust-metrics-bar {
    border-radius: var(--radius-lg);
    padding: 0.85rem 1rem;
    gap: 0.85rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .metric-divider {
    display: none;
  }

  .quick-format-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
    padding: 0.75rem 1rem;
  }

  .quick-format-pills {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem;
  }

  .quick-format-btn {
    justify-content: center;
    padding: 0.4rem 0.5rem;
  }

  .floating-chips-layer {
    display: none;
  }

  .hero-title {
    font-size: 1.85rem;
  }

  .converter-view {
    padding: 1.25rem;
  }

  .queue-item-card {
    flex-direction: column;
    align-items: stretch;
  }

  .queue-col-actions {
    justify-content: flex-end;
  }

  .player-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .player-controls-row {
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .completed-actions {
    flex-direction: column;
    width: 100%;
  }

  .completed-actions .btn {
    width: 100%;
  }

  .form-row-2 {
    grid-template-columns: 1fr;
  }

  .footer-links-row {
    gap: 0.5rem;
  }
}
