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

/* =====================
   ROOT VARIABLES
===================== */
:root {
  --bg-dark: #060606;
  --glass: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.1);
  --neon: #4cff9b;
}

/* =====================
   PAGE BASE
===================== */
body {
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: radial-gradient(circle at top, #1a1a1a, var(--bg-dark) 65%);
  color: #ffffff;
  overflow: hidden;
  position: relative;
}

/* =====================
   AMBIENT BACKGROUND GLOW
===================== */
.ambient {
  position: absolute;
  width: 800px;
  height: 800px;
  background: radial-gradient(
    circle,
    rgba(76, 255, 155, 0.09),
    transparent 70%
  );
  filter: blur(150px);
  animation: drift 25s ease-in-out infinite;
  z-index: 0;
}

@keyframes drift {
  0%   { transform: translate(-250px, -150px); }
  50%  { transform: translate(250px, 150px); }
  100% { transform: translate(-250px, -150px); }
}

/* =====================
   GLASS CARD
===================== */
.glass {
  position: relative;
  z-index: 1;
  background: var(--glass);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border-radius: 32px;
  padding: 3rem;
  width: 420px;
  max-width: 92%;
  text-align: center;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.75),
    inset 0 0 0 1px var(--border);
  animation: rise 1.2s ease;
}

/* Neon hover glow */
.glass::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  box-shadow: 0 0 50px rgba(76, 255, 155, 0.4);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.glass:hover::after {
  opacity: 1;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =====================
   BRANDING
===================== */
.brand {
  font-size: 2.4rem;
  letter-spacing: 0.6px;
  margin-bottom: 0.4rem;
}

.tagline {
  font-size: 1rem;
  opacity: 0.75;
  margin-bottom: 2rem;
}

/* =====================
   PLAYER
===================== */
.player {
  margin-bottom: 1.6rem;
}

/* Custom play button */
.play-btn {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: white;
  font-size: 1.8rem;
  cursor: pointer;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.12),
    0 0 25px rgba(76, 255, 155, 0.35);
  transition: transform 0.2s ease, box-shadow 0.3s ease;
}

.play-btn:hover {
  transform: scale(1.08);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.2),
    0 0 40px rgba(76, 255, 155, 0.6);
}

.play-btn:active {
  transform: scale(0.95);
}

/* =====================
   NOW PLAYING
===================== */
.now-playing {
  margin-bottom: 1.6rem;
  font-size: 0.95rem;
}

.now-playing .label {
  display: block;
  opacity: 0.6;
  font-size: 0.75rem;
  margin-bottom: 0.3rem;
}

#trackTitle {
  font-weight: 500;
}

/* =====================
   STATS
===================== */
.stats {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.listeners {
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

/* Pulse dot */
.pulse {
  width: 9px;
  height: 9px;
  background: var(--neon);
  border-radius: 50%;
  box-shadow: 0 0 14px rgba(76, 255, 155, 0.9);
  animation: pulse 1.6s infinite;
}

@keyframes pulse {
  0%   { transform: scale(1); opacity: 1; }
  50%  { transform: scale(1.7); opacity: 0.5; }
  100% { transform: scale(1); opacity: 1; }
}

/* =====================
   FOOTER
===================== */
footer {
  position: absolute;
  bottom: 1rem;
  width: 100%;
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.4;
  z-index: 1;
}

/* =====================
   NOISE / GRAIN OVERLAY
===================== */
.noise {
  pointer-events: none;
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4'/></filter><rect width='120' height='120' filter='url(%23n)' opacity='0.15'/></svg>");
  opacity: 0.04;
  animation: grain 0.6s steps(2) infinite;
  z-index: 2;
}

@keyframes grain {
  from { transform: translate(0, 0); }
  to   { transform: translate(-10%, 10%); }
}

/* =====================
   MOBILE
===================== */
@media (max-width: 420px) {
  .glass {
    padding: 2.4rem 2rem;
  }

  .stats {
    flex-direction: column;
    gap: 0.7rem;
  }

  .play-btn {
    width: 70px;
    height: 70px;
  }
}
