/* A to Z Editor - Performance Optimized Custom Styles */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  --bg-primary: #090a0f;
  --bg-secondary: #0f121a;
  --bg-card: #151924;
  --bg-card-hover: #1b2131;
  --accent-cyan: #00f0ff;
  --accent-purple: #8b5cf6;
  --accent-indigo: #6366f1;
  --accent-emerald: #10b981;
  --accent-pink: #ec4899;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border-subtle: rgba(255, 255, 255, 0.08);
}

html {
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-main);
  overflow-x: hidden;
}

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

/* Hardware Accelerated Glassmorphism */
.glass-panel {
  background: rgba(15, 18, 26, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  transform: translateZ(0);
}

.glass-nav {
  background: rgba(9, 10, 15, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transform: translateZ(0);
  will-change: transform;
}

.glass-card {
  background: rgba(21, 25, 36, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease, box-shadow 0.2s ease;
  transform: translateZ(0);
}

.glass-card:hover {
  background: rgba(27, 33, 49, 0.8);
  border-color: rgba(0, 240, 255, 0.25);
  transform: translateY(-3px) translateZ(0);
  box-shadow: 0 12px 28px -10px rgba(0, 240, 255, 0.12);
}

/* Gradients */
.gradient-text {
  background: linear-gradient(135deg, #00f0ff 0%, #a855f7 50%, #ec4899 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gradient-border-glow {
  position: relative;
}

.gradient-border-glow::before {
  content: '';
  position: absolute;
  inset: -1px;
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.6), rgba(139, 92, 246, 0.6), rgba(236, 72, 153, 0.4));
  border-radius: inherit;
  z-index: -1;
  opacity: 0.7;
  transition: opacity 0.25s ease;
}

.gradient-border-glow:hover::before {
  opacity: 1;
}

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

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

::-webkit-scrollbar-thumb {
  background: #232b3e;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #3a4765;
}

/* Range Inputs */
input[type=range] {
  -webkit-appearance: none;
  background: transparent;
  width: 100%;
}

input[type=range]:focus {
  outline: none;
}

input[type=range]::-webkit-slider-runnable-track {
  width: 100%;
  height: 5px;
  cursor: pointer;
  background: #1e2638;
  border-radius: 9999px;
  border: none;
}

input[type=range]::-webkit-slider-thumb {
  height: 14px;
  width: 14px;
  border-radius: 50%;
  background: #00f0ff;
  cursor: pointer;
  -webkit-appearance: none;
  margin-top: -4.5px;
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.6);
  transition: transform 0.15s ease;
}

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

/* Timeline */
.timeline-grid {
  background-size: 30px 100%;
  background-image: linear-gradient(to right, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
}

.timeline-clip {
  user-select: none;
  transition: filter 0.15s ease, outline-color 0.15s ease;
}

.timeline-clip:hover {
  filter: brightness(1.12);
}

.timeline-clip.active-clip {
  outline: 2px solid #00f0ff;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.4);
}

.vu-bar {
  transition: height 0.08s ease;
  will-change: height;
}

/* Ambient glow */
.glow-orb-cyan {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 240, 255, 0.1) 0%, rgba(0, 0, 0, 0) 70%);
  filter: blur(60px);
  pointer-events: none;
}

.glow-orb-purple {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.12) 0%, rgba(0, 0, 0, 0) 70%);
  filter: blur(80px);
  pointer-events: none;
}

#editorCanvas {
  max-width: 100%;
  display: block;
  border-radius: 6px;
  background-color: #050608;
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.8);
  transform: translateZ(0);
}

/* Comparison Slider */
.comparison-container {
  position: relative;
  overflow: hidden;
  user-select: none;
  transform: translateZ(0);
}

.comparison-before {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  overflow: hidden;
}

.comparison-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #00f0ff;
  cursor: ew-resize;
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.8);
  will-change: left;
}

.comparison-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 36px;
  height: 36px;
  background: #090a0f;
  border: 2px solid #00f0ff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.7);
}

/* Modal Backdrop */
.modal-overlay {
  background: rgba(5, 7, 12, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
