:root {
  --bg-1: #09111f;
  --bg-2: #111b2e;
  --panel: rgba(11, 19, 32, 0.64);
  --panel-strong: rgba(16, 24, 40, 0.82);
  --panel-soft: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.14);
  --text-main: #f5f7ff;
  --text-muted: rgba(228, 233, 255, 0.68);
  --accent: #82e6ff;
  --accent-strong: #6ab6ff;
  --accent-secondary: #b3ffb8;
  --danger-soft: rgba(255, 118, 145, 0.72);
  --shadow: 0 32px 80px rgba(4, 9, 19, 0.48);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --progress-percent: 0%;
  --volume-percent: 75%;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande", sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at top left, rgba(122, 163, 255, 0.25), transparent 30%),
    radial-gradient(circle at 85% 15%, rgba(130, 230, 255, 0.18), transparent 24%),
    linear-gradient(145deg, var(--bg-1), var(--bg-2));
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.page-glow,
.grain-overlay {
  pointer-events: none;
  position: fixed;
  inset: 0;
}

.page-glow {
  filter: blur(20px);
  opacity: 0.85;
}

.page-glow-one {
  background:
    radial-gradient(circle at 16% 20%, rgba(103, 143, 255, 0.35), transparent 26%),
    radial-gradient(circle at 84% 18%, rgba(130, 230, 255, 0.25), transparent 22%);
}

.page-glow-two {
  background:
    radial-gradient(circle at 20% 88%, rgba(179, 255, 184, 0.16), transparent 18%),
    radial-gradient(circle at 86% 82%, rgba(255, 129, 163, 0.18), transparent 16%);
}

.grain-overlay {
  opacity: 0.1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 120px 120px;
  mask-image: radial-gradient(circle at center, black 45%, transparent 100%);
}

.app-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 18px;
}

.player-card {
  position: relative;
  width: min(100%, 1040px);
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius-xl) + 4px);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04)),
    var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
  overflow: hidden;
  isolation: isolate;
}

.player-card::before,
.player-card::after {
  content: "";
  position: absolute;
  inset: auto;
  border-radius: 999px;
  filter: blur(12px);
  opacity: 0.8;
  z-index: -1;
}

.player-card::before {
  width: 180px;
  height: 180px;
  right: -40px;
  top: -40px;
  background: radial-gradient(circle, rgba(130, 230, 255, 0.28), transparent 65%);
}

.player-card::after {
  width: 210px;
  height: 210px;
  left: -60px;
  bottom: -80px;
  background: radial-gradient(circle, rgba(179, 255, 184, 0.18), transparent 65%);
}

.player-header,
.player-content,
.playlist-panel {
  position: relative;
  z-index: 1;
}

.player-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}

.eyebrow,
.section-label {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.player-header h1,
.playlist-header h3 {
  margin: 4px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.player-header h1 {
  font-size: clamp(2rem, 4vw, 2.9rem);
}

.header-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-secondary), var(--accent));
  box-shadow: 0 0 16px rgba(130, 230, 255, 0.65);
}

.player-content {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 28px;
  align-items: center;
}

.cover-stage,
.player-panel,
.playlist-panel {
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.04));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 22px 60px rgba(5, 9, 20, 0.28);
  backdrop-filter: blur(18px);
}

.cover-stage {
  position: relative;
  min-height: 100%;
  padding: 28px;
  border-radius: var(--radius-xl);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.cover-orbit {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.cover-orbit-one {
  width: 84%;
  aspect-ratio: 1;
  animation: rotateSlow 22s linear infinite;
}

.cover-orbit-two {
  width: 58%;
  aspect-ratio: 1;
  border-style: dashed;
  animation: rotateSlowReverse 16s linear infinite;
}

.cover-frame {
  position: relative;
  width: min(100%, 300px);
  aspect-ratio: 1;
  padding: 10px;
  border-radius: 32px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.08)),
    rgba(255, 255, 255, 0.06);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.2),
    0 20px 60px rgba(1, 8, 22, 0.38);
  transition: transform 280ms ease, box-shadow 280ms ease, filter 280ms ease;
}

.player-card.is-playing .cover-frame {
  transform: scale(1.03);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.2),
    0 0 0 1px rgba(130, 230, 255, 0.3),
    0 26px 70px rgba(1, 8, 22, 0.48),
    0 0 44px rgba(130, 230, 255, 0.24);
}

.cover-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 24px;
  transition: transform 280ms ease, opacity 220ms ease, filter 220ms ease;
}

.player-card.is-switching .cover-frame img,
.player-card.is-switching .song-overview,
.player-card.is-switching .time-row,
.player-card.is-switching .duration-pill {
  opacity: 0.45;
  transform: translateY(6px);
  filter: saturate(0.84);
}

.cover-reflection {
  position: absolute;
  inset: auto 12% 10px;
  height: 54px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(130, 230, 255, 0.24), transparent 70%);
  filter: blur(18px);
}

.player-panel {
  padding: 26px;
  border-radius: var(--radius-xl);
  display: grid;
  gap: 22px;
}

.song-overview,
.volume-panel,
.playlist-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.track-copy h2 {
  margin: 6px 0 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  line-height: 1.05;
}

.track-copy p:last-child {
  margin: 0;
  color: var(--text-muted);
  font-size: 1rem;
}

.duration-pill,
.playlist-count {
  flex-shrink: 0;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
}

.progress-panel {
  padding: 18px;
  border-radius: var(--radius-lg);
  background: var(--panel-strong);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.time-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  color: var(--text-muted);
  transition: opacity 220ms ease, transform 220ms ease;
}

.progress-track {
  position: relative;
  height: 12px;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(255, 255, 255, 0.06);
  overflow: visible;
  cursor: pointer;
  touch-action: none;
}

.progress-fill,
.progress-thumb {
  position: absolute;
  top: 50%;
  pointer-events: none;
}

.progress-fill {
  left: 0;
  height: 100%;
  width: var(--progress-percent);
  transform: translateY(-50%);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-secondary), var(--accent), var(--accent-strong));
  box-shadow: 0 0 18px rgba(130, 230, 255, 0.45);
  transition: width 120ms linear;
}

.progress-thumb {
  left: var(--progress-percent);
  width: 18px;
  height: 18px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #f9fdff;
  box-shadow:
    0 0 0 5px rgba(130, 230, 255, 0.18),
    0 8px 24px rgba(0, 0, 0, 0.28);
  transition: left 120ms linear, transform 180ms ease;
}

.progress-track:hover .progress-thumb,
.progress-track:focus-visible .progress-thumb {
  transform: translate(-50%, -50%) scale(1.08);
}

.controls-panel {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
}

.control-button,
.sound-toggle {
  display: grid;
  place-items: center;
  border: 0;
  color: var(--text-main);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.06)),
    rgba(255, 255, 255, 0.06);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease,
    opacity 180ms ease;
}

.control-button {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 18px 36px rgba(0, 0, 0, 0.24);
}

.control-button-primary {
  width: 82px;
  height: 82px;
  border-radius: 26px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.08)),
    linear-gradient(135deg, rgba(130, 230, 255, 0.36), rgba(106, 182, 255, 0.28));
  box-shadow:
    0 24px 40px rgba(0, 0, 0, 0.26),
    0 0 32px rgba(130, 230, 255, 0.24);
}

.control-button:hover,
.sound-toggle:hover,
.playlist-track:hover {
  transform: translateY(-2px) scale(1.02);
}

.control-button:active,
.sound-toggle:active,
.playlist-track:active {
  transform: scale(0.97);
}

.control-button svg,
.sound-toggle svg {
  width: 24px;
  height: 24px;
}

.control-button-primary svg {
  width: 28px;
  height: 28px;
}

.icon-pause,
.icon-muted,
.player-card.is-muted .icon-volume,
.player-card.is-playing .icon-play {
  display: none;
}

.player-card.is-playing .icon-pause,
.player-card.is-muted .icon-muted {
  display: block;
}

.volume-panel {
  align-items: end;
}

.sound-toggle {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  flex-shrink: 0;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 16px 30px rgba(0, 0, 0, 0.24);
}

.volume-slider-wrap {
  flex: 1;
}

.volume-slider-wrap .section-label {
  margin-bottom: 12px;
}

.volume-slider {
  width: 100%;
  height: 6px;
  appearance: none;
  border-radius: 999px;
  outline: none;
  background:
    linear-gradient(90deg, var(--accent) 0%, var(--accent-secondary) var(--volume-percent), rgba(255, 255, 255, 0.12) var(--volume-percent), rgba(255, 255, 255, 0.12) 100%);
}

.volume-slider::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 0;
  background: #fcffff;
  box-shadow:
    0 0 0 5px rgba(130, 230, 255, 0.18),
    0 8px 20px rgba(0, 0, 0, 0.28);
}

.volume-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 0;
  background: #fcffff;
  box-shadow:
    0 0 0 5px rgba(130, 230, 255, 0.18),
    0 8px 20px rgba(0, 0, 0, 0.28);
}

.volume-slider::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: transparent;
}

.playlist-panel {
  margin-top: 28px;
  padding: 22px;
  border-radius: var(--radius-xl);
}

.playlist-header {
  margin-bottom: 18px;
}

.playlist-list {
  display: grid;
  gap: 12px;
  max-height: 278px;
  overflow-y: auto;
  padding-right: 6px;
}

.playlist-list::-webkit-scrollbar {
  width: 8px;
}

.playlist-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

.playlist-track {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  color: inherit;
  text-align: left;
  transition:
    transform 180ms ease,
    background 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.playlist-track img {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border-radius: 14px;
}

.playlist-track strong,
.playlist-track span {
  display: block;
}

.playlist-track strong {
  font-size: 1rem;
  margin-bottom: 4px;
}

.playlist-track span {
  color: var(--text-muted);
}

.playlist-track .track-tag {
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.85rem;
}

.playlist-track.is-active {
  border-color: rgba(130, 230, 255, 0.34);
  background:
    linear-gradient(135deg, rgba(130, 230, 255, 0.14), rgba(179, 255, 184, 0.08)),
    rgba(255, 255, 255, 0.06);
  box-shadow:
    0 0 0 1px rgba(130, 230, 255, 0.16),
    0 18px 36px rgba(4, 9, 19, 0.22),
    0 0 30px rgba(130, 230, 255, 0.14);
}

.playlist-track.is-active .track-tag {
  color: #08101d;
  background: linear-gradient(135deg, var(--accent-secondary), var(--accent));
}

.control-button:focus-visible,
.sound-toggle:focus-visible,
.volume-slider:focus-visible,
.playlist-track:focus-visible {
  outline: 2px solid rgba(130, 230, 255, 0.95);
  outline-offset: 3px;
}

@keyframes rotateSlow {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes rotateSlowReverse {
  from {
    transform: rotate(360deg);
  }

  to {
    transform: rotate(0deg);
  }
}

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

  .player-content {
    grid-template-columns: 1fr;
  }

  .cover-stage {
    padding: 24px;
  }

  .cover-frame {
    width: min(100%, 280px);
  }
}

@media (max-width: 640px) {
  .app-shell {
    padding: 18px 12px;
  }

  .player-card {
    padding: 18px;
    border-radius: 26px;
  }

  .player-header,
  .song-overview,
  .volume-panel,
  .playlist-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .header-chip,
  .duration-pill,
  .playlist-count {
    align-self: stretch;
    justify-content: center;
  }

  .player-panel,
  .playlist-panel {
    padding: 18px;
  }

  .controls-panel {
    gap: 12px;
  }

  .control-button {
    width: 58px;
    height: 58px;
  }

  .control-button-primary {
    width: 74px;
    height: 74px;
  }

  .playlist-track {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .playlist-track .track-tag {
    grid-column: 2;
    justify-self: start;
    margin-top: 8px;
  }
}
