/* ==========================================================================
   GHIBLI STUDIO PRO — PRODUCTION DESIGN SYSTEM & GLASSMORPHISM STYLESHEET
   Sleek Obsidian Dark Mode, Cyber-Violet to Emerald Accents & Neon Micro-Interactions
   ========================================================================== */

:root {
  --bg-deep: #08090C;
  --bg-surface: #0E111A;
  --panel-glass: rgba(18, 21, 31, 0.72);
  --card-glass: rgba(26, 30, 46, 0.55);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(99, 102, 241, 0.45);
  
  --accent-violet: #7928CA;
  --accent-indigo: #4338CA;
  --accent-emerald: #10B981;
  --accent-cyan: #06B6D4;
}

/* Base Body & Noise Texture */
body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-deep);
  background-image: 
    radial-gradient(at 0% 0%, rgba(67, 56, 202, 0.12) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(16, 185, 129, 0.08) 0px, transparent 50%);
  color: #E2E8F0;
  overflow: hidden;
  user-select: none;
}

.font-display {
  font-family: 'Space Grotesk', sans-serif;
}

/* Glassmorphism Surface Panels */
.glass-panel {
  background: var(--panel-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
}

.glass-card {
  background: var(--card-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card:hover {
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 10px 30px -10px rgba(99, 102, 241, 0.25), 0 0 15px rgba(16, 185, 129, 0.1);
  transform: translateY(-2px);
}

.glass-card.active-scene {
  border-color: #818CF8;
  box-shadow: 0 0 0 2px rgba(129, 140, 248, 0.3), 0 12px 35px -8px rgba(129, 140, 248, 0.4);
}

/* Gradient Typography */
.gradient-text {
  background: linear-gradient(135deg, #C084FC 0%, #818CF8 50%, #34D399 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gradient-badge {
  background: linear-gradient(135deg, rgba(121, 40, 202, 0.15) 0%, rgba(16, 185, 129, 0.15) 100%);
  border: 1px solid rgba(129, 140, 248, 0.3);
}

/* Skeleton Shimmer Loading Effect */
.shimmer {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.03) 0%,
    rgba(255, 255, 255, 0.12) 50%,
    rgba(255, 255, 255, 0.03) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.8s infinite cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Neon Pulse Indicator */
.pulse-indicator {
  position: relative;
}
.pulse-indicator::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 9999px;
  background: inherit;
  opacity: 0.5;
  animation: pulse-ring 2s cubic-bezier(0.24, 0, 0.38, 1) infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.9); opacity: 0.8; }
  100% { transform: scale(2.2); opacity: 0; }
}

/* Audio Waveform Bar Animation */
.waveform-bar {
  animation: wave 1.2s ease-in-out infinite alternate;
}
.waveform-bar:nth-child(2) { animation-delay: 0.2s; }
.waveform-bar:nth-child(3) { animation-delay: 0.4s; }
.waveform-bar:nth-child(4) { animation-delay: 0.1s; }
.waveform-bar:nth-child(5) { animation-delay: 0.3s; }

@keyframes wave {
  0% { height: 4px; }
  100% { height: 16px; }
}

/* Sleek Obsidian Scrollbars */
.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 9999px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: rgba(129, 140, 248, 0.5);
}

/* Timeline Track Styles */
.timeline-track {
  background: rgba(14, 17, 26, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.timeline-clip {
  background: linear-gradient(180deg, rgba(67, 56, 202, 0.4) 0%, rgba(30, 27, 75, 0.6) 100%);
  border: 1px solid rgba(129, 140, 248, 0.4);
  transition: all 0.2s ease;
}

.timeline-clip:hover {
  border-color: rgba(52, 211, 153, 0.7);
  box-shadow: 0 0 12px rgba(52, 211, 153, 0.2);
}

.timeline-playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #34D399;
  box-shadow: 0 0 8px #34D399;
  pointer-events: none;
  z-index: 30;
}
