:root {
  /* Green-Forward Organic Earth Palette (Salvia, Bosque, Oliva & Esmeralda) */
  --color-primary-green: #5c873a;
  --color-bright-sage: #88b75b;
  --color-olive-moss: #878532;
  --color-deep-forest: #233b18;
  --color-gold-citron: #dbb95f;

  --bg-dark: #070e08;
  --bg-dark-secondary: #0d1a0e;
  --card-bg: rgba(15, 28, 16, 0.82);
  --card-border: rgba(136, 183, 91, 0.18);
  --card-hover-border: rgba(136, 183, 91, 0.5);
  
  --primary: #6da244;
  --primary-hover: #5d8e37;
  --primary-glow: rgba(109, 162, 68, 0.35);
  
  --secondary: #162617;
  --secondary-hover: #223a23;
  
  --accent-cyan: #9ecc7a;
  --accent-pink: #dbb95f;
  --accent-green: #6da244;
  --accent-tiktok: #88b75b;
  
  --text-main: #f5fcf2;
  --text-muted: #bcd0b6;
  --text-dim: #7a9474;
  
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;
  --transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  line-height: 1.5;
}

/* Fonts */
.font-impact { font-family: 'Impact', 'Arial Black', sans-serif; letter-spacing: 0.03em; }
.font-montserrat { font-family: 'Montserrat', sans-serif; font-weight: 800; }
.font-arial { font-family: 'Arial', sans-serif; }
.font-segoe-ui { font-family: 'Segoe UI', sans-serif; }
.font-trebuchet { font-family: 'Trebuchet MS', sans-serif; }
.font-verdana { font-family: 'Verdana', sans-serif; }
.font-georgia { font-family: 'Georgia', serif; }
.font-comic { font-family: 'Comic Sans MS', cursive, sans-serif; }

/* Subtitle Animations - Natural & Organic Curves */
.anim-pop {
  animation: popScale 0.22s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}
@keyframes popScale {
  0% { transform: scale(0.90); opacity: 0; }
  50% { transform: scale(1.06); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

.anim-fade {
  animation: fadeSlide 0.2s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}
@keyframes fadeSlide {
  0% { opacity: 0; transform: translateY(4px); }
  100% { opacity: 1; transform: translateY(0); }
}

.anim-wipe {
  animation: wipeText 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
@keyframes wipeText {
  0% { clip-path: inset(0 100% 0 0); opacity: 0.8; }
  100% { clip-path: inset(0 0 0 0); opacity: 1; }
}

.anim-gradient-gold {
  background: linear-gradient(135deg, #f5fcf2 0%, #dbb95f 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  text-shadow: none !important;
}

.anim-gradient-forest {
  background: linear-gradient(135deg, #c4e8a0 0%, #5c873a 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  text-shadow: none !important;
}

.anim-gradient-bronze {
  background: linear-gradient(135deg, #9ecc7a 0%, #878532 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  text-shadow: none !important;
}

.anim-gradient-fire {
  background: linear-gradient(135deg, #e4f5d5 0%, #6da244 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  text-shadow: none !important;
}

/* Ambient organic green glow lights */
.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(150px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}
.bg-glow-1 {
  width: 580px;
  height: 580px;
  top: -120px;
  left: 8%;
  background: radial-gradient(circle, #5c873a, #162f14);
}
.bg-glow-2 {
  width: 650px;
  height: 650px;
  bottom: -150px;
  right: 5%;
  background: radial-gradient(circle, #878532, #0d210f);
}

.app-container {
  position: relative;
  z-index: 1;
  max-width: 1300px;
  margin: 0 auto;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--card-border);
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-logo-wrap {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 0 16px rgba(109, 162, 68, 0.55));
  transition: var(--transition);
}

.brand-logo-wrap:hover {
  transform: scale(1.06) rotate(2deg);
  filter: drop-shadow(0 0 24px rgba(109, 162, 68, 0.8));
}

.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
}

.brand h1 {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.gradient-text {
  background: linear-gradient(135deg, #e4f5d5, #88b75b, #dbb95f);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

.header-right-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* Language Switcher */
.lang-switcher-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 28, 16, 0.9);
  border: 1px solid var(--card-border);
  padding: 6px 10px;
  border-radius: 20px;
  transition: var(--transition);
}

.lang-switcher-wrap:hover {
  border-color: var(--primary);
  box-shadow: 0 0 12px var(--primary-glow);
}

.lang-icon {
  width: 16px;
  height: 16px;
  color: var(--color-bright-sage);
}

.lang-switcher-select {
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 0.82rem;
  font-weight: 700;
  outline: none;
  cursor: pointer;
}

.lang-switcher-select option {
  background: #0d1a0e;
  color: #fff;
}

.header-badges {
  display: flex;
  gap: 10px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge i {
  width: 14px;
  height: 14px;
}

.badge-tiktok {
  background: rgba(109, 162, 68, 0.2);
  color: #aae07e;
  border: 1px solid rgba(109, 162, 68, 0.4);
}

.badge-ai {
  background: rgba(135, 133, 50, 0.22);
  color: #dedb77;
  border: 1px solid rgba(135, 133, 50, 0.4);
}

.badge-hd {
  background: rgba(219, 185, 95, 0.16);
  color: #ebd38e;
  border: 1px solid rgba(219, 185, 95, 0.35);
}

.badge-count {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
}

/* Cards & Glassmorphism */
.card {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 36px 0 rgba(0, 0, 0, 0.6);
  overflow: hidden;
  transition: var(--transition);
}

.hidden {
  display: none !important;
}

/* STEP 1: Upload Card */
.upload-card {
  padding: 36px;
  margin-bottom: 24px;
}

.dropzone {
  border: 2px dashed rgba(136, 183, 91, 0.3);
  border-radius: var(--radius-md);
  padding: 48px 24px;
  text-align: center;
  background: rgba(10, 20, 11, 0.65);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.dropzone:hover, .dropzone.dragover {
  border-color: var(--primary);
  background: rgba(109, 162, 68, 0.12);
  box-shadow: 0 0 35px var(--primary-glow);
}

.dropzone-icon-wrap {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(109, 162, 68, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.dropzone-icon {
  width: 36px;
  height: 36px;
  color: var(--primary);
}

.dropzone h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-main);
}

.dropzone-hint {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.supported-formats {
  margin-top: 24px;
  display: flex;
  gap: 8px;
}

.supported-formats span {
  font-size: 0.72rem;
  font-family: 'JetBrains Mono', monospace;
  background: rgba(255, 255, 255, 0.05);
  padding: 3px 8px;
  border-radius: 4px;
  color: var(--text-dim);
}

.upload-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--card-border);
}

.manual-upload-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  background: rgba(11, 22, 12, 0.5);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
}

.option-hint-box {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 500;
  max-width: 600px;
}

.option-hint-box i {
  color: var(--color-bright-sage);
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.option-srt-box {
  display: flex;
  align-items: center;
}

.editor-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.option-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.option-group label i {
  width: 15px;
  height: 15px;
  color: var(--primary);
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  background: rgba(11, 22, 12, 0.9);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-glow);
}

.form-control-sm {
  padding: 7px 10px;
  font-size: 0.82rem;
}

/* Format Card */
.format-card {
  padding: 18px 20px;
}

.format-buttons-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.format-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(11, 22, 12, 0.7);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
}

.format-btn i {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--text-dim);
}

.format-btn-info {
  display: flex;
  flex-direction: column;
}

.format-btn-info strong {
  font-size: 0.84rem;
  color: var(--text-main);
}

.format-btn-info span {
  font-size: 0.7rem;
  color: var(--text-dim);
}

.format-btn:hover {
  border-color: var(--primary-glow);
  background: rgba(109, 162, 68, 0.1);
}

.format-btn.active {
  background: rgba(109, 162, 68, 0.2);
  border-color: var(--primary);
  box-shadow: 0 0 14px var(--primary-glow);
}

.format-btn.active i {
  color: var(--primary);
}

.format-btn.active[data-ratio="9:16"] {
  border-color: var(--color-bright-sage);
  background: rgba(136, 183, 91, 0.22);
  box-shadow: 0 0 16px rgba(136, 183, 91, 0.35);
}

.format-btn.active[data-ratio="9:16"] i {
  color: var(--color-bright-sage);
}

.vertical-fit-wrap {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.vertical-fit-wrap label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.vertical-fit-wrap label i {
  width: 14px;
  height: 14px;
  color: var(--color-bright-sage);
}

/* Gradient Presets */
.gradient-presets-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 6px;
}

.grad-pill {
  padding: 6px 10px;
  background: rgba(11, 22, 12, 0.85);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
}

.grad-pill:hover {
  border-color: var(--primary);
  color: var(--text-main);
}

.grad-pill.active {
  background: rgba(109, 162, 68, 0.25);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 0 10px var(--primary-glow);
}

/* Mode Tabs Header */
.mode-tabs-header {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  border-bottom: 1px solid var(--card-border);
  background: rgba(11, 22, 12, 0.7);
}

.mode-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  border-bottom: 2px solid transparent;
}

.mode-tab i {
  width: 16px;
  height: 16px;
}

.mode-tab:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.03);
}

.mode-tab.active {
  color: var(--color-bright-sage);
  border-bottom-color: var(--color-bright-sage);
  background: rgba(109, 162, 68, 0.16);
}

#tabClipsMode.active {
  border-bottom-color: var(--color-bright-sage);
  color: #c4e8a0;
  background: rgba(109, 162, 68, 0.2);
}

/* Clips Config Panel */
.clips-config-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.clips-config-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.clips-config-header label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.duration-pills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.duration-pill-btn {
  padding: 8px 6px;
  background: rgba(11, 22, 12, 0.85);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.duration-pill-btn span {
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--text-dim);
}

.duration-pill-btn:hover {
  border-color: var(--color-bright-sage);
  background: rgba(109, 162, 68, 0.14);
}

.duration-pill-btn.active {
  background: rgba(109, 162, 68, 0.28);
  border-color: var(--color-bright-sage);
  color: #fff;
  box-shadow: 0 0 14px rgba(109, 162, 68, 0.4);
}

.duration-pill-btn.active span {
  color: #c4e8a0;
}

.btn-clips {
  width: 100%;
  padding: 14px 20px;
  background: linear-gradient(135deg, #5c873a, #878532);
  color: #f5fcf2;
  font-size: 0.95rem;
  font-weight: 800;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 20px rgba(92, 135, 58, 0.45);
}

.btn-clips:hover {
  background: linear-gradient(135deg, #6ba142, #99963b);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(92, 135, 58, 0.6);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-decoration: none;
}

.btn i {
  width: 18px;
  height: 18px;
}

.btn-primary {
  background: linear-gradient(135deg, #6da244, #446e28);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(109, 162, 68, 0.4);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #7bb84e, #4f8030);
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(109, 162, 68, 0.55);
}

.btn-secondary {
  background: var(--secondary);
  color: var(--text-main);
  border: 1px solid var(--card-border);
}

.btn-secondary:hover {
  background: var(--secondary-hover);
  border-color: rgba(136, 183, 91, 0.35);
}

.btn-outline {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--card-border);
}

.btn-outline:hover {
  background: rgba(109, 162, 68, 0.1);
  color: var(--text-main);
}

.btn-burn {
  width: 100%;
  padding: 14px 20px;
  background: linear-gradient(135deg, #6da244, #5c873a);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 800;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 20px rgba(109, 162, 68, 0.4);
}

.btn-burn:hover {
  background: linear-gradient(135deg, #7bb84e, #6ba142);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(109, 162, 68, 0.55);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1rem;
}

/* STEP 2: Loading State */
.loading-card {
  padding: 60px 24px;
  text-align: center;
}

.loader-content {
  max-width: 500px;
  margin: 0 auto;
}

.sound-wave {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 50px;
  margin-bottom: 24px;
}

.sound-wave span {
  width: 6px;
  height: 100%;
  background: linear-gradient(to top, #5c873a, #88b75b);
  border-radius: 3px;
  animation: wave 1.2s ease-in-out infinite alternate;
}

.sound-wave span:nth-child(1) { animation-delay: 0.1s; height: 30%; }
.sound-wave span:nth-child(2) { animation-delay: 0.2s; height: 60%; }
.sound-wave span:nth-child(3) { animation-delay: 0.3s; height: 90%; }
.sound-wave span:nth-child(4) { animation-delay: 0.4s; height: 45%; }
.sound-wave span:nth-child(5) { animation-delay: 0.5s; height: 100%; }
.sound-wave span:nth-child(6) { animation-delay: 0.4s; height: 75%; }
.sound-wave span:nth-child(7) { animation-delay: 0.3s; height: 50%; }
.sound-wave span:nth-child(8) { animation-delay: 0.2s; height: 85%; }
.sound-wave span:nth-child(9) { animation-delay: 0.1s; height: 40%; }
.sound-wave span:nth-child(10){ animation-delay: 0.25s; height: 65%; }

@keyframes wave {
  0% { transform: scaleY(0.2); }
  100% { transform: scaleY(1); }
}

.loading-subtitle {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-top: 6px;
  margin-bottom: 20px;
}

.progress-bar-container {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-bar-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #5c873a, #88b75b, #dbb95f);
  transition: width 0.25s ease;
}

.progress-percent {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--color-bright-sage);
  margin-bottom: 24px;
  font-weight: 600;
}

.loading-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}

.step-item {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-dim);
  font-size: 0.88rem;
  transition: var(--transition);
}

.step-bullet {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-dim);
  border: 1px solid var(--card-border);
  flex-shrink: 0;
}

.step-item.active {
  color: var(--text-main);
}

.step-item.active .step-bullet {
  background: var(--color-bright-sage);
  color: #070e08;
  box-shadow: 0 0 14px var(--primary-glow);
  border-color: transparent;
  animation: pulse 1.5s infinite;
}

.step-item.done {
  color: #aae07e;
}

.step-item.done .step-bullet {
  background: rgba(92, 135, 58, 0.35);
  color: #aae07e;
  border-color: rgba(92, 135, 58, 0.55);
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* STEP 3: Studio Section */
.studio-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 24px;
  align-items: start;
}

.studio-left, .studio-right {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Video Player Box */
.video-card {
  padding: 16px;
}

.video-container-wrap {
  display: flex;
  justify-content: center;
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
  max-height: 480px;
}

.video-container {
  position: relative;
  background: #000;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.video-container.ratio-16-9 {
  width: 100%;
  aspect-ratio: 16 / 9;
}

.video-container.ratio-9-16 {
  height: 480px;
  aspect-ratio: 9 / 16;
}

.video-container.ratio-original {
  width: 100%;
  max-height: 480px;
}

.video-container video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.subtitle-overlay {
  position: absolute;
  left: 6%;
  right: 6%;
  text-align: center;
  pointer-events: none;
  z-index: 10;
  transition: all 0.15s ease;
  display: flex;
  justify-content: center;
}

.subtitle-overlay.style-pos-bottom {
  bottom: 18%;
}

.subtitle-overlay.style-pos-middle {
  top: 50%;
  transform: translateY(-50%);
}

.subtitle-overlay.style-pos-top {
  top: 12%;
}

.subtitle-text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  max-height: 110px;
  padding: 4px 10px;
  border-radius: 4px;
  font-weight: 700;
  color: #ffffff;
  max-width: 88%;
  word-break: break-word;
  white-space: pre-line;
  line-height: 1.35;
  text-align: center;
}

/* Detection Banner */
.lang-detection-banner {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--card-border);
}

.lang-info {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.lang-pill, .confidence-pill, .duration-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(11, 22, 12, 0.85);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  border: 1px solid var(--card-border);
}

.lang-pill strong { color: var(--color-bright-sage); }
.confidence-pill strong { color: #aae07e; }
.duration-pill strong { color: #ebd38e; }

.lang-pill i { width: 14px; height: 14px; color: var(--color-bright-sage); }
.confidence-pill i { width: 14px; height: 14px; color: #aae07e; }
.duration-pill i { width: 14px; height: 14px; color: #ebd38e; }

/* Styling Card */
.styling-card {
  padding: 18px 20px;
  transition: var(--transition);
}

.styling-card.is-collapsed {
  padding-bottom: 14px;
}

.card-title-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.btn-toggle-styles {
  background: rgba(136, 183, 91, 0.12);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.btn-toggle-styles:hover {
  background: rgba(136, 183, 91, 0.25);
  border-color: var(--card-hover-border);
  color: var(--text-main);
  transform: translateY(-1px);
}

.btn-toggle-styles i,
.btn-toggle-styles svg {
  width: 18px;
  height: 18px;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.styling-card.is-collapsed .btn-toggle-styles i,
.styling-card.is-collapsed .btn-toggle-styles svg {
  transform: rotate(180deg);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.styling-card.is-collapsed .card-header {
  margin-bottom: 0;
}

.card-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-header h3 i {
  color: var(--primary);
  width: 18px;
  height: 18px;
}

.header-tag {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.style-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.22s ease, margin-top 0.22s ease;
  overflow: hidden;
  max-height: 550px;
  opacity: 1;
}

.style-grid.collapsed {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
  margin-bottom: 0;
  padding-top: 0;
  padding-bottom: 0;
  pointer-events: none;
}

.style-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.style-item.full-width {
  grid-column: span 2;
}

.style-item label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.style-item label i {
  width: 14px;
  height: 14px;
}

.range-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.range-wrap input[type="range"] {
  flex: 1;
  accent-color: var(--primary);
}

.range-wrap span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  color: var(--text-muted);
  min-width: 40px;
}

.color-picker-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.color-picker-wrap input[type="color"] {
  -webkit-appearance: none;
  border: none;
  width: 36px;
  height: 32px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: transparent;
}

.color-picker-wrap input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

.color-picker-wrap input[type="color"]::-webkit-color-swatch {
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
}

.color-picker-wrap span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.checkbox-wrap {
  margin-top: 4px;
}

.custom-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.custom-checkbox input {
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Editor Right Column */
.editor-card {
  display: flex;
  flex-direction: column;
  min-height: 440px;
  max-height: 580px;
  transition: max-height 0.3s ease;
}

.styling-card.is-collapsed + .editor-card {
  max-height: 780px;
}

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

.editor-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.editor-title-wrap h3 {
  font-size: 1.05rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.editor-title-wrap h3 i {
  color: var(--primary);
  width: 18px;
  height: 18px;
}

.segments-list {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 180px;
  max-height: 380px;
  transition: max-height 0.3s ease;
}

.styling-card.is-collapsed + .editor-card .segments-list {
  max-height: 580px;
}

.segments-list::-webkit-scrollbar {
  width: 6px;
}
.segments-list::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
}
.segments-list::-webkit-scrollbar-thumb {
  background: rgba(136, 183, 91, 0.25);
  border-radius: 3px;
}

.segment-item {
  background: rgba(11, 22, 12, 0.7);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 12px;
  transition: var(--transition);
}

.segment-item:hover, .segment-item.active {
  border-color: var(--primary-glow);
  background: rgba(109, 162, 68, 0.1);
}

.segment-item-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.segment-times {
  display: flex;
  align-items: center;
  gap: 6px;
}

.time-input {
  width: 64px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--card-border);
  border-radius: 4px;
  color: var(--color-bright-sage);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  text-align: center;
  padding: 2px 4px;
}

.time-sep {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.segment-actions {
  display: flex;
  gap: 6px;
}

.btn-icon {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.btn-icon:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.08);
}

.btn-icon.btn-delete:hover {
  color: #f43f5e;
  background: rgba(244, 63, 94, 0.1);
}

.segment-text-area {
  width: 100%;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.88rem;
  padding: 8px 10px;
  resize: vertical;
  min-height: 48px;
  outline: none;
  transition: var(--transition);
}

.segment-text-area:focus {
  border-color: var(--primary);
}

.editor-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--card-border);
  background: rgba(11, 22, 12, 0.6);
}

/* Interactive Visual Timeline Editor (Directly below video) */
.video-timeline-editor-wrap {
  margin-top: 14px;
  background: rgba(11, 22, 12, 0.85);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

.timeline-title {
  font-size: 0.88rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.timeline-title i {
  color: var(--color-bright-sage);
  width: 16px;
  height: 16px;
}

.timeline-stats-badge {
  font-size: 0.76rem;
  font-family: 'JetBrains Mono', monospace;
  background: rgba(109, 162, 68, 0.2);
  color: var(--color-bright-sage);
  padding: 3px 8px;
  border-radius: 4px;
}

/* Visual Track Bar */
.timeline-track-container {
  position: relative;
  width: 100%;
  height: 44px;
  background: #060e07;
  border: 1px solid rgba(136, 183, 91, 0.35);
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  user-select: none;
}

.timeline-track-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.track-piece-block {
  height: 100%;
  position: absolute;
  top: 0;
  border-right: 2px solid rgba(0, 0, 0, 0.7);
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  transition: all 0.15s ease;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 4px;
}

.track-piece-block.kept {
  background: linear-gradient(180deg, rgba(109, 162, 68, 0.9) 0%, rgba(68, 115, 38, 0.95) 100%);
  color: #fff;
  cursor: pointer;
}

.track-piece-block.kept:hover {
  background: linear-gradient(180deg, rgba(136, 183, 91, 1) 0%, rgba(92, 145, 52, 1) 100%);
}

.track-piece-block.kept.selected {
  background: linear-gradient(180deg, rgba(220, 38, 38, 0.9) 0%, rgba(153, 27, 27, 0.95) 100%) !important;
  outline: 2px solid #ef4444;
  outline-offset: -2px;
  box-shadow: inset 0 0 14px rgba(239, 68, 68, 0.6), 0 0 8px rgba(239, 68, 68, 0.5);
  color: #fff;
}

.track-piece-block.kept.selected span::after {
  content: " (Seleccionado)";
  font-size: 0.65rem;
  color: #fecaca;
}

.timeline-playhead {
  position: absolute;
  top: 0;
  left: 0%;
  width: 3px;
  height: 100%;
  background: #ffffff;
  box-shadow: 0 0 10px #ffffff, 0 0 16px rgba(255,255,255,0.9);
  pointer-events: auto;
  cursor: ew-resize;
  z-index: 20;
  transform: translateX(-50%);
}

.timeline-playhead::after {
  content: '';
  position: absolute;
  top: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 18px;
  height: 16px;
  background: #ffd700;
  clip-path: polygon(0% 0%, 100% 0%, 50% 100%);
  box-shadow: 0 2px 8px rgba(0,0,0,0.8);
  cursor: grab;
}

.timeline-playhead:active::after {
  cursor: grabbing;
  transform: translateX(-50%) scale(1.15);
}

/* Controls Bar */
.timeline-controls-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.timeline-left-btns, .timeline-right-btns {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Timeline pieces list */
.timeline-pieces-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.piece-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  font-size: 0.76rem;
  font-family: 'JetBrains Mono', monospace;
  cursor: pointer;
  transition: var(--transition);
}

.piece-chip.selected, .piece-chip.active {
  border-color: #ffd700;
  background: rgba(255, 215, 0, 0.12);
}

.piece-chip.deleted {
  opacity: 0.5;
  text-decoration: line-through;
  border-color: rgba(244, 63, 94, 0.4);
}

.piece-chip .btn-del-chip, .piece-chip .chip-del-btn {
  background: transparent;
  border: none;
  color: #f43f5e;
  cursor: pointer;
  padding: 0 2px;
  font-weight: 700;
}

/* Video Live United Time Overlay */
.video-live-united-time-pill {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(7, 14, 8, 0.85);
  border: 1px solid rgba(136, 183, 91, 0.45);
  color: #aae07e;
  padding: 4px 10px;
  border-radius: 20px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
  z-index: 12;
  pointer-events: none;
}

.video-live-united-time-pill i {
  width: 14px;
  height: 14px;
  color: var(--color-bright-sage);
}

/* Direct Export Box Below Timeline */
.timeline-download-action-bar {
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px dashed rgba(136, 183, 91, 0.3);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.timeline-download-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.download-ready-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.76rem;
  font-weight: 700;
  color: #aae07e;
  background: rgba(109, 162, 68, 0.2);
  padding: 3px 8px;
  border-radius: 4px;
}

.download-ready-tag i {
  width: 13px;
  height: 13px;
}

.download-united-label {
  font-size: 0.8rem;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-muted);
}

.timeline-download-btn-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* STEP 4: Download Section */
.download-card {
  padding: 40px;
  text-align: center;
}

.download-header {
  margin-bottom: 28px;
}

.success-icon-wrap {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(92, 135, 58, 0.25);
  border: 1px solid rgba(92, 135, 58, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.success-icon-wrap.bg-tiktok-glow {
  background: rgba(136, 183, 91, 0.22);
  border-color: rgba(136, 183, 91, 0.45);
}

.success-icon {
  width: 32px;
  height: 32px;
  color: #aae07e;
}

.text-tiktok {
  color: var(--color-bright-sage) !important;
}

.download-header h2 {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 6px;
}

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

.final-video-container-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 32px;
}

.final-video-container {
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  border: 1px solid var(--card-border);
  max-height: 480px;
}

.final-video-container.ratio-9-16 {
  height: 480px;
  aspect-ratio: 9 / 16;
}

.final-video-container.ratio-16-9 {
  width: 720px;
  aspect-ratio: 16 / 9;
}

.final-video-container.ratio-original {
  max-width: 720px;
  max-height: 480px;
}

.final-video-container video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ZIP Banner */
.zip-download-banner {
  background: rgba(109, 162, 68, 0.15);
  border: 1px solid rgba(136, 183, 91, 0.4);
  border-radius: var(--radius-md);
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.zip-info {
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: left;
}

.zip-icon {
  width: 36px;
  height: 36px;
  color: var(--color-bright-sage);
  flex-shrink: 0;
}

.zip-info strong {
  font-size: 1.05rem;
  color: #fff;
}

.zip-info p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Clips Gallery Grid */
.clips-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  max-width: 1000px;
  margin: 0 auto;
}

.clip-card {
  background: rgba(15, 28, 16, 0.85);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.clip-card:hover {
  border-color: rgba(136, 183, 91, 0.6);
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.65);
}

.clip-card-header {
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--card-border);
}

.clip-card-header strong {
  font-size: 0.9rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.clip-time-badge {
  font-size: 0.72rem;
  font-family: 'JetBrains Mono', monospace;
  background: rgba(109, 162, 68, 0.18);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--color-bright-sage);
}

.clip-video-preview {
  width: 100%;
  aspect-ratio: 9 / 16;
  max-height: 360px;
  background: #000;
  object-fit: contain;
}

.clip-card-body {
  padding: 12px 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}

.clip-summary-text {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
  text-align: left;
  font-style: italic;
}

.clip-actions-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* SEO Content Section */
.seo-content-section {
  margin-top: 40px;
  margin-bottom: 40px;
}

.seo-card {
  padding: 40px 36px;
  text-align: left;
}

.seo-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 24px;
  text-align: center;
}

.seo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 36px;
}

.seo-feature-item {
  background: rgba(10, 20, 11, 0.5);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 20px;
}

.seo-feature-item h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-bright-sage);
  margin-bottom: 8px;
}

.seo-feature-item p {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.faq-container {
  border-top: 1px solid var(--card-border);
  padding-top: 30px;
}

.faq-main-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 20px;
  text-align: center;
}

.faq-item {
  background: rgba(10, 20, 11, 0.4);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin-bottom: 12px;
}

.faq-item h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-bright-sage);
  margin-bottom: 6px;
}

.faq-item p {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.mt-30 {
  margin-top: 30px;
}

.action-buttons-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

/* Footer Links */
.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 0.85rem;
}

.footer-links a {
  color: var(--color-bright-sage);
  text-decoration: none;
  transition: var(--transition);
}

.footer-links a:hover {
  text-decoration: underline;
  color: #fff;
}

/* Cookie Consent Banner */
.cookie-banner {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  max-width: 900px;
  margin: 0 auto;
  background: rgba(10, 20, 11, 0.95);
  border: 1px solid var(--card-border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
  border-radius: var(--radius-md);
  padding: 16px 24px;
  z-index: 9999;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.cookie-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.cookie-content p {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin: 0;
  flex: 1;
}

.cookie-content a {
  color: var(--color-bright-sage);
  text-decoration: underline;
}

/* Responsive Ad Container */
.ad-container-wrap {
  width: 100%;
  max-width: 970px;
  margin: 20px auto;
  text-align: center;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Footer */
.app-footer {
  margin-top: auto;
  padding-top: 36px;
  padding-bottom: 20px;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.8rem;
}

/* ===================================================
   MODERN FLOATING EXPORT & PROGRESS MODAL
   =================================================== */
.export-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(7, 14, 8, 0.84);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  padding: 20px;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.export-modal-backdrop.hidden {
  display: none !important;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.export-modal-card {
  background: rgba(15, 28, 16, 0.96);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.75), 0 0 35px rgba(109, 162, 68, 0.2);
  width: 100%;
  max-width: 480px;
  padding: 34px 28px;
  text-align: center;
  position: relative;
  animation: modalPop 0.28s cubic-bezier(0.2, 0.9, 0.3, 1) forwards;
}

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

.export-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--card-border);
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  cursor: pointer;
  transition: var(--transition);
}

.export-modal-close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--text-main);
  transform: rotate(90deg);
}

.export-spinner-wrap {
  position: relative;
  width: 76px;
  height: 76px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.export-ring {
  position: absolute;
  inset: 0;
  border: 3px solid rgba(136, 183, 91, 0.18);
  border-top-color: var(--primary);
  border-right-color: var(--color-bright-sage);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.export-spinner-icon {
  width: 30px;
  height: 30px;
  color: var(--color-bright-sage);
}

.export-modal-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-main);
}

.export-modal-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 22px;
}

.export-progress-bar-wrap {
  width: 100%;
  height: 10px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--card-border);
  margin-bottom: 10px;
}

.export-progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--color-primary-green), var(--color-bright-sage));
  border-radius: 6px;
  transition: width 0.15s ease;
}

.export-progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.export-progress-percent {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  color: var(--color-bright-sage);
  font-size: 0.95rem;
}

.export-success-icon-wrap {
  width: 68px;
  height: 68px;
  background: rgba(109, 162, 68, 0.18);
  border: 2px solid var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  color: var(--color-bright-sage);
  box-shadow: 0 0 24px rgba(109, 162, 68, 0.35);
}

.export-success-icon {
  width: 34px;
  height: 34px;
}

.export-success-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

/* Responsive */
@media (max-width: 960px) {
  .app-header {
    flex-direction: column;
    align-items: stretch;
  }
  .header-right-actions {
    justify-content: space-between;
  }
  .studio-layout {
    grid-template-columns: 1fr;
  }
  .upload-options {
    grid-template-columns: 1fr;
  }
  .format-buttons-grid {
    grid-template-columns: 1fr;
  }
  .duration-pills-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .seo-grid {
    grid-template-columns: 1fr;
  }
  .zip-download-banner {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
  .zip-info {
    flex-direction: column;
    text-align: center;
  }
  .action-buttons-group {
    flex-direction: column;
    align-items: stretch;
  }
}
