:root {
  --bg-1: #06070b;
  --bg-2: #0d1220;
  --bg-3: #191f36;
  --text: #eef2ff;
  --muted: #b2bbd3;
  --line: rgba(255, 255, 255, 0.1);
  --panel: rgba(255, 255, 255, 0.06);
  --accent: #ff3030;
  --accent-soft: #ff8e8e;
  --shadow: 0 25px 60px rgba(0, 0, 0, 0.38);
  --radius: clamp(28px, 4vw, 42px);
  --pulse-scale: 1;
  --pulse-opacity: 0;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 48, 48, 0.18), transparent 28%),
    radial-gradient(circle at 80% 30%, rgba(255, 255, 255, 0.08), transparent 24%),
    linear-gradient(145deg, var(--bg-1), var(--bg-2) 48%, var(--bg-3));
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), transparent 92%);
}

.page-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.player-card {
  position: relative;
  width: min(100%, 1100px);
  min-height: 760px;
  display: grid;
  place-items: center;
  gap: 1.4rem;
  padding: 2rem;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.player-card__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(28px);
  opacity: 0.8;
  z-index: 0;
}

.player-card__glow--left {
  top: 8%;
  left: 7%;
  width: 260px;
  height: 260px;
  background: rgba(255, 48, 48, 0.18);
}

.player-card__glow--right {
  right: -2%;
  bottom: 4%;
  width: 320px;
  height: 320px;
  background: rgba(255, 255, 255, 0.08);
}

.player-copy,
.meta-block,
.controls,
.footer-note,
.player-stage {
  position: relative;
  z-index: 2;
}

.player-copy {
  display: grid;
  gap: 1rem;
  justify-items: center;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(12px);
  font-size: 0.92rem;
  color: var(--accent-soft);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 18px rgba(255, 48, 48, 0.85);
}

h1 {
  margin: 0;
  font-size: clamp(2.6rem, 6vw, 5rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.lead {
  margin: 0;
  max-width: 760px;
  color: var(--muted);
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  line-height: 1.7;
}

.lead code,
.footer-note code {
  padding: 0.1rem 0.38rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.player-stage {
  position: relative;
  display: grid;
  place-items: center;
  width: min(92vw, 560px);
  min-height: 620px;
}

.orbit,
.audio-ring,
.energy-field {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.orbit {
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 40px rgba(255, 255, 255, 0.04);
}

.orbit--outer {
  width: min(84%, 480px);
  animation: spin 28s linear infinite;
}

.orbit--inner {
  width: min(64%, 360px);
  border-style: dashed;
  animation: spin 22s linear infinite reverse;
}

.audio-ring {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.audio-ring--main {
  width: min(72%, 400px);
  aspect-ratio: 1;
  border: 2px solid rgba(255, 80, 80, 0.55);
  box-shadow:
    0 0 18px rgba(255, 60, 60, 0.35),
    0 0 50px rgba(255, 60, 60, 0.25),
    inset 0 0 20px rgba(255, 60, 60, 0.18);
}

.audio-ring--secondary {
  width: min(86%, 470px);
  aspect-ratio: 1;
  border: 1px solid rgba(255, 160, 160, 0.35);
  box-shadow: 0 0 40px rgba(255, 90, 90, 0.18);
}

.energy-field {
  width: min(90%, 500px);
  aspect-ratio: 1;
  opacity: 0;
  background:
    radial-gradient(circle, rgba(255, 60, 60, 0.16) 0%, rgba(255, 60, 60, 0.04) 42%, transparent 70%),
    conic-gradient(from 0deg, rgba(255, 90, 90, 0.2), transparent 35%, rgba(255, 120, 120, 0.15), transparent 80%, rgba(255, 90, 90, 0.2));
  filter: blur(18px);
  transition: opacity 0.25s ease;
}

.player-card.is-playing .audio-ring,
.player-card.is-playing .energy-field {
  opacity: max(0.2, var(--pulse-opacity));
}

.player-card.is-playing .audio-ring--main,
.player-card.is-playing .audio-ring--secondary,
.player-card.is-playing .energy-field {
  transform: scale(var(--pulse-scale));
}

.key-button {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: auto;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.key-button:hover {
  transform: translateY(-4px) scale(1.03);
}

.key-button:active {
  transform: scale(0.98);
}

.key-button img {
  display: block;
  width: auto;
  height: clamp(300px, 58vh, 560px);
  max-width: min(42vw, 250px);
  transform-origin: 50% 50%;
  filter: drop-shadow(0 0 28px rgba(255, 76, 76, 0.22));
  animation: rotateVertical 8.5s linear infinite, float 6s ease-in-out infinite;
  user-select: none;
  -webkit-user-drag: none;
}

.player-card.is-playing .key-button img {
  filter:
    drop-shadow(0 0 18px rgba(255, 90, 90, 0.38))
    drop-shadow(0 0 38px rgba(255, 60, 60, 0.3));
  animation: rotateVertical 4.8s linear infinite, float 3.6s ease-in-out infinite;
}

.meta-block {
  display: grid;
  gap: 0.9rem;
  justify-items: center;
  width: 100%;
}

.location-badge,
.status-box,
.track-box {
  padding: 0.9rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(10px);
}

.location-badge {
  color: var(--accent-soft);
  letter-spacing: 0.04em;
}

.status-box {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--muted);
}

.status-box__dot {
  width: 0.78rem;
  height: 0.78rem;
  border-radius: 50%;
  background: #858fa8;
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

.player-card.is-playing .status-box__dot {
  background: var(--accent);
  box-shadow: 0 0 18px rgba(255, 48, 48, 0.75);
}

.track-box {
  display: grid;
  gap: 0.35rem;
  min-width: min(100%, 520px);
  justify-items: center;
  text-align: center;
  color: var(--muted);
}

.track-box strong {
  color: var(--text);
}

.controls {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  justify-content: center;
}

.control-btn {
  min-width: 140px;
  min-height: 50px;
  padding: 0.85rem 1.15rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.control-btn:hover {
  transform: translateY(-2px);
}

.control-btn--accent {
  background: linear-gradient(135deg, #ff4747, #ca1111);
  box-shadow: 0 16px 35px rgba(202, 17, 17, 0.35);
}

.footer-note {
  max-width: 760px;
  color: var(--muted);
  text-align: center;
  line-height: 1.65;
}

@keyframes rotateVertical {
  from {
    transform: rotateY(0deg);
  }
  to {
    transform: rotateY(360deg);
  }
}

@keyframes float {
  0%, 100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -14px;
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 720px) {
  .player-card {
    min-height: 640px;
    padding: 1.2rem;
  }

  .player-stage {
    min-height: 420px;
  }

  .key-button img {
    height: clamp(240px, 48vh, 420px);
    max-width: min(52vw, 180px);
  }

  .control-btn {
    width: 100%;
  }
}
