:root {
  --background: hsl(0 0% 4.3%);
  --foreground: hsl(0 0% 90%);
  --muted-foreground: hsl(0 0% 55%);
  --primary: hsl(0 0% 88%);
  --primary-dark: hsl(0 0% 62%);
  --surface-glass: hsla(0 0% 100% / 0.05);
  --surface-glass-border: hsla(0 0% 100% / 0.1);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
}

body {
  font-family: "Segoe UI", system-ui, sans-serif;
  background: var(--background);
  color: var(--foreground);
  overflow: hidden;
}

.bg-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  animation: bg-drift 20s ease-in-out infinite;
}

.orb-1 {
  width: 600px;
  height: 600px;
  top: -10%;
  right: -10%;
  background: radial-gradient(circle, hsla(0 0% 92% / 0.12) 0%, transparent 70%);
}

.orb-2 {
  width: 500px;
  height: 500px;
  bottom: -15%;
  left: -5%;
  animation-delay: -7s;
  background: radial-gradient(circle, hsla(0 0% 85% / 0.1) 0%, transparent 70%);
}

.orb-3 {
  width: 300px;
  height: 300px;
  top: 40%;
  left: 30%;
  animation-delay: -13s;
  background: radial-gradient(circle, hsla(0 0% 75% / 0.12) 0%, transparent 70%);
}

.grid-overlay {
  position: absolute;
  inset: 0;
  opacity: 0.03;
  background-image:
    linear-gradient(hsla(0 0% 100% / 0.1) 1px, transparent 1px),
    linear-gradient(90deg, hsla(0 0% 100% / 0.1) 1px, transparent 1px);
  background-size: 60px 60px;
}

.screen {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.player-card {
  width: min(420px, 90vw);
  padding: 24px;
  border-radius: 24px;
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  background: var(--surface-glass);
  border: 1px solid var(--surface-glass-border);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
  animation: float 6s ease-in-out infinite;
}

.player-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.logo-wrap {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: hsla(0 0% 100% / 0.08);
  border: 1px solid hsla(0 0% 100% / 0.12);
}

.logo-wrap img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.station-meta {
  min-width: 0;
}

.station-meta h1 {
  margin: 0;
  font-size: 1.2rem;
}

.station-meta p {
  margin: 2px 0 0;
  color: var(--muted-foreground);
  font-size: 0.92rem;
}

.live-badge {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border-radius: 999px;
  background: hsla(0 0% 100% / 0.08);
  border: 1px solid hsla(0 0% 100% / 0.12);
  font-size: 0.72rem;
  color: var(--primary);
  font-weight: 700;
  letter-spacing: 0.05em;
}

.live-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--primary);
  animation: pulse-glow 2s ease-in-out infinite;
}

.visualizer-wrap {
  margin-bottom: 20px;
  border-radius: 12px;
  padding: 12px;
  background: hsla(0 0% 100% / 0.08);
  border: 1px solid hsla(0 0% 100% / 0.12);
}

#visualizer {
  display: block;
  width: 100%;
  height: 80px;
}

.reconnect {
  margin: 0 0 14px;
  text-align: center;
  color: var(--primary);
  animation: pulse 1.5s ease-in-out infinite;
  font-size: 0.92rem;
}

.controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.control-btn,
.play-btn {
  border: 1px solid hsla(0 0% 100% / 0.12);
  background: hsla(0 0% 100% / 0.08);
  color: var(--foreground);
  cursor: pointer;
}

.control-btn {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.control-btn.active {
  color: var(--primary);
  border-color: hsla(0 0% 88% / 0.4);
  box-shadow: 0 0 14px hsla(0 0% 88% / 0.2);
}

.play-btn {
  position: relative;
  width: 68px;
  height: 68px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #111;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.play-btn.playing::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  box-shadow:
    0 0 20px hsla(0 0% 88% / 0.4),
    0 0 60px hsla(0 0% 88% / 0.15);
  animation: pulse 2s ease-in-out infinite;
}

.play-btn:disabled {
  opacity: 0.7;
  cursor: wait;
}

#muteBtnIcon,
#playBtnIcon,
.eq-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

#playBtnIcon svg {
  width: 24px;
  height: 24px;
}

#muteBtnIcon svg,
.eq-icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

.volume-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 4px;
}

.volume-icon {
  color: var(--muted-foreground);
  font-size: 10px;
  font-weight: 700;
}

.volume-slider {
  flex: 1;
  height: 6px;
  appearance: none;
  background: hsla(0 0% 100% / 0.1);
  border-radius: 3px;
  outline: none;
}

.volume-slider::-webkit-slider-thumb {
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  box-shadow: 0 0 10px hsla(0 0% 88% / 0.5);
}

.volume-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  box-shadow: 0 0 10px hsla(0 0% 88% / 0.5);
}

.eq-panel {
  margin-top: 16px;
  padding: 12px;
  border-radius: 12px;
  background: hsla(0 0% 100% / 0.05);
  border: 1px solid hsla(0 0% 100% / 0.1);
}

.eq-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--muted-foreground);
  margin-bottom: 8px;
}

.eq-row {
  display: grid;
  grid-template-columns: 56px 1fr 44px;
  gap: 8px;
  align-items: center;
  margin-top: 6px;
}

.eq-row label,
.eq-row span {
  font-size: 10px;
  font-weight: 700;
  color: var(--muted-foreground);
}

.eq-row span {
  text-align: right;
}

.eq-slider {
  height: 4px;
  appearance: none;
  background: hsla(0 0% 100% / 0.12);
  border-radius: 3px;
  outline: none;
}

.eq-slider::-webkit-slider-thumb {
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: none;
  background: var(--primary);
}

.eq-slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: none;
  background: var(--primary);
}

.hidden {
  display: none;
}

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

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.55;
  }
}

@keyframes pulse-glow {
  0%,
  100% {
    box-shadow: 0 0 4px hsla(0 0% 88% / 0.8);
  }
  50% {
    box-shadow: 0 0 12px hsla(0 0% 88% / 0.4);
  }
}

@keyframes bg-drift {
  0% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(30px, -20px) scale(1.05);
  }
  66% {
    transform: translate(-20px, 15px) scale(0.95);
  }
  100% {
    transform: translate(0, 0) scale(1);
  }
}

@media (max-width: 480px) {
  .player-card {
    padding: 20px;
  }

  .logo-wrap {
    width: 56px;
    height: 56px;
  }

  .logo-wrap img {
    width: 42px;
    height: 42px;
  }
}
