:root {
  color-scheme: dark;
  --text: #fff8e8;
  --muted: rgba(255, 248, 232, .72);
  --line: rgba(255, 248, 232, .22);
  --panel: rgba(24, 17, 12, .46);
  --panel-strong: rgba(20, 13, 10, .68);
  --gold: #ffd06b;
  --red: #cc3429;
}

* {
  box-sizing: border-box;
}

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

body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #17110c;
  overflow: hidden;
  -webkit-user-select: none;
  user-select: none;
}

img,
svg,
button {
  -webkit-user-drag: none;
}

.scene {
  position: relative;
  min-height: 100svh;
  color: var(--text);
  background-image: url("media/chhath-river-hero");
  background-position: center center;
  background-size: cover;
  isolation: isolate;
}

.shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(7, 6, 5, .42), rgba(7, 6, 5, .05) 44%, rgba(7, 6, 5, .34)),
    linear-gradient(0deg, rgba(7, 6, 5, .58), transparent 42%, rgba(7, 6, 5, .18));
}

.topbar {
  position: fixed;
  top: 22px;
  left: 24px;
  right: 24px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  pointer-events: none;
}

.online {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 12, 10, .35);
  color: rgba(255, 255, 255, .78);
  font-size: 13px;
  line-height: 1;
  backdrop-filter: blur(16px);
}

.online span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #75ff9f;
  box-shadow: 0 0 16px rgba(117, 255, 159, .9);
}

.online strong {
  color: #fff;
  font-weight: 700;
}

.icon-button,
.play-button,
.control-button {
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(15, 12, 10, .35);
  backdrop-filter: blur(16px);
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
  pointer-events: auto;
}

.icon-button {
  width: 42px;
  height: 42px;
  border-radius: 50%;
}

.icon-button:hover,
.play-button:hover,
.control-button:hover {
  transform: translateY(-1px);
  background: rgba(42, 25, 16, .58);
  border-color: rgba(255, 208, 107, .55);
}

svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.play-button svg,
.control-button svg {
  fill: none;
  stroke: currentColor;
}

.play-button .play-icon,
.control-button polygon {
  fill: currentColor;
  stroke: none;
}

.title {
  position: fixed;
  left: clamp(22px, 4vw, 64px);
  bottom: clamp(118px, 13vh, 160px);
  max-width: min(760px, calc(100vw - 44px));
  text-shadow: 0 2px 28px rgba(0, 0, 0, .5);
}

.festival-clock {
  display: grid;
  gap: 8px;
  margin: 0 0 16px;
}

.clock-line {
  display: grid;
  gap: 3px;
}

.clock-line span {
  color: var(--gold);
  font-size: clamp(13px, 1.3vw, 18px);
  font-weight: 800;
}

.clock-line strong {
  display: block;
  overflow: hidden;
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(27px, 3.6vw, 52px);
  font-weight: 500;
  line-height: .95;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.countdown-line strong {
  font-size: clamp(42px, 5.6vw, 82px);
}

.title p {
  margin: 0 0 9px;
  color: var(--gold);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  letter-spacing: 0;
}

.title h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(58px, 10vw, 152px);
  font-weight: 500;
  line-height: .85;
  letter-spacing: 0;
}

.player {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 2;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 38px 42px 38px 38px;
  align-items: center;
  gap: 13px;
  width: min(520px, calc(100vw - 48px));
  min-height: 78px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .28);
  backdrop-filter: blur(20px);
}

.disc {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #120d0b 0 9%, #f6d36f 10% 14%, transparent 15%),
    var(--thumb, conic-gradient(from 40deg, #bb201f, #ffcf65, #f9a43b, #7e171a, #bb201f));
  background-position: center;
  background-size: cover;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .24), inset 0 0 0 999px rgba(0, 0, 0, .12), 0 8px 22px rgba(0, 0, 0, .3);
}

.player.playing .disc {
  animation: spin 5s linear infinite;
}

.track {
  min-width: 0;
}

.track p,
.track strong,
.track span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.track p {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 12px;
}

.track strong {
  font-size: 15px;
}

.track span {
  margin-top: 4px;
  color: rgba(255, 248, 232, .68);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.play-button,
.control-button {
  width: 42px;
  height: 42px;
  border-radius: 50%;
}

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

.pause-icon,
.player.playing .play-icon {
  display: none;
}

.player.playing .pause-icon {
  display: block;
}

.playlist-shell {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 2;
  width: min(420px, calc(100vw - 48px));
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel-strong);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}

.playlist-shell.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.queue-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  background: rgba(24, 17, 12, .78);
}

.queue-head strong {
  font-size: 14px;
}

.text-button {
  border: 0;
  color: var(--gold);
  background: transparent;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.song-list {
  max-height: 430px;
  margin: 0;
  padding: 0;
  overflow: auto;
  list-style: none;
  background: rgba(18, 12, 9, .78);
}

.song-list button {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border: 0;
  border-top: 1px solid rgba(255, 248, 232, .11);
  color: var(--text);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.song-list button:hover,
.song-list button.active {
  background: rgba(255, 208, 107, .12);
}

.song-list span {
  color: var(--muted);
  font-size: 12px;
}

.song-list strong {
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.song-list small {
  display: none;
  overflow: hidden;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-engine {
  position: fixed;
  right: 0;
  bottom: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: .01;
  pointer-events: none;
}

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

@media (max-width: 760px) {
  body {
    overflow: auto;
  }

  .scene {
    min-height: 100svh;
    background-position: 62% center;
  }

  .shade {
    background:
      linear-gradient(0deg, rgba(7, 6, 5, .75), transparent 54%, rgba(7, 6, 5, .25)),
      linear-gradient(90deg, rgba(7, 6, 5, .15), rgba(7, 6, 5, .04));
  }

  .topbar {
    top: 16px;
    left: 16px;
    right: 16px;
    align-items: flex-start;
  }

  .online {
    padding: 7px 9px;
    font-size: 12px;
  }

  .title {
    left: 18px;
    bottom: 128px;
  }

  .festival-clock {
    gap: 6px;
    margin-bottom: 12px;
  }

  .clock-line span {
    font-size: 12px;
  }

  .clock-line strong {
    font-size: clamp(17px, 5vw, 22px);
  }

  .countdown-line strong {
    font-size: clamp(28px, 8.4vw, 39px);
  }

  .title p {
    font-size: 16px;
  }

  .title h1 {
    font-size: clamp(52px, 20vw, 88px);
  }

  .player {
    display: grid;
    left: 12px;
    right: auto;
    bottom: 16px;
    width: calc(100vw - 24px);
    grid-template-columns: 40px repeat(4, 32px) minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 6px;
    padding: 8px;
  }

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

  .player .control-button,
  .player .play-button {
    grid-row: 2;
  }

  #prevButton {
    grid-column: 1;
  }

  #playToggle {
    grid-column: 2;
  }

  #nextButton {
    grid-column: 3;
  }

  #queueButton {
    grid-column: 4;
  }

  .disc {
    width: 40px;
    height: 40px;
  }

  .play-button {
    width: 32px;
    height: 32px;
  }

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

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

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

  .track strong {
    font-size: 13px;
  }

  .playlist-shell {
    right: 16px;
    left: 16px;
    bottom: 108px;
    width: auto;
  }

  .song-list {
    max-height: 330px;
  }
}
