:root {
  --ink: #f6ecff;
  --hot: #ff45b5;
  --cool: #4ff0ff;
  --beat: 0.484s;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
  overflow: hidden;
  background: #08040f;
  color: var(--ink);
  font-family: "Outfit", "Segoe UI", system-ui, -apple-system, sans-serif;
}

#club {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
}

.stage {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 1.25rem 1.25rem 4.4rem;
  pointer-events: none;
}

/* ------------------------------------------------------------- the call card */

.call {
  width: min(46rem, 100%);
  position: relative;
  overflow: hidden;
  padding: 0.95rem 1.2rem 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 0.95rem;
  background:
    repeating-linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.03) 0 1px,
      transparent 1px 4px
    ),
    linear-gradient(160deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0) 46%),
    rgba(8, 3, 18, 0.72);
  backdrop-filter: blur(18px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 0 0 1px rgba(0, 0, 0, 0.45),
    0 1.6rem 3.4rem rgba(0, 0, 0, 0.62),
    0 0 3.6rem -0.8rem var(--hot);
  transition: box-shadow 0.6s ease;
}

.call::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--hot), color-mix(in srgb, var(--hot) 25%, transparent));
  transition: background 0.5s ease;
}

.call-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.5rem;
  font: 600 0.66rem/1 "IBM Plex Mono", Consolas, "Courier New", monospace;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.call-tag {
  padding: 0.28rem 0.5rem;
  border-radius: 999px;
  background: var(--hot);
  color: #14020c;
  transition: background-color 0.5s ease;
}

.call-meta {
  padding: 0.28rem 0.5rem;
  border: 1px solid rgba(246, 236, 255, 0.28);
  border-radius: 999px;
  color: rgba(246, 236, 255, 0.86);
}

.call-meta:empty {
  display: none;
}

.call-count {
  margin-left: auto;
  color: rgba(246, 236, 255, 0.5);
  letter-spacing: 0.1em;
}

.call-name {
  margin: 0 0 0.3rem;
  font-size: clamp(1.5rem, 4.2vw, 2.3rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.01em;
  text-wrap: balance;
  color: #fffafd;
  text-shadow:
    0 0 1.2rem color-mix(in srgb, var(--hot) 45%, transparent),
    0 2px 1.4rem rgba(0, 0, 0, 0.6);
}

.call-body {
  margin: 0;
  max-width: 42rem;
  font-size: clamp(0.92rem, 2.1vw, 1.06rem);
  line-height: 1.5;
  color: rgba(246, 236, 255, 0.88);
  text-wrap: pretty;
}

.call-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin: 0.85rem 0 0;
  pointer-events: auto;
}

.call-dot {
  width: 0.85rem;
  height: 0.3rem;
  border-radius: 999px;
  background: rgba(246, 236, 255, 0.2);
  cursor: pointer;
  transition:
    background-color 0.3s ease,
    transform 0.3s ease;
}

.call-dot.is-done {
  background: rgba(246, 236, 255, 0.42);
}

.call-dot.is-now {
  background: var(--hot);
  transform: scaleY(1.7);
  box-shadow: 0 0 0.7rem var(--hot);
}

.call-dot:hover {
  background: #fffafd;
}

.call-bar {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 100%;
  transform: scaleX(var(--call-progress, 0));
  transform-origin: left center;
  background: var(--hot);
  opacity: 0.75;
  transition: background-color 0.5s ease;
}

.call.is-held .call-bar {
  opacity: 0.28;
}

/* ------------------------------------------------------------- the song deck */

.deck {
  position: fixed;
  z-index: 3;
  left: 0.85rem;
  top: 0.85rem;
  width: min(17.6rem, calc(100vw - 1.7rem));
  font: 500 0.72rem/1.2 "IBM Plex Mono", Consolas, "Courier New", monospace;
}

.deck-toggle {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.58rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.75rem;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.08), transparent 50%),
    rgba(10, 4, 20, 0.72);
  backdrop-filter: blur(16px);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow:
    0 0.8rem 1.8rem rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(0, 0, 0, 0.35);
  transition:
    border-color 0.3s ease,
    background-color 0.3s ease;
}

.deck-toggle:hover,
.deck-toggle[aria-expanded="true"] {
  border-color: color-mix(in srgb, var(--cool) 55%, transparent);
  background: rgba(16, 7, 30, 0.78);
}

.deck-toggle:focus {
  outline: none;
}

.deck-toggle:focus-visible {
  outline: 2px solid var(--cool);
  outline-offset: 3px;
}

.deck-eq {
  flex: none;
  display: flex;
  align-items: flex-end;
  gap: 2px;
  width: 1.1rem;
  height: 1.1rem;
}

.deck-eq i {
  flex: 1;
  border-radius: 1px;
  background: var(--cool);
  transform-origin: bottom center;
  animation: deck-eq calc(var(--beat) * 2) ease-in-out infinite;
  height: 100%;
}

.deck-eq i:nth-child(1) {
  animation-delay: calc(var(--beat) * -0.1);
}

.deck-eq i:nth-child(2) {
  animation-delay: calc(var(--beat) * -0.7);
}

.deck-eq i:nth-child(3) {
  animation-delay: calc(var(--beat) * -1.3);
}

.deck-eq i:nth-child(4) {
  animation-delay: calc(var(--beat) * -0.4);
}

.deck-eq i:nth-child(5) {
  animation-delay: calc(var(--beat) * -1.6);
}

.deck.is-quiet .deck-eq i {
  animation-play-state: paused;
  background: rgba(246, 236, 255, 0.3);
  transform: scaleY(0.2);
}

.deck-text {
  min-width: 0;
  flex: 1;
}

.deck-kicker {
  display: block;
  font-size: 0.56rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(246, 236, 255, 0.5);
}

.deck-title {
  display: block;
  overflow: hidden;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #fffafd;
}

.deck-meta {
  display: block;
  margin-top: 0.12rem;
  font-size: 0.56rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(246, 236, 255, 0.48);
}

.deck-caret {
  flex: none;
  width: 0.9rem;
  height: 0.9rem;
  fill: none;
  stroke: rgba(246, 236, 255, 0.6);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.25s ease;
}

.deck-toggle[aria-expanded="true"] .deck-caret {
  transform: rotate(180deg);
}

.deck-list {
  margin: 0.4rem 0 0;
  padding: 0.35rem;
  list-style: none;
  max-height: min(24rem, calc(100dvh - 6.5rem));
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 0.75rem;
  background: rgba(10, 4, 20, 0.86);
  backdrop-filter: blur(16px);
  box-shadow: 0 1rem 2.2rem rgba(0, 0, 0, 0.6);
}

.deck-track {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
  padding: 0.48rem 0.5rem;
  border: 0;
  border-radius: 0.5rem;
  background: none;
  color: rgba(246, 236, 255, 0.82);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.deck-swatch {
  flex: none;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: rgba(246, 236, 255, 0.2);
  box-shadow: 0 0 0.45rem currentColor;
}

.deck-track:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fffafd;
}

.deck-track:focus {
  outline: none;
}

.deck-track:focus-visible {
  outline: 2px solid var(--cool);
  outline-offset: -2px;
}

.deck-track.is-now {
  background: rgba(255, 255, 255, 0.07);
  color: #fffafd;
}

.deck-track.is-now .deck-key {
  color: var(--cool);
}

.deck-track.is-locked {
  color: rgba(246, 236, 255, 0.4);
}

.deck-key {
  flex: none;
  width: 0.9rem;
  color: rgba(246, 236, 255, 0.4);
  font-size: 0.66rem;
}

.deck-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.deck-vibe {
  flex: none;
  max-width: 6.4rem;
  overflow: hidden;
  font-size: 0.56rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(246, 236, 255, 0.42);
}

/* ------------------------------------------------------------------- chrome */

.hint {
  position: fixed;
  z-index: 2;
  right: 0.95rem;
  top: 0.95rem;
  margin: 0;
  max-width: 13rem;
  font: 500 0.68rem/1.45 "IBM Plex Mono", Consolas, "Courier New", monospace;
  text-align: right;
  color: rgba(246, 236, 255, 0.7);
  pointer-events: none;
  text-shadow: 0 1px 0.6rem rgba(0, 0, 0, 0.9);
  transition: opacity 0.8s ease;
}

.hint.is-gone {
  opacity: 0;
}

.secrets {
  position: fixed;
  z-index: 3;
  right: 0.95rem;
  top: 5.2rem;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
  margin: 0;
  font: 600 0.62rem/1 "IBM Plex Mono", Consolas, "Courier New", monospace;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(246, 236, 255, 0.72);
  pointer-events: none;
  text-shadow: 0 1px 0.6rem rgba(0, 0, 0, 0.9);
}

.secrets-dot {
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: #ffd83a;
  box-shadow: 0 0 0.5rem #ffd83a;
}

.secrets.is-new {
  animation: secret-pop 0.7s ease;
}

.homage {
  position: fixed;
  z-index: 2;
  right: 0.95rem;
  bottom: 0.85rem;
  margin: 0;
  max-width: 20rem;
  font: 400 0.62rem/1.35 "IBM Plex Mono", Consolas, "Courier New", monospace;
  text-align: right;
  color: rgba(246, 236, 255, 0.42);
  pointer-events: none;
}

.zen-volume {
  position: fixed;
  z-index: 2;
  left: 0.85rem;
  bottom: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: #f6ecff;
  filter:
    drop-shadow(0 1px 1px #000)
    drop-shadow(0 4px 10px rgba(0, 0, 0, 0.55));
}

.zen-sound,
.zen-full {
  flex: none;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: none;
  color: inherit;
  cursor: pointer;
}

.zen-sound svg,
.zen-full svg {
  display: block;
  width: 1.4rem;
  height: 1.4rem;
  margin: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.zen-sound .icon-speaker {
  fill: currentColor;
  stroke: none;
}

.zen-sound .icon-waves {
  display: none;
}

.zen-sound .icon-mute {
  display: block;
}

.zen-sound.is-on .icon-waves {
  display: block;
}

.zen-sound.is-on .icon-mute {
  display: none;
}

.zen-sound:focus,
.zen-full:focus,
.zen-volume-label input:focus {
  outline: none;
}

.zen-sound:focus-visible,
.zen-full:focus-visible,
.zen-volume-label input:focus-visible {
  outline: 2px solid var(--cool);
  outline-offset: 3px;
}

.zen-full .icon-exit {
  display: none;
}

.zen-full.is-on .icon-enter {
  display: none;
}

.zen-full.is-on .icon-exit {
  display: block;
}

.zen-volume:not(.is-on) .zen-sound {
  animation: sound-hint 2.8s ease-in-out infinite;
}

.zen-volume-label {
  display: flex;
  align-items: center;
  margin: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.zen-volume-label input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 7.6rem;
  height: 1.35rem;
  margin: 0;
  background: transparent;
  cursor: pointer;
}

.zen-volume-label input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(246, 236, 255, 0.38);
}

.zen-volume-label input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  margin-top: -5px;
  border: 0;
  border-radius: 50%;
  background: #f6ecff;
  box-shadow: 0 0 0 2px rgba(12, 4, 18, 0.55);
}

.zen-volume-label input[type="range"]::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(246, 236, 255, 0.38);
}

.zen-volume-label input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: 0;
  border-radius: 50%;
  background: #f6ecff;
  box-shadow: 0 0 0 2px rgba(12, 4, 18, 0.55);
}

@keyframes sound-hint {
  0%,
  100% {
    opacity: 0.58;
  }
  50% {
    opacity: 1;
  }
}

@keyframes deck-eq {
  0%,
  100% {
    transform: scaleY(0.22);
  }
  20% {
    transform: scaleY(1);
  }
  55% {
    transform: scaleY(0.45);
  }
  75% {
    transform: scaleY(0.8);
  }
}

@keyframes secret-pop {
  0% {
    transform: scale(1);
  }
  35% {
    transform: scale(1.14);
  }
  100% {
    transform: scale(1);
  }
}

@media (max-width: 640px) {
  .stage {
    padding: 1rem 0.75rem 3.9rem;
  }

  .call {
    padding: 0.75rem 0.85rem 1rem;
  }

  .call-dots {
    margin-top: 0.7rem;
  }

  .hint {
    max-width: 8.5rem;
    font-size: 0.6rem;
  }

  .homage {
    max-width: 11rem;
    font-size: 0.55rem;
  }

  .deck {
    width: 13.4rem;
  }

  .deck-vibe {
    max-width: 4.6rem;
  }

  .zen-volume-label input[type="range"] {
    width: 4.6rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .call-bar,
  .hint {
    transition: none;
  }

  .deck-eq i,
  .secrets.is-new,
  .zen-volume:not(.is-on) .zen-sound {
    animation: none;
  }
}
