.TimelinePreview_timelineContainer__IJSF6 {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: #1a1a1a;
  border-top: 1px solid #333;
  padding: 0 1.5rem 0.75rem 1.5rem;
  z-index: 1000;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: all 0.3s ease-in-out;
}

.TimelinePreview_timelineContainer__IJSF6.TimelinePreview_compact__NXn23 .TimelinePreview_timelineTrack__NGN6V {
  height: 60px;
}

.TimelinePreview_timelineContainer__IJSF6.TimelinePreview_compact__NXn23 .TimelinePreview_timelineHeader__Fjb3b {
  font-size: 0.75rem;
}

.TimelinePreview_timelineContainer__IJSF6.TimelinePreview_compact__NXn23 .TimelinePreview_sceneLabel___9BDr {
  font-size: 0.65rem;
  padding: 1px 4px;
}

.TimelinePreview_timelineContainer__IJSF6.TimelinePreview_compact__NXn23 .TimelinePreview_segmentDuration__BiTKh {
  font-size: 0.7rem;
  padding: 2px 4px;
}

/* Controls bar with toggle and close buttons */
.TimelinePreview_controlsBar___wP0P {
  position: absolute;
  top: -32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  background: #1a1a1a;
  border: 1px solid #333;
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  padding: 4px 8px;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.3);
}

.TimelinePreview_toggleButton__PJFlK,
.TimelinePreview_closeButton__R25tr {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ccc;
  padding: 4px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
}

.TimelinePreview_toggleButton__PJFlK:hover,
.TimelinePreview_closeButton__R25tr:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  color: white;
  transform: translateY(-1px);
}

.TimelinePreview_closeButton__R25tr:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #ef4444;
}

.TimelinePreview_timelineHeader__Fjb3b {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  color: #ccc;
  font-weight: 500;
  transition: font-size 0.3s ease-in-out;
}

.TimelinePreview_timelineTrack__NGN6V {
  display: flex;
  width: 100%;
  height: 120px;
  background-color: #2a2a2a;
  border-radius: 6px;
  overflow: hidden;
  transition: height 0.3s ease-in-out;
}

/* Mobile responsive styles */
@media (max-width: 768px) {
  .TimelinePreview_timelineContainer__IJSF6 {
    padding: 0 0.5rem 0.5rem 0.5rem;
  }

  /* Enable horizontal scrolling on mobile */
  .TimelinePreview_timelineTrack__NGN6V {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
  }

  /* Compact mode on mobile */
  .TimelinePreview_timelineContainer__IJSF6.TimelinePreview_compact__NXn23 .TimelinePreview_timelineTrack__NGN6V {
    height: 60px;
  }

  /* Expanded mode on mobile (slightly taller than compact) */
  .TimelinePreview_timelineContainer__IJSF6:not(.TimelinePreview_compact__NXn23) .TimelinePreview_timelineTrack__NGN6V {
    height: 90px;
  }

  .TimelinePreview_timelineHeader__Fjb3b {
    font-size: 0.75rem;
    padding: 0.25rem 0;
  }

  .TimelinePreview_sceneLabel___9BDr {
    font-size: 0.65rem;
    padding: 1px 4px;
    top: 4px;
    left: 4px;
  }

  .TimelinePreview_segmentDuration__BiTKh {
    font-size: 0.65rem;
    padding: 2px 4px;
    bottom: 4px;
    right: 4px;
  }

  /* Make controls bar smaller on mobile */
  .TimelinePreview_controlsBar___wP0P {
    top: -28px;
    padding: 3px 6px;
  }

  .TimelinePreview_toggleButton__PJFlK,
  .TimelinePreview_closeButton__R25tr {
    padding: 3px 10px;
    font-size: 12px;
  }

  /* Ensure scenes have minimum width for horizontal scrolling */
  .TimelinePreview_sceneGroup__xWs3W {
    min-width: 100px;
    flex-shrink: 0;
  }

  .TimelinePreview_timelineSegment__mvFVT {
    min-width: 50px;
    flex-shrink: 0;
  }
}

/* Scrollbar styling for mobile timeline track */
.TimelinePreview_timelineTrack__NGN6V::-webkit-scrollbar {
  height: 4px;
}

.TimelinePreview_timelineTrack__NGN6V::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}

.TimelinePreview_timelineTrack__NGN6V::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.5);
  border-radius: 2px;
}

.TimelinePreview_timelineTrack__NGN6V::-webkit-scrollbar-thumb:hover {
  background: rgba(99, 102, 241, 0.7);
}

/* Scene grouping: each scene has its own flex row segment */
.TimelinePreview_sceneGroup__xWs3W {
  position: relative;
  display: flex;
  height: 100%;
  border-right: 3px solid #4F46E5; /* bright divider between scenes */
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.15);
}

.TimelinePreview_sceneGroup__xWs3W:last-child {
  border-right: none;
}

.TimelinePreview_sceneLabel___9BDr {
  position: absolute;
  top: 6px;
  left: 8px;
  z-index: 2;
  color: #e5e5e5;
  font-size: 0.8rem;
  font-weight: 600;
  background: rgba(0,0,0,0.35);
  padding: 2px 6px;
  border-radius: 4px;
  pointer-events: none;
}

.TimelinePreview_timelineSegment__mvFVT {
  position: relative;
  height: 100%;
  overflow: hidden;
  border-right: 2px solid rgba(255, 255, 255, 0.15);
  box-sizing: border-box;
  transition: border-color 0.2s ease-in-out;
}

.TimelinePreview_timelineSegment__mvFVT:hover {
  border-right-color: rgba(255, 255, 255, 0.3);
}

.TimelinePreview_timelineSegment__mvFVT:last-child {
  border-right: none;
}

.TimelinePreview_segmentThumbnail__MMwuF {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: brightness(0.88);
  transition: filter 0.2s ease-in-out;
}

.TimelinePreview_timelineSegment__mvFVT:hover .TimelinePreview_segmentThumbnail__MMwuF {
  filter: brightness(1);
}

.TimelinePreview_segmentDuration__BiTKh {
  position: absolute;
  bottom: 6px;
  right: 8px;
  background-color: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 3px 6px;
  font-size: 0.9rem;
  border-radius: 4px;
  font-weight: 700;
}

/* Resize handle between assets - bidirectional slider design */
.TimelinePreview_resizeHandle__Nx9de {
  position: absolute;
  top: 0;
  right: -8px;
  width: 16px;
  height: 100%;
  cursor: col-resize;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.85;
  transition: all 0.2s ease-in-out;
}

/* Center line */
.TimelinePreview_resizeHandle__Nx9de::before {
  content: '';
  position: absolute;
  width: 3px;
  height: 100%;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(99, 102, 241, 0.6) 10%,
    rgba(99, 102, 241, 0.9) 50%,
    rgba(99, 102, 241, 0.6) 90%,
    transparent 100%
  );
  border-radius: 2px;
}

/* Bidirectional arrows indicator */
.TimelinePreview_resizeHandle__Nx9de::after {
  content: '⇔';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 16px;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 0 6px rgba(99, 102, 241, 0.8);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
}

.TimelinePreview_timelineSegment__mvFVT:hover .TimelinePreview_resizeHandle__Nx9de {
  opacity: 1;
  width: 20px;
  right: -10px;
}

.TimelinePreview_timelineSegment__mvFVT:hover .TimelinePreview_resizeHandle__Nx9de::after {
  opacity: 1;
}

.TimelinePreview_resizeHandle__Nx9de:hover::before {
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(99, 102, 241, 0.8) 10%,
    rgba(99, 102, 241, 1) 50%,
    rgba(99, 102, 241, 0.8) 90%,
    transparent 100%
  );
  width: 4px;
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.6);
}

.TimelinePreview_resizeHandle__Nx9de:hover::after {
  color: white;
  text-shadow: 0 0 10px rgba(99, 102, 241, 1);
  font-size: 18px;
}

.TimelinePreview_resizeHandle__Nx9de:active::before {
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(139, 92, 246, 0.9) 10%,
    rgba(139, 92, 246, 1) 50%,
    rgba(139, 92, 246, 0.9) 90%,
    transparent 100%
  );
  box-shadow: 0 0 16px rgba(139, 92, 246, 0.8);
}

.TimelinePreview_resizeHandle__Nx9de:active::after {
  color: white;
  text-shadow: 0 0 14px rgba(139, 92, 246, 1);
}


