@import 'tailwindcss/base';
@import 'tailwindcss/components';
@import 'tailwindcss/utilities';

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

:root {
  font-family: 'Inter', system-ui, Avenir, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  font-weight: 400;
  
  color-scheme: dark;
  color: rgba(255, 255, 255, 0.87);
  background: transparent;
  
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
  
  /* Theme variables - default to green */
  --theme-primary: #1db954;
  --theme-secondary: #1ed760;
  --theme-accent: #00e676;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow-x: hidden;
}

body {
  background: transparent;
  background-attachment: fixed;
  min-height: 100vh;
}

#root {
  min-height: 100vh;
  position: relative;
}

/* Glassmorphism utilities */
.glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.glass-dark {
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.glass-theme {
  background: var(--theme-primary);
  backdrop-filter: blur(20px);
  border: 1px solid var(--theme-primary);
  box-shadow: 0 8px 32px var(--theme-primary);
  opacity: 0.1;
}

.glass-green {
  background: rgba(29, 185, 84, 0.1);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(29, 185, 84, 0.3);
  box-shadow: 0 8px 32px rgba(29, 185, 84, 0.2);
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--theme-primary);
  border-radius: 4px;
  opacity: 0.6;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--theme-primary);
  opacity: 0.8;
}

/* Animated background particles */
.particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}

.particle {
  position: absolute;
  background: radial-gradient(circle, var(--theme-primary) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 20s infinite linear;
  opacity: 0.3;
}

@keyframes float {
  0% {
    transform: translateY(100vh) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100px) rotate(360deg);
    opacity: 0;
  }
}

/* Fluid wave animations */
.wave-bubble {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, var(--theme-primary) 0%, var(--theme-secondary) 50%, var(--theme-accent) 100%);
  filter: blur(40px);
  animation: wave-flow 8s ease-in-out infinite;
  opacity: 0.4;
}

/* Large liquid light cylinders from top */
.light-cylinder {
  position: absolute;
  top: -30%;
  transform-origin: top center;
  width: 400px;
  height: 150vh;
  background: linear-gradient(to bottom, 
    var(--theme-primary) 0%,
    var(--theme-secondary) 15%,
    var(--theme-accent) 30%,
    rgba(255, 255, 255, 0.4) 50%,
    rgba(255, 255, 255, 0.2) 70%,
    rgba(255, 255, 255, 0.1) 85%,
    transparent 100%
  );
  border-radius: 200px;
  animation: liquid-flow 40s ease-in-out infinite;
  filter: blur(80px);
}

.light-cylinder-1 { 
  animation-delay: 0s; 
  left: 10%;
  width: 600px;
  height: 160vh;
}
.light-cylinder-2 { 
  animation-delay: 13s; 
  left: 45%;
  width: 550px;
  height: 140vh;
}
.light-cylinder-3 { 
  animation-delay: 26s; 
  left: 70%;
  width: 580px;
  height: 150vh;
}

@keyframes liquid-flow {
  0% {
    transform: translateX(0px) translateY(0px) rotate(0deg) scale(1);
    opacity: 0.7;
    filter: blur(80px);
  }
  20% {
    transform: translateX(40px) translateY(15px) rotate(2deg) scale(1.05);
    opacity: 0.75;
    filter: blur(85px);
  }
  40% {
    transform: translateX(-25px) translateY(-8px) rotate(-1.5deg) scale(0.95);
    opacity: 0.65;
    filter: blur(82px);
  }
  60% {
    transform: translateX(60px) translateY(25px) rotate(3deg) scale(1.1);
    opacity: 0.8;
    filter: blur(88px);
  }
  80% {
    transform: translateX(-15px) translateY(10px) rotate(-1deg) scale(0.98);
    opacity: 0.75;
    filter: blur(84px);
  }
  100% {
    transform: translateX(0px) translateY(0px) rotate(0deg) scale(1);
    opacity: 0.7;
    filter: blur(80px);
  }
}

.wave-bubble:nth-child(1) {
  width: 300px;
  height: 300px;
  top: 10%;
  left: 10%;
  animation-delay: 0s;
  animation-duration: 12s;
}

.wave-bubble:nth-child(2) {
  width: 200px;
  height: 200px;
  top: 60%;
  right: 15%;
  animation-delay: 2s;
  animation-duration: 10s;
}

.wave-bubble:nth-child(3) {
  width: 250px;
  height: 250px;
  bottom: 20%;
  left: 20%;
  animation-delay: 4s;
  animation-duration: 14s;
}

.wave-bubble:nth-child(4) {
  width: 180px;
  height: 180px;
  top: 30%;
  right: 40%;
  animation-delay: 6s;
  animation-duration: 9s;
}

.wave-bubble:nth-child(5) {
  width: 320px;
  height: 320px;
  bottom: 40%;
  right: 10%;
  animation-delay: 8s;
  animation-duration: 16s;
}

@keyframes wave-flow {
  0%, 100% {
    transform: translateY(0px) translateX(0px) scale(1);
    opacity: 0.3;
  }
  25% {
    transform: translateY(-50px) translateX(30px) scale(1.1);
    opacity: 0.6;
  }
  50% {
    transform: translateY(-20px) translateX(-20px) scale(0.9);
    opacity: 0.4;
  }
  75% {
    transform: translateY(-80px) translateX(40px) scale(1.2);
    opacity: 0.7;
  }
}

/* Real soap bubbles */
.soap-bubble {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, 
    rgba(255, 255, 255, 0.8) 0%,
    rgba(255, 255, 255, 0.4) 20%,
    rgba(147, 51, 234, 0.2) 40%,
    rgba(59, 130, 246, 0.3) 60%,
    rgba(236, 72, 153, 0.2) 80%,
    rgba(255, 255, 255, 0.1) 100%
  );
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: 
    inset 0 0 20px rgba(255, 255, 255, 0.2),
    inset 0 0 40px rgba(147, 51, 234, 0.1),
    0 0 30px rgba(255, 255, 255, 0.1);
  animation: bubble-float 8s ease-in-out infinite;
}

.bubble-small {
  width: 20px;
  height: 20px;
  animation: bubble-rise 3s ease-out forwards;
}

.bubble-medium {
  width: 40px;
  height: 40px;
  animation: bubble-float 6s ease-in-out infinite;
}

.bubble-large {
  width: 80px;
  height: 80px;
  animation: bubble-float 10s ease-in-out infinite;
}

@keyframes bubble-float {
  0%, 100% {
    transform: translateY(0px) scale(1);
    opacity: 0.6;
  }
  50% {
    transform: translateY(-20px) scale(1.1);
    opacity: 0.8;
  }
}

@keyframes bubble-rise {
  0% {
    transform: translateY(0px) scale(1);
    opacity: 0.8;
  }
  100% {
    transform: translateY(-150px) scale(0.2);
    opacity: 0;
  }
}

/* Enhanced glassmorphism */
.glass-fluid {
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(30px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.glass-bubble {
  background: radial-gradient(circle at 30% 30%, 
    rgba(255, 255, 255, 0.15) 0%,
    rgba(255, 255, 255, 0.08) 20%,
    rgba(147, 51, 234, 0.1) 40%,
    rgba(59, 130, 246, 0.08) 60%,
    rgba(236, 72, 153, 0.06) 80%,
    rgba(255, 255, 255, 0.03) 100%
  );
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 
    inset 0 0 20px rgba(255, 255, 255, 0.1),
    inset 0 0 40px rgba(147, 51, 234, 0.05),
    0 8px 32px rgba(147, 51, 234, 0.1),
    0 0 20px rgba(255, 255, 255, 0.05);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-bubble:hover {
  background: radial-gradient(circle at 30% 30%, 
    rgba(255, 255, 255, 0.2) 0%,
    rgba(255, 255, 255, 0.12) 20%,
    rgba(147, 51, 234, 0.15) 40%,
    rgba(59, 130, 246, 0.12) 60%,
    rgba(236, 72, 153, 0.1) 80%,
    rgba(255, 255, 255, 0.05) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 
    inset 0 0 25px rgba(255, 255, 255, 0.15),
    inset 0 0 50px rgba(147, 51, 234, 0.08),
    0 12px 40px rgba(147, 51, 234, 0.2),
    0 0 30px rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

/* Spotify-like hover effects */
.spotify-hover {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.spotify-hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px var(--theme-primary);
}

/* Gradient text */
.gradient-text {
  background: linear-gradient(135deg, var(--theme-primary), var(--theme-secondary), var(--theme-primary));
  background-size: 200% 200%;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradient-shift 3s ease infinite;
}

@keyframes gradient-shift {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* Pulse animation for play buttons */
.pulse-play {
  animation: pulse-play 2s infinite;
}

@keyframes pulse-play {
  0% {
    box-shadow: 0 0 0 0 var(--theme-primary);
  }
  70% {
    box-shadow: 0 0 0 10px var(--theme-primary);
  }
  100% {
    box-shadow: 0 0 0 0 var(--theme-primary);
  }
}
