/* PromoForgeAI custom styles */
:root {
  --pf-primary: #4f46e5;
  --pf-primary-dark: #4338ca;
  --pf-secondary: #0ea5e9;
  --pf-accent: #f59e0b;
  --pf-dark: #0f172a;
  --pf-bg: #f8fafc;
  --pf-border: #e2e8f0;
}

body {
  background: var(--pf-bg);
  color: var(--pf-dark);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.bg-gradient-brand {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #0ea5e9 100%);
}

.btn-brand {
  background: var(--pf-primary);
  color: #fff;
  border: none;
}
.btn-brand:hover {
  background: var(--pf-primary-dark);
  color: #fff;
}
.btn-outline-brand {
  color: var(--pf-primary);
  border: 1px solid var(--pf-primary);
  background: transparent;
}
.btn-outline-brand:hover {
  background: var(--pf-primary);
  color: #fff;
}

.text-brand { color: var(--pf-primary); }

.card-hover {
  transition: transform .2s, box-shadow .2s;
}
.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(79,70,229,.15);
}

.stat-card {
  border-radius: 14px;
  border: 1px solid var(--pf-border);
  background: #fff;
}

.sidebar {
  min-height: 100vh;
  background: #fff;
  border-right: 1px solid var(--pf-border);
}
.sidebar .nav-link {
  color: #475569;
  border-radius: 8px;
  margin-bottom: 2px;
}
.sidebar .nav-link:hover,
.sidebar .nav-link.active {
  background: #eef2ff;
  color: var(--pf-primary);
}

.timeline-grid { display: flex; align-items: stretch; }
.timeline-labels {
  width: 74px;
  flex-shrink: 0;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-right: 2px solid #cbd5e1;
  border-radius: 8px 0 0 8px;
  z-index: 2;
  overflow: hidden;
}
.timeline-label-spacer { height: 22px; border-bottom: 1px solid #cbd5e1; background: #e2e8f0; }
.timeline-label { height: 52px; display: flex; align-items: center; padding-left: 8px; border-bottom: 1px dashed #e2e8f0; }
.timeline-label:last-child { border-bottom: none; }
.timeline-body {
  position: relative;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid #cbd5e1;
  border-radius: 0 8px 8px 0;
  background: #f1f5f9;
}
.timeline-ruler {
  position: relative;
  height: 22px;
  min-width: 100%;
  background: #e2e8f0;
  border-bottom: 1px solid #cbd5e1;
}
.timeline-row { height: 52px; }
.timeline-track {
  height: 52px;
  min-width: 100%;
  white-space: nowrap;
  display: flex;
  align-items: center;
  padding: 0 4px;
  border-bottom: 1px dashed #e2e8f0;
}
.timeline-track:last-child { border-bottom: none; }
.tick { position: absolute; bottom: 0; width: 1px; height: 7px; background: #94a3b8; }
.tick.major { height: 12px; background: #64748b; }
.tick-label { position: absolute; top: 0; font-size: 10px; color: #475569; transform: translateX(-50%); white-space: nowrap; }
.playhead { position: absolute; top: 0; bottom: 0; width: 2px; background: #f59e0b; z-index: 4; pointer-events: none; }
.playhead-handle {
  position: absolute;
  top: 0;
  left: -6px;
  width: 14px;
  height: 20px;
  background: #f59e0b;
  border: 1px solid #d97706;
  border-radius: 3px;
  cursor: ew-resize;
  pointer-events: auto;
}
.clip-block {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  height: 42px;
  border-radius: 6px;
  background: var(--pf-primary);
  color: #fff;
  font-size: 11px;
  line-height: 1.2;
  padding: 4px 14px 4px 8px;
  margin: 2px 4px;
  cursor: grab;
  vertical-align: top;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(15,23,42,.18);
  transition: box-shadow .15s, outline-color .15s;
  outline: 2px solid transparent;
}
.clip-block:hover { box-shadow: 0 3px 8px rgba(15,23,42,.25); }
.clip-block.selected { outline: 2px solid #f59e0b; box-shadow: 0 0 0 4px rgba(245,158,11,.25); }
.clip-title { font-weight: 600; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.clip-dur { font-size: 10px; opacity: .85; white-space: nowrap; }
.clip-handle {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 10px;
  cursor: ew-resize;
  background: rgba(255,255,255,.25);
  border-radius: 0 6px 6px 0;
}
.clip-handle::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 50%;
  transform: translateY(-50%);
  height: 18px;
  width: 4px;
  border-radius: 2px;
  background: rgba(255,255,255,.9);
}
body.resizing, body.resizing * { cursor: ew-resize !important; user-select: none; }
.clip-menu { position: fixed; z-index: 2000; display: none; min-width: 180px; }
.clip-menu .dropdown-item { cursor: pointer; }
.clip-menu .dropdown-item i { color: #64748b; }
.clip-menu .dropdown-item:hover i { color: #fff; }
.clip-block.text-clip { background: #0ea5e9; }
.clip-block.audio-clip { background: #16a34a; }
.clip-block.voice-clip { background: #dc2626; }

.media-grid .media-item {
  border: 1px solid var(--pf-border);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}
.media-grid .media-item img {
  width: 100%;
  height: 120px;
  object-fit: cover;
}

.preview-canvas {
  width: 100%;
  background: #0f172a;
  position: relative;
  aspect-ratio: 16/9;
  max-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
}

.wizard-step { display: none; }
.wizard-step.active { display: block; }

.fade-in { animation: fadeIn .3s ease-in; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.hero {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 55%, #0ea5e9 100%);
  color: #fff;
}

.logo-img { height: 40px; }
.landing-logo { height: 56px; }

.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #eef2ff, #e0f2fe);
}
.auth-card {
  width: 100%;
  max-width: 460px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(2,6,23,.12);
}
.editor-toolbar { border-bottom: 1px solid var(--pf-border); background:#fff; }
.editor-panels { display:flex; gap:0; height:calc(100vh - 56px); }

.store-badge {
  display: inline-block;
  line-height: 0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.15);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.store-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.22);
}
.store-badge img {
  display: block;
  width: 135px;
  height: auto;
}

.template-thumb {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}
