/* Professional NLE Theme */
/* Based on modern video editing software like Premiere Pro, DaVinci Resolve */

/* Import Open Sans font */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;500;600;700&display=swap');

/* Unified Streaming NLE Color Palette */
:root {
  /* Brand Colors */
  --petrol-blue: #1e4a5c;
  --petrol-blue-65: rgba(30, 74, 92, 0.65);
  --primary-bg: #030041;
  
  /* Standard Gray Scale */
  --white: #ffffff;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  
  /* Background Colors */
  --bg-primary: var(--primary-bg);
  --bg-secondary: #f1f5f9;
  --bg-tertiary: #e2e8f0;
  --bg-panel: #ffffff;
  --bg-header: var(--primary-bg);
  --bg-timeline: #ffffff;
  --bg-elevated: #ffffff;
  
  /* Text Colors */
  --text-primary: var(--gray-900);
  --text-secondary: var(--gray-700);
  --text-muted: var(--gray-500);
  --text-accent: #3b82f6;
  --text-inverse: var(--white);
  
  /* Unified Streaming Accent Colors */
  --accent-blue: #3b82f6;
  --accent-blue-hover: #2563eb;
  --accent-blue-light: #60a5fa;
  --accent-green: #10b981;
  --accent-orange: #f97316;
  --accent-red: #ef4444;
  --accent-purple: #7c3aed;
  --accent-yellow: #f59e0b;
  
  /* Modern UI Colors */
  --border-color: #cbd5e1;
  --border-light: #e2e8f0;
  --border-subtle: #f1f5f9;
  --hover-bg: rgba(59, 130, 246, 0.05);
  --active-bg: rgba(59, 130, 246, 0.1);
  --selection-bg: rgba(59, 130, 246, 0.15);
  
  /* Unified Streaming Timeline Colors */
  --timeline-bg: #ffffff;
  --track-bg: #ffffff;
  --track-border: #e2e8f0;
  --clip-bg: linear-gradient(135deg, #3b82f6, #2563eb);
  --clip-selected: rgba(59, 130, 246, 0.1);
  --clip-border-selected: #3b82f6;
  --playhead-color: #ef4444;
  
  /* Modern Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  
  /* Font */
  --font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  
  /* Spacing */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 12px;
  --spacing-lg: 16px;
  --spacing-xl: 20px;
  --spacing-xxl: 24px;
  
  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;
}

/* Reset and Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background: var(--bg-primary);
  color: var(--text-primary);
  overflow: hidden;
  height: 100vh;
  font-size: 14px;
  line-height: 1.4;
}

/* NLE Workspace Layout */
.nle-workspace {
  display: flex;
  flex-direction: column;
  height: 100vh;
  min-height: 600px;
}

/* Modern Header Bar */
.nle-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-header);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0 var(--spacing-xl);
  height: 60px;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(20px);
}

.header-left {
  display: flex;
  align-items: center;
  gap: var(--spacing-lg);
}

.nle-logo {
  height: 40px;
  filter: brightness(1.2);
}

.header-title-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nle-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-inverse);
  margin: 0;
}

.nle-subtitle {
  font-size: 13px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
}


/* Playback Information */
.playback-info {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: var(--spacing-sm) 0;
  flex-shrink: 0;
  width: 100%;
}

.duration-display {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  background: var(--bg-tertiary);
  padding: var(--spacing-sm) var(--spacing-lg);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.timecode {
  font-family: 'Monaco', monospace;
  font-size: 14px;
  color: var(--text-accent);
  font-weight: 600;
  letter-spacing: 0.5px;
}

.timecode-separator {
  color: var(--text-muted);
  font-weight: 400;
}

.header-right {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

.help-btn, .status-indicator {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-inverse);
  padding: var(--spacing-sm);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.help-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent-blue-light);
}

.status-indicator {
  color: var(--accent-green);
  cursor: default;
}

/* Modern Workspace Grid */
.nle-workspace-grid {
  display: grid;
  grid-template-columns: minmax(280px, 340px) 1fr minmax(260px, 320px);
  grid-template-rows: minmax(300px, 1fr) minmax(140px, 180px);
  grid-template-areas: 
    "media-bin preview properties"
    "timeline timeline timeline";
  height: calc(100vh - 60px - 30px); /* Header and statusbar */
  min-height: 440px;
  gap: 12px;
  padding: 12px;
  background: var(--bg-primary);
  overflow: hidden;
}

/* Unified Streaming Panel Styles */
.media-bin-panel,
.preview-panel,
.properties-panel,
.timeline-panel {
  background: white;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
  backdrop-filter: blur(10px);
}

.media-bin-panel {
  grid-area: media-bin;
}

.preview-panel {
  grid-area: preview;
  overflow: hidden;
}

.properties-panel {
  grid-area: properties;
}

.timeline-panel {
  grid-area: timeline;
}

/* Modern Panel Headers */
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  padding: 16px 20px;
  flex-shrink: 0;
  border-radius: 16px 16px 0 0;
}

.panel-header h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-family: var(--font-primary);
}

.panel-controls,
.monitor-controls,
.timeline-controls {
  display: flex;
  gap: 8px;
}

.panel-btn,
.timeline-btn {
  background: white;
  border: 2px solid #e2e8f0;
  color: #64748b;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.2s;
  font-family: var(--font-primary);
}

.panel-btn:hover,
.timeline-btn:hover {
  border-color: #4ea1ff;
  color: #1e293b;
  transform: translateY(-1px);
}

.timeline-btn.active {
  background: #4ea1ff;
  border-color: #4ea1ff;
  color: white;
}

/* Media Bin Panel */
.media-bin-content {
  flex: 1;
  overflow-y: auto;
  padding: var(--spacing-lg);
}

.bin-section {
  margin-bottom: 24px;
}

.bin-section h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 12px 0;
  font-family: var(--font-primary);
}

.clips-container {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-xxl);
  color: var(--text-muted);
}

.loading-spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--border-color);
  border-top: 2px solid var(--accent-blue);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: var(--spacing-md);
}

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

/* Modern Media Segments - Unified Streaming Style */
.media-segment {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  background: white;
  cursor: grab;
  transition: all 0.3s ease;
  text-align: left;
  font-family: var(--font-primary);
  font-weight: 400;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: inherit;
  width: 100%;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.media-segment:hover {
  border-color: #4ea1ff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.media-segment:active {
  cursor: grabbing;
}

.media-segment.dragging {
  opacity: 0.6;
  transform: rotate(2deg);
}

.segment-title {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
  font-size: 0.95rem;
}

.segment-details {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.3;
  opacity: 0.7;
}

/* Project Stats */
.project-stats {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: #f1f5f9;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.stat-label {
  font-size: 0.85rem;
  color: #64748b;
  font-weight: 500;
}

.stat-value {
  font-size: 0.85rem;
  font-weight: 600;
  color: #1e293b;
}

/* Preview Panel */
.preview-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: var(--spacing-md);
  min-height: 0;
  overflow: hidden;
  position: relative;
}

.video-monitor-wrapper {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  height: 100%;
  justify-content: center;
  align-items: center;
}

.video-monitor {
  position: relative;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: calc(100vh - 350px);
  box-shadow: var(--shadow-xl);
  border: 2px solid var(--border-color);
}

#videoPlayer {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.overlay-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  border: none;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  font-size: 24px;
  cursor: pointer;
  display: none;
  z-index: 10;
  transition: all 0.3s;
  backdrop-filter: blur(10px);
}

.overlay-play-btn:hover {
  background: rgba(0, 0, 0, 0.9);
  transform: translate(-50%, -50%) scale(1.1);
}

.monitor-overlay {
  position: absolute;
  top: var(--spacing-md);
  right: var(--spacing-md);
  background: rgba(0, 0, 0, 0.8);
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-md);
  backdrop-filter: blur(10px);
  z-index: 15;
}

.monitor-info {
  display: flex;
  gap: var(--spacing-md);
  font-size: 12px;
  color: white;
  font-weight: 500;
}

.preview-scrubber {
  margin-top: var(--spacing-md);
}

.scrubber-bar {
  width: 100%;
  height: 4px;
  background: var(--bg-tertiary);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  appearance: none;
}

.scrubber-bar::-webkit-slider-thumb {
  appearance: none;
  width: 14px;
  height: 14px;
  background: var(--accent-blue);
  border-radius: 50%;
  cursor: pointer;
}

/* Properties Panel */
.properties-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  position: relative;
}

.properties-content-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

.properties-scrollable {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  padding-bottom: 0;
}

.properties-fixed-bottom {
  flex-shrink: 0;
  padding: 0 20px 20px;
  background: white;
  border-top: 1px solid var(--border-light);
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
}

.property-section {
  margin-bottom: 24px;
}

.property-section h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 12px 0;
  font-family: var(--font-primary);
}

/* About Section */
.about-section {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
}

.about-text {
  font-size: 0.9rem;
  line-height: 1.5;
  color: #475569;
  margin-bottom: 12px;
}

.feature-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: #1e293b;
  padding: 6px 0;
}

.selection-details {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
}

.no-selection {
  color: #64748b;
  font-style: italic;
  text-align: center;
  padding: 20px;
  font-size: 0.9rem;
}

.export-controls {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

/* Unified Streaming Button Styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  background: white;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  font-family: var(--font-primary);
  font-weight: 500;
  letter-spacing: 0.02em;
  font-size: 14px;
  color: #333;
  text-decoration: none;
  user-select: none;
}

.btn:hover {
  border-color: #4ea1ff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.btn.primary {
  background: #4ea1ff;
  border-color: #4ea1ff;
  color: white;
  font-weight: 600;
}

.btn.primary:hover {
  background: #3b82f6;
  border-color: #3b82f6;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(78, 161, 255, 0.3);
}

.btn.secondary {
  background: white;
  border-color: #e2e8f0;
  color: #64748b;
}

.btn.secondary:hover {
  border-color: #4ea1ff;
  background: #f8fafc;
}

.export-options {
  padding: var(--spacing-sm);
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
}

.export-options label {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
}

/* Debug Panel */
.debug-toggle {
  width: 100%;
  background: #64748b;
  border: none;
  color: white;
  padding: 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s;
  font-family: var(--font-primary);
  font-weight: 400;
  letter-spacing: 0.02em;
}

.debug-toggle:hover {
  background: #475569;
}

.debug-panel {
  max-height: 200px;
  overflow-y: auto;
  margin-top: 12px;
  display: none;
}

.debug-panel.show {
  display: block;
}

.debug-content {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 12px;
  font-family: 'Monaco', monospace;
  font-size: 11px;
  color: #e2e8f0;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Timeline Panel */
.timeline-workspace {
  display: flex;
  flex-direction: column;
  background: var(--timeline-bg);
  overflow: hidden;
  flex: 1;
  min-height: 0;
}

.timeline-separator {
  width: 1px;
  height: 20px;
  background: var(--border-color);
  margin: 0 var(--spacing-sm);
}

/* Timeline Ruler */
.timeline-ruler {
  position: relative;
  height: 40px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  overflow: hidden;
}

.ruler-marks {
  height: 100%;
  position: relative;
  margin-left: 120px;
}

.ruler-mark {
  position: absolute;
  border-left: 1px solid var(--border-light);
  height: 100%;
  display: flex;
  align-items: center;
  padding-left: var(--spacing-sm);
  font-size: 13px;
  color: var(--text-muted);
  font-family: 'Monaco', monospace;
  font-weight: 500;
}

.ruler-mark-minor {
  position: absolute;
  border-left: 1px solid var(--border-color);
  height: 50%;
  top: 25%;
  width: 0;
}

.ruler-mark-zero {
  position: absolute;
  font-weight: bold !important;
  color: var(--accent-blue) !important;
  background: rgba(59, 130, 246, 0.1);
  padding: 0 var(--spacing-sm);
}

.playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--playhead-color);
  z-index: 100;
  pointer-events: none;
}

.playhead::before {
  content: '';
  position: absolute;
  top: -6px;
  left: -8px;
  width: 18px;
  height: 18px;
  background: var(--playhead-color);
  clip-path: polygon(50% 100%, 0 0, 100% 0);
}

/* Timeline Tracks */
.timeline-tracks-container {
  flex: 0 1 auto;
  overflow: visible;
}

.timeline-tracks {
  height: fit-content;
}

.track {
  display: flex;
  height: 80px;
  border-bottom: 1px solid var(--track-border);
  background: var(--track-bg);
}

.track:last-child {
  border-bottom: none;
}

.track-label {
  width: 120px;
  background: var(--bg-secondary);
  border-right: 1px solid var(--track-border);
  display: flex;
  flex-direction: column;
  padding: var(--spacing-sm);
  gap: var(--spacing-xs);
}

.track-icon {
  font-size: 16px;
}

.track-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}

.track-info {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
}

.track-status {
  background: var(--accent-green);
  color: white;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.track-content {
  flex: 1;
  position: relative;
  background: var(--track-bg);
  transition: background-color 0.2s;
}

.track-content.drag-over {
  background: rgba(59, 130, 246, 0.1);
  border: 2px dashed var(--accent-blue);
}

/* Track Placeholder */
.track-placeholder {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  color: var(--text-muted);
  font-size: 14px;
  opacity: 0.6;
  pointer-events: none;
  white-space: nowrap;
}

.placeholder-icon {
  font-size: 20px;
  animation: bounce 2s ease-in-out infinite;
}

.placeholder-text {
  font-weight: 500;
  letter-spacing: 0.02em;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

/* Hide placeholder when track has content */
.track-content:has(.timeline-clip) .track-placeholder {
  display: none;
}

/* Unified Streaming Timeline Clips */
.timeline-clip {
  position: absolute;
  height: 60px;
  top: 10px;
  background: #4ea1ff;
  border-radius: 12px;
  display: flex;
  align-items: center;
  padding: 0 var(--spacing-md);
  color: white;
  cursor: move;
  user-select: none;
  font-size: 12px;
  font-weight: 600;
  border: 2px solid #4ea1ff;
  transition: all 0.3s ease;
  min-width: 40px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  font-family: var(--font-primary);
  letter-spacing: 0.02em;
}

.timeline-clip:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
  border-color: #4ea1ff;
}

.timeline-clip.selected {
  border-color: #4ea1ff;
  background: #4ea1ff;
  box-shadow: 0 0 0 2px #4ea1ff, 0 4px 12px rgba(59, 130, 246, 0.15);
}

.timeline-clip.dragging {
  opacity: 0.7;
  transform: rotate(2deg);
  z-index: 1000;
}

/* NLE Insertion Indicator */
.insertion-indicator {
  position: absolute;
  width: 2px;
  height: 100%;
  background: var(--accent-orange);
  pointer-events: none;
  display: none;
  z-index: 1000;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.8);
  animation: pulse-indicator 1s ease-in-out infinite alternate;
}

@keyframes pulse-indicator {
  from {
    opacity: 0.8;
    transform: scaleX(1);
  }
  to {
    opacity: 1;
    transform: scaleX(1.2);
  }
}

/* Snap Guide */
.snap-guide {
  position: absolute;
  width: 1px;
  height: 100%;
  background: var(--accent-orange);
  display: none;
  pointer-events: none;
  z-index: 999;
  opacity: 0.8;
}

/* Status Bar */
.nle-statusbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #1e293b;
  border-top: 1px solid #334155;
  padding: 0 16px;
  height: 30px;
  font-size: 11px;
  flex-shrink: 0;
}

.status-left,
.status-center,
.status-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-text {
  color: #94a3b8;
}

.render-progress {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.progress-bar {
  width: 200px;
  height: 4px;
  background: var(--bg-tertiary);
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--accent-blue);
  transition: width 0.3s;
}

.progress-text {
  color: var(--text-muted);
}

.memory-usage,
.fps-counter {
  color: var(--text-muted);
  font-family: 'Monaco', monospace;
}

/* Empty States */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-xxl);
  color: var(--text-muted);
  text-align: center;
}

.empty-state > div:first-child {
  font-size: 2rem;
  margin-bottom: var(--spacing-md);
}

/* Animations */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.media-segment {
  animation: slideIn 0.3s ease-out;
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Focus States */
.control-btn:focus,
.panel-btn:focus,
.timeline-btn:focus,
.btn:focus {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}

/* Responsive Design */
@media (max-width: 1400px) and (max-height: 900px) {
  .nle-workspace-grid {
    grid-template-columns: minmax(240px, 300px) 1fr minmax(220px, 280px);
    grid-template-rows: minmax(280px, 1fr) minmax(120px, 160px);
    gap: 8px;
    padding: 8px;
  }
  
  .video-monitor {
    max-height: calc(100vh - 320px);
    max-width: 85%;
  }
  
  .video-monitor-wrapper {
    max-width: 100%;
  }
  
  .panel-header {
    padding: 12px 16px;
  }
  
  .property-section {
    margin-bottom: 16px;
  }
  
  .about-section {
    display: none;
  }
}

@media (max-width: 1200px) {
  .nle-workspace-grid {
    grid-template-columns: 300px 1fr 280px;
  }
  
  .video-monitor-wrapper {
    max-width: 100%;
  }
}

/* Compact mode for 14" displays */
@media (max-height: 800px) and (min-width: 1200px) {
  .nle-header {
    height: 48px;
  }
  
  .nle-statusbar {
    height: 24px;
  }
  
  .header-title-group .nle-subtitle {
    display: none;
  }
  
  .video-monitor {
    max-height: calc(100vh - 380px);
    max-width: 80%;
  }
  
  .video-monitor-wrapper {
    max-width: 100%;
  }
  
  .properties-fixed-bottom .property-section {
    margin-bottom: 0;
  }
  
  .properties-fixed-bottom .property-section h4 {
    margin-bottom: 8px;
    font-size: 1rem;
  }
  
  .playback-info {
    padding: var(--spacing-xs) 0;
  }
  
  .duration-display {
    padding: var(--spacing-xs) var(--spacing-md);
    font-size: 12px;
  }
}

@media (max-width: 1024px) {
  .nle-workspace-grid {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 200px 140px;
    grid-template-areas: 
      "preview"
      "media-bin"
      "timeline";
  }
  
  .properties-panel {
    display: none;
  }
  
  .media-bin-panel {
    height: 200px;
  }
  
  .timeline-panel {
    height: 140px;
  }
}

@media (max-width: 768px) {
  .nle-header {
    padding: 0 var(--spacing-md);
  }
  
  .header-center {
    display: none;
  }
  
  .playback-controls {
    padding: var(--spacing-xs) var(--spacing-md);
  }
  
  .nle-workspace-grid {
    gap: 0;
  }
}

/* Mobile Warning Overlay */
.mobile-warning-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--primary-bg);
  z-index: 10000;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.mobile-warning-content {
  background: white;
  border-radius: 16px;
  padding: 40px;
  max-width: 500px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.warning-icon {
  font-size: 64px;
  margin-bottom: 20px;
}

.mobile-warning-content h2 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.mobile-warning-content p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.warning-requirements {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border-light);
  text-align: left;
}

.warning-requirements h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.warning-requirements ul {
  list-style: none;
  padding: 0;
}

.warning-requirements li {
  padding: 8px 0;
  padding-left: 24px;
  position: relative;
  color: var(--text-secondary);
}

.warning-requirements li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent-green);
  font-weight: bold;
}

/* Show mobile warning on small screens */
@media (max-width: 1199px), (max-height: 700px), (pointer: coarse) {
  .mobile-warning-overlay {
    display: flex;
  }
  
  .nle-workspace > *:not(.mobile-warning-overlay) {
    display: none !important;
  }
}

/* Also show warning on touch devices */
@media (hover: none) and (pointer: coarse) {
  .mobile-warning-overlay {
    display: flex;
  }
  
  .nle-workspace > *:not(.mobile-warning-overlay) {
    display: none !important;
  }
}

/* Dark theme toggle classes for future use */
.theme-dark {
  /* Already implemented as default */
}

.theme-light {
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #e2e8f0;
  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-muted: #64748b;
}