/* ==========================================================================
   MAKHU AI STUDIO — MODERN PRODUCTION DESIGN SYSTEM
   Dark Aesthetic / Glassmorphism / Vibrant Accents / Ultra-Responsive
   ========================================================================== */

:root {
  /* Core Palette */
  --bg-color: #09090b;          /* Deep Obsidian */
  --panel-bg: #121216;          /* Dark Slate */
  --panel-bg-subtle: #18181f;   /* Card Surface */
  --panel-border: rgba(255, 255, 255, 0.08);
  --panel-border-hover: rgba(255, 77, 0, 0.35);
  
  /* Typography Colors */
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  /* Brand Accents */
  --accent: #ff4d00;            /* Vibrant Electric Orange */
  --accent-hover: #ff6622;
  --accent-gradient: linear-gradient(135deg, #ff4d00 0%, #ff7733 100%);
  --accent-light: rgba(255, 77, 0, 0.12);
  --accent-glow: 0 0 24px rgba(255, 77, 0, 0.25);
  
  /* Status Colors */
  --success: #10b981;
  --success-light: rgba(16, 185, 129, 0.15);
  --warning: #f59e0b;
  --warning-light: rgba(245, 158, 11, 0.15);
  --danger: #ef4444;
  --info: #3b82f6;

  /* Typography */
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Radii & Shadows */
  --radius-xl: 18px;
  --radius-lg: 12px;
  --radius-md: 8px;
  --radius-sm: 6px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.6);
  --shadow-panel: 0 4px 20px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

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

body {
  background-color: var(--bg-color);
  background-image: 
    radial-gradient(circle at 15% 10%, rgba(255, 77, 0, 0.04) 0%, transparent 40%),
    radial-gradient(circle at 85% 90%, rgba(59, 130, 246, 0.03) 0%, transparent 40%);
  color: var(--text-main);
  font-family: var(--font-main);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* App Container */
.app-container {
  max-width: 1480px;
  margin: 0 auto;
  padding: 20px 24px 40px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ==========================================================================
   HEADER
   ========================================================================== */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-panel);
}

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

.brand-logo-badge {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: var(--accent-glow);
}

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

.brand-title {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 24px;
  letter-spacing: -0.5px;
  color: #fff;
  line-height: 1;
}

.brand-accent {
  color: var(--accent);
}

.brand-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--accent-light);
  color: var(--accent);
  border: 1px solid rgba(255, 77, 0, 0.3);
}

.header-center-info {
  display: flex;
  align-items: center;
}

.live-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--panel-border);
  border-radius: 20px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.7);
  animation: pulse-glow 2s infinite ease-in-out;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

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

.backend-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--panel-border);
  padding: 6px 12px;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.backend-switcher:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.backend-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--text-dim);
}

.backend-select {
  background: transparent;
  border: none;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  outline: none;
}

.backend-select option {
  background: #18181f;
  color: #fff;
}

/* ==========================================================================
   WORKSPACE GRID & PANELS
   ========================================================================== */
.workspace-grid {
  display: grid;
  grid-template-columns: 480px 1fr;
  gap: 20px;
  align-items: start;
}

.panel {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-xl);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: var(--shadow-panel);
}

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

.panel-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel-step-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  color: var(--accent);
  background: var(--accent-light);
  padding: 2px 7px;
  border-radius: 4px;
}

.panel-header h2 {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--text-main);
  text-transform: uppercase;
}

/* ==========================================================================
   MODE TOGGLE (SEGMENTED CONTROL)
   ========================================================================== */
.mode-toggle {
  display: flex;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--panel-border);
  padding: 3px;
  border-radius: var(--radius-md);
  gap: 3px;
}

.mode-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 11px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

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

.mode-btn.active {
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: 0 2px 8px rgba(255, 77, 0, 0.35);
}

/* ==========================================================================
   DROPZONE
   ========================================================================== */
.dropzone {
  border: 2px dashed rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  padding: 30px 16px;
  text-align: center;
  background: rgba(255, 255, 255, 0.015);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.dropzone:hover, .dropzone.dragover {
  border-color: var(--accent);
  background: var(--accent-light);
  transform: translateY(-1px);
}

.dropzone-icon-box {
  width: 52px;
  height: 52px;
  margin: 0 auto 12px;
  border-radius: 12px;
  background: var(--accent-light);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.drop-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.3px;
  margin-bottom: 4px;
}

.drop-subtitle {
  font-size: 11px;
  color: var(--text-dim);
  margin-bottom: 14px;
}

.file-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--panel-bg-subtle);
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--panel-border);
}

.file-info-main {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}

.file-icon {
  font-size: 20px;
}

.file-meta {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.file-name {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 12px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
}

.file-size {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
}

.btn-icon-danger {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--danger);
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
  transition: all 0.2s ease;
}

.btn-icon-danger:hover {
  background: var(--danger);
  color: #fff;
}

/* ==========================================================================
   ZEROSEVEN SNIPER TAB
   ========================================================================== */
.zeroseven-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: rgba(255, 77, 0, 0.02);
  border: 1px solid rgba(255, 77, 0, 0.2);
  border-radius: var(--radius-lg);
  padding: 16px;
}

.yt-url-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.yt-input-group {
  display: flex;
  gap: 8px;
}

.cloud-ip-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  font-size: 10.5px;
  color: #93c5fd;
  line-height: 1.4;
}

.cloud-ip-note strong {
  color: #fff;
}

.yt-input {
  flex: 1;
  background: #09090b;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 12px;
  outline: none;
  transition: border-color 0.2s ease;
}

.yt-input:focus {
  border-color: var(--accent);
}

.channel-feed-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.channel-info-badge {
  display: flex;
  align-items: center;
  gap: 8px;
}

.channel-avatar {
  font-size: 18px;
}

.channel-titles {
  display: flex;
  flex-direction: column;
}

.channel-name {
  font-weight: 800;
  font-size: 13px;
  color: #ff9944;
}

.channel-desc {
  font-size: 10px;
  color: var(--text-dim);
}

.btn-refresh {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--panel-border);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

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

.channel-feed-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  max-height: 330px;
  overflow-y: auto;
  padding: 2px 6px 2px 2px;
}

.channel-feed-grid::-webkit-scrollbar {
  width: 4px;
}

.channel-feed-grid::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
}

.short-card {
  background: var(--panel-bg-subtle);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.short-card:hover {
  border-color: rgba(255, 77, 0, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.short-thumb-box {
  position: relative;
  width: 100%;
  aspect-ratio: 16/10;
  background: #000;
  overflow: hidden;
}

.short-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.short-dur-badge {
  position: absolute;
  bottom: 4px;
  right: 4px;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 3px;
}

.short-info {
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.short-title {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-main);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.btn-dub-card {
  margin-top: auto;
  background: var(--accent-gradient);
  color: #fff;
  border: none;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 800;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  width: 100%;
  transition: all 0.2s ease;
}

.btn-dub-card:hover {
  box-shadow: 0 2px 10px rgba(255, 77, 0, 0.4);
  transform: translateY(-1px);
}

/* ==========================================================================
   VOICE SELECTOR & FILTERS
   ========================================================================== */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.form-label {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.label-hint {
  font-size: 10px;
  color: var(--text-dim);
  font-weight: 400;
}

.voice-filters {
  display: flex;
  gap: 4px;
}

.voice-filter-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--panel-border);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.voice-filter-btn:hover {
  color: var(--text-main);
}

.voice-filter-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.voice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  max-height: 290px;
  overflow-y: auto;
  padding: 2px 6px 2px 2px;
}

.voice-grid::-webkit-scrollbar {
  width: 4px;
}

.voice-grid::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
}

.voice-card {
  background: var(--panel-bg-subtle);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  padding: 12px 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.voice-card:hover {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.04);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.voice-card.active {
  border-color: var(--accent);
  background: var(--accent-light);
  box-shadow: 0 0 0 1px var(--accent), 0 4px 12px rgba(255, 77, 0, 0.15);
}

.voice-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 4px;
}

.voice-title-group {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
}

.voice-name {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 13px;
  color: #fff;
}

.voice-badge {
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 4px;
  text-transform: uppercase;
}

.voice-filter-btn.primary-vm {
  background: linear-gradient(135deg, rgba(255, 170, 0, 0.15), rgba(255, 77, 0, 0.25));
  border-color: rgba(255, 170, 0, 0.4);
  color: #ffb84d;
  font-weight: 700;
}
.voice-filter-btn.primary-vm:hover,
.voice-filter-btn.primary-vm.active {
  background: linear-gradient(135deg, #ffaa00, #ff4d00);
  border-color: #ffaa00;
  color: #000;
  box-shadow: 0 0 10px rgba(255, 170, 0, 0.4);
}

.voice-badge.star { background: rgba(255, 77, 0, 0.2); color: var(--accent); }
.voice-badge.voicemaker { background: linear-gradient(135deg, rgba(255, 170, 0, 0.25), rgba(255, 77, 0, 0.25)); color: #ffb84d; border: 1px solid rgba(255, 170, 0, 0.4); font-weight: 800; }
.voice-badge.gemini { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
.voice-badge.kokoro { background: rgba(236, 72, 153, 0.2); color: #f472b6; border: 1px solid rgba(236, 72, 153, 0.3); }
.voice-badge.openai { background: rgba(16, 185, 129, 0.2); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.voice-badge.local { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.voice-badge.clone { background: rgba(168, 85, 247, 0.2); color: #c084fc; }

.btn-play-preview {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.btn-play-preview:hover {
  background: var(--accent);
  color: #fff;
}

.btn-play-preview.playing {
  background: var(--accent);
  color: #fff;
  animation: pulse-glow 1s infinite;
}

.voice-desc {
  font-size: 10px;
  color: var(--text-dim);
  line-height: 1.25;
}

/* ==========================================================================
   LANGUAGE SELECTOR
   ========================================================================== */
.lang-selector {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.lang-btn {
  background: var(--panel-bg-subtle);
  border: 1px solid var(--panel-border);
  color: var(--text-main);
  padding: 8px 6px;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: all 0.2s ease;
}

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

.lang-btn.active {
  background: var(--accent-light);
  border-color: var(--accent);
  color: #fff;
}

/* ==========================================================================
   SETTINGS & SUPERPOWER CARDS
   ========================================================================== */
.settings-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.superpower-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, rgba(255, 77, 0, 0.05) 100%);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
}

.superpower-icon {
  font-size: 24px;
}

.superpower-info {
  flex: 1;
}

.superpower-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 11px;
  color: #fbbf24;
  display: flex;
  align-items: center;
  gap: 6px;
}

.superpower-tag {
  font-family: var(--font-mono);
  font-size: 8px;
  background: #f59e0b;
  color: #000;
  padding: 1px 4px;
  border-radius: 3px;
  font-weight: 800;
}

.superpower-desc {
  font-size: 10px;
  color: var(--text-muted);
  line-height: 1.3;
}

.toggle-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--panel-bg-subtle);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  padding: 10px 14px;
}

.toggle-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 11px;
  color: var(--text-main);
  display: block;
}

.toggle-desc {
  font-size: 10px;
  color: var(--text-dim);
}

/* Switch Toggle */
.switch {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 20px;
  flex-shrink: 0;
}

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

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #33333d;
  transition: .2s;
  border-radius: 20px;
}

.slider::before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .2s;
  border-radius: 50%;
}

.switch input:checked + .slider {
  background-color: var(--accent);
}

.switch input:checked + .slider::before {
  transform: translateX(18px);
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.3px;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}

.btn-lg {
  padding: 16px 24px;
  font-size: 14px;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 11px;
}

.btn-block {
  width: 100%;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: 0 4px 16px rgba(255, 77, 0, 0.3);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(255, 77, 0, 0.45);
}

.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  filter: grayscale(0.8);
  box-shadow: none;
}

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

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

.btn-accent {
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: 0 4px 16px rgba(255, 77, 0, 0.3);
}

.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(255, 77, 0, 0.45);
}

/* ==========================================================================
   STATUS CARD & LOG CONSOLE
   ========================================================================== */
.status-card {
  background: var(--panel-bg-subtle);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

.status-badge-live {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-step-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 12px;
  color: var(--accent);
}

.progress-bar-container {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent-gradient);
  transition: width 0.3s ease;
}

.log-console {
  background: #09090b;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  padding: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  max-height: 120px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.log-entry {
  line-height: 1.4;
}

.log-entry.highlight {
  color: #fff;
}

/* Spinner */
.spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

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

/* ==========================================================================
   RIGHT PANEL: PLAYERS & PREVIEWS
   ========================================================================== */
.view-toggle {
  display: flex;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--panel-border);
  padding: 3px;
  border-radius: var(--radius-md);
  gap: 3px;
}

.toggle-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 11px;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.toggle-tab:hover {
  color: #fff;
}

.toggle-tab.active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.player-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.video-box {
  background: #09090b;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.video-label-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--panel-border);
}

.player-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 3px;
}

.player-tag.before {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
}

.player-tag.after {
  background: var(--accent-light);
  color: var(--accent);
}

.player-title {
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
}

.video-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  max-height: 520px;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.video-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
  gap: 10px;
}

.placeholder-icon-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 77, 0, 0.08);
  border: 1px dashed rgba(255, 77, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.placeholder-title {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

.placeholder-subtitle {
  font-size: 11px;
  color: var(--text-dim);
  max-width: 220px;
}

/* Transcript Container */
.transcript-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.transcript-column {
  background: #09090b;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.transcript-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--panel-border);
  background: rgba(255, 255, 255, 0.02);
}

.transcript-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
}

.transcript-tag.accent {
  background: var(--accent-light);
  color: var(--accent);
}

.transcript-header h3 {
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
}

.transcript-box {
  padding: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-muted);
  max-height: 480px;
  overflow-y: auto;
}

/* Export Bar */
.export-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  border-top: 1px solid var(--panel-border);
  flex-wrap: wrap;
  gap: 12px;
}

.result-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.meta-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--panel-border);
  padding: 4px 8px;
  border-radius: 4px;
  color: var(--text-muted);
}

.meta-tag.highlight {
  background: var(--accent-light);
  border-color: rgba(255, 77, 0, 0.3);
  color: var(--accent);
}

/* ==========================================================================
   BATCH MODE STYLES
   ========================================================================== */
.batch-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.batch-dropzone {
  border: 2px dashed rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  background: rgba(255, 255, 255, 0.015);
  cursor: pointer;
}

.batch-drop-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

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

.queue-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 12px;
  color: var(--text-muted);
}

.btn-text-danger {
  background: transparent;
  border: none;
  color: var(--danger);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.batch-queue-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 240px;
  overflow-y: auto;
}

.batch-item {
  background: var(--panel-bg-subtle);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

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

.batch-item-name {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

.batch-item-badge {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
}

.batch-item-badge.pending { background: rgba(245, 158, 11, 0.2); color: var(--warning); }
.batch-item-badge.processing { background: var(--accent-light); color: var(--accent); }
.batch-item-badge.done { background: var(--success-light); color: var(--success); }
.batch-item-badge.err { background: rgba(239, 68, 68, 0.2); color: var(--danger); }

.batch-item-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.batch-select {
  background: #09090b;
  border: 1px solid var(--panel-border);
  color: #fff;
  border-radius: 4px;
  padding: 4px 6px;
  font-size: 10px;
}

.batch-empty-msg {
  text-align: center;
  font-size: 11px;
  color: var(--text-dim);
  padding: 20px 0;
}

/* ==========================================================================
   RESPONSIVE LAYOUT
   ========================================================================== */
@media (max-width: 1080px) {
  .workspace-grid {
    grid-template-columns: 1fr;
  }
  .app-container {
    padding: 16px;
  }
}

@media (max-width: 640px) {
  .app-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .header-controls {
    width: 100%;
  }
  .backend-switcher {
    width: 100%;
    justify-content: space-between;
  }
  .player-container {
    grid-template-columns: 1fr;
  }
  .transcript-container {
    grid-template-columns: 1fr;
  }
  .voice-grid {
    grid-template-columns: 1fr;
  }
  .lang-selector {
    grid-template-columns: 1fr 1fr;
  }
}

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