/* AI Video Generator Stylesheet */

:root {
  --bg-color: #05070e;
  --bg-grid: rgba(255, 255, 255, 0.015);
  
  --panel-bg: rgba(13, 17, 34, 0.55);
  --panel-border: rgba(255, 255, 255, 0.05);
  --panel-hover-border: rgba(139, 92, 246, 0.25);
  
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dark: #475569;
  
  --purple: #8b5cf6;
  --purple-glow: rgba(139, 92, 246, 0.2);
  --blue: #3b82f6;
  --blue-glow: rgba(59, 130, 246, 0.2);
  --green: #10b981;
  --green-glow: rgba(16, 185, 129, 0.25);
  --red: #ef4444;
  --gold: #fbbf24;
  
  --font-main: 'Noto Sans KR', 'Inter', sans-serif;
  --font-display: 'Outfit', sans-serif;
  --font-code: 'Fira Code', 'Courier New', monospace;
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-card: 0 12px 40px 0 rgba(0, 0, 0, 0.5);
}

/* Base resets */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-color);
  color: var(--text-main);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  line-height: 1.6;
}

body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(var(--bg-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--bg-grid) 1px, transparent 1px);
  background-size: 40px 40px;
  z-index: -2;
  pointer-events: none;
}

/* Background glows */
.bg-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(150px);
  z-index: -3;
  pointer-events: none;
  opacity: 0.12;
}

.bg-glow-purple {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, #7c3aed 0%, transparent 70%);
  top: -100px;
  left: 5%;
}

.bg-glow-blue {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, #2563eb 0%, transparent 70%);
  top: 50%;
  right: 5%;
}

/* Glassmorphism Panel */
.glass-panel {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 20px;
  box-shadow: var(--shadow-card);
  transition: var(--transition-smooth);
}

/* Main Header */
.main-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
  margin: 1rem 1.5rem 0 1.5rem;
  border-radius: 50px;
  border: 1px solid var(--panel-border);
  background: rgba(15, 15, 26, 0.85);
  backdrop-filter: blur(20px);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.back-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition-smooth);
}

.back-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  border-color: var(--text-muted);
}

.app-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-icon.text-purple {
  color: var(--purple);
}

.logo-text {
  font-family: var(--font-main);
  font-weight: 800;
  font-size: 1.15rem;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.engine-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 400;
}

.btn-back-dashboard {
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.2);
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.82rem;
  padding: 0.5rem 1rem;
  border-radius: 30px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: var(--transition-smooth);
}

.btn-back-dashboard:hover {
  background: var(--purple);
  box-shadow: 0 4px 12px var(--purple-glow);
}

/* Workspace Container Layout */
.workspace-container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}

.workspace-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 2rem;
  align-items: start;
}

.left-col, .right-col {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Glass Card */
.glass-card {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  padding: 1.75rem;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  transition: var(--transition-smooth);
}

.glass-card:hover {
  border-color: rgba(139, 92, 246, 0.15);
}

.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 0.75rem;
}

.card-header-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 0.75rem;
}

.card-header-flex .card-title {
  margin-bottom: 0;
  border-bottom: none;
  padding-bottom: 0;
}

.scene-counter {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  background-color: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: #c084fc;
  border-radius: 4px;
}

/* Form Controls */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.form-group:last-child {
  margin-bottom: 0;
}

label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

input[type="password"],
input[type="text"],
select,
textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  color: var(--text-main);
  padding: 0.75rem 1rem;
  font-size: 0.88rem;
  outline: none;
  font-family: inherit;
  transition: var(--transition-smooth);
}

input[type="password"]:focus,
input[type="text"]:focus,
select:focus,
textarea:focus {
  border-color: var(--purple);
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.15);
  background: rgba(0, 0, 0, 0.35);
}

select {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1rem;
  padding-right: 2.5rem;
}

/* Custom Password input toggle */
.input-password-wrapper {
  position: relative;
  display: flex;
}

.input-password-wrapper input {
  padding-right: 3rem;
}

.btn-icon-toggle {
  position: absolute;
  right: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  transition: var(--transition-smooth);
}

.btn-icon-toggle:hover {
  color: var(--text-main);
}

/* Switches */
.toggle-row {
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
}

.switch-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  user-select: none;
}

.switch-label input {
  display: none;
}

.switch-slider {
  width: 38px;
  height: 20px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  position: relative;
  transition: var(--transition-smooth);
}

.switch-slider::before {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background-color: #ffffff;
  top: 3px;
  left: 3px;
  transition: var(--transition-smooth);
}

.switch-label input:checked + .switch-slider {
  background-color: var(--purple);
}

.switch-label input:checked + .switch-slider::before {
  left: 21px;
}

.switch-text {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
}

.switch-label:hover .switch-text {
  color: var(--text-main);
}

/* Dual Column Form Layout */
.form-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.form-row-2col:last-child {
  margin-bottom: 0;
}

/* Alerts */
.info-alert {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.85rem 1.15rem;
  border-radius: 8px;
  font-size: 0.78rem;
  line-height: 1.4;
  margin-top: 1rem;
}

.info-alert-purple {
  background-color: rgba(139, 92, 246, 0.06);
  border: 1px solid rgba(139, 92, 246, 0.15);
  color: #c084fc;
}

.info-alert i {
  margin-top: 0.15rem;
  font-size: 0.95rem;
}

/* Buttons */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 8px;
  padding: 0.8rem 1.25rem;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  outline: none;
  font-family: inherit;
  transition: var(--transition-smooth);
}

.btn-full {
  width: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, #a78bfa, #8b5cf6);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.25);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #c084fc, #a78bfa);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-success {
  background: linear-gradient(135deg, #34d399, #10b981);
  color: #ffffff;
  box-shadow: 0 4px 15px var(--green-glow);
}

.btn-success:hover:not(:disabled) {
  background: linear-gradient(135deg, #6ee7b7, #34d399);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.btn-success:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-secondary {
  background-color: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--panel-border);
  color: var(--text-main);
}

.btn-secondary:hover:not(:disabled) {
  background-color: rgba(255, 255, 255, 0.08);
}

.btn-secondary:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Accordion details */
.accordion {
  cursor: pointer;
}

.accordion-header {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-main);
}

.accordion-header::-webkit-details-marker {
  display: none;
}

.accordion-header .arrow-icon {
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: transform 0.3s ease;
}

.accordion[open] .accordion-header .arrow-icon {
  transform: rotate(180deg);
}

.accordion-body {
  margin-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 1rem;
}

.accordion-body p {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-bottom: 0.75rem;
}

.font-small {
  padding: 1.15rem 1.5rem;
}

/* Script Code Block */
.code-block {
  background-color: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  padding: 0.85rem;
  overflow-x: auto;
}

.code-block code {
  font-family: var(--font-code);
  font-size: 0.7rem;
  color: #c084fc;
}

/* Script Editor Component */
.textarea-editor-wrapper {
  background-color: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  height: 380px;
}

#script-editor-text {
  width: 100%;
  height: 100%;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  resize: none;
  font-family: var(--font-code);
  font-size: 0.85rem;
  line-height: 1.5;
  color: #f1f5f9;
  padding: 1rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

#script-editor-text::-webkit-scrollbar {
  width: 8px;
}

#script-editor-text::-webkit-scrollbar-track {
  background: transparent;
}

#script-editor-text::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

#script-editor-text::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

.btn-compile-row {
  margin-top: 1.25rem;
}

.btn-action-compile {
  width: 100%;
  background: linear-gradient(135deg, #60a5fa, #3b82f6);
  border: none;
  color: #ffffff;
  border-radius: 10px;
  padding: 1rem;
  font-weight: 800;
  font-size: 1.05rem;
  box-shadow: 0 4px 15px var(--blue-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-action-compile:hover {
  background: linear-gradient(135deg, #93c5fd, #60a5fa);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.35);
}

/* ==========================================
   16:9 Canvas Video Player UI
   ========================================== */
.video-renderer-layout {
  position: relative;
  background-color: #000000;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: inset 0 0 25px rgba(0, 0, 0, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.canvas-aspect-wrapper {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 ratio */
  transition: var(--transition-smooth);
}

.canvas-aspect-wrapper.aspect-9-16 {
  padding-top: 177.77%; /* 9:16 ratio */
  max-width: 270px;
  margin: 0 auto;
}

#video-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* Overlay subtitles */
.subtitle-overlay-wrapper {
  position: absolute;
  bottom: 8%;
  left: 5%;
  right: 5%;
  display: flex;
  justify-content: center;
  pointer-events: none;
  z-index: 2;
}

#subtitle-text-element {
  background: rgba(10, 12, 22, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.5rem 1.25rem;
  border-radius: 8px;
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 500;
  text-align: center;
  max-width: 90%;
  line-height: 1.4;
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

/* Player loading and recording states overlays */
.player-overlay-state {
  position: absolute;
  inset: 0;
  background: rgba(6, 8, 18, 0.9);
  backdrop-filter: blur(15px);
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
}

.spinner-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(139, 92, 246, 0.15);
  border-top-color: var(--purple);
  border-radius: 50%;
  animation: spinLoader 0.9s linear infinite;
}

@keyframes spinLoader {
  to { transform: rotate(360deg); }
}

#player-loading-text {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.2px;
}

.recording-indicator-banner {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: rgba(239, 68, 68, 0.9);
  border: 1px solid #ef4444;
  border-radius: 6px;
  padding: 0.35rem 0.75rem;
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  z-index: 3;
  box-shadow: 0 4px 10px rgba(239, 68, 68, 0.35);
  letter-spacing: 0.5px;
}

.rec-dot {
  width: 8px;
  height: 8px;
  background-color: #ffffff;
  border-radius: 50%;
  animation: pulseDot 1s infinite alternate;
}

@keyframes pulseDot {
  from { opacity: 0.3; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1.15); }
}

/* ==========================================
   Timeline Controls HUD
   ========================================== */
.timeline-dashboard {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: rgba(255,255,255,0.01);
  border: 1px solid rgba(255,255,255,0.03);
  padding: 1rem;
  border-radius: 12px;
}

/* Slider */
.slider-track-container {
  width: 100%;
  display: flex;
  align-items: center;
}

#timeline-progress-slider {
  width: 100%;
  height: 6px;
  border-radius: 10px;
  outline: none;
  background-color: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: height 0.15s ease;
}

#timeline-progress-slider:hover {
  height: 8px;
}

/* Webkit browser slider customization */
#timeline-progress-slider::-webkit-slider-runnable-track {
  height: 100%;
  border-radius: 10px;
}

#timeline-progress-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background-color: var(--purple);
  border: 2px solid #ffffff;
  box-shadow: 0 0 8px rgba(139, 92, 246, 0.8);
  cursor: pointer;
  margin-top: -3px; /* vertically center it on Chrome */
  transition: transform 0.1s ease;
}

#timeline-progress-slider::-webkit-slider-thumb:hover {
  transform: scale(1.25);
}

/* Firefox slider customization */
#timeline-progress-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background-color: var(--purple);
  border: 2px solid #ffffff;
  box-shadow: 0 0 8px rgba(139, 92, 246, 0.8);
  cursor: pointer;
  transition: transform 0.15s ease;
}

#timeline-progress-slider::-moz-range-thumb:hover {
  transform: scale(1.25);
}

/* Control Buttons row */
.player-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.controls-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.btn-control {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255,255,255,0.06);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  outline: none;
  font-size: 0.85rem;
  transition: var(--transition-smooth);
}

.btn-control:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255,255,255,0.15);
  color: var(--purple);
  box-shadow: 0 0 8px rgba(139, 92, 246, 0.1);
}

.btn-control:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}

/* Time readout index */
.controls-center {
  display: flex;
  align-items: center;
}

.time-readout {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.time-bold {
  color: var(--text-main);
  font-weight: 700;
}

.time-slash {
  color: var(--text-dark);
}

.controls-right {
  display: flex;
  align-items: center;
}

.scene-indicator {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

/* ==========================================
   Export & Preset Buttons grid
   ========================================== */
.action-grid-buttons {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.action-grid-buttons .btn {
  padding: 0.95rem;
}

/* Presets Loader */
.preset-section {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: 1.15rem;
}

.preset-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-dark);
}

.preset-btn-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.btn-preset-load {
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  color: var(--text-muted);
  padding: 0.65rem;
  font-size: 0.76rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-preset-load:hover {
  background-color: rgba(139, 92, 246, 0.05);
  border-color: rgba(139, 92, 246, 0.25);
  color: #c084fc;
}

/* Footer style matching */
.main-footer {
  text-align: center;
  padding: 3rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  margin-top: 4rem;
}

.main-footer p {
  font-size: 0.78rem;
  color: var(--text-dark);
}

/* ==========================================
   Responsive Mobile breakpoints
   ========================================== */
@media (max-width: 1024px) {
  .workspace-grid {
    grid-template-columns: 1fr;
  }
  
  .left-col, .right-col {
    gap: 1.5rem;
  }
}

@media (max-width: 600px) {
  .workspace-container {
    padding: 1rem;
  }
  
  .form-row-2col, .action-grid-buttons, .preset-btn-row {
    grid-template-columns: 1fr;
  }
  
  .main-header {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
    border-radius: 20px;
    padding: 1rem 1.5rem;
  }
  
  .header-right {
    width: 100%;
    justify-content: space-between;
    display: flex;
  }
}

/* Custom additions for optimization toolbar and multi-format builder */
.drag-over {
  border-color: var(--purple) !important;
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.35) !important;
  background-color: rgba(139, 92, 246, 0.05) !important;
}

.format-badge-standard {
  background-color: rgba(139, 92, 246, 0.15) !important;
  border-color: rgba(139, 92, 246, 0.4) !important;
  color: #c084fc !important;
}

.format-badge-json {
  background-color: rgba(59, 130, 246, 0.15) !important;
  border-color: rgba(59, 130, 246, 0.4) !important;
  color: #60a5fa !important;
}

.format-badge-csv {
  background-color: rgba(16, 185, 129, 0.15) !important;
  border-color: rgba(16, 185, 129, 0.4) !important;
  color: #34d399 !important;
}

.format-badge-unknown {
  background-color: rgba(239, 68, 68, 0.1) !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
  color: #f87171 !important;
}

.segment-progress-container {
  width: 100%;
  margin-top: 0.75rem;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  overflow: hidden;
  height: 6px;
  display: block;
}

.segment-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #a78bfa, #3b82f6);
  width: 0%;
  transition: width 0.3s ease;
}


/* ==========================================================================
   Antigravity Unified Header Styles
   ========================================================================== */
.main-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 0.85rem 2rem !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 100 !important;
  margin: 1rem 1.5rem 0 1.5rem !important;
  border-radius: 50px !important;
  border: 1px solid rgba(255, 255, 255, 0.05) !important;
  background: rgba(15, 15, 26, 0.85) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
}

.header-left {
  display: flex !important;
  align-items: center !important;
  gap: 0.75rem !important;
}

.back-btn {
  width: 36px !important;
  height: 36px !important;
  border-radius: 10px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #94a3b8 !important;
  text-decoration: none !important;
  transition: all 0.3s ease !important;
}

.back-btn:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #f1f5f9 !important;
  border-color: #94a3b8 !important;
}

.app-logo {
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
}

.app-logo i.logo-icon {
  font-size: 1.15rem !important;
}

.app-logo i.logo-icon.text-purple { color: #a78bfa !important; }
.app-logo i.logo-icon.text-blue { color: #60a5fa !important; }
.app-logo i.logo-icon.text-red { color: #f87171 !important; }
.app-logo i.logo-icon.text-green { color: #34d399 !important; }
.app-logo i.logo-icon.text-orange { color: #fb923c !important; }
.app-logo i.logo-icon.text-cyan { color: #22d3ee !important; }
.app-logo i.logo-icon.text-gold { color: #fbbf24 !important; }

.logo-text {
  font-family: inherit !important;
  font-weight: 800 !important;
  font-size: 1.15rem !important;
  display: flex !important;
  align-items: baseline !important;
  gap: 0.5rem !important;
  color: #f1f5f9 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
}

.engine-sub {
  font-size: 0.7rem !important;
  color: #94a3b8 !important;
  font-weight: 400 !important;
}

.btn-back-dashboard {
  background: rgba(168, 85, 247, 0.1) !important;
  border: 1px solid rgba(168, 85, 247, 0.2) !important;
  color: #f1f5f9 !important;
  font-weight: 600 !important;
  font-size: 0.82rem !important;
  padding: 0.5rem 1.25rem !important;
  border-radius: 30px !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  gap: 0.4rem !important;
  transition: all 0.3s ease !important;
}

.btn-back-dashboard:hover {
  background: #a855f7 !important;
  box-shadow: 0 4px 12px rgba(168, 85, 247, 0.3) !important;
}
