
@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700&display=swap');

:root {
  color-scheme: dark;

  --bg: #080d1b;
  --panel: rgba(13, 22, 43, .80);
  --text: #edf3ff;
  --muted: #8290ad;
  --accent: #83b8ff;
  --line: rgba(151, 183, 232, .2);
}

* {
  box-sizing: border-box;
}

html, body {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  color: var(--text);

  background:
    radial-gradient(
      ellipse at 50% 42%,
      rgba(40, 91, 157, .25),
      transparent 55%
    ),
    radial-gradient(
      circle at 15% 85%,
      rgba(47, 68, 133, .12),
      transparent 32%
    ),
    var(--bg);

  font-family: Manrope, sans-serif;
}

/* Background grid */

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .18;

  background-image:
    linear-gradient(rgba(145,180,230,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(145,180,230,.035) 1px, transparent 1px);

  background-size: 44px 44px;

  mask-image: linear-gradient(
    to bottom,
    black,
    transparent 85%
  );
}

/* Main layout */

.player-shell {
  position: relative;

  min-height: 100vh;
  min-height: 100svh;

  width: 100%;
  padding: clamp(18px, 4vw, 54px);

  display: grid;
  place-items: center;
}

/* Player container */

.player {
  width: min(100%, 1100px);

  padding: clamp(24px, 5vw, 64px);

  display: grid;

  grid-template-columns:
    minmax(260px, 1.1fr)
    minmax(280px, 1fr);

  align-items: center;

  gap: clamp(32px, 6vw, 76px);

  background: var(--panel);

  border: 1px solid var(--line);
  border-radius: clamp(16px, 2vw, 24px);

  box-shadow:
    0 24px 90px rgba(0,0,0,.34),
    inset 0 1px rgba(255,255,255,.035);

  backdrop-filter: blur(14px);
}

/* Album artwork */

.artwork-wrap {
  position: relative;

  width: 100%;
  aspect-ratio: 1;
  min-width: 0;
}

.artwork-glow {
  position: absolute;

  inset: 10% -4%;

  background: var(--accent);

  filter: blur(48px);
  opacity: .2;

  border-radius: 50%;
}

.artwork {
  position: relative;

  display: block;

  width: 100%;
  height: 100%;

  object-fit: cover;

  border-radius: 10px;

  box-shadow:
    0 14px 38px rgba(0,0,0,.35);
}

/* Song information */

.player-content {
  min-width: 0;
}

.eyebrow,
.loop-note {
  font-family: 'DM Mono', monospace;
  letter-spacing: .19em;
}

.eyebrow {
  color: var(--accent);

  margin: 0 0 12px;

  font-size: 10px;
}

.track-info h1 {
  margin: 0;

  font-size: clamp(32px, 5vw, 58px);
  line-height: 1.08;

  font-weight: 600;
  letter-spacing: -.05em;

  overflow-wrap: anywhere;
}

.artist {
  margin: 12px 0 clamp(30px, 4vw, 48px);

  color: var(--muted);

  font-size: clamp(12px, 1.5vw, 15px);
}

.artist span {
  padding: 0 4px;
  color: #53627f;
}

/* Progress bar */

.timeline {
  width: 100%;
}

.seek,
.volume-control input {
  appearance: none;

  display: block;

  width: 100%;
  height: 4px;

  border-radius: 8px;

  background:
    linear-gradient(
      to right,
      var(--accent) 0%,
      var(--accent) 0%,
      #34425d 0%,
      #34425d 100%
    );

  outline: none;
  cursor: pointer;
}

.seek::-webkit-slider-thumb,
.volume-control input::-webkit-slider-thumb {
  appearance: none;

  width: 11px;
  height: 11px;

  border-radius: 50%;

  background: var(--text);

  box-shadow:
    0 0 0 3px rgba(131,184,255,.14);
}

.seek::-moz-range-thumb,
.volume-control input::-moz-range-thumb {
  width: 11px;
  height: 11px;

  border: 0;
  border-radius: 50%;

  background: var(--text);
}

.time-row {
  display: flex;
  justify-content: space-between;

  margin-top: 12px;

  color: var(--muted);

  font: 11px 'DM Mono', monospace;
}

/* Controls */

.controls {
  display: flex;

  align-items: center;
  justify-content: space-between;

  gap: 24px;

  margin: 34px 0 25px;
}

button {
  border: 0;
  cursor: pointer;
}

.icon-button,
.play-button {
  display: grid;
  place-items: center;

  color: var(--muted);
  background: transparent;
}

.icon-button svg,
.volume-control svg {
  width: 21px;
  height: 21px;

  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;

  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-button.active {
  color: var(--accent);
}

/* Play button */

.play-button {
  width: 68px;
  height: 68px;

  flex: 0 0 68px;

  border-radius: 50%;

  background: var(--accent);
  color: #07101f;

  transition:
    transform .2s,
    box-shadow .2s;
}

.play-button:hover {
  transform: scale(1.05);

  box-shadow:
    0 0 28px rgba(131,184,255,.25);
}

.play-button svg {
  width: 27px;
  height: 27px;

  fill: currentColor;
}

/* Volume */

.volume-control {
  display: flex;

  align-items: center;

  gap: 11px;

  width: min(34%, 132px);

  color: var(--muted);
}

.volume-control input {
  width: 100%;
  height: 3px;
}

/* Loop indicator */

.loop-note {
  display: flex;

  justify-content: center;
  align-items: center;

  gap: 9px;

  margin: 0;

  color: #687b9d;

  font-size: 10px;
}

.pulse {
  width: 6px;
  height: 6px;

  border-radius: 50%;

  background: #83b8ff;

  box-shadow:
    0 0 9px #83b8ff;
}

/* Tablet and mobile */

@media (max-width: 700px) {

  .player-shell {
    padding: clamp(14px, 4vw, 28px);
  }

  .player {
    width: min(100%, 560px);

    grid-template-columns: minmax(0, 1fr);

    gap: clamp(22px, 5vw, 34px);

    padding: clamp(20px, 5vw, 34px);
  }

  .artwork-wrap {
    width: min(100%, 520px);

    margin-inline: auto;
  }

  .track-info h1 {
    font-size: clamp(29px, 8vw, 43px);
  }

  .artist {
    margin-bottom: 26px;
  }

  .controls {
    margin: 28px 0 22px;
  }

  .play-button {
    width: 62px;
    height: 62px;

    flex-basis: 62px;
  }
}

/* Small phones */

@media (max-width: 380px) {

  .player {
    padding: 18px;
  }

  .controls {
    gap: 16px;
  }

  .volume-control {
    width: 30%;
  }
}

/* Short desktop screens */

@media (max-height: 620px) and (min-width: 701px) {

  .player-shell {
    padding-block: 18px;
  }

  .player {
    padding: 24px;
    gap: 28px;
  }

  .artwork-wrap {
    max-height: calc(100svh - 84px);
  }
}
