/* Global Theme - Dark Background */

/* CSS Variable Definitions */
:root {
  /* Glass panel styling */
  --glass-bg: rgba(255, 255, 255, 0.08);
  --glass-bg-elevated: rgba(255, 255, 255, 0.12);
  --glass-border: rgba(255, 255, 255, 0.15);
  --glass-border-subtle: rgba(255, 255, 255, 0.1);
  --glass-blur: blur(16px);
  --glass-blur-strong: blur(24px);
  
  /* Blue glass variant (manager pages) */
  --glass-blue-bg: rgba(147, 51, 234, 0.1);
  --glass-blue-border: rgba(147, 51, 234, 0.3);
  
  /* Blue accent glass variant */
  --glass-purple-bg: rgba(147, 51, 234, 0.1);
  --glass-purple-border: rgba(147, 51, 234, 0.3);
  
  /* Text colors */
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.8);
  --text-muted: rgba(255, 255, 255, 0.6);
  --text-tertiary: rgba(255, 255, 255, 0.4);
  
  /* Primary colors */
  --primary: #9333ea;
  --primary-gradient: linear-gradient(135deg, #9333ea 0%, #8b5cf6 100%);
  
  /* Accent colors */
  --accent-primary: #9333ea;
  --accent-primary-rgb: 147, 51, 234;
  --accent-primary-hover: #a855f7;
  --accent-secondary: #8b5cf6;
  --accent-tertiary: #c084fc;
  --accent-muted: rgba(147, 51, 234, 0.2);
  --accent-glow: rgba(147, 51, 234, 0.5);
  
  /* Spotify green */
  --spotify-green: #1DB954;
  
  /* Status colors */
  --success: #8b5cf6;
  --success-muted: rgba(139, 92, 246, 0.2);
  --warning: #f59e0b;
  --warning-muted: rgba(245, 158, 11, 0.2);
  --error: #ef4444;
  --error-muted: rgba(239, 68, 68, 0.2);
  
  /* Surface colors */
  --surface-dark: rgba(0, 0, 0, 0.3);
  --surface-elevated: rgba(255, 255, 255, 0.12);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  height: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 50%, #16213e 100%);
  background-attachment: fixed;
  color: #ffffff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Global blurred background orbs for glass effect */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -2;
  background: 
    radial-gradient(ellipse 80% 50% at 20% 20%, rgba(147, 51, 234, 0.25) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 80% 30%, rgba(139, 92, 246, 0.2) 0%, transparent 50%),
    radial-gradient(ellipse 50% 60% at 40% 80%, rgba(236, 72, 153, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse 70% 50% at 70% 70%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
  filter: blur(60px);
  pointer-events: none;
}

/* Subtle animated glow effect */
body::after {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  right: -50%;
  bottom: -50%;
  z-index: -3;
  background: 
    radial-gradient(circle at 30% 40%, rgba(147, 51, 234, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 70% 60%, rgba(139, 92, 246, 0.06) 0%, transparent 40%);
  animation: backgroundPulse 15s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes backgroundPulse {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 0.8;
  }
  100% {
    transform: translate(2%, 2%) scale(1.05);
    opacity: 1;
  }
}

/* Page wallpaper - dark gradient background for pages with user-wallpaper partial */
.page-wallpaper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 50%, #16213e 100%);
  background-attachment: fixed;
}

/* When body has transparent background, page-wallpaper provides the dark gradient */
body.has-wallpaper {
  background: transparent;
}

/* Hide decorative blob elements by default */
.bg-patterns {
  display: none;
}

/* Scrollbar styling for dark theme */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}

/* Equalizer / Sound Wave Loading Animation */
.eq-loader {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  height: 2rem;
  padding: 0.5rem 0;
}

.eq-loader .eq-bar {
  width: 4px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--accent-primary, #1DB954) 0%, var(--primary, #9333ea) 100%);
  animation: eq-bounce 1s ease-in-out infinite;
}

.eq-loader .eq-bar:nth-child(1) { height: 40%; animation-delay: 0s; }
.eq-loader .eq-bar:nth-child(2) { height: 70%; animation-delay: 0.15s; }
.eq-loader .eq-bar:nth-child(3) { height: 100%; animation-delay: 0.3s; }
.eq-loader .eq-bar:nth-child(4) { height: 60%; animation-delay: 0.45s; }
.eq-loader .eq-bar:nth-child(5) { height: 80%; animation-delay: 0.6s; }

@keyframes eq-bounce {
  0%, 100% { transform: scaleY(0.3); opacity: 0.6; }
  50% { transform: scaleY(1); opacity: 1; }
}
