:root {
  --primary: #00ffcc;
  --secondary: #ff00ff;
  --bg: #0a0a0a;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg);
  color: #fff;
  overflow: hidden;
}

#app {
  position: relative;
  width: 100vw;
  height: 100vh;
}

#visualizer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

#player-ui {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  padding: 15px 30px;
  border-radius: 30px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: opacity 0.5s ease;
}

#player-ui.hidden,
#player-ui.idle {
  opacity: 0;
  pointer-events: none;
}

body.idle-cursor {
  cursor: none !important;
}

#current-track {
  font-family: 'Orbitron', sans-serif;
  font-size: 1rem;
  margin-bottom: 10px;
  letter-spacing: 2px;
  color: var(--primary);
}

.controls button {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  margin: 0 10px;
  transition: transform 0.2s, color 0.2s;
}

.controls button:hover {
  transform: scale(1.2);
  color: var(--secondary);
}

/* Audius Link Button */
#audius-link {
  display: inline-block;
  margin-top: 15px;
  padding: 8px 20px;
  background: transparent;
  color: #fff;
  text-decoration: none;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.9rem;
  border: 1px solid var(--secondary);
  border-radius: 20px;
  transition: all 0.3s ease;
}

#audius-link:hover {
  background: var(--secondary);
  color: #000;
  box-shadow: 0 0 15px var(--secondary);
}

/* Splash Screen */
#splash {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #000;
  z-index: 100;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 1s ease, visibility 1s ease;
}

#splash.hidden {
  opacity: 0;
  visibility: hidden;
}

/* Blurred Record Background */
.record {
  position: absolute;
  width: 120vmin;
  height: 120vmin;
  border-radius: 50%;
  background: radial-gradient(circle, #222 30%, #111 35%, #050505 70%);
  border: 5px solid #333;
  box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.8), 0 0 100px rgba(255, 0, 255, 0.2);
  animation: spin 20s linear infinite;
  filter: blur(12px);
  z-index: 0;
}

.record::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 30%;
  height: 30%;
  border-radius: 50%;
  background: var(--secondary);
  border: 10px solid #111;
}

.record::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 5%;
  height: 5%;
  border-radius: 50%;
  background: #fff;
}

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

/* Splash Content */
.content {
  position: relative;
  z-index: 1;
  text-align: center;
}

/* Glitch Text Effect */
.glitch {
  font-family: 'Orbitron', sans-serif;
  font-size: 4rem;
  font-weight: 900;
  text-transform: uppercase;
  position: relative;
  color: #fff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
  margin-bottom: 0.5rem;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.glitch::before {
  left: 3px;
  text-shadow: -2px 0 var(--primary);
  clip: rect(44px, 450px, 56px, 0);
  animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch::after {
  left: -3px;
  text-shadow: -2px 0 var(--secondary);
  clip: rect(44px, 450px, 56px, 0);
  animation: glitch-anim2 5s infinite linear alternate-reverse;
}

.subtitle {
  font-size: 1.5rem;
  margin-top: 10px;
  font-family: 'Inter', sans-serif;
  letter-spacing: 4px;
}

.subtitle.glitch::before,
.subtitle.glitch::after {
  animation-duration: 3s;
}

@keyframes glitch-anim {
  0% { clip: rect(74px, 9999px, 86px, 0); }
  5% { clip: rect(10px, 9999px, 90px, 0); }
  10% { clip: rect(65px, 9999px, 98px, 0); }
  15% { clip: rect(12px, 9999px, 55px, 0); }
  20% { clip: rect(87px, 9999px, 20px, 0); }
  25% { clip: rect(3px, 9999px, 35px, 0); }
  30% { clip: rect(54px, 9999px, 66px, 0); }
  35% { clip: rect(77px, 9999px, 83px, 0); }
  40% { clip: rect(32px, 9999px, 44px, 0); }
  45% { clip: rect(81px, 9999px, 11px, 0); }
  50% { clip: rect(44px, 9999px, 90px, 0); }
  55% { clip: rect(10px, 9999px, 50px, 0); }
  60% { clip: rect(88px, 9999px, 7px, 0); }
  65% { clip: rect(21px, 9999px, 34px, 0); }
  70% { clip: rect(55px, 9999px, 66px, 0); }
  75% { clip: rect(90px, 9999px, 12px, 0); }
  80% { clip: rect(33px, 9999px, 45px, 0); }
  85% { clip: rect(66px, 9999px, 88px, 0); }
  90% { clip: rect(11px, 9999px, 22px, 0); }
  95% { clip: rect(88px, 9999px, 99px, 0); }
  100% { clip: rect(44px, 9999px, 55px, 0); }
}

@keyframes glitch-anim2 {
  0% { clip: rect(65px, 9999px, 100px, 0); }
  5% { clip: rect(5px, 9999px, 75px, 0); }
  10% { clip: rect(85px, 9999px, 20px, 0); }
  15% { clip: rect(42px, 9999px, 90px, 0); }
  20% { clip: rect(11px, 9999px, 40px, 0); }
  25% { clip: rect(55px, 9999px, 60px, 0); }
  30% { clip: rect(95px, 9999px, 10px, 0); }
  35% { clip: rect(33px, 9999px, 80px, 0); }
  40% { clip: rect(77px, 9999px, 30px, 0); }
  45% { clip: rect(20px, 9999px, 50px, 0); }
  50% { clip: rect(60px, 9999px, 90px, 0); }
  55% { clip: rect(99px, 9999px, 15px, 0); }
  60% { clip: rect(15px, 9999px, 35px, 0); }
  65% { clip: rect(45px, 9999px, 65px, 0); }
  70% { clip: rect(80px, 9999px, 25px, 0); }
  75% { clip: rect(25px, 9999px, 85px, 0); }
  80% { clip: rect(50px, 9999px, 45px, 0); }
  85% { clip: rect(90px, 9999px, 5px, 0); }
  90% { clip: rect(35px, 9999px, 70px, 0); }
  95% { clip: rect(70px, 9999px, 95px, 0); }
  100% { clip: rect(10px, 9999px, 50px, 0); }
}

#enter-btn {
  margin-top: 40px;
  padding: 15px 40px;
  font-family: 'Orbitron', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  background: transparent;
  border: 2px solid var(--primary);
  border-radius: 30px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 2px;
  transition: all 0.3s ease;
  box-shadow: 0 0 20px rgba(0, 255, 204, 0.2), inset 0 0 10px rgba(0, 255, 204, 0.1);
}

#enter-btn:hover {
  background: var(--primary);
  color: #000;
  box-shadow: 0 0 30px rgba(0, 255, 204, 0.6), inset 0 0 20px rgba(0, 255, 204, 0.4);
}

/* Flying Music Notes */
#notes-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0; /* behind content */
  perspective: 1000px;
}

.music-note {
  position: absolute;
  font-size: 2rem;
  font-weight: bold;
  opacity: 0;
  animation: fly-at-screen 3s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  transform-style: preserve-3d;
  text-shadow: 0 0 20px currentColor;
}

@keyframes fly-at-screen {
  0% {
    transform: translate(-50%, -50%) translateZ(-1000px) scale(0.1) rotate(0deg);
    opacity: 0;
  }
  20% {
    opacity: 0.6;
  }
  100% {
    transform: translate(-50%, -50%) translateZ(400px) scale(5) rotate(45deg);
    opacity: 0;
  }
}
