:root {
  --bg-dark: #08090d;
  --bg-card: #10121a;
  --bg-card-hover: #151824;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-active: rgba(255, 230, 0, 0.4);
  
  --accent-yellow: #FFE600;
  --accent-green: #00FF88;
  --accent-cyan: #00E5FF;
  --accent-indigo: #6366F1;
  --accent-purple: #A855F7;
  
  --text-main: #F3F4F6;
  --text-muted: #9CA3AF;
  --text-dim: #6B7280;
  
  --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Space Grotesk', sans-serif;
  --font-captions: 'Montserrat', sans-serif;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --shadow-glow-yellow: 0 0 25px rgba(255, 230, 0, 0.25);
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

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

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 15% 10%, rgba(99, 102, 241, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 20%, rgba(255, 230, 0, 0.05) 0%, transparent 45%),
    radial-gradient(circle at 50% 80%, rgba(0, 255, 136, 0.04) 0%, transparent 50%);
}

/* Header */
.app-header {
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(16, 18, 26, 0.7);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.brand-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(255, 230, 0, 0.15), rgba(0, 255, 136, 0.1));
  border: 1px solid rgba(255, 230, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px rgba(255, 230, 0, 0.15);
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.version-tag {
  font-size: 0.72rem;
  background: rgba(255, 230, 0, 0.15);
  color: var(--accent-yellow);
  padding: 2px 7px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 230, 0, 0.3);
}

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

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

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.03);
}

.badge-locked {
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.35);
  color: #c7d2fe;
}

.badge-ai {
  background: rgba(0, 255, 136, 0.1);
  border-color: rgba(0, 255, 136, 0.3);
  color: var(--accent-green);
}

.badge-layout {
  background: rgba(255, 230, 0, 0.1);
  border-color: rgba(255, 230, 0, 0.3);
  color: var(--accent-yellow);
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.pulse-green {
  background: var(--accent-green);
  box-shadow: 0 0 8px var(--accent-green);
  animation: pulse 2s infinite;
}

.pulse-blue {
  background: #818cf8;
  box-shadow: 0 0 8px #818cf8;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

/* Main Layout */
.main-content {
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 32px 24px 60px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* Section Cards */
.section-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 30px;
}

.main-title {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
  line-height: 1.25;
}

.highlight-text {
  background: linear-gradient(135deg, var(--accent-yellow), var(--accent-green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-desc {
  font-size: 1.02rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.sub-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Upload Container */
.upload-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 28px;
}

.dropzone {
  border: 2px dashed rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 36px 20px;
  background: rgba(255, 255, 255, 0.015);
  text-align: center;
  transition: all 0.25s ease;
  cursor: pointer;
  position: relative;
}

.dropzone:hover, .dropzone.dragover {
  border-color: var(--accent-yellow);
  background: rgba(255, 230, 0, 0.025);
  box-shadow: inset 0 0 20px rgba(255, 230, 0, 0.04);
}

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

.upload-icon-wrapper {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  color: var(--accent-yellow);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  transition: transform 0.2s ease;
}

.dropzone:hover .upload-icon-wrapper {
  transform: translateY(-4px) scale(1.05);
}

.dropzone-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}

.dropzone-text strong {
  font-size: 1.1rem;
  color: #fff;
}

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

/* Selected Video Strip */
.dropzone-selected {
  padding: 12px 18px;
}

.video-info-strip {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 230, 0, 0.3);
  padding: 14px 20px;
  border-radius: var(--radius-md);
  text-align: left;
}

.video-icon {
  font-size: 1.8rem;
}

.video-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.video-filename {
  font-weight: 600;
  font-size: 0.98rem;
  color: #fff;
}

.video-filesize {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Quick Samples */
.quick-samples-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

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

.sample-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 6px 14px;
  color: #fff;
  font-size: 0.82rem;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sample-chip:hover {
  background: rgba(255, 230, 0, 0.1);
  border-color: rgba(255, 230, 0, 0.4);
  color: var(--accent-yellow);
  transform: translateY(-1px);
}

.sample-play-icon {
  color: var(--accent-yellow);
  font-size: 0.75rem;
}

/* Config Grid */
.config-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  padding: 24px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  margin-bottom: 28px;
}

.config-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

.pill-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pill {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 7px 14px;
  border-radius: var(--radius-full);
  font-size: 0.83rem;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pill:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.pill.active {
  background: rgba(255, 230, 0, 0.15);
  border-color: var(--accent-yellow);
  color: var(--accent-yellow);
  box-shadow: 0 0 12px rgba(255, 230, 0, 0.15);
}

.pill-yellow.active {
  border-color: var(--accent-yellow);
  color: var(--accent-yellow);
}

.pill-green.active {
  background: rgba(0, 255, 136, 0.15);
  border-color: var(--accent-green);
  color: var(--accent-green);
  box-shadow: 0 0 12px rgba(0, 255, 136, 0.15);
}

.color-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.yellow-dot { background: var(--accent-yellow); }
.green-dot { background: var(--accent-green); }

.locked-info-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: var(--radius-md);
  padding: 8px 14px;
}

.lock-icon {
  font-size: 1.1rem;
}

.locked-info-text {
  display: flex;
  flex-direction: column;
}

.locked-info-text strong {
  font-size: 0.85rem;
  color: #c7d2fe;
}

.locked-info-text span {
  font-size: 0.72rem;
  color: var(--text-dim);
}

/* Action Bar */
.action-bar {
  display: flex;
  justify-content: center;
}

/* Buttons */
.btn {
  font-family: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 12px 28px;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-yellow) 0%, #ffc800 100%);
  color: #000;
  box-shadow: 0 4px 20px rgba(255, 230, 0, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 26px rgba(255, 230, 0, 0.45);
}

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

.btn-run {
  font-size: 1.1rem;
  padding: 16px 48px;
  letter-spacing: -0.01em;
}

.btn-sparkle {
  font-size: 1.2rem;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border: 1px solid var(--border-subtle);
}

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

.btn-sm {
  font-size: 0.85rem;
  padding: 8px 18px;
}

.btn-icon {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.btn-icon:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

/* Progress Stage Card */
.progress-card {
  border-color: rgba(255, 230, 0, 0.3);
  background: linear-gradient(180deg, rgba(255, 230, 0, 0.03) 0%, var(--bg-card) 100%);
}

.progress-header {
  margin-bottom: 24px;
}

.progress-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.progress-percent {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent-yellow);
}

.progress-status-msg {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.pipeline-stages-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  overflow-x: auto;
  padding: 12px 0;
}

.stage-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 100px;
  gap: 8px;
  opacity: 0.45;
  transition: all 0.3s ease;
}

.stage-item.active {
  opacity: 1;
}

.stage-item.running {
  opacity: 1;
  animation: pulse 1.5s infinite;
}

.stage-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  transition: all 0.3s ease;
}

.stage-item.active .stage-icon {
  background: rgba(0, 255, 136, 0.15);
  border-color: var(--accent-green);
  color: var(--accent-green);
}

.stage-item.running .stage-icon {
  background: rgba(255, 230, 0, 0.2);
  border-color: var(--accent-yellow);
  box-shadow: 0 0 15px rgba(255, 230, 0, 0.3);
}

.stage-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
}

.stage-status {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.stage-item.active .stage-status {
  color: var(--accent-green);
}

.stage-item.running .stage-status {
  color: var(--accent-yellow);
}

.stage-connector {
  flex: 1;
  height: 2px;
  background: rgba(255, 255, 255, 0.1);
  margin: 0 10px;
  position: relative;
  top: -18px;
}

.stage-connector.active {
  background: var(--accent-green);
  box-shadow: 0 0 6px var(--accent-green);
}

/* Studio Section */
.studio-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 18px;
}

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

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

.btn-card-download {
  background: linear-gradient(135deg, var(--accent-yellow) 0%, #ffc800 100%);
  color: #000;
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(255, 230, 0, 0.25);
  font-size: 0.85rem;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.btn-card-download:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(255, 230, 0, 0.4);
}

.btn-card-download.rendering {
  background: rgba(255, 255, 255, 0.12);
  color: var(--accent-yellow);
  cursor: wait;
  pointer-events: none;
}

.studio-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 32px;
}

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

/* Clips Column */
.clips-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.column-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  font-family: var(--font-display);
}

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

.clips-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Clip Card */
.clip-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
}

.clip-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.clip-card.active {
  background: rgba(255, 230, 0, 0.04);
  border-color: var(--accent-yellow);
  box-shadow: 0 0 20px rgba(255, 230, 0, 0.12);
}

.clip-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.clip-virality-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
}

.score-super {
  background: linear-gradient(135deg, rgba(255, 230, 0, 0.2), rgba(255, 100, 0, 0.2));
  border: 1px solid rgba(255, 230, 0, 0.5);
  color: var(--accent-yellow);
}

.score-high {
  background: rgba(0, 255, 136, 0.15);
  border: 1px solid rgba(0, 255, 136, 0.4);
  color: var(--accent-green);
}

.clip-title-area {
  flex: 1;
}

.clip-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
  line-height: 1.3;
}

.clip-meta-line {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.clip-transcript-snippet {
  font-size: 0.88rem;
  color: #d1d5db;
  line-height: 1.5;
  background: rgba(0, 0, 0, 0.25);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent-yellow);
}

.clip-llm-insight {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: rgba(168, 85, 247, 0.08);
  border: 1px solid rgba(168, 85, 247, 0.25);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 0.8rem;
  color: #e9d5ff;
  line-height: 1.4;
}

.llm-insight-icon {
  font-size: 1rem;
}

.llm-insight-text strong {
  color: #c084fc;
}

/* Metrics Mini-Grid */
.metrics-mini-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  font-size: 0.75rem;
}

.metric-box {
  background: rgba(255, 255, 255, 0.03);
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  text-align: center;
}

.metric-label {
  color: var(--text-dim);
  display: block;
  margin-bottom: 2px;
}

.metric-val {
  font-weight: 700;
  color: #fff;
}

/* Card Actions */
.clip-card-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

/* Preview Column (9:16 Creator Player) */
.preview-column {
  display: flex;
  flex-direction: column;
}

.preview-card {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
}

.preview-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.preview-tag {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent-yellow);
  background: rgba(255, 230, 0, 0.1);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
}

.active-clip-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
  margin-left: 8px;
}

.preview-timing {
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* 9:16 Vertical Phone Viewport */
.phone-frame-wrapper {
  width: 100%;
  max-width: 340px;
  position: relative;
}

.phone-viewport {
  width: 100%;
  aspect-ratio: 9 / 16;
  background: #000;
  border-radius: 28px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 15px 40px -10px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Blurred Background Video */
.bg-blur-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(28px) brightness(0.65) saturate(1.2);
  transform: scale(1.25);
  pointer-events: none;
  z-index: 1;
}

.bg-blur-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, transparent 35%, rgba(0,0,0,0.65) 100%);
  pointer-events: none;
  z-index: 2;
}

/* Centered Foreground Video */
.foreground-video-container {
  position: relative;
  width: 100%;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fg-video {
  width: 100%;
  max-height: 100%;
  display: block;
}

/* Animated MrBeast Captions Overlay */
.mrbeast-captions-overlay {
  position: absolute;
  bottom: 22%;
  left: 0;
  width: 100%;
  padding: 0 16px;
  z-index: 10;
  text-align: center;
  pointer-events: none;
}

.caption-card-inner {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 10px;
}

/* Individual MrBeast Words */
.mrbeast-word {
  font-family: var(--font-captions);
  font-weight: 900;
  font-size: 1.55rem;
  text-transform: uppercase;
  color: #FFFFFF;
  -webkit-text-stroke: 2.5px #000000;
  paint-order: stroke fill;
  text-shadow: 
    0 3px 6px rgba(0, 0, 0, 0.9),
    0 0 12px rgba(0, 0, 0, 0.7);
  letter-spacing: 0.02em;
  transition: transform 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275), color 0.1s ease;
  display: inline-block;
}

/* Active Highlight Word */
.mrbeast-word.active-word {
  color: var(--accent-yellow);
  transform: scale(1.22);
  -webkit-text-stroke: 3px #000000;
  text-shadow: 
    0 4px 10px rgba(0, 0, 0, 0.95),
    0 0 18px rgba(255, 230, 0, 0.6);
  z-index: 5;
}

.mrbeast-word.active-word-green {
  color: var(--accent-green);
  transform: scale(1.22);
  -webkit-text-stroke: 3px #000000;
  text-shadow: 
    0 4px 10px rgba(0, 0, 0, 0.95),
    0 0 18px rgba(0, 255, 136, 0.6);
  z-index: 5;
}

.caption-placeholder {
  font-family: var(--font-captions);
  font-weight: 900;
  font-size: 1.1rem;
  color: var(--accent-yellow);
  -webkit-text-stroke: 2px #000;
  opacity: 0.4;
}

/* Player Overlay Controls */
.player-controls-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 12px 14px;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.8) 100%);
  z-index: 15;
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-play-toggle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  transition: all 0.2s ease;
}

.btn-play-toggle:hover {
  background: var(--accent-yellow);
  color: #000;
  border-color: var(--accent-yellow);
}

.seek-bar-container {
  flex: 1;
  display: flex;
  align-items: center;
}

#seek-slider {
  width: 100%;
  accent-color: var(--accent-yellow);
  cursor: pointer;
}

/* Export Box */
.export-box {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.export-actions-row {
  width: 100%;
}

.btn-export {
  width: 100%;
  padding: 14px;
  font-size: 1rem;
}

.render-status-container {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
}

.spinner-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.mini-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--accent-yellow);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.render-ready-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.ready-badge {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent-green);
}

.btn-download-mp4 {
  background: linear-gradient(135deg, var(--accent-green), #059669);
  color: #000;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(0, 255, 136, 0.3);
  transition: all 0.2s ease;
}

.btn-download-mp4:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 255, 136, 0.45);
}

.subtitles-download-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 0.8rem;
  padding-top: 6px;
}

.subs-label {
  color: var(--text-dim);
}

.subs-chip {
  color: var(--text-muted);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  transition: all 0.2s ease;
}

.subs-chip:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
}

/* Helpers */
.hidden {
  display: none !important;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: #1a1d2e;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 0.9rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  animation: slideIn 0.3s ease;
}

.toast.toast-error {
  border-color: #ef4444;
  background: #2a1215;
  color: #fca5a5;
}

.toast.toast-success {
  border-color: var(--accent-green);
  background: #0d281e;
  color: #a7f3d0;
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Server badge & Cloudflare modal */
.badge-server {
  cursor: pointer;
  background: rgba(0, 255, 136, 0.08);
  border-color: rgba(0, 255, 136, 0.25);
  color: var(--accent-green);
  transition: all 0.2s ease;
  font-family: inherit;
}

.badge-server:hover {
  background: rgba(0, 255, 136, 0.16);
  border-color: rgba(0, 255, 136, 0.5);
  transform: translateY(-1px);
}

.badge-server.disconnected {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  color: #f87171;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

.modal-backdrop.hidden {
  display: none !important;
}

.modal-card {
  background: #111422;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  padding: 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8), 0 0 30px rgba(0, 255, 136, 0.1);
  animation: scaleUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 18px;
}

.modal-title-row {
  display: flex;
  gap: 12px;
  align-items: center;
}

.modal-icon {
  font-size: 1.8rem;
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
}

.modal-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.modal-info-box {
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: var(--radius-sm);
  padding: 12px;
  display: flex;
  gap: 10px;
  font-size: 0.82rem;
  color: #c7d2fe;
  line-height: 1.45;
}

.option-pill:hover {
  background: rgba(255, 255, 255, 0.12) !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleUp {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

