/* VideoStoryboard.module.css */

.VideoStoryboard_storyboardContainer__PrTUK {
  padding: 1.5rem; /* Restore padding */
  background-color: #1e1e1e; /* Darker background for contrast */
  border-radius: 8px;
  color: #e0e0e0;
  /* Accent used for any duration-related UI to visually link them */
  --duration-accent: #00e5ff;
  --duration-accent-bg: rgba(0, 229, 255, 0.12);
  --duration-accent-border: rgba(0, 229, 255, 0.35);
}

.VideoStoryboard_headerActions__iuJzL {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.VideoStoryboard_durationInfo__Mr0T3 {
  font-size: 0.9rem;
  color: #b0b0b0;
}

.VideoStoryboard_durationInfo__Mr0T3 strong {
  color: #fff;
  font-weight: 600;
}

.VideoStoryboard_generateVideoButton__PUgtl {
  background-color: #4A90E2; /* A nice blue */
  color: white;
  border: none;
  padding: 0.7rem 1.5rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.VideoStoryboard_generateVideoButton__PUgtl:hover:not(:disabled) {
  background-color: #5aa1f2;
  transform: translateY(-1px);
}

.VideoStoryboard_generateVideoButton__PUgtl:disabled {
  background-color: #555;
  cursor: not-allowed;
  opacity: 0.7;
}


/* Scene Styles */
.VideoStoryboard_scene__DyN2Q {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background-color: #2a2a2a;
  border-radius: 8px;
  border: 1px solid #383838;
}

.VideoStoryboard_sceneText__qBu9Y {
  flex: 1 1;
  min-width: 200px;
}

.VideoStoryboard_sceneHeader__XZyGm {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #444;
}

.VideoStoryboard_sceneNumber__5HDdp {
  font-weight: 600;
  color: #fff;
  font-size: 1rem;
}

.VideoStoryboard_sceneDuration__YJw4Q {
  font-size: 0.85rem;
  color: var(--duration-accent);
  background-color: var(--duration-accent-bg);
  border: 1px solid var(--duration-accent-border);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-weight: 600;
}

/* Generate More Images button for each scene */
.VideoStoryboard_generateMoreImagesButton__qfM3g {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #e5e7eb;
  background-color: #4a4a4a;
  border: 1px solid #5a5a5a;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.1s ease, border-color 0.15s ease;
}

.VideoStoryboard_generateMoreImagesButton__qfM3g:hover:not(:disabled) {
  background-color: #5a5a5a;
  border-color: #6a6a6a;
  transform: translateY(-1px);
}

.VideoStoryboard_generateMoreImagesButton__qfM3g:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.VideoStoryboard_sceneText__qBu9Y p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #ccc;
  margin: 0;
}

/* Override panel styles */
.VideoStoryboard_overrideContainer__sWERP {
  margin-top: 0.6rem;
  padding: 0.75rem;
  background-color: #232323;
  border: 1px solid #3a3a3a;
  border-radius: 6px;
}

.VideoStoryboard_overrideLabel__NBemS {
  display: block;
  font-size: 0.85rem;
  color: #e0e0e0;
  margin-bottom: 0.3rem;
}

.VideoStoryboard_overrideOptional__MODoy {
  color: #9aa0a6;
}

.VideoStoryboard_overrideInput__w7Yz4 {
  width: 100%;
  padding: 0.5rem 0.6rem;
  border-radius: 6px;
  border: 1px solid #444;
  background-color: #1b1b1b;
  color: #e5e7eb;
}

.VideoStoryboard_overrideHelp__nbOjI {
  margin-top: 0.4rem;
  font-size: 0.8rem;
  color: #a0a0a0;
}

.VideoStoryboard_overrideActions__juEgv {
  margin-top: 0.6rem;
  display: flex;
  gap: 0.5rem;
}

.VideoStoryboard_overrideConfirmButton__yL7I2 {
  background-color: #4A90E2;
  color: white;
  border: 1px solid #4A90E2;
  border-radius: 6px;
  padding: 0.45rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.VideoStoryboard_overrideUseOriginalButton__WpUS_ {
  background-color: #3a3a3a;
  color: #e5e7eb;
  border: 1px solid #555;
  border-radius: 6px;
  padding: 0.45rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.VideoStoryboard_overrideCancelButton__sz6zB {
  background: transparent;
  color: #a0a0a0;
  border: 1px solid #444;
  border-radius: 6px;
  padding: 0.45rem 0.75rem;
  font-size: 0.85rem;
  cursor: pointer;
}

/* Image Selector Styles */
.VideoStoryboard_sceneImageSelector__WPGx_ {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  flex: 2 1;
}

.VideoStoryboard_imageWrapper__QlFJ9 {
  position: relative;
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: 6px;
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease;
  width: 150px;
}

.VideoStoryboard_downloadCheckbox__lOr3D {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 20px;
  height: 20px;
  cursor: pointer;
  z-index: 2; /* Above the image */
}

/* --- New Animation Panel Styles --- */

.VideoStoryboard_animateButton__psZ75 {
  padding: 4px 8px;
  width: auto;
  max-width: 80px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(74, 144, 226, 0.95);
  -webkit-backdrop-filter: blur(4px);
          backdrop-filter: blur(4px);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(74, 144, 226, 0.4);
  position: relative;
  z-index: 5;
}
.VideoStoryboard_animateButton__psZ75:hover {
  background: rgba(85, 155, 235, 1);
  box-shadow: 0 3px 12px rgba(74, 144, 226, 0.6);
  transform: translateY(-1px);
}

.VideoStoryboard_animationPanel___2xia {
  background: rgba(10, 10, 10, 0.98);
  -webkit-backdrop-filter: blur(12px);
          backdrop-filter: blur(12px);
  padding: 8px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border: 1px solid rgba(255,255,255,0.2);
  box-shadow: 0 8px 32px rgba(0,0,0,0.8);
  height: 100%;
  overflow: hidden;
}

.VideoStoryboard_panelHeader__EJInJ {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.VideoStoryboard_modelSelect___bKtY {
  flex: 1 1;
  padding: 3px 5px;
  font-size: 10px;
  border-radius: 4px;
  border: 1px solid #444;
  background: #1b1b1b;
  color: #e5e7eb;
  cursor: pointer;
}

.VideoStoryboard_closePanelButton__XjBcX {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #aaa;
  cursor: pointer;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  font-size: 11px;
}

.VideoStoryboard_closePanelButton__XjBcX:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
}

.VideoStoryboard_presetContainer__V37yw {
  flex: 1 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
}

.VideoStoryboard_presetSection__MaJTm {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.VideoStoryboard_sectionLabel__KIH2V {
  font-size: 7px;
  font-weight: 700;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding-left: 2px;
}

.VideoStoryboard_presetGrid__SpypE {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-gap: 3px;
  gap: 3px;
}

.VideoStoryboard_presetButton__5dW_O {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 3px 1px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  color: #e5e7eb;
  cursor: pointer;
  transition: all 0.2s;
}

.VideoStoryboard_presetButton__5dW_O:hover:not(:disabled) {
  background: rgba(74, 144, 226, 0.2);
  border-color: rgba(74, 144, 226, 0.4);
}

.VideoStoryboard_presetButton__5dW_O:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.VideoStoryboard_presetIcon__l3gvF {
  font-size: 12px;
  line-height: 1;
}

.VideoStoryboard_presetLabel__75lQY {
  font-size: 7px;
  font-weight: 600;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  line-height: 1;
}

.VideoStoryboard_manualPromptArea__IXRk6 {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 6px;
  flex-shrink: 0;
}

.VideoStoryboard_clipPromptInput__eJqiX {
  width: 100%;
  padding: 5px 6px;
  font-size: 10px;
  border-radius: 4px;
  border: 1px solid #444;
  background: rgba(0,0,0,0.4);
  color: #e5e7eb;
  outline: none;
}

.VideoStoryboard_clipPromptInput__eJqiX:focus {
  border-color: #4A90E2;
}

.VideoStoryboard_clipButton__1i_qb {
  padding: 6px;
  font-size: 11px;
  font-weight: 700;
  background: #4A90E2;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  box-shadow: 0 2px 8px rgba(74, 144, 226, 0.3);
}

.VideoStoryboard_clipButton__1i_qb:hover:not(:disabled) {
  background: #357abd;
}

.VideoStoryboard_clipButton__1i_qb:active:not(:disabled) {
  transform: translateY(1px);
}

.VideoStoryboard_clipButton__1i_qb:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.VideoStoryboard_animationPanelContainer__ZAfS4 {
  position: absolute;
  inset: 0;
  z-index: 10;
  padding: 6px;
  background: rgba(0, 0, 0, 0.6); /* Slightly darker backdrop */
}

/* Minimal controls for creating and listing video clips per image */
.VideoStoryboard_clipControls__gSavs {
  position: absolute;
  bottom: 6px;
  right: 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 3;
  align-items: flex-end;
}

.VideoStoryboard_clipRow__qA1Eq {
  display: flex;
  gap: 6px;
}

.VideoStoryboard_clipPromptInput__eJqiX {
  flex: 1 1;
  min-width: 0;
  padding: 3px 5px;
  font-size: 11px;
  border-radius: 4px;
  border: 1px solid #444;
  background: rgba(20,20,20,0.8);
  color: #e5e7eb;
}

.VideoStoryboard_clipButton__1i_qb {
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 700;
  background: #4A90E2;
  color: #fff;
  border: 1px solid #4A90E2;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(74, 144, 226, 0.35);
  width: 100%;
}

.VideoStoryboard_clipButton__1i_qb:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.VideoStoryboard_clipError__ygcc7 {
  font-size: 10px;
  color: #ff8080;
  line-height: 1.3;
}

.VideoStoryboard_clipList__9w_5C {
  display: flex;
  gap: 6px;
}

.VideoStoryboard_clipLink__jqqYA {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  background: rgba(0,0,0,0.5);
  color: #e5e7eb;
  text-decoration: none;
}

.VideoStoryboard_imageWrapper__QlFJ9:hover {
  transform: scale(1.05);
  border-color: #777;
}

.VideoStoryboard_imageWrapper__QlFJ9.VideoStoryboard_selected__cdQFF {
  border-color: #4A90E2;
  box-shadow: 0 0 10px rgba(74, 144, 226, 0.5);
}

.VideoStoryboard_thumbnailImage__aKaVI {
  object-fit: cover;
}

/* Aspect-ratio-aware skeleton placeholder with shimmer */
.VideoStoryboard_skeleton__ybQgA {
  position: absolute;
  inset: 0;
  border-radius: 4px;
  overflow: hidden;
  background: linear-gradient(90deg, #2a2a2a 25%, #333 37%, #2a2a2a 63%);
  background-size: 400% 100%;
  animation: VideoStoryboard_shimmer__DuJqb 1.2s ease-in-out infinite;
}

@keyframes VideoStoryboard_shimmer__DuJqb {
  0% { background-position: 100% 0; }
  100% { background-position: 0 0; }
}

/* State-specific styles */
.VideoStoryboard_pendingState__8WBAJ,
.VideoStoryboard_processingState__0QNtA,
.VideoStoryboard_failedState__1aGbJ {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  text-align: center;
}

/* Pending state - waiting to process */
.VideoStoryboard_pendingState__8WBAJ {
  background-color: #1e1e1e;
  border: 2px solid #444;
}

.VideoStoryboard_pendingSpinner__APWOf {
  width: 32px;
  height: 32px;
  border: 3px solid #333;
  border-top-color: #666;
  border-radius: 50%;
  animation: VideoStoryboard_pendingSpin__TC8Y1 1.5s linear infinite;
  margin-bottom: 0.5rem;
}

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

/* Processing state - actively generating */
.VideoStoryboard_processingState__0QNtA {
  background-color: #1a2332;
  border: 2px solid #4A90E2;
}

.VideoStoryboard_processingSpinner__8GTzL {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(74, 144, 226, 0.2);
  border-top-color: #4A90E2;
  border-radius: 50%;
  animation: VideoStoryboard_processingSpin__wknYm 0.8s linear infinite;
  margin-bottom: 0.5rem;
}

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

/* Failed state */
.VideoStoryboard_failedState__1aGbJ {
  background-color: #2a1a1a;
  border: 2px solid #cc4444;
}

.VideoStoryboard_failureTextStrong__geead {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.VideoStoryboard_inlineBuyButton__4SvL4 {
  margin-top: 4px;
  background: #4f46e5;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 10px;
  cursor: pointer;
}

.VideoStoryboard_failedIcon__tw4uy {
  font-size: 2rem;
  color: #cc4444;
  font-weight: bold;
  margin-bottom: 0.25rem;
}

.VideoStoryboard_failedText__NqVS9 {
  font-size: 0.9rem;
  font-weight: 600;
  color: #ff6666;
  margin-bottom: 0.25rem;
}

.VideoStoryboard_failureReason__pULO9 {
  font-size: 0.75rem;
  color: #ff9999;
  line-height: 1.2;
  max-width: 100%;
  word-break: break-word;
  overflow-wrap: break-word;
}

.VideoStoryboard_stateText__RXAXg {
  font-size: 0.85rem;
  color: #b0b0b0;
  font-weight: 500;
}

/* Update wrapper states */
.VideoStoryboard_imageWrapper__QlFJ9.VideoStoryboard_pending__i15KP {
  border-color: #444;
}

.VideoStoryboard_imageWrapper__QlFJ9.VideoStoryboard_processing__z88Vb {
  border-color: #4A90E2;
  animation: VideoStoryboard_processingPulse__9xB1m 2s ease-in-out infinite;
}

@keyframes VideoStoryboard_processingPulse__9xB1m {
  0%, 100% { box-shadow: 0 0 0 0 rgba(74, 144, 226, 0); }
  50% { box-shadow: 0 0 10px 2px rgba(74, 144, 226, 0.4); }
}

.VideoStoryboard_imageWrapper__QlFJ9.VideoStoryboard_failed__1Hmzu {
  border-color: #cc4444;
  cursor: not-allowed;
}

.VideoStoryboard_imageWrapper__QlFJ9.VideoStoryboard_failed__1Hmzu:hover {
  transform: none;
  border-color: #cc4444;
}

/* Disabled wrapper for non-interactive placeholders */
.VideoStoryboard_imageWrapper__QlFJ9.VideoStoryboard_disabled___zHT2 {
  cursor: default;
}
.VideoStoryboard_imageWrapper__QlFJ9.VideoStoryboard_disabled___zHT2:hover {
  transform: none;
  border-color: transparent;
}

/* --- New Video Clip Gallery Styles --- */

.VideoStoryboard_sceneVideoSelector__80twZ {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-top: 0.75rem;
  margin-top: 0.75rem;
  border-top: 1px solid #383838;
}

.VideoStoryboard_videoWrapper__Ev3og {
  position: relative;
  cursor: pointer;
  border: 2px solid #00e5ff; /* Bright cyan border for videos - highly visible */
  border-radius: 6px;
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  width: 150px;
  background-color: #1e1e1e;
  /* Maintain aspect ratio */
  aspect-ratio: 1 / 1;
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.6); /* Bright cyan aura */
}

.VideoStoryboard_videoWrapper__Ev3og:hover {
  transform: scale(1.05);
  border-color: #40f4ff;
  box-shadow: 0 0 16px rgba(0, 229, 255, 0.8);
}

.VideoStoryboard_videoWrapper__Ev3og.VideoStoryboard_selected__cdQFF {
  border-color: #00fff7; /* Brighter cyan for selected videos */
  box-shadow: 0 0 20px rgba(0, 255, 247, 0.9);
}

/* Status overlay for video clips */
.VideoStoryboard_videoStatusOverlay__LgYfi {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
  pointer-events: none;
}

.VideoStoryboard_videoStatusText__A1uJs {
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.VideoStoryboard_videoStatusSpinner__N3Z_P {
  width: 24px;
  height: 24px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top: 2px solid #6c5ce7;
  border-radius: 50%;
  animation: VideoStoryboard_spin__enAZH 1s linear infinite;
}

@keyframes VideoStoryboard_spin__enAZH {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.VideoStoryboard_videoStatusError__EXjDm {
  color: #ff6b6b;
  font-size: 11px;
  text-align: center;
  padding: 0 8px;
  margin-top: 6px;
}

.VideoStoryboard_noChargeDisclaimer__ph_Vh {
  color: #78ff78;
  font-size: 9px;
  text-align: center;
  margin-top: 4px;
  font-weight: 500;
  opacity: 0.8;
}

.VideoStoryboard_videoThumbnail__SiSl6 {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Performance optimizations for smooth video playback */
  will-change: transform;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* Video info overlay */
.VideoStoryboard_videoInfoOverlay__XTfNE {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(0, 0, 0, 0.8);
  border-radius: 3px;
  padding: 2px 4px;
  z-index: 5;
  -webkit-backdrop-filter: blur(4px);
          backdrop-filter: blur(4px);
}

.VideoStoryboard_videoInfo__nYCY4 {
  display: flex;
  flex-direction: column;
  gap: 1px;
  align-items: flex-end;
}

.VideoStoryboard_videoModel__kVcJv {
  font-size: 8px;
  font-weight: 600;
  color: #e0e0e0;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  line-height: 1;
}

.VideoStoryboard_videoDuration__FgWWQ {
  font-size: 7px;
  color: var(--duration-accent);
  font-weight: 600;
  line-height: 1;
}

@media (max-width: 768px) {
    .VideoStoryboard_scene__DyN2Q {
        flex-direction: column;
    }

    .VideoStoryboard_sceneImageSelector__WPGx_ {
        justify-content: center; /* Center images on mobile */
    }

    .VideoStoryboard_imageWrapper__QlFJ9,
    .VideoStoryboard_videoWrapper__Ev3og {
        width: 120px;
    }
}

.ProjectVideos_projectVideosSection__9T4Mq {
  padding: 1rem 1.5rem;
  background-color: #1e1e22; /* Slightly different background to stand out */
  border-radius: 8px;
  margin: 0 1.5rem 1.5rem 1.5rem;
  border: 1px solid #3a3a3e;
}

.ProjectVideos_projectVideosTitle__LrnS_ {
  font-size: 1rem;
  font-weight: 600;
  color: #e5e5e6;
  margin: 0 0 1rem 0;
  padding-bottom: 1rem;
  border-bottom: 1px solid #3a3a3e;
}

.ProjectVideos_carouselContainer__a5qez {
  display: flex;
  overflow-x: auto;
  gap: 1.5rem;
  padding-bottom: 1rem; /* For scrollbar */
  scrollbar-width: thin;
  scrollbar-color: #4a4a4e #2a2a2e;
}

/* Custom scrollbar for Webkit browsers */
.ProjectVideos_carouselContainer__a5qez::-webkit-scrollbar {
  height: 8px;
}
.ProjectVideos_carouselContainer__a5qez::-webkit-scrollbar-track {
  background: #2a2a2e;
  border-radius: 4px;
}
.ProjectVideos_carouselContainer__a5qez::-webkit-scrollbar-thumb {
  background-color: #4a4a4e;
  border-radius: 4px;
  border: 2px solid #2a2a2e;
}
.ProjectVideos_carouselContainer__a5qez::-webkit-scrollbar-thumb:hover {
  background-color: #5a5a5e;
}

.ProjectVideos_videoItem__GVWRP {
  position: relative;
  flex: 0 0 200px; /* Fixed width for each thumbnail */
  height: 120px;
  border-radius: 8px;
  overflow: hidden;
  background-color: #111;
  cursor: pointer;
  transition: transform 0.2s ease-in-out;
  display: flex;
  flex-direction: column;
}

.ProjectVideos_videoItem__GVWRP:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.ProjectVideos_videoThumbnail__7fPT9 {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Performance optimizations for smooth video playback */
  will-change: transform;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.ProjectVideos_videoOverlay__nRpFz {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
}

.ProjectVideos_videoOverlay__nRpFz.ProjectVideos_visible__pegmU {
  opacity: 1;
}

.ProjectVideos_videoActions__YtcuO {
  display: flex;
  gap: 1rem;
}

.ProjectVideos_actionButton__kCen_ {
  background: rgba(30, 30, 34, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.2s;
  padding: 0; /* Reset padding */
  text-decoration: none; /* For <a> tags */
}

.ProjectVideos_actionButton__kCen_:hover {
  background-color: #4CAF50;
  transform: scale(1.1);
}

.ProjectVideos_videoLabel__Yfe96 {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.75rem 0.5rem 0.25rem;
  text-align: right;
  box-sizing: border-box;
}

/* --- Responsive Design for Mobile --- */
@media (max-width: 768px) {
  .ProjectVideos_projectVideosSection__9T4Mq {
    margin: 0 0 1rem 0; /* Full width on mobile */
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  .ProjectVideos_carouselContainer__a5qez {
    position: relative;
    padding: 0 1rem; /* Add padding for content */
    gap: 1rem;
    /* Hide scrollbar visually but keep it functional */
    scrollbar-width: none; /* For Firefox */
  }
  
  .ProjectVideos_carouselContainer__a5qez::-webkit-scrollbar {
    display: none; /* For Webkit browsers */
  }

  /* Add a fade-out effect to indicate more content */
  .ProjectVideos_carouselContainer__a5qez::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 50px;
    background: linear-gradient(to right, rgba(30, 30, 34, 0), #1e1e22);
    pointer-events: none; /* Allows clicking through the gradient */
    transition: opacity 0.3s;
  }

  /* Hide the fade-out when scrolled to the end */
  .ProjectVideos_carouselContainer__a5qez.ProjectVideos_scrolled-to-end__WXDkT::after {
    opacity: 0;
  }
  
  .ProjectVideos_videoItem__GVWRP {
    flex: 0 0 180px; /* Slightly smaller thumbnails for mobile */
    height: 100px;
  }
}

.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;
  /* Performance optimizations for smooth video playback */
  will-change: transform, filter;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.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);
}


