:root {
  --accent: #3b9aef;
  --accent-rgb: 59, 154, 239;
  --pill-bg: rgba(14, 22, 32, 0.82);
  --pill-border: rgba(255, 255, 255, 0.22);
  --title: #ffffff;
  --artist: rgba(235, 242, 248, 0.72);
  --track: rgba(255, 255, 255, 0.18);
  --fill: rgba(255, 255, 255, 0.92);
  --glow: rgba(var(--accent-rgb), 0.45);
  --shadow: 0 10px 36px rgba(0, 0, 0, 0.28);
  --font: "DM Sans", "Segoe UI", sans-serif;
  --radius: 18px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: transparent;
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

body {
  display: grid;
  place-items: center;
}

.auth {
  display: grid;
  gap: 10px;
  justify-items: center;
  padding: 20px 28px;
  border-radius: var(--radius);
  background: rgba(10, 16, 24, 0.88);
  color: #f4efe6;
  box-shadow: var(--shadow);
}

.auth[hidden] {
  display: none !important;
}

.auth__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 12px;
  border: 0;
  cursor: pointer;
  background: #1db954;
  color: #04130a;
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.auth__hint {
  margin: 0;
  font-size: 12px;
  opacity: 0.7;
}

.idle {
  padding: 10px 16px;
  border-radius: 12px;
  background: rgba(10, 16, 24, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: rgba(255, 255, 255, 0.55);
  font-size: 13px;
}

.idle[hidden] {
  display: none !important;
}

.idle__text {
  margin: 0;
}

.pill {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  width: min(720px, calc(100vw - 32px));
  min-height: 58px;
  padding: 10px 18px 10px 12px;
  border-radius: var(--radius);
  overflow: hidden;
  isolation: isolate;
  background:
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.22) 0%,
      rgba(255, 255, 255, 0.06) 42%,
      rgba(var(--accent-rgb), 0.22) 100%
    ),
    var(--pill-bg);
  border: 1px solid var(--pill-border);
  box-shadow:
    var(--shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.32),
    inset 0 -1px 0 rgba(0, 0, 0, 0.22),
    0 0 0 1px rgba(var(--accent-rgb), 0.1);
  backdrop-filter: blur(18px) saturate(1.35);
  -webkit-backdrop-filter: blur(18px) saturate(1.35);
  opacity: 0;
  transform: translateY(8px) scale(0.98);
  transition:
    opacity 280ms ease,
    transform 280ms ease,
    background 700ms ease,
    box-shadow 700ms ease,
    border-color 700ms ease;
}

.pill[hidden] {
  display: none !important;
}

.pill.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.pill__glow {
  position: absolute;
  inset: -40% -10% auto;
  height: 120%;
  background: radial-gradient(
    ellipse at 20% 40%,
    rgba(var(--accent-rgb), 0.28),
    transparent 58%
  );
  pointer-events: none;
  z-index: 0;
  transition: opacity 700ms ease;
  opacity: 0.9;
}

.disc,
.pill__meta,
.pill__progress {
  position: relative;
  z-index: 1;
}

.disc {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  position: relative;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.16),
    0 4px 14px rgba(0, 0, 0, 0.35),
    0 0 18px rgba(var(--accent-rgb), 0.28);
}

.disc__art {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background: rgba(0, 0, 0, 0.3);
  animation: disc-spin 9s linear infinite;
  animation-play-state: paused;
}

.disc.is-spinning .disc__art {
  animation-play-state: running;
}

.disc__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.12),
    inset 0 0 10px rgba(0, 0, 0, 0.35);
  background:
    repeating-radial-gradient(
      circle at center,
      transparent 0 5px,
      rgba(0, 0, 0, 0.08) 5px 6px
    );
  mix-blend-mode: soft-light;
  opacity: 0.55;
}

.disc__hub {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, #f2f5f8 0%, #9aa4af 55%, #3a424a 100%);
  box-shadow:
    0 0 0 2px rgba(0, 0, 0, 0.35),
    0 1px 2px rgba(0, 0, 0, 0.4);
  pointer-events: none;
}

@keyframes disc-spin {
  to {
    transform: rotate(360deg);
  }
}

.pill__meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
  white-space: nowrap;
  overflow: hidden;
}

.pill__title {
  color: var(--title);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.25);
}

.pill__dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(var(--accent-rgb), 0.85);
  flex: 0 0 auto;
  transform: translateY(-1px);
  box-shadow: 0 0 8px var(--glow);
  transition: background 700ms ease, box-shadow 700ms ease;
}

.pill__artist {
  color: var(--artist);
  font-size: 16px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pill__progress {
  flex: 0 0 180px;
  height: 6px;
  border-radius: 999px;
  background: var(--track);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.pill__bar {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: var(--fill);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.35);
  transform-origin: left center;
  will-change: width;
}

@media (max-width: 560px) {
  .pill {
    width: min(100vw - 24px, 420px);
    gap: 10px;
    padding-right: 14px;
  }

  .pill__progress {
    flex-basis: 96px;
  }

  .pill__title {
    font-size: 15px;
  }

  .pill__artist {
    font-size: 13px;
  }
}
