@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");

:root {
  color-scheme: dark;
  --bg: #080c18;
  --card: rgba(10, 15, 28, 0.2);
  --card-border: rgba(255, 255, 255, 0.13);
  --text: #f7f8ff;
  --muted: #aeb7cc;
  --accent: #8b7cff;
  --accent-light: #c6beff;
  --cyan: #42d6d0;
  --track: rgba(255, 255, 255, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 15%, rgba(109, 89, 255, 0.2), transparent 34%),
    radial-gradient(circle at 82% 82%, rgba(38, 202, 196, 0.13), transparent 30%),
    linear-gradient(145deg, #070a13 0%, #0c1222 55%, #080c18 100%);
  font-family: "Inter", Arial, sans-serif;
}

button,
input {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

.page-shell {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 32px 20px;
}

.audio-card {
  width: min(100%, 1040px);
  padding: clamp(28px, 7vw, 54px);
  text-align: center;
  border: 1px solid var(--card-border);
  border-radius: 32px;
  background: var(--card);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 7px 12px;
  color: var(--accent-light);
  border: 1px solid rgba(139, 124, 255, 0.24);
  border-radius: 999px;
  background: rgba(139, 124, 255, 0.08);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 13px var(--cyan);
}

h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(22px, 4.5vw, 34px);
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -0.045em;
  text-transform: none;
}

.subtitle {
  max-width: 450px;
  margin: 10px auto 4px;
  color: #fff;
  font-size: clamp(14px, 3vw, 17px);
  line-height: 1.9;
}

.tertiary-title {
  max-width: 450px;
  margin: 0 auto 32px;
  color: #fff;
  font-size: clamp(12px, 2.5vw, 14px);
  font-weight: 500;
  line-height: 1.45;
}

.tertiary-title span {
  display: block;
  margin: 0;
  padding: 0;
  line-height: 1.45;
}

.player {
  padding: 26px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 25px;
  background: rgba(4, 8, 18, 0.13);
}

.cover {
  position: relative;
  display: grid;
  width: 112px;
  height: 112px;
  margin: 0 auto 27px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 31px;
  background: linear-gradient(145deg, rgba(139, 124, 255, 0.9), rgba(66, 214, 208, 0.58));
  box-shadow: 0 19px 35px rgba(54, 46, 138, 0.28);
}

.cover::before {
  position: absolute;
  width: 78px;
  height: 78px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  content: "";
}

.cover-ring {
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
}

.sound-bars {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  height: 34px;
}

.sound-bars i {
  display: block;
  width: 4px;
  height: 12px;
  border-radius: 9px;
  background: white;
}

.sound-bars i:nth-child(2),
.sound-bars i:nth-child(4) {
  height: 24px;
}

.sound-bars i:nth-child(3) {
  height: 34px;
}

.is-playing .sound-bars i {
  animation: bars 0.72s ease-in-out infinite alternate;
}

.is-playing .sound-bars i:nth-child(2) { animation-delay: -0.4s; }
.is-playing .sound-bars i:nth-child(3) { animation-delay: -0.2s; }
.is-playing .sound-bars i:nth-child(4) { animation-delay: -0.55s; }
.is-playing .sound-bars i:nth-child(5) { animation-delay: -0.15s; }

@keyframes bars {
  from { transform: scaleY(0.38); opacity: 0.72; }
  to { transform: scaleY(1); opacity: 1; }
}

.timeline-block {
  direction: ltr;
}

.time-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  color: #c5ccda;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
}

.range {
  width: 100%;
  height: 5px;
  margin: 0;
  cursor: pointer;
  border: 0;
  border-radius: 999px;
  outline: 0;
  appearance: none;
  -webkit-appearance: none;
  background: linear-gradient(to right, var(--accent) var(--range-progress, 0%), var(--track) var(--range-progress, 0%));
}

.range::-webkit-slider-thumb {
  width: 16px;
  height: 16px;
  cursor: grab;
  border: 3px solid #fff;
  border-radius: 50%;
  appearance: none;
  -webkit-appearance: none;
  background: var(--accent);
  box-shadow: 0 3px 11px rgba(0, 0, 0, 0.34);
}

.range::-moz-range-thumb {
  width: 11px;
  height: 11px;
  cursor: grab;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--accent);
}

.range:focus-visible {
  box-shadow: 0 0 0 4px rgba(139, 124, 255, 0.23);
}

.controls {
  direction: ltr;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(9px, 3vw, 16px);
  margin: 26px 0 22px;
}

.control-button,
.play-button,
.icon-button {
  display: grid;
  cursor: pointer;
  color: var(--text);
  border: 0;
  place-items: center;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

.control-button {
  position: relative;
  width: 43px;
  height: 43px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 15px;
}

.control-button.small {
  color: #dfe3ee;
  background: transparent;
  border-color: transparent;
}

.control-button small {
  position: absolute;
  font-size: 8px;
  font-weight: 800;
}

.skip-icon {
  font-size: 28px;
  line-height: 1;
}

.skip-icon.reverse {
  transform: scaleX(-1);
}

.play-button {
  width: 66px;
  height: 66px;
  padding-left: 3px;
  border-radius: 22px;
  background: linear-gradient(145deg, var(--accent-light), var(--accent));
  box-shadow: 0 14px 30px rgba(111, 93, 255, 0.36);
  font-size: 24px;
}

.control-button:hover,
.icon-button:hover {
  color: white;
  background: rgba(255, 255, 255, 0.11);
}

.play-button:hover {
  transform: translateY(-2px) scale(1.03);
}

.control-button:active,
.play-button:active,
.icon-button:active {
  transform: scale(0.94);
}

.control-button:focus-visible,
.play-button:focus-visible,
.icon-button:focus-visible {
  outline: 3px solid rgba(198, 190, 255, 0.45);
  outline-offset: 3px;
}

.volume-row {
  direction: ltr;
  display: grid;
  grid-template-columns: auto minmax(80px, 145px) auto;
  align-items: center;
  justify-content: center;
  gap: 11px;
  color: var(--muted);
}

.icon-button {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: transparent;
  font-size: 15px;
}

.volume {
  height: 4px;
  --range-progress: 100%;
}

.volume-label {
  font-size: 12px;
}

.status {
  min-height: 22px;
  margin: 20px 0 0;
  color: #8893aa;
  font-size: 12px;
}

.ambient {
  position: fixed;
  width: 300px;
  height: 300px;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(16px);
  opacity: 0.06;
}

.ambient-one {
  top: -150px;
  right: -80px;
  background: #8b7cff;
}

.ambient-two {
  bottom: -160px;
  left: -70px;
  background: #42d6d0;
}

.playlist {
  width: 100%;
}

.track-list {
  display: grid;
  gap: 8px;
}

.track-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(320px, 1.55fr) 92px;
  align-items: center;
  gap: 20px;
  min-height: 70px;
  padding: 11px 15px;
  overflow: hidden;
  border: 1px solid rgba(124, 151, 255, 0.13);
  border-radius: 18px;
  background: rgba(3, 12, 35, 0.17);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.track-row:hover {
  transform: translateY(-1px);
  border-color: rgba(139, 124, 255, 0.3);
  background: rgba(7, 18, 49, 0.25);
}

.track-row[data-state="playing"] {
  border-color: rgba(139, 124, 255, 0.52);
  background: rgba(35, 27, 88, 0.3);
  box-shadow: 0 8px 25px rgba(5, 7, 20, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.track-row[data-state="error"] {
  border-color: rgba(255, 105, 105, 0.34);
}

.track-meta {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
  text-align: left;
}

.track-number {
  display: grid;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  color: #fff;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 11px;
  background: rgba(139, 124, 255, 0.16);
  font-size: 11px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.track-title {
  overflow: hidden;
  color: #fff;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.track-player {
  direction: ltr;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 13px;
  min-width: 0;
}

.track-play {
  display: grid;
  width: 42px;
  height: 42px;
  padding: 0 0 0 2px;
  cursor: pointer;
  color: #fff;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(145deg, var(--accent-light), var(--accent));
  box-shadow: 0 8px 19px rgba(111, 93, 255, 0.27);
  place-items: center;
  font-size: 15px;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.track-play:hover {
  transform: translateY(-1px) scale(1.03);
  box-shadow: 0 10px 23px rgba(111, 93, 255, 0.38);
}

.track-play:active {
  transform: scale(0.94);
}

.track-play:focus-visible {
  outline: 3px solid rgba(198, 190, 255, 0.45);
  outline-offset: 3px;
}

.track-timeline {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.track-seek {
  width: 100%;
  height: 5px;
  margin: 0;
  cursor: pointer;
  border: 0;
  border-radius: 999px;
  outline: 0;
  appearance: none;
  -webkit-appearance: none;
  background: linear-gradient(to right, var(--accent) var(--track-progress, 0%), rgba(255, 255, 255, 0.14) var(--track-progress, 0%));
}

.track-seek::-webkit-slider-thumb {
  width: 14px;
  height: 14px;
  cursor: grab;
  border: 3px solid #fff;
  border-radius: 50%;
  appearance: none;
  -webkit-appearance: none;
  background: var(--accent);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.32);
}

.track-seek::-moz-range-thumb {
  width: 9px;
  height: 9px;
  cursor: grab;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--accent);
}

.track-seek:focus-visible {
  box-shadow: 0 0 0 4px rgba(139, 124, 255, 0.22);
}

.track-times {
  display: flex;
  justify-content: space-between;
  color: rgba(255, 255, 255, 0.58);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}

.track-status {
  color: rgba(255, 255, 255, 0.66);
  text-align: right;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.track-row[data-state="playing"] .track-status {
  color: #c6beff;
}

.track-row[data-state="error"] .track-status {
  color: #ffaaaa;
}

.track-audio {
  display: none;
}

@media (max-width: 760px) {
  .track-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px 14px;
    padding: 12px;
  }

  .track-player {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .track-status {
    grid-column: 2;
    grid-row: 1;
  }
}

@media (max-width: 520px) {
  .page-shell {
    min-height: 100svh;
    padding: 1cm;
    place-items: center;
  }

  .audio-card {
    width: 100%;
    padding: 20px 12px;
    overflow-wrap: anywhere;
    border-radius: 20px;
    border-color: rgba(124, 151, 255, 0.15);
    background: rgba(3, 12, 35, 0.18);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
  }

  h1 {
    font-size: clamp(18px, 6.5vw, 24px);
    line-height: 1.3;
    letter-spacing: -0.025em;
  }

  .subtitle {
    margin-top: 6px;
    font-size: 13px;
    line-height: 1.45;
  }

  .tertiary-title {
    margin-bottom: 20px;
    font-size: 11.5px;
  }

  .tertiary-title span {
    line-height: 1.35;
  }

  .player {
    padding: 16px 10px;
    border-radius: 18px;
    border-color: rgba(124, 151, 255, 0.12);
    background: rgba(2, 10, 30, 0.13);
  }

  .cover {
    width: 74px;
    height: 74px;
    margin-bottom: 18px;
    border-radius: 20px;
  }

  .play-button {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    font-size: 21px;
  }

  .controls {
    margin: 18px 0 15px;
  }

  .volume-row {
    grid-template-columns: auto minmax(64px, 118px) auto;
    gap: 7px;
  }

  .volume-label,
  .time-row,
  .status {
    font-size: 11px;
  }

  .status {
    margin-top: 13px;
  }

  .audio-card {
    padding: 18px 8px;
  }

  .tertiary-title {
    margin-bottom: 18px;
  }

  .track-list {
    gap: 7px;
  }

  .track-row {
    min-height: 0;
    padding: 10px;
    border-radius: 15px;
  }

  .track-meta {
    gap: 9px;
  }

  .track-number {
    flex-basis: 29px;
    width: 29px;
    height: 29px;
    border-radius: 9px;
    font-size: 9.5px;
  }

  .track-title {
    font-size: 11px;
  }

  .track-player {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 10px;
  }

  .track-play {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    font-size: 13px;
  }

  .track-status {
    font-size: 9px;
  }

  .track-times {
    font-size: 8.5px;
  }
}

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