/* Modern Multi-Theme (Dark & Light) & Glassmorphism Utilities */

:root {
  color-scheme: light;
  --bg-primary: #F8FAFC;
  --bg-card: rgba(255, 255, 255, 0.95);
  --bg-surface: #F1F5F9;
  --border-color: #E2E8F0;
  --text-main: #0F172A;
  --text-muted: #64748B;
}

html.dark {
  color-scheme: dark;
  --bg-primary: #0B0F19;
  --bg-card: rgba(17, 24, 39, 0.9);
  --bg-surface: #0F172A;
  --border-color: #1F2937;
  --text-main: #F8FAFC;
  --text-muted: #94A3B8;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  background-image: 
    radial-gradient(at 0% 0%, rgba(47, 126, 255, 0.07) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(99, 102, 241, 0.05) 0px, transparent 50%);
  background-attachment: fixed;
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: var(--bg-surface);
}
::-webkit-scrollbar-thumb {
  background: #94A3B8;
  border-radius: 4px;
}
html.dark ::-webkit-scrollbar-thumb {
  background: #1E293B;
}
::-webkit-scrollbar-thumb:hover {
  background: #64748B;
}

/* Glass Panels */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
}

.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  transition: all 0.25s ease-in-out;
}

.glass-card:hover {
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}
html.dark .glass-card:hover {
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.35);
}

/* Glowing Elements */
.glow-blue {
  box-shadow: 0 0 30px -5px rgba(47, 126, 255, 0.45);
}

.glow-green {
  box-shadow: 0 0 30px -5px rgba(34, 197, 94, 0.45);
}

.glow-purple {
  box-shadow: 0 0 30px -5px rgba(168, 85, 247, 0.45);
}

/* Audio Visualizer Wave Animation */
@keyframes soundwave {
  0%, 100% { height: 4px; }
  50% { height: 26px; }
}

.wave-bar {
  width: 3.5px;
  background: #2563eb;
  border-radius: 2px;
  animation: soundwave 1.1s ease-in-out infinite;
}
html.dark .wave-bar {
  background: #38bdf8;
}
.wave-bar:nth-child(1) { animation-delay: 0.0s; }
.wave-bar:nth-child(2) { animation-delay: 0.2s; }
.wave-bar:nth-child(3) { animation-delay: 0.4s; }
.wave-bar:nth-child(4) { animation-delay: 0.1s; }
.wave-bar:nth-child(5) { animation-delay: 0.3s; }
.wave-bar:nth-child(6) { animation-delay: 0.5s; }

/* Pulse Glow */
@keyframes pulse-border {
  0%, 100% { border-color: rgba(47, 126, 255, 0.5); box-shadow: 0 0 25px rgba(47, 126, 255, 0.2); }
  50% { border-color: rgba(14, 165, 233, 0.9); box-shadow: 0 0 35px rgba(14, 165, 233, 0.35); }
}

.animate-glow-border {
  animation: pulse-border 2.5s infinite ease-in-out;
}

/* Sidebar Smooth Squeeze Transition */
.sidebar-panel {
  transition: width 0.32s cubic-bezier(0.4, 0, 0.2, 1), 
              opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: width, opacity, transform;
}
