/* Cinematic Story View Module - Exact Restructured Layout CSS */

#cinematicstory-editor-view {
  font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  width: 100%;
  height: calc(100vh - 64px);
  background: #0b0d12;
  color: #c5c6c7;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

#cinematicstory-editor-screen {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #0b0d12;
  overflow: hidden;
}

.cs-main-workspace {
  flex: 1;
  height: calc(100vh - 64px - 52px);
  display: flex;
  flex-direction: row;
  align-items: stretch;
  overflow: hidden;
  position: relative;
}

/* Custom Scrollbars */
.cs-options-sidebar::-webkit-scrollbar,
#cinematicstory-timeline-cards-container::-webkit-scrollbar,
#cinematicstory-create-screen::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

.cs-options-sidebar::-webkit-scrollbar-track,
#cinematicstory-timeline-cards-container::-webkit-scrollbar-track,
#cinematicstory-create-screen::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}

.cs-options-sidebar::-webkit-scrollbar-thumb,
#cinematicstory-timeline-cards-container::-webkit-scrollbar-thumb,
#cinematicstory-create-screen::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.cs-options-sidebar::-webkit-scrollbar-thumb:hover,
#cinematicstory-timeline-cards-container::-webkit-scrollbar-thumb:hover,
#cinematicstory-create-screen::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Front Page ("Let's make a video") Dark Mode */
#cinematicstory-create-screen {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: flex-start;
  flex-direction: column;
  background: #0b0d12;
  padding: 36px 20px 60px 20px;
  box-sizing: border-box;
  z-index: 10;
  overflow-y: auto;
}

.cs-create-container {
  width: 100%;
  max-width: 860px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin: 0 auto;
}

.cs-page-title {
  font-size: 2.2rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
  text-align: center;
  font-family: 'Outfit', sans-serif;
}

.cs-script-box-container {
  width: 100%;
  background: #131722;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 18px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  margin-bottom: 8px;
}

.cs-script-textarea {
  width: 100%;
  min-height: 110px;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 0.95rem;
  font-family: inherit;
  resize: vertical;
  line-height: 1.5;
}

.cs-script-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 12px;
  flex-wrap: wrap;
  gap: 12px;
}

.cs-icon-circle-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #8b9bb4;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.85rem;
}

.cs-icon-circle-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: #66fcf1;
}

/* Filter Pills */
.cs-filter-pills-row {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 0 8px 0;
  margin-top: 4px;
}

.cs-filter-pill {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #c5c6c7;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.cs-filter-pill:hover, .cs-filter-pill.active {
  background: rgba(102, 252, 241, 0.1);
  border-color: #66fcf1;
  color: #66fcf1;
}

/* Asset Carousel Grid */
.cs-asset-carousel {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 2px 14px 2px;
  box-sizing: border-box;
}

.cs-asset-card {
  width: 150px;
  min-width: 150px;
  height: 180px;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  background: #131722;
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.cs-asset-card:hover {
  transform: translateY(-3px);
  border-color: #66fcf1;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.cs-asset-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cs-asset-tag {
  position: absolute;
  bottom: 8px;
  left: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.7);
  padding: 4px 6px;
  border-radius: 4px;
  font-size: 0.7rem;
  color: #fff;
  font-weight: bold;
}

/* My Videos Grid */
.cs-search-box {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 6px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 200px;
}

.cs-search-input {
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 0.8rem;
  width: 100%;
}

.cs-my-videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  width: 100%;
}

.cs-video-card {
  background: #131722;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.cs-video-card-delete {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.75);
  border: 1px solid rgba(255, 69, 58, 0.5);
  color: #ff453a;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: all 0.2s ease;
  z-index: 10;
  font-size: 0.75rem;
}

.cs-video-card:hover .cs-video-card-delete {
  opacity: 1;
}

.cs-video-card:hover {
  transform: translateY(-3px);
  border-color: #66fcf1;
  box-shadow: 0 8px 20px rgba(102, 252, 241, 0.15);
}

.cs-video-card-thumb {
  width: 100%;
  aspect-ratio: 9/11;
  background: #000;
  overflow: hidden;
}

.cs-video-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cs-video-card-info {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cs-video-card-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}

.cs-video-card-time {
  font-size: 0.7rem;
  color: #8b9bb4;
}

/* Leftmost Vertical Navigation Rail (Stretched Full Vertical Height) */
.cs-nav-rail {
  width: 60px;
  min-width: 60px;
  height: 100%;
  background: #0d0f17;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 14px;
  gap: 16px;
  z-index: 12;
  box-sizing: border-box;
  flex-shrink: 0;
}

.cs-rail-btn {
  background: transparent;
  border: none;
  color: #8b9bb4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 1rem;
  cursor: pointer;
  width: 52px;
  height: 52px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.cs-rail-btn span {
  font-size: 0.65rem;
  font-weight: 600;
}

.cs-rail-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.cs-rail-btn.active {
  background: rgba(102, 252, 241, 0.1);
  color: #66fcf1;
}

/* Left Options Sidebar Container (Stretched Full Vertical Height) */
.cs-options-sidebar {
  width: 280px;
  min-width: 280px;
  max-width: 280px;
  height: 100%;
  background: #121622;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  padding: 16px;
  box-sizing: border-box;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
}

.cs-sidebar-view {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}

.cs-sidebar-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 10px;
}

/* Sidebar Accordions */
.cs-sidebar-accordion {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 10px 0;
}

.cs-accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  padding: 4px 0;
  user-select: none;
  transition: color 0.2s ease;
}

.cs-accordion-header:hover {
  color: #66fcf1;
}

.cs-accordion-body {
  margin-top: 10px;
}

/* Captions Card & Segmented Control Groups */
.cs-captions-card {
  background: #1a202c;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
}

/* Green Toggle Switch */
.cs-toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.cs-toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.cs-toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #334155;
  transition: .3s;
  border-radius: 24px;
}

.cs-toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.cs-toggle-switch input:checked + .cs-toggle-slider {
  background-color: #22c55e;
}

.cs-toggle-switch input:checked + .cs-toggle-slider:before {
  transform: translateX(20px);
}

/* Segmented Tabs Group (S, M, L, XL & Position Presets) */
.cs-segmented-group {
  display: flex;
  align-items: center;
  background: #1a202c;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  overflow: hidden;
  box-sizing: border-box;
  width: 100%;
}

.cs-segment-btn {
  flex: 1;
  background: transparent;
  border: none;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  color: #8b9bb4;
  padding: 8px 0;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.cs-segment-btn:last-child {
  border-right: none;
}

.cs-segment-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.cs-segment-btn.active {
  background: rgba(102, 252, 241, 0.15);
  color: #66fcf1;
}

/* Position Icon Presets (Top, Center, Bottom icons) */
.cs-pos-icon-box {
  width: 18px;
  height: 24px;
  background: #334155;
  border-radius: 3px;
  position: relative;
  display: inline-block;
  transition: all 0.2s ease;
}

.cs-segment-btn.active .cs-pos-icon-box {
  background: #475569;
}

.cs-pos-bar-top {
  position: absolute;
  top: 3px;
  left: 2px;
  right: 2px;
  height: 5px;
  background: #000;
  border-radius: 1px;
}

.cs-pos-bar-center {
  position: absolute;
  top: 9px;
  left: 2px;
  right: 2px;
  height: 6px;
  background: #000;
  border-radius: 1px;
}

.cs-pos-bar-bottom {
  position: absolute;
  bottom: 3px;
  left: 2px;
  right: 2px;
  height: 5px;
  background: #000;
  border-radius: 1px;
}

.cs-setting-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #8b9bb4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.cs-select-input {
  background: #1a202c;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.82rem;
  outline: none;
  cursor: pointer;
  width: 100%;
}

.cs-select-input:hover {
  border-color: #66fcf1;
}

.cs-action-btn {
  width: 100%;
  background: #1a202c;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 10px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.2s ease;
}

.cs-action-btn:hover {
  border-color: #66fcf1;
  background: rgba(102, 252, 241, 0.05);
}

.cs-btn-outline {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 10px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.cs-btn-outline:hover {
  border-color: #66fcf1;
  color: #66fcf1;
  background: rgba(102, 252, 241, 0.08);
}

/* Style Card Menu Dropdown */
.cs-dropdown-menu {
  background: #1a202c;
  color: #fff;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 36px rgba(0,0,0,0.5);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 6px;
}

.cs-dropdown-item, .cs-voice-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cs-dropdown-item:hover, .cs-voice-item:hover, .cs-voice-item.active {
  background: rgba(255, 255, 255, 0.08);
}

/* Transitions Cards Grid */
.cs-trans-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.cs-trans-card {
  background: #18202c;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cs-trans-card:hover {
  border-color: #66fcf1;
  transform: translateY(-2px);
}

.cs-trans-card.active {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.12);
}

.cs-trans-card-icon {
  width: 42px;
  height: 60px;
  background: rgba(192, 132, 252, 0.22);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 900;
  color: #fff;
  position: relative;
  overflow: hidden;
  transition: all 0.25s ease;
  user-select: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.cs-trans-card:hover .cs-trans-card-icon {
  background: rgba(192, 132, 252, 0.38);
}

.cs-trans-card.active .cs-trans-card-icon {
  background: #a855f7;
  color: #fff;
  box-shadow: 0 0 14px rgba(168, 85, 247, 0.7);
}

/* Micro Animations for transition cards on click */
.cs-trans-card-icon.anim-fade {
  animation: csFadeAnim 0.5s ease forwards;
}

.cs-trans-card-icon.anim-cube {
  animation: csCubeAnim 0.5s ease forwards;
}

.cs-trans-card-icon.anim-flip {
  animation: csFlipAnim 0.5s ease forwards;
}

.cs-trans-card-icon.anim-slide {
  animation: csSlideAnim 0.5s ease forwards;
}

.cs-trans-card-icon.anim-wipe {
  animation: csWipeAnim 0.5s ease forwards;
}

@keyframes csFadeAnim {
  0% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.2; transform: scale(0.9); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes csCubeAnim {
  0% { transform: rotateY(0deg); }
  50% { transform: rotateY(90deg); }
  100% { transform: rotateY(0deg); }
}

@keyframes csFlipAnim {
  0% { transform: rotateX(0deg); }
  50% { transform: rotateX(180deg); }
  100% { transform: rotateX(360deg); }
}

@keyframes csSlideAnim {
  0% { transform: translateX(0); }
  50% { transform: translateX(100%); opacity: 0; }
  51% { transform: translateX(-100%); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}

@keyframes csWipeAnim {
  0% { clip-path: inset(0 0 0 0); }
  50% { clip-path: inset(0 100% 0 0); }
  100% { clip-path: inset(0 0 0 0); }
}

/* Right Viewport Stage & Canvas Workspace */
.cs-right-workspace {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  min-height: 0;
  background: #0d0f17;
  height: 100%;
}

.cs-viewport-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  min-height: 0;
  overflow: hidden;
  position: relative;
  gap: 12px;
}

#cinematicstory-canvas-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: #000;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  flex-shrink: 1;
}

#cinematicstory-canvas-wrapper.ratio-9-16 {
  height: calc(100% - 50px);
  max-height: 410px;
  aspect-ratio: 9 / 16;
  width: auto !important;
}

#cinematicstory-canvas-wrapper.ratio-16-9 {
  width: 100%;
  max-width: 600px;
  max-height: 337px;
  aspect-ratio: 16 / 9;
  height: auto !important;
}

#cinematicstory-canvas-wrapper.ratio-1-1 {
  height: calc(100% - 50px);
  max-height: 360px;
  aspect-ratio: 1 / 1;
  width: auto !important;
}

#cinematicstory-visualizer-canvas {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Media Player Transport Control Bar Pill (Directly UNDER Canvas) */
.cs-player-pill-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  flex-shrink: 0;
  margin-top: 2px;
}

.cs-player-pill {
  background: rgba(18, 24, 36, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 30px;
  padding: 4px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  white-space: nowrap;
}

.cs-pill-btn {
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 0.8rem;
  padding: 2px 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.cs-pill-btn:hover {
  color: #66fcf1;
}

.cs-pill-time {
  font-size: 0.72rem;
  font-weight: 700;
  color: #8b9bb4;
  white-space: nowrap;
}

/* Bottom Storyboard Timeline Panel (Scene Bar) */
.cs-timeline-panel {
  height: 130px;
  min-height: 130px;
  max-height: 130px;
  width: 100%;
  background: #111520;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  padding: 0;
  box-sizing: border-box;
  overflow: hidden;
  flex-shrink: 0;
  z-index: 10;
}

#cinematicstory-timeline-cards-container {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  align-items: stretch !important;
  width: 100% !important;
  height: 100% !important;
  gap: 0px !important;
  box-sizing: border-box !important;
}

.cs-timeline-card {
  min-width: 180px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  padding: 0 4px 6px 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  box-sizing: border-box;
  background: #111520;
}

.cs-timeline-card.expanded {
  min-width: auto !important;
  flex-shrink: 0;
}

.cs-timeline-card:first-child {
  border-left: none;
}

.cs-card-narration {
  font-size: 0.82rem;
  color: #fff;
  white-space: nowrap;
  width: 100%;
  text-align: left;
  font-weight: 500;
  line-height: 1.4;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
}

.cs-narration-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
}

.cs-ellipsis-btn {
  color: #8b9bb4;
  font-weight: 700;
  cursor: pointer;
  padding: 0 4px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.cs-ellipsis-btn:hover {
  color: #66fcf1;
  background: rgba(102, 252, 241, 0.15);
}

.cs-word-item {
  padding: 2px 4px;
  border-radius: 4px;
  transition: all 0.15s ease;
  cursor: pointer;
}

.cs-word-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

.cs-word-item.cs-drag-target {
  background: rgba(102, 252, 241, 0.3) !important;
  border-left: 2px solid #66fcf1;
}

/* Draggable Pill Handle Divider Positioned Right On Top of Scene Divider Border Line */
.cs-pill-handle-wrapper {
  position: absolute;
  top: 4px;
  right: -8px;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 24px;
  cursor: col-resize;
  user-select: none;
}

.cs-pill-handle-bar {
  width: 7px;
  height: 20px;
  background: #3b82f6;
  border-radius: 4px;
  transition: all 0.2s ease;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.4);
}

.cs-pill-handle-wrapper:hover .cs-pill-handle-bar,
.cs-dragging-pill .cs-pill-handle-bar {
  background: #60a5fa;
  box-shadow: 0 0 10px rgba(96, 165, 250, 0.8);
  width: 9px;
}

.cs-card-thumb-wrapper {
  height: 64px;
  width: 64px;
  min-width: 64px;
  position: relative;
  background: #1a202c;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: all 0.2s ease;
  margin-top: 8px;
}

/* Top-Right Corner Duration Badge */
.cs-card-duration-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 4px;
  backdrop-filter: blur(4px);
  z-index: 2;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  font-family: monospace;
}

.cs-timeline-card.active .cs-card-thumb-wrapper {
  border-color: #66fcf1;
  box-shadow: 0 0 10px rgba(102, 252, 241, 0.4);
}

.cs-card-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Modal Overlay */
.cs-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.cs-modal-dialog {
  width: 540px;
  max-width: 90vw;
  max-height: 85vh;
  background: #121622;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: #fff;
}
