@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600;700;800&display=swap');

html {
  scroll-padding-top: 4.5rem;
  overflow-x: clip;
}

html, body {
  width: 100%;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  overflow-x: clip;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: #020617;
  color: #f1f5f9;
}

.font-mono {
  font-family: 'JetBrains Mono', monospace;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #090d16;
}

::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #334155;
}

/* CloudConvert / CriticShift style active red button */
.btn-format-active {
  background-color: #dc2626 !important;
  color: #ffffff !important;
  border-color: #ef4444 !important;
  box-shadow: 0 4px 14px 0 rgba(220, 38, 38, 0.39);
}

/* Smooth Animated Expand/Collapse Per-Card Player Drawer */
.player-drawer-wrapper {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows 340ms cubic-bezier(0.4, 0, 0.2, 1), opacity 280ms ease-in-out;
}

.player-drawer-wrapper.drawer-open {
  grid-template-rows: 1fr;
  opacity: 1;
}

.player-drawer-inner {
  overflow: hidden;
}

.waveform-draggable {
  cursor: grab;
}

.waveform-draggable.is-dragging {
  cursor: grabbing !important;
}

/* ==========================================================================
   SPA MULTI-PAGE VIEW TRANSITIONS (Fast Zero-Reload Page Switching)
   ========================================================================== */
.spa-page-view {
  display: none;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 260ms cubic-bezier(0.22, 1, 0.36, 1), transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

.spa-page-view.spa-page-active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   REACTBITS RUBBER SEGMENT (Top Nav Bar) — CriticShift / CriticStudio Signature
   ========================================================================== */
.rb-rubber-track {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 3px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.95) 0%, rgba(9, 13, 22, 0.98) 100%);
  border: 1px solid rgba(51, 65, 85, 0.75);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.65), 0 4px 12px rgba(0, 0, 0, 0.35);
  user-select: none;
  -webkit-user-select: none;
}

.rb-rubber-thumb {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: 96px;
  border-radius: 11px;
  background: linear-gradient(135deg, #f43f5e 0%, #e11d48 55%, #6366f1 100%);
  border: 1px solid rgba(251, 113, 133, 0.65);
  box-shadow: 0 4px 16px rgba(244, 63, 94, 0.42), inset 0 1px 1px rgba(255, 255, 255, 0.28);
  pointer-events: none;
  z-index: 1;
  transform-origin: center center;
  will-change: left, width, transform;
}

.rb-rubber-slot {
  position: relative;
  z-index: 2;
  height: 34px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: rgba(226, 232, 240, 0.72);
  border-radius: 11px;
  transition: color 180ms ease;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
}

.rb-rubber-slot:hover {
  color: rgba(255, 255, 255, 0.92);
}

.rb-rubber-slot:focus,
.rb-rubber-slot:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

.rb-rubber-slot.rb-slot-active {
  color: #ffffff !important;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

/* ==========================================================================
   REACTBITS JELLY RADIO (Format Chips, LUT Presets & Category Chips)
   ========================================================================== */
.rb-jelly-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  user-select: none;
  -webkit-user-select: none;
}

.rb-jelly-chip {
  position: relative;
  height: 30px;
  padding: 0 11px;
  border-radius: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  color: #cbd5e1;
  border: 1px solid rgba(51, 65, 85, 0.85);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  transform-origin: center center;
  will-change: transform;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.rb-jelly-chip:hover {
  color: #ffffff;
  border-color: rgba(244, 63, 94, 0.5);
}

.rb-jelly-chip.rb-jelly-active {
  background: linear-gradient(135deg, #f43f5e 0%, #e11d48 58%, #6366f1 100%) !important;
  color: #ffffff !important;
  border-color: rgba(251, 113, 133, 0.8) !important;
  box-shadow: 0 4px 16px rgba(244, 63, 94, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.25) !important;
  z-index: 5;
}

/* ==========================================================================
   REACTBITS ANIMATED CONTENT (Scroll Reveal: Rise, Blur, 3D Tilt & Stagger)
   ========================================================================== */
.rb-anim-item {
  opacity: 0;
  transform: perspective(900px) translate3d(0, var(--rb-dist, 65px), 0) scale(var(--rb-scale, 0.97)) rotateX(var(--rb-tilt, 5deg));
  filter: blur(var(--rb-blur, 4px));
  transition:
    opacity var(--rb-dur, 0.75s) cubic-bezier(0.215, 0.61, 0.355, 1) var(--rb-delay, 0s),
    transform var(--rb-dur, 0.75s) cubic-bezier(0.215, 0.61, 0.355, 1) var(--rb-delay, 0s),
    filter var(--rb-dur, 0.75s) cubic-bezier(0.215, 0.61, 0.355, 1) var(--rb-delay, 0s);
  will-change: opacity, transform, filter;
}

.rb-anim-item.rb-anim-visible {
  opacity: 1;
  transform: perspective(900px) translate3d(0, 0, 0) scale(1) rotateX(0deg);
  filter: blur(0px);
}

@media (prefers-reduced-motion: reduce) {
  .rb-anim-item {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    transition: none !important;
  }
}

/* ==========================================================================
   AMBIENT FORMAT WATERMARK OVALS (Left: Indigo FROM | Right: Rose TO)
   ========================================================================== */
.ambient-oval-left {
  background: radial-gradient(ellipse at center, rgba(79, 70, 229, 0.19) 0%, rgba(67, 56, 202, 0.095) 58%, rgba(15, 23, 42, 0) 100%);
  box-shadow: 0 0 70px 10px rgba(79, 70, 229, 0.09);
  border: 1px solid rgba(129, 140, 248, 0.11);
  transition: transform 650ms cubic-bezier(0.22, 1, 0.36, 1), border-color 450ms ease;
}

.ambient-oval-right {
  background: radial-gradient(ellipse at center, rgba(225, 29, 72, 0.20) 0%, rgba(190, 18, 60, 0.10) 58%, rgba(15, 23, 42, 0) 100%);
  box-shadow: 0 0 70px 10px rgba(225, 29, 72, 0.10);
  border: 1px solid rgba(251, 113, 133, 0.12);
  transition: transform 650ms cubic-bezier(0.22, 1, 0.36, 1), border-color 450ms ease;
}

.ambient-watermark-label {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 800;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  font-size: clamp(0.54rem, 0.8vw, 0.70rem);
  margin-bottom: 0.15rem;
  user-select: none;
  -webkit-user-select: none;
}

.ambient-morph-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: clamp(2.1rem, 4.8vw, 4.2rem);
}

.ambient-watermark-ext {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1;
  font-size: clamp(1.85rem, 4.4vw, 3.9rem);
  user-select: none;
  -webkit-user-select: none;
  will-change: transform, opacity, filter;
}

.ambient-watermark-left-tone {
  color: rgba(165, 180, 252, 0.24);
  text-shadow: 0 0 28px rgba(99, 102, 241, 0.22);
}

.ambient-watermark-right-tone {
  color: rgba(253, 164, 175, 0.25);
  text-shadow: 0 0 28px rgba(244, 63, 94, 0.24);
}

/* ==========================================================================
   VOLUME & PITCH SEEKBAR LOADING PULSE STATES
   ========================================================================== */
@keyframes volSeekbarPulseWave {
  0% {
    background-position: 200% 0;
    box-shadow: 0 0 6px rgba(244, 63, 94, 0.45);
    opacity: 0.75;
  }
  50% {
    box-shadow: 0 0 16px rgba(251, 113, 133, 0.95), 0 0 24px rgba(245, 158, 11, 0.55);
    opacity: 1;
  }
  100% {
    background-position: -200% 0;
    box-shadow: 0 0 6px rgba(244, 63, 94, 0.45);
    opacity: 0.75;
  }
}

.vol-seekbar-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  padding: 3px 4px;
  transition: box-shadow 250ms ease, background-color 250ms ease;
}

.vol-seekbar-wrap.vol-seekbar-pulsing {
  background: linear-gradient(90deg, rgba(244, 63, 94, 0.18) 0%, rgba(251, 191, 36, 0.45) 50%, rgba(244, 63, 94, 0.18) 100%);
  background-size: 200% 100%;
  animation: volSeekbarPulseWave 0.75s ease-in-out infinite;
}

.vol-seekbar-wrap.vol-seekbar-pulsing .item-volume-slider {
  filter: drop-shadow(0 0 8px rgba(244, 63, 94, 0.9));
}

@keyframes pitchSeekbarPulseWave {
  0% {
    background-position: 200% 0;
    box-shadow: 0 0 6px rgba(99, 102, 241, 0.45);
    opacity: 0.75;
  }
  50% {
    box-shadow: 0 0 16px rgba(129, 140, 248, 0.95), 0 0 24px rgba(244, 63, 94, 0.55);
    opacity: 1;
  }
  100% {
    background-position: -200% 0;
    box-shadow: 0 0 6px rgba(99, 102, 241, 0.45);
    opacity: 0.75;
  }
}

.pitch-seekbar-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  padding: 3px 4px;
  transition: box-shadow 250ms ease, background-color 250ms ease;
}

.pitch-seekbar-wrap.pitch-seekbar-pulsing {
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.22) 0%, rgba(244, 63, 94, 0.5) 50%, rgba(99, 102, 241, 0.22) 100%);
  background-size: 200% 100%;
  animation: pitchSeekbarPulseWave 0.75s ease-in-out infinite;
}

.pitch-seekbar-wrap.pitch-seekbar-pulsing .item-pitch-slider {
  filter: drop-shadow(0 0 8px rgba(129, 140, 248, 0.95));
}

/* ==========================================================================
   DRAG-OVER FILE REACTION FOR DROP ZONES & UPLOAD ICONS
   ========================================================================== */
.drop-zone-reactive.is-file-dragging {
  border-color: #f43f5e !important;
  background-color: rgba(15, 23, 42, 0.78) !important;
  box-shadow: 0 0 36px rgba(244, 63, 94, 0.20), 0 25px 50px -12px rgba(0, 0, 0, 0.65) !important;
}

.drop-zone-reactive.is-file-dragging .drop-zone-icon-box {
  transform: scale(1.12) translateY(-2px) !important;
  background-color: rgba(244, 63, 94, 0.22) !important;
  border-color: rgba(251, 113, 133, 0.55) !important;
  color: #fda4af !important;
  box-shadow: 0 0 24px rgba(244, 63, 94, 0.35) !important;
}

.drop-zone-reactive.is-file-dragging .drop-zone-icon-box svg {
  transform: translateY(-2px);
  transition: transform 250ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* ==========================================================================
   VIDEO STUDIO MONITOR, CHECKERBOARD & ON-CANVAS INTERACTIVE HANDLES
   ========================================================================== */
.studio-checkerboard {
  background-color: #090d16;
  background-image:
    linear-gradient(45deg, rgba(30, 41, 59, 0.45) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(30, 41, 59, 0.45) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(30, 41, 59, 0.45) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(30, 41, 59, 0.45) 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
}

.studio-inspector-tab {
  transition: all 180ms ease;
}

.studio-inspector-tab.active-tab {
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.22) 0%, rgba(99, 102, 241, 0.22) 100%);
  color: #ffffff;
  border-color: rgba(244, 63, 94, 0.55);
  box-shadow: 0 4px 12px rgba(244, 63, 94, 0.18);
}

/* Studio Fullscreen Mode */
.studio-deck-fullscreen {
  position: fixed !important;
  inset: 0 !important;
  z-index: 60 !important;
  max-width: none !important;
  width: 100vw !important;
  height: 100vh !important;
  margin: 0 !important;
  border-radius: 0 !important;
  overflow-y: auto !important;
  background-color: #020617 !important;
}

/* Custom Range Input Polish */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  background: #1e293b;
  border-radius: 9999px;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #f43f5e;
  border: 2px solid #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  transition: transform 120ms ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

input[type="range"].accent-indigo-500::-webkit-slider-thumb {
  background: #6366f1;
}

input[type="range"].accent-amber-400::-webkit-slider-thumb {
  background: #fbbf24;
}

input[type="range"].accent-emerald-500::-webkit-slider-thumb {
  background: #10b981;
}

