/**
 * ZSky Video Editor — UI Shell Styles
 * Surgical minimalism: void black, whisper type, video is the only star
 * (c) ZSky LLC — All rights reserved
 */

/* ================================================================
   Main Overlay — Pure void
   ================================================================ */

.zsve-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: #000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', sans-serif;
  display: flex;
  flex-direction: column;
  color: rgba(255, 255, 255, 0.5);
  user-select: none;
  -webkit-user-select: none;
  letter-spacing: 0.01em;
}

.zsve-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

/* ================================================================
   Top Bar — Barely there
   ================================================================ */

.zsve-topbar {
  height: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border-bottom: none;
  z-index: 2;
}

.zsve-topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.zsve-topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.25);
}

.zsve-close {
  color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  cursor: pointer;
  padding: 6px 10px;
  line-height: 1;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.zsve-close:hover {
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.1);
}
.zsve-close svg { pointer-events: none; }

.zsve-topbar-right button {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.25);
  cursor: pointer;
  padding: 4px 2px;
  font-size: 11px;
  font-family: inherit;
  letter-spacing: 0.03em;
  transition: color 0.3s;
}
.zsve-topbar-right button:hover { color: rgba(255, 255, 255, 0.6); }
.zsve-topbar-right button:disabled { cursor: default; }
.zsve-topbar-right button:disabled:hover { color: inherit; }

/* ================================================================
   Main Area — Three columns, breathing room
   ================================================================ */

.zsve-main {
  flex: 1;
  display: flex;
  flex-direction: row;
  min-height: 0;
  overflow: hidden;
  position: relative;
}

/* ================================================================
   Clip Library — Ghostly left panel
   ================================================================ */

.zsve-clip-library {
  width: 180px;
  max-width: 13vw;
  min-width: 0;
  flex-shrink: 1;
  border-right: 1px solid rgba(255, 255, 255, 0.03);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: transparent;
}

.zsve-lib-tabs {
  display: flex;
  gap: 0;
  padding: 0;
  margin: 12px 12px 0;
}

.zsve-lib-tab {
  flex: 1;
  padding: 6px 0;
  border-radius: 0;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.2);
  cursor: pointer;
  background: none;
  border: none;
  border-bottom: 1px solid transparent;
  text-align: center;
  font-family: inherit;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.3s, border-color 0.3s;
  white-space: nowrap;
}
.zsve-lib-tab:hover { color: rgba(255, 255, 255, 0.4); }
.zsve-lib-tab.active {
  color: rgba(255, 255, 255, 0.6);
  border-bottom-color: rgba(255, 255, 255, 0.15);
}

.zsve-lib-grid {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 10px 10px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  align-content: start;
}
.zsve-lib-grid::-webkit-scrollbar { display: none; }

.zsve-lib-item {
  aspect-ratio: 16 / 9;
  border-radius: 3px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  background: rgba(255, 255, 255, 0.02);
  transition: opacity 0.2s ease;
  opacity: 0.7;
}
.zsve-lib-item:hover { opacity: 1; }
.zsve-lib-item img,
.zsve-lib-item video { width: 100%; height: 100%; object-fit: cover; display: block; }

.zsve-lib-item-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2px 4px;
  font-size: 8px;
  color: rgba(255, 255, 255, 0.5);
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
}

/* ================================================================
   Preview Area — Video is the hero
   ================================================================ */

.zsve-preview-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  position: relative;
  background: #000;
}

.zsve-canvas-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 4px;
}

.zsve-canvas-wrap canvas {
  max-width: 100%;
  max-height: 100%;
  display: block;
  border-radius: 1px;
}

/* ================================================================
   Transport — Floating, minimal
   ================================================================ */

.zsve-transport {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 16px 2px;
}

.zsve-play-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s, color 0.3s;
}
.zsve-play-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
}

.zsve-time-display {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.2);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.05em;
}

/* ================================================================
   Clip Settings — Glass panel with elegant sliders
   ================================================================ */

.zsve-clip-settings {
  width: 196px;
  max-width: 14vw;
  min-width: 0;
  flex-shrink: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  border-left: 1px solid rgba(255, 255, 255, 0.03);
  padding: 14px 14px;
  background: transparent;
}
.zsve-clip-settings::-webkit-scrollbar { display: none; }
.zsve-clip-settings.hidden { display: none; }

.zsve-group-label {
  font-size: 8px;
  color: rgba(255, 255, 255, 0.25);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 10px;
  margin-top: 4px;
}

.zsve-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.03);
  margin: 10px 0;
}

/* ================================================================
   Sliders — Elegant 3D with per-slider accent colors
   ================================================================ */

.zsve-slider-row {
  padding: 6px 0;
  position: relative;
}

.zsve-slider-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}

.zsve-slider-label {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 400;
}

.zsve-slider-value {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.2);
  font-variant-numeric: tabular-nums;
  transition: color 0.3s;
}
.zsve-slider-value.active { color: rgba(255, 255, 255, 0.6); }

/* ── 3D Track Base ── */

input[type="range"].zsve-range {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 3px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  outline: none;
  margin: 0;
  padding: 0;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5), 0 1px 0 rgba(255, 255, 255, 0.03);
}

/* ── 3D Glossy Thumb (WebKit) ── */

.zsve-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(145deg, #f0f0f0, #d0d0d0);
  cursor: pointer;
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.4),
    0 1px 2px rgba(0, 0, 0, 0.3),
    inset 0 1px 1px rgba(255, 255, 255, 0.8),
    inset 0 -1px 1px rgba(0, 0, 0, 0.1);
  transition: transform 0.15s, box-shadow 0.2s;
  border: none;
}
.zsve-range::-webkit-slider-thumb:hover {
  transform: scale(1.12);
  box-shadow:
    0 3px 10px rgba(0, 0, 0, 0.5),
    0 1px 3px rgba(0, 0, 0, 0.3),
    inset 0 1px 1px rgba(255, 255, 255, 0.9),
    0 0 12px var(--slider-glow, rgba(56, 189, 248, 0.3));
}
.zsve-range:active::-webkit-slider-thumb {
  transform: scale(1.05);
  box-shadow:
    0 1px 4px rgba(0, 0, 0, 0.4),
    inset 0 1px 1px rgba(255, 255, 255, 0.7),
    0 0 16px var(--slider-glow, rgba(56, 189, 248, 0.4));
}

/* ── 3D Glossy Thumb (Firefox) ── */

.zsve-range::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(145deg, #f0f0f0, #d0d0d0);
  cursor: pointer;
  border: none;
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.4),
    0 1px 2px rgba(0, 0, 0, 0.3),
    inset 0 1px 1px rgba(255, 255, 255, 0.8);
  transition: transform 0.15s;
}
.zsve-range::-moz-range-thumb:hover { transform: scale(1.12); }
.zsve-range:active::-moz-range-thumb { transform: scale(1.05); }
.zsve-range::-moz-range-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 3px;
  border: none;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* ── Per-Slider Accent Colors (via data attribute) ── */

/* Colored gradient tracks — Temperature and Tint */
.zsve-range.zsve-temp {
  background: linear-gradient(90deg, #3b82f6 0%, rgba(255,255,255,0.04) 50%, #f97316 100%);
  --slider-glow: rgba(249, 115, 22, 0.35);
}
.zsve-range.zsve-tint {
  background: linear-gradient(90deg, #22c55e 0%, rgba(255,255,255,0.04) 50%, #d946ef 100%);
  --slider-glow: rgba(217, 70, 239, 0.35);
}
.zsve-range.zsve-temp::-moz-range-track {
  background: linear-gradient(90deg, #3b82f6, rgba(255,255,255,0.04) 50%, #f97316);
}
.zsve-range.zsve-tint::-moz-range-track {
  background: linear-gradient(90deg, #22c55e, rgba(255,255,255,0.04) 50%, #d946ef);
}

/* Grading slider accent colors */
.zsve-range[data-key="exposure"]    { --slider-glow: rgba(250, 204, 21, 0.3); }
.zsve-range[data-key="contrast"]    { --slider-glow: rgba(168, 162, 158, 0.3); }
.zsve-range[data-key="saturation"]  { --slider-glow: rgba(244, 63, 94, 0.3); }
.zsve-range[data-key="vibrance"]    { --slider-glow: rgba(192, 132, 252, 0.3); }
.zsve-range[data-key="highlights"]  { --slider-glow: rgba(253, 224, 71, 0.3); }
.zsve-range[data-key="shadows"]     { --slider-glow: rgba(99, 102, 241, 0.3); }
.zsve-range[data-key="clarity"]     { --slider-glow: rgba(14, 165, 233, 0.3); }
.zsve-range[data-key="dehaze"]      { --slider-glow: rgba(45, 212, 191, 0.3); }
.zsve-range[data-key="sharpness"]   { --slider-glow: rgba(251, 146, 60, 0.3); }
.zsve-range[data-key="grain"]       { --slider-glow: rgba(163, 163, 163, 0.3); }
.zsve-range[data-key="vignette"]    { --slider-glow: rgba(139, 92, 246, 0.3); }
.zsve-range[data-key="fade"]        { --slider-glow: rgba(236, 72, 153, 0.3); }

/* ================================================================
   Toggle — Minimal pill
   ================================================================ */

.zsve-toggle {
  position: relative;
  width: 28px;
  height: 14px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.3s;
  border: none;
  padding: 0;
  flex-shrink: 0;
}
.zsve-toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), background 0.25s;
}
.zsve-toggle.active { background: rgba(255, 255, 255, 0.12); }
.zsve-toggle.active::after {
  transform: translateX(14px);
  background: #fff;
}

/* ================================================================
   Presets — Glass pills
   ================================================================ */

.zsve-preset-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-bottom: 12px;
}

.zsve-preset-item {
  padding: 5px 4px;
  border: none;
  border-radius: 3px;
  font-size: 9px;
  color: rgba(255, 255, 255, 0.2);
  text-align: center;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.02);
  font-family: inherit;
  letter-spacing: 0.02em;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.zsve-preset-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.5);
}
.zsve-preset-item.active {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.7);
}

/* ================================================================
   Timeline — Low-profile strip
   ================================================================ */

.zsve-timeline-area {
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.008);
}

.zsve-timeline-tracks {
  height: 68px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  position: relative;
}
.zsve-timeline-tracks::-webkit-scrollbar { display: none; }

.zsve-clip-track {
  height: 48px;
  display: flex;
  align-items: center;
  padding: 4px 12px;
  position: relative;
  min-width: max-content;
}

.zsve-tl-clip {
  height: 40px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.04);
  cursor: grab;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  transition: background 0.2s;
}
.zsve-tl-clip:hover { background: rgba(255, 255, 255, 0.06); }
.zsve-tl-clip.selected {
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}
.zsve-tl-clip:active { cursor: grabbing; }

.zsve-tl-clip-label {
  font-size: 8px;
  color: rgba(255, 255, 255, 0.3);
  pointer-events: none;
  z-index: 1;
  padding: 0 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.03em;
}

.zsve-tl-clip-thumb {
  position: absolute;
  inset: 0;
  display: flex;
}
.zsve-tl-clip-thumb img {
  height: 100%;
  flex-shrink: 0;
  object-fit: cover;
  opacity: 0.25;
}

/* ================================================================
   Trim Handles — Barely visible
   ================================================================ */

.zsve-trim-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 6px;
  cursor: col-resize;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.2s;
}
.zsve-trim-handle:hover,
.zsve-trim-handle:active {
  opacity: 1;
  background: rgba(255, 255, 255, 0.15);
}
.zsve-trim-handle-left  { left: 0;  border-radius: 3px 0 0 3px; }
.zsve-trim-handle-right { right: 0; border-radius: 0 3px 3px 0; }

/* ================================================================
   Crossfade — Subtle hatching
   ================================================================ */

.zsve-tl-crossfade {
  height: 40px;
  min-width: 12px;
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 3px,
    rgba(255, 255, 255, 0.04) 3px,
    rgba(255, 255, 255, 0.04) 6px
  );
  border-radius: 2px;
  cursor: ew-resize;
  position: relative;
  flex-shrink: 0;
  margin: 0 -2px;
  z-index: 1;
}

/* ================================================================
   Playhead — White, not red
   ================================================================ */

.zsve-playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(255, 255, 255, 0.6);
  z-index: 10;
  pointer-events: none;
}
.zsve-playhead::before {
  content: '';
  position: absolute;
  top: -3px;
  left: 50%;
  transform: translateX(-50%);
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
}

/* ================================================================
   Audio Track
   ================================================================ */

.zsve-audio-track {
  height: 20px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  font-size: 9px;
  color: rgba(255, 255, 255, 0.1);
  border-top: 1px solid rgba(255, 255, 255, 0.02);
}

.zsve-audio-track-upload {
  cursor: pointer;
  padding: 1px 6px;
  border: 1px dashed rgba(255, 255, 255, 0.05);
  border-radius: 2px;
  transition: border-color 0.3s, color 0.3s;
  letter-spacing: 0.03em;
}
.zsve-audio-track-upload:hover {
  border-color: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.25);
}

/* ================================================================
   Controls Bar — Almost invisible
   ================================================================ */

.zsve-controls-bar {
  height: 32px;
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  border-top: none;
  font-size: 9px;
  color: rgba(255, 255, 255, 0.15);
}

.zsve-controls-left,
.zsve-controls-center,
.zsve-controls-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.zsve-controls-bar button {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.15);
  cursor: pointer;
  padding: 4px;
  font-size: 9px;
  font-family: inherit;
  transition: color 0.3s;
}
.zsve-controls-bar button:hover { color: rgba(255, 255, 255, 0.4); }

.zsve-duration-limit { font-size: 9px; color: rgba(255, 255, 255, 0.1); }
.zsve-zoom-label { font-size: 9px; color: rgba(255, 255, 255, 0.1); }

/* ================================================================
   Upsell — Gentle nudge
   ================================================================ */

.zsve-upsell {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: none;
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
}
.zsve-upsell-text { font-size: 10px; color: rgba(255, 255, 255, 0.2); flex: 1; }
.zsve-upsell-btn {
  padding: 3px 10px;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: none;
  color: rgba(255, 255, 255, 0.4);
  font-size: 9px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: 0.03em;
  transition: border-color 0.3s, color 0.3s;
}
.zsve-upsell-btn:hover { border-color: rgba(255, 255, 255, 0.2); color: rgba(255, 255, 255, 0.6); }

/* ================================================================
   Export Button — Only color accent in the entire UI
   ================================================================ */

.zsve-export-btn {
  padding: 5px 14px;
  border-radius: 4px;
  border: none;
  background: #fff;
  color: #000;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: 0.03em;
  transition: opacity 0.3s;
}
.zsve-export-btn:hover { opacity: 0.85; }
.zsve-export-btn:disabled { opacity: 0.2; cursor: default; }

/* ================================================================
   Keyframes — Restrained
   ================================================================ */

@keyframes zsve-glow {
  0%   { box-shadow: none; }
  50%  { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); }
  100% { box-shadow: none; }
}

@keyframes zsve-slide-up {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes zsve-spring-in {
  0%   { transform: scaleX(0.97); opacity: 0.5; }
  60%  { transform: scaleX(1.01); }
  100% { transform: scaleX(1); opacity: 1; }
}
.zsve-tl-clip.just-added {
  animation: zsve-spring-in 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes zsve-fade-cascade {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 0.7; transform: translateY(0); }
}
.zsve-lib-item { animation: zsve-fade-cascade 0.25s ease-out both; }

.zsve-range:active::-webkit-slider-thumb { background: #fff; transform: scale(1.2); }
.zsve-range:active::-moz-range-thumb { background: #fff; }

.zsve-transport-btn:active, .zsve-ctrl-btn:active {
  transform: scale(0.92);
  transition: transform 0.06s;
}

@keyframes zsve-playhead-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.3); }
  100% { box-shadow: 0 0 0 4px rgba(255, 255, 255, 0); }
}
.zsve-playhead.seeking::before {
  animation: zsve-playhead-pulse 0.3s ease-out;
}

.zsve-preset-item:active { transform: scale(0.96); transition: transform 0.08s; }

@keyframes zsve-panel-slide-in {
  from { opacity: 0; transform: translateX(8px); }
  to { opacity: 1; transform: translateX(0); }
}
.zsve-clip-settings:not(.hidden) { animation: zsve-panel-slide-in 0.2s ease-out; }

@keyframes zsve-lib-slide-in {
  from { opacity: 0; transform: translateX(-8px); }
  to { opacity: 1; transform: translateX(0); }
}
.zsve-clip-library { animation: zsve-lib-slide-in 0.25s ease-out; }

.zsve-export-btn:hover { opacity: 0.85; }

@keyframes zsve-toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(-6px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ================================================================
   Hidden Scrollbars
   ================================================================ */

.zsve-overlay *::-webkit-scrollbar { display: none; }
.zsve-overlay * { scrollbar-width: none; -ms-overflow-style: none; }

/* ================================================================
   RESPONSIVE — Small laptop (< 1440px)
   ================================================================ */

@media (max-width: 1440px) {
  .zsve-clip-library { width: 160px; }
  .zsve-clip-settings { width: 168px; padding: 10px 12px; }
  .zsve-preset-item { font-size: 8px; }
}

/* ================================================================
   RESPONSIVE — Tablet landscape (< 1024px)
   ================================================================ */

@media (max-width: 1024px) {
  .zsve-clip-library { width: 140px; }
  .zsve-clip-settings { width: 152px; padding: 8px 10px; }
  .zsve-topbar { height: 40px; min-height: 40px; padding: 0 14px; }
  .zsve-timeline-tracks { height: 60px; }
  .zsve-clip-track { height: 42px; }
  .zsve-tl-clip { height: 34px; }
  .zsve-tl-crossfade { height: 34px; }
  .zsve-controls-bar { height: 28px; min-height: 28px; }
  .zsve-preset-grid { grid-template-columns: 1fr; gap: 2px; }
  .zsve-lib-grid { grid-template-columns: 1fr; gap: 3px; padding: 6px; }
}

/* ================================================================
   RESPONSIVE — Tablet portrait (< 900px)
   ================================================================ */

@media (max-width: 900px) {
  .zsve-clip-library { width: 120px; }
  .zsve-clip-settings { width: 140px; padding: 6px 8px; }
  .zsve-slider-label { font-size: 9px; }
  .zsve-group-label { font-size: 7px; }
  .zsve-play-btn { width: 24px; height: 24px; }
}

/* ================================================================
   RESPONSIVE — Minimum gate (768px)
   ================================================================ */

@media (max-width: 768px) {
  .zsve-clip-library {
    position: absolute;
    left: 0; top: 44px; bottom: 100px;
    z-index: 5;
    background: rgba(0, 0, 0, 0.97);
    width: 160px;
    border-right: 1px solid rgba(255, 255, 255, 0.04);
    transform: translateX(-100%);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .zsve-clip-library.open { transform: translateX(0); }

  .zsve-clip-settings {
    position: absolute;
    right: 0; top: 44px; bottom: 100px;
    z-index: 5;
    background: rgba(0, 0, 0, 0.97);
    width: 160px;
    border-left: 1px solid rgba(255, 255, 255, 0.04);
    transform: translateX(100%);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .zsve-clip-settings:not(.hidden) { transform: translateX(0); }
  .zsve-clip-settings.hidden { display: block; transform: translateX(100%); }

  .zsve-topbar { height: 40px; min-height: 40px; padding: 0 10px; }
  .zsve-close { font-size: 16px; }
  .zsve-export-btn { padding: 4px 10px; font-size: 9px; }
}

/* ================================================================
   RESPONSIVE — Large desktop (> 1600px)
   ================================================================ */

@media (min-width: 1600px) {
  .zsve-clip-library { width: 200px; }
  .zsve-clip-settings { width: 200px; padding: 16px 16px; }
  .zsve-timeline-tracks { height: 80px; }
  .zsve-clip-track { height: 56px; }
  .zsve-tl-clip { height: 46px; }
  .zsve-tl-crossfade { height: 46px; }
  .zsve-preset-grid { grid-template-columns: 1fr 1fr 1fr; }
}

/* ================================================================
   RESPONSIVE — Ultra-wide (> 2200px)
   ================================================================ */

@media (min-width: 2200px) {
  .zsve-clip-library { width: 240px; }
  .zsve-clip-settings { width: 240px; }
  .zsve-lib-grid { grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
  .zsve-topbar { height: 48px; min-height: 48px; }
  .zsve-timeline-tracks { height: 96px; }
  .zsve-clip-track { height: 64px; }
  .zsve-tl-clip { height: 52px; }
  .zsve-tl-crossfade { height: 52px; }
  .zsve-slider-label { font-size: 11px; }
}
