/* ============================================
   DASHBOARD STYLES
   ============================================ */

#dashboard-page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px;
}

/* ============================================
   EDITOR STYLES
   ============================================ */

#editor-page {
  height: calc(100vh - 56px);
  margin-top: 56px;
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.editor-layout {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* ---- EDITOR MAIN (left side) ---- */
.editor-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg);
}

/* Preview toolbar */
.preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
  gap: 16px;
}
.preview-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
}
.breadcrumb-link { color: var(--text-muted); transition: color var(--transition); }
.breadcrumb-link:hover { color: var(--accent); }
.preview-actions { display: flex; align-items: center; gap: 8px; }

/* Preview area */
.preview-area {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: hidden;
  background: #080A0F;
  position: relative;
}
.preview-player {
  width: 100%;
  max-width: 900px;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.preview-inner {
  aspect-ratio: 16/9;
  background: var(--surface-2);
  border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.preview-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--text-dim);
  text-align: center;
  padding: 40px;
}
.preview-placeholder p { font-size: 14px; }

.preview-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Preview controls */
.preview-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
}
.ctrl-btn {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: all var(--transition);
  flex-shrink: 0;
}
.ctrl-btn:hover { color: var(--text); background: var(--surface-2); }
.ctrl-timeline {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 6px;
}
.ctrl-timeline span {
  font-size: 11px;
  font-family: var(--mono);
  color: var(--text-muted);
  flex-shrink: 0;
}
.ctrl-progress {
  flex: 1;
  height: 4px;
  background: var(--surface-3);
  border-radius: 2px;
  cursor: pointer;
  overflow: hidden;
}
.ctrl-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  width: 0%;
  transition: width 100ms linear;
}

/* ---- TIMELINE ---- */
.timeline-area {
  border-top: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
}
.timeline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 20px;
  border-bottom: 1px solid var(--border);
}
.timeline-tabs { display: flex; gap: 4px; }
.tl-tab {
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  transition: all var(--transition);
}
.tl-tab:hover { color: var(--text); }
.tl-tab.active { background: var(--surface-3); color: var(--text); }
.timeline-meta { font-size: 12px; color: var(--text-dim); }
.timeline-body { padding: 12px 20px; overflow-x: auto; overflow-y: hidden; }

/* Timeline slides strip */
.tl-slides {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 80px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.tl-slide {
  flex-shrink: 0;
  width: 100px;
  cursor: pointer;
  position: relative;
}
.tl-slide-thumb {
  width: 100px;
  aspect-ratio: 16/9;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid transparent;
  transition: border-color var(--transition);
}
.tl-slide.active .tl-slide-thumb { border-color: var(--accent); }
.tl-slide-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tl-slide-num {
  text-align: center;
  font-size: 10px;
  font-family: var(--mono);
  color: var(--text-dim);
  margin-top: 3px;
}
.tl-slide.active .tl-slide-num { color: var(--accent); font-weight: 600; }
.tl-trans-marker {
  position: absolute;
  right: -5px;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
  z-index: 1;
  opacity: 0.7;
}
.tl-add-slide {
  flex-shrink: 0;
  width: 100px;
  aspect-ratio: 16/9;
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  cursor: pointer;
  transition: all var(--transition);
  font-size: 24px;
}
.tl-add-slide:hover { border-color: var(--accent); color: var(--accent); }

/* ---- CONFIG PANEL ---- */
.config-panel {
  width: 320px;
  flex-shrink: 0;
  background: var(--surface);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ---- WIZARD MODAL ---- */
.wizard-modal-content {
  max-width: 640px;
  padding: 0;
}
.wizard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.wizard-header h2 { font-size: 18px; font-weight: 700; }
.wizard-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 24px;
  gap: 0;
  border-bottom: 1px solid var(--border);
}
.wizard-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 500;
}
.wizard-step.active { color: var(--accent); }
.wizard-step.done { color: var(--success); }
.step-dot {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  font-weight: 700;
  transition: all var(--transition);
}
.wizard-step.active .step-dot { border-color: var(--accent); color: var(--accent); }
.wizard-step.done .step-dot { border-color: var(--success); background: var(--success); color: white; }
.wizard-step-line {
  width: 60px;
  height: 2px;
  background: var(--border);
  margin: 0 8px;
  margin-bottom: 18px;
}
.wizard-body { padding: 24px; max-height: 60vh; overflow-y: auto; }
.wizard-body-step { display: none; }
.wizard-body-step.active { display: block; }
.wizard-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.wizard-footer-right { display: flex; gap: 8px; align-items: center; }
.wizard-upload-zone { padding: 48px 24px; }

/* Wizard images grid */
.wiz-images-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

/* ---- GENERATE MODAL ---- */
.generate-modal-content {
  max-width: 400px;
  padding: 40px;
  text-align: center;
}
.gen-spinner { margin-bottom: 16px; }
#gen-status-title { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
#gen-status-text { color: var(--text-muted); font-size: 13px; margin-bottom: 20px; }
.gen-progress { margin: 16px 0; }
