:root {
  --btn-glass-bg: rgba(255, 255, 255, 0.15);
  --btn-glass-border: rgba(255, 255, 255, 0.3);
  --btn-glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.2);
  --btn-glass-hover-bg: rgba(255, 255, 255, 0.25);
  --btn-sparkle-color: rgba(255, 255, 255, 0.8);
  --btn-glow-primary: rgba(255, 105, 180, 0.6);
  --btn-glow-secondary: rgba(180, 228, 255, 0.4);
}

#constellation-btn {
  position: fixed;
  bottom: 5rem;
  left: 1.5rem;
  width: 60px !important;
  height: 60px !important;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.25) 0%,
    rgba(255, 255, 255, 0.1) 100%
  );
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 2px solid rgba(255, 255, 255, 0.4);
  box-shadow: 
    0 8px 32px 0 rgba(31, 38, 135, 0.3),
    0 4px 16px 0 rgba(255, 105, 180, 0.2),
    inset 0 1px 2px rgba(255, 255, 255, 0.5),
    inset 0 -1px 2px rgba(0, 0, 0, 0.1),
    0 0 20px rgba(180, 228, 255, 0.3);
  font-size: 1.8rem;
  cursor: url("/imgs/cursors/purr.png"), pointer !important;
  z-index: 100;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  animation: constellationGlow 3s ease-in-out infinite;
  outline: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-shadow: 0 2px 8px rgba(255, 255, 255, 0.5);
}

#constellation-btn::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  padding: 2px;
  background: linear-gradient(
    135deg,
    rgba(255, 182, 193, 0.5),
    rgba(180, 228, 255, 0.5),
    rgba(201, 160, 220, 0.5)
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
}

#constellation-btn::after {
  content: '✨';
  position: absolute;
  top: -8px;
  right: -8px;
  font-size: 1rem;
  opacity: 0;
  transform: scale(0) rotate(-45deg);
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  pointer-events: none;
}

#constellation-btn:hover {
  transform: scale(1.15) translateY(-2px);
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.35) 0%,
    rgba(255, 255, 255, 0.15) 100%
  );
  box-shadow: 
    0 12px 40px 0 rgba(31, 38, 135, 0.4),
    0 6px 20px 0 rgba(255, 105, 180, 0.4),
    inset 0 2px 4px rgba(255, 255, 255, 0.6),
    inset 0 -2px 4px rgba(0, 0, 0, 0.1),
    0 0 30px rgba(180, 228, 255, 0.5),
    0 0 15px rgba(255, 182, 193, 0.4);
  animation: constellationPulse 1.5s ease-in-out infinite;
}

#constellation-btn:hover::before {
  opacity: 1;
  animation: borderRotate 3s linear infinite;
}

#constellation-btn:hover::after {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

#constellation-btn:active {
  transform: scale(1.05) translateY(0);
  transition: all 0.1s ease;
}

@keyframes constellationGlow {
  0%, 100% {
    box-shadow: 
      0 8px 32px 0 rgba(31, 38, 135, 0.3),
      0 4px 16px 0 rgba(255, 105, 180, 0.2),
      inset 0 1px 2px rgba(255, 255, 255, 0.5),
      inset 0 -1px 2px rgba(0, 0, 0, 0.1),
      0 0 20px rgba(180, 228, 255, 0.3);
  }
  50% {
    box-shadow: 
      0 8px 32px 0 rgba(31, 38, 135, 0.3),
      0 4px 16px 0 rgba(255, 105, 180, 0.3),
      inset 0 1px 2px rgba(255, 255, 255, 0.5),
      inset 0 -1px 2px rgba(0, 0, 0, 0.1),
      0 0 30px rgba(180, 228, 255, 0.5);
  }
}

@keyframes constellationPulse {
  0%, 100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.2);
  }
}

@keyframes borderRotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

#constellation-btn.active {
  background: linear-gradient(
    135deg,
    rgba(255, 215, 0, 0.4) 0%,
    rgba(255, 182, 193, 0.3) 100%
  );
  border-color: rgba(255, 215, 0, 0.6);
  box-shadow: 
    0 8px 32px 0 rgba(255, 215, 0, 0.4),
    0 4px 16px 0 rgba(255, 182, 193, 0.3),
    inset 0 1px 2px rgba(255, 255, 255, 0.6),
    inset 0 -1px 2px rgba(255, 215, 0, 0.2),
    0 0 30px rgba(255, 215, 0, 0.5);
  animation: constellationActiveGlow 2s ease-in-out infinite;
}

#constellation-btn.active::before {
  opacity: 1;
  background: linear-gradient(
    135deg,
    rgba(255, 215, 0, 0.6),
    rgba(255, 182, 193, 0.6),
    rgba(255, 215, 0, 0.6)
  );
  animation: borderRotate 3s linear infinite;
}

@keyframes constellationActiveGlow {
  0%, 100% {
    box-shadow: 
      0 8px 32px 0 rgba(255, 215, 0, 0.4),
      0 4px 16px 0 rgba(255, 182, 193, 0.3),
      inset 0 1px 2px rgba(255, 255, 255, 0.6),
      inset 0 -1px 2px rgba(255, 215, 0, 0.2),
      0 0 30px rgba(255, 215, 0, 0.5);
  }
  50% {
    box-shadow: 
      0 8px 32px 0 rgba(255, 215, 0, 0.6),
      0 4px 16px 0 rgba(255, 182, 193, 0.4),
      inset 0 1px 2px rgba(255, 255, 255, 0.6),
      inset 0 -1px 2px rgba(255, 215, 0, 0.2),
      0 0 40px rgba(255, 215, 0, 0.7);
  }
}

#constellation-btn.clicked::before {
  animation: sparkleExplosion 0.6s ease-out;
}

@keyframes sparkleExplosion {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(2);
  }
}

#explode-heart-btn {
  position: relative;
  width: 70px;
  height: 80px;
  padding: 0;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  padding-bottom: 10px;
  color: white;
  background: linear-gradient(
    135deg,
    rgba(255, 105, 180, 0.9) 0%,
    rgba(255, 182, 193, 0.8) 100%
  );
  clip-path: path('M35 11.1 C30.6 5.8 24.1 2.5 17.5 2.5 C7.8 2.5 0 10.3 0 20 C0 39.5 35 72.5 35 72.5 C35 72.5 70 39.5 70 20 C70 10.3 62.2 2.5 52.5 2.5 C45.9 2.5 39.4 5.8 35 11.1 Z');
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  cursor: url("/imgs/cursors/purr.png"), pointer !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  filter: drop-shadow(0 4px 8px rgba(255, 105, 180, 0.5));
  overflow: visible;
  animation: gentleHeartbeat 2s ease-in-out infinite;
}

#explode-heart-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.8), transparent 50%);
  opacity: 0.4;
  pointer-events: none;
}

#explode-heart-btn:hover {
  transform: scale(1.15) translateY(-5px);
  background: linear-gradient(
    135deg,
    rgba(255, 20, 147, 1) 0%,
    rgba(255, 105, 180, 1) 100%
  );
  filter: drop-shadow(0 8px 15px rgba(255, 105, 180, 0.8));
  animation: heartbeatIntense 0.8s ease-in-out infinite;
}

#explode-heart-btn:active {
  transform: scale(0.95);
  filter: drop-shadow(0 2px 5px rgba(255, 105, 180, 0.5));
}

@keyframes gentleHeartbeat {
  0%, 100% {
    transform: scale(1);
  }
  14% {
    transform: scale(1.02);
  }
  28% {
    transform: scale(1);
  }
  42% {
    transform: scale(1.02);
  }
  56% {
    transform: scale(1);
  }
}

@keyframes heartbeatIntense {
  0%, 100% {
    transform: scale(1.15) translateY(-5px);
  }
  25% {
    transform: scale(1.2) translateY(-6px);
  }
  50% {
    transform: scale(1.15) translateY(-5px);
  }
  75% {
    transform: scale(1.2) translateY(-6px);
  }
}

.floating-bubble {
  position: fixed;
  width: 65px;
  height: 65px;
  border-radius: 50%;
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.2) 0%,
    rgba(255, 255, 255, 0.05) 100%
  );
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 2px solid rgba(255, 255, 255, 0.35);
  box-shadow: 
    0 8px 32px rgba(31, 38, 135, 0.25),
    0 4px 16px rgba(255, 105, 180, 0.15),
    inset 0 1px 2px rgba(255, 255, 255, 0.4),
    0 0 15px rgba(180, 228, 255, 0.2);
  
  cursor: url("/imgs/cursors/purr.png"), pointer !important;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 9999;
  animation: gentleFloat 4s ease-in-out infinite;
}

.floating-bubble::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: linear-gradient(
    45deg,
    rgba(255, 182, 193, 0.4),
    rgba(180, 228, 255, 0.4),
    rgba(201, 160, 220, 0.4)
  );
  z-index: -1;
  opacity: 0;
  filter: blur(8px);
  transition: opacity 0.4s ease;
}

.floating-bubble:hover {
  transform: scale(1.15) translateY(-5px);
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.3) 0%,
    rgba(255, 255, 255, 0.1) 100%
  );
  box-shadow: 
    0 12px 40px rgba(31, 38, 135, 0.35),
    0 6px 24px rgba(255, 105, 180, 0.3),
    inset 0 2px 4px rgba(255, 255, 255, 0.5),
    0 0 25px rgba(180, 228, 255, 0.4);
  animation: floatBounce 0.8s ease-in-out infinite;
}

.floating-bubble:hover::before {
  opacity: 1;
  animation: rotateHue 2s linear infinite;
}

.floating-bubble:active {
  transform: scale(1.05) translateY(-2px);
  transition: all 0.1s ease;
}

.playlist-bubble {
  bottom: 90px;
  right: 20px;
  animation-delay: 0s;
}

.movies-bubble {
  bottom: 170px;
  right: 20px;
  animation-delay: 1s;
}

@keyframes gentleFloat {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes floatBounce {
  0%, 100% {
    transform: scale(1.15) translateY(-5px);
  }
  50% {
    transform: scale(1.15) translateY(-10px);
  }
}

@keyframes rotateHue {
  0% {
    filter: blur(8px) hue-rotate(0deg);
  }
  100% {
    filter: blur(8px) hue-rotate(360deg);
  }
}

.cat-indicator {
  position: fixed;
  top: 20px;
  left: 20px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  font-size: 2rem;
  
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.25) 0%,
    rgba(255, 255, 255, 0.1) 100%
  );
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  
  border: 2px solid rgba(255, 255, 255, 0.4);
  box-shadow: 
    0 8px 32px rgba(31, 38, 135, 0.3),
    0 4px 16px rgba(255, 105, 180, 0.2),
    inset 0 1px 2px rgba(255, 255, 255, 0.5);
  
  cursor: url("/imgs/cursors/purr.png"), pointer !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10001;
  
  display: flex;
  align-items: center;
  justify-content: center;
  
  animation: catBounce 2s ease-in-out infinite;
}

.cat-indicator:hover {
  transform: scale(1.2) rotate(10deg);
  box-shadow: 
    0 12px 40px rgba(31, 38, 135, 0.4),
    0 6px 20px rgba(255, 105, 180, 0.4),
    inset 0 2px 4px rgba(255, 255, 255, 0.6),
    0 0 30px rgba(255, 182, 193, 0.4);
  animation: catWiggle 0.5s ease-in-out infinite;
}

@keyframes catBounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

@keyframes catWiggle {
  0%, 100% {
    transform: scale(1.2) rotate(10deg);
  }
  25% {
    transform: scale(1.2) rotate(-10deg);
  }
  50% {
    transform: scale(1.2) rotate(10deg);
  }
  75% {
    transform: scale(1.2) rotate(-10deg);
  }
}

.unlock-btn {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  background: linear-gradient(
    135deg,
    rgba(255, 179, 217, 0.95) 0%,
    rgba(201, 160, 220, 0.95) 100%
  );
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  color: var(--color-white);
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--radius-full);
  font-size: 1.1rem;
  font-weight: 600;
  cursor: url("/imgs/cursors/purr.png"), pointer !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 
    0 4px 20px rgba(255, 179, 217, 0.4),
    inset 0 1px 2px rgba(255, 255, 255, 0.4),
    0 0 15px rgba(201, 160, 220, 0.3);
  position: relative;
  overflow: hidden;
}

.unlock-btn::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transform: rotate(45deg);
  transition: all 0.5s ease;
}

.unlock-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  background: linear-gradient(
    135deg,
    rgba(255, 179, 217, 1) 0%,
    rgba(201, 160, 220, 1) 100%
  );
  box-shadow: 
    0 8px 30px rgba(255, 179, 217, 0.6),
    inset 0 2px 4px rgba(255, 255, 255, 0.5),
    0 0 25px rgba(201, 160, 220, 0.5);
}

.unlock-btn:hover:not(:disabled)::before {
  left: 100%;
}

.unlock-btn:active:not(:disabled) {
  transform: translateY(0);
}

.unlock-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.music-btn {
  position: relative;
  padding: 0;
  font-size: 1.5rem;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.2) 0%,
    rgba(255, 255, 255, 0.05) 100%
  );
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: url("/imgs/cursors/purr.png"), pointer !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 
    0 8px 32px rgba(31, 38, 135, 0.25),
    0 4px 16px rgba(255, 105, 180, 0.2),
    inset 0 1px 2px rgba(255, 255, 255, 0.4);
  overflow: visible;
}

.music-btn::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    rgba(255, 182, 193, 0.5),
    rgba(180, 228, 255, 0.5),
    rgba(201, 160, 220, 0.5),
    rgba(255, 182, 193, 0.5)
  );
  z-index: -1;
  opacity: 0;
  filter: blur(10px);
  transition: opacity 0.3s ease;
}

.music-btn:hover {
  transform: scale(1.15) translateY(-2px);
  box-shadow: 
    0 12px 40px rgba(31, 38, 135, 0.35),
    0 6px 24px rgba(255, 105, 180, 0.3),
    inset 0 2px 4px rgba(255, 255, 255, 0.5);
}

.music-btn:hover::before {
  opacity: 1;
  animation: musicPulseRing 2s ease-in-out infinite;
}

.music-btn.playing {
  animation: musicBounce 0.6s ease-in-out infinite;
  background: linear-gradient(
    135deg,
    rgba(255, 182, 193, 0.3) 0%,
    rgba(180, 228, 255, 0.2) 100%
  );
}

.music-btn.playing::before {
  opacity: 1;
  animation: musicSpinGlow 3s linear infinite;
}

.music-btn.playing::after {
  content: '';
  position: absolute;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: 
    radial-gradient(circle at center, 
      transparent 20%,
      rgba(255, 182, 193, 0.6) 20%,
      rgba(255, 182, 193, 0.6) 22%,
      transparent 22%,
      transparent 40%,
      rgba(180, 228, 255, 0.4) 40%,
      rgba(180, 228, 255, 0.4) 42%,
      transparent 42%
    );
  border: 3px solid rgba(255, 215, 0, 0.5);
  animation: vinylSpin 2s linear infinite;
  pointer-events: none;
  z-index: -1;
  box-shadow: 
    0 0 15px rgba(255, 215, 0, 0.4),
    inset 0 0 10px rgba(255, 182, 193, 0.3);
}

@keyframes vinylSpin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes musicNoteFloat {
  0%, 100% {
    transform: translateY(0px) translateX(-15px);
    opacity: 0;
  }
  20% {
    opacity: 0.8;
  }
  50% {
    transform: translateY(-25px) translateX(-15px);
    opacity: 0.6;
  }
  80% {
    opacity: 0.4;
  }
}

@keyframes musicPulseRing {
  0%, 100% {
    transform: scale(1);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
}

@keyframes musicSpinGlow {
  0% {
    transform: rotate(0deg) scale(1);
    opacity: 0.8;
  }
  100% {
    transform: rotate(360deg) scale(1);
    opacity: 0.8;
  }
}

@keyframes musicBounce {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.08);
  }
}

.close-letter-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    rgba(255, 105, 180, 0.9) 0%,
    rgba(255, 182, 193, 0.8) 100%
  );
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 2px solid rgba(255, 255, 255, 0.5);
  box-shadow: 
    0 4px 16px rgba(255, 105, 180, 0.3),
    inset 0 1px 2px rgba(255, 255, 255, 0.4);
  color: white;
  font-size: 1.5rem;
  font-weight: bold;
  cursor: url("/imgs/cursors/purr.png"), pointer !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  z-index: 10;
}

.close-letter-btn:hover {
  transform: scale(1.2) rotate(90deg);
  background: linear-gradient(
    135deg,
    rgba(255, 105, 180, 1) 0%,
    rgba(255, 182, 193, 0.9) 100%
  );
  box-shadow: 
    0 6px 24px rgba(255, 105, 180, 0.5),
    inset 0 2px 4px rgba(255, 255, 255, 0.5);
}

.close-letter-btn:active {
  transform: scale(1.1) rotate(90deg);
}

.ripple {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.8),
    rgba(255, 182, 193, 0.4),
    transparent
  );
  transform: scale(0);
  animation: enhancedRipple 0.6s ease-out;
  pointer-events: none;
}

@keyframes enhancedRipple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

@media (max-width: 768px) {
  #constellation-btn {
    width: 50px !important;
    height: 50px !important;
    font-size: 1.5rem;
    bottom: 4rem;
    left: 1rem;
  }
  
  .floating-bubble {
    width: 55px;
    height: 55px;
    font-size: 1.6rem;
  }
  
  .cat-indicator {
    width: 50px;
    height: 50px;
    font-size: 1.6rem;
    top: 15px;
    left: 15px;
  }
  
  .music-btn {
    width: 60px;
    height: 60px;
    font-size: 1.3rem;
  }
}

@media (max-width: 480px) {
  #constellation-btn {
    width: 45px !important;
    height: 45px !important;
    font-size: 1.3rem;
  }
  
  .floating-bubble {
    width: 50px;
    height: 50px;
    font-size: 1.4rem;
  }
  
  .cat-indicator {
    width: 45px;
    height: 45px;
    font-size: 1.4rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  #constellation-btn,
  .floating-bubble,
  .cat-indicator,
  .music-btn,
  .unlock-btn,
  .close-letter-btn,
  #explode-heart-btn {
    animation: none !important;
  }
  
  #constellation-btn::before,
  .floating-bubble::before,
  .music-btn::before {
    animation: none !important;
  }
}

body.night-theme #constellation-btn,
body.night-theme .floating-bubble,
body.night-theme .cat-indicator,
body.night-theme .music-btn {
  background: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.4) 0%,
    rgba(0, 0, 0, 0.2) 100%
  );
  border-color: rgba(255, 255, 255, 0.2);
}

body.night-theme #constellation-btn:hover,
body.night-theme .floating-bubble:hover,
body.night-theme .cat-indicator:hover,
body.night-theme .music-btn:hover {
  background: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.5) 0%,
    rgba(0, 0, 0, 0.3) 100%
  );
  border-color: rgba(255, 255, 255, 0.3);
}