@font-face {
  font-family: "Quicksand Light";
  src: url("../assets/fonts/Quicksand-Light.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Roboto Condensed Light";
  src: url("../assets/fonts/RobotoCondensed-Light.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg-purple: #2A2E74;
  --title-color: #d8c8ff;
  --status-color: #bba7f0;
  --ui-text: #f4efff;
  --ui-muted: #c9b8f0;
  --ui-pill: rgba(18, 9, 33, 0.72);
  --ui-pill-border: rgba(225, 209, 255, 0.25);
  --ui-thumb: rgba(231, 219, 255, 0.88);
  --ui-thumb-text: #180f28;
}

html,
body,
#app {
  width: 100%;
  height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  background: var(--bg-purple);
  color: #ffffff;
  font-family: "Roboto Condensed Light", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

#scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.site-title {
  position: fixed;
  top: 12vh;
  right: 8vw;
  width: min(30vw, 420px);
  margin: 0;
  text-align: right;
  letter-spacing: 0.08em;
  font-size: clamp(2rem, 4.2vw, 4.6rem);
  font-weight: 300;
  line-height: 1.05;
  color: var(--title-color);
  text-transform: uppercase;
  pointer-events: none;
  user-select: none;
  text-shadow: 0 0 24px rgba(137, 96, 244, 0.24);
  font-family: "Quicksand Light", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.history-help {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  z-index: 10;
  pointer-events: auto;
}

.history-help-button {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(225, 209, 255, 0.55);
  background: rgba(23, 12, 43, 0.72);
  color: #f7f2ff;
  font-size: 1.1rem;
  line-height: 1;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  font-family: "Roboto Condensed Light", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.history-help-button:hover {
  background: rgba(35, 20, 60, 0.82);
}

.history-help-button:focus-visible {
  outline: 2px solid #f0e6ff;
  outline-offset: 2px;
}

.history-help-panel {
  position: absolute;
  bottom: 44px;
  right: 0;
  width: min(90vw, 520px);
  max-height: min(70vh, 560px);
  overflow: auto;
  border-radius: 22px;
  border: 1px solid rgba(225, 209, 255, 0.25);
  background: rgba(15, 8, 29, 0.9);
  color: var(--ui-text);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
  padding: 1rem 1.1rem;
  font-size: 0.95rem;
  line-height: 1.45;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.history-help-panel h2 {
  margin: 0.65rem 0 0.45rem;
  font-size: 1.02rem;
  font-weight: 600;
  color: #e4d6ff;
  letter-spacing: 0.02em;
}

.history-help-panel p {
  margin: 0;
}

.history-help-panel p + p {
  margin-top: 0.58rem;
}

.history-help-panel a {
  color: #f0e8ff;
}

.history-help:hover .history-help-panel,
.history-help:focus-within .history-help-panel,
.history-help[data-open="true"] .history-help-panel {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.status {
  position: fixed;
  left: 1rem;
  bottom: 1rem;
  margin: 0;
  font-size: 0.9rem;
  color: var(--status-color);
  pointer-events: none;
  user-select: none;
}

.radio-ui {
  position: fixed;
  left: 5vw;
  bottom: 8vh;
  transform: none;
  width: min(84vw, 440px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  pointer-events: auto;
}

.now-playing-label {
  margin: 0;
  color: var(--ui-muted);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.now-playing {
  margin: 0 0 0.55rem 0;
  color: var(--ui-text);
  font-size: clamp(1rem, 2.3vw, 1.25rem);
  line-height: 1.2;
  text-align: left;
  max-width: 100%;
  min-height: 2.4em;
}

.playlist-slider {
  position: relative;
  width: min(74vw, 220px);
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--ui-pill-border);
  background: var(--ui-pill);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3);
}

.playlist-thumb {
  position: absolute;
  top: 4px;
  left: 4px;
  height: calc(100% - 8px);
  border-radius: 999px;
  background: var(--ui-thumb);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
  transform: translateX(0);
  transition: transform 220ms ease, width 220ms ease;
  pointer-events: none;
}

.playlist-steps {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

.playlist-step {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ui-muted);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1;
  border-radius: 999px;
  height: 34px;
  cursor: pointer;
  font-family: "Roboto Condensed Light", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.playlist-step.active {
  color: var(--ui-thumb-text);
}

.playlist-step:focus-visible {
  outline: 2px solid #f0e6ff;
  outline-offset: 1px;
}

.playlist-name {
  margin: 0.5rem 0 0 0;
  color: var(--ui-muted);
  font-size: clamp(0.92rem, 2vw, 1.05rem);
  text-align: left;
}

@media (max-width: 720px) {
  .site-title {
    top: 7vh;
    right: 6vw;
    width: min(54vw, 280px);
    font-size: clamp(1.8rem, 10vw, 3rem);
  }

  .radio-ui {
    bottom: 9vh;
    left: 4vw;
    width: min(90vw, 420px);
  }

  .history-help {
    bottom: 1rem;
    right: 1rem;
  }

  .history-help-panel {
    width: min(92vw, 430px);
    right: -2px;
    max-height: 62vh;
    border-radius: 20px;
    font-size: 0.92rem;
  }

  .now-playing {
    max-width: 100%;
    font-size: 1rem;
  }
}
