:root {
  color-scheme: dark;
  --ink: #fff8de;
  --white: #f7f4ea;
  --muted: #b9b2a3;
  --dim: #7f796d;
  --line: rgba(232, 203, 129, 0.22);
  --panel: rgba(13, 13, 12, 0.74);
  --gold: #d8a84e;
  --gold-bright: #ffe7a0;
  --silver: #e8e8df;
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.58);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background:
    radial-gradient(circle at 50% 12%, rgba(220, 169, 77, 0.24), transparent 30rem),
    radial-gradient(circle at 78% 64%, rgba(255, 255, 255, 0.09), transparent 24rem),
    linear-gradient(145deg, #050505 0%, #0b0a08 48%, #000000 100%);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, black, transparent 72%);
}

body::after {
  position: fixed;
  inset: auto -10vw -26vh -10vw;
  z-index: -1;
  height: 46vh;
  content: "";
  background: linear-gradient(90deg, rgba(139, 91, 24, 0.26), rgba(255, 239, 173, 0.16), rgba(93, 93, 84, 0.2));
  filter: blur(24px);
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0;
}

.brand-link,
.nav-links,
.player-shell,
.queue-panel,
.mini-player {
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(20, 18, 14, 0.82), rgba(3, 3, 3, 0.68));
  box-shadow: 0 1px 0 rgba(255, 239, 173, 0.15) inset, var(--shadow);
  backdrop-filter: blur(22px) saturate(1.1);
}

.brand-link {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
  padding: 8px 14px 8px 8px;
  border-radius: var(--radius);
  font-weight: 800;
  text-decoration: none;
}

.brand-link span,
.track-meta h2,
.queue-top h2 {
  background: linear-gradient(105deg, #b97822 0%, #ffe7a0 25%, #ffffff 52%, #d9dbd1 74%, #7b817a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-mark {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  object-fit: contain;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px;
  border-radius: var(--radius);
}

.nav-links a {
  padding: 10px 12px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--gold-bright);
  background: rgba(232, 203, 129, 0.12);
}

.player-page {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(24px, 4vw, 44px) 0 42px;
}

.player-hero {
  display: grid;
  gap: clamp(22px, 3vw, 34px);
}

.hero-copy {
  max-width: 860px;
}

.eyebrow,
.kicker {
  margin: 0 0 12px;
  color: var(--gold-bright);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.hero-copy h1 {
  max-width: 840px;
  margin: 0;
  background: linear-gradient(105deg, #b97822 0%, #ffe7a0 25%, #ffffff 52%, #d9dbd1 74%, #7b817a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: clamp(2.15rem, 4.7vw, 3.85rem);
  line-height: 1;
  letter-spacing: 0;
}

.hero-lede {
  max-width: 720px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.8vw, 1.28rem);
  line-height: 1.62;
}

.player-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(340px, 0.58fr);
  align-items: stretch;
  gap: clamp(18px, 2.6vw, 28px);
  padding: clamp(16px, 2.4vw, 24px);
  overflow: hidden;
  border-radius: var(--radius);
}

.player-shell::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background:
    radial-gradient(circle at 15% 16%, rgba(255, 231, 160, 0.16), transparent 11rem),
    linear-gradient(120deg, rgba(255, 255, 255, 0.08), transparent 34%, rgba(255, 231, 160, 0.08));
}

.video-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  overflow: hidden;
  border: 1px solid rgba(255, 231, 160, 0.24);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 231, 160, 0.1), transparent 38%),
    radial-gradient(circle at 50% 28%, rgba(216, 168, 78, 0.18), rgba(0, 0, 0, 0.94));
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.48), 0 0 54px rgba(216, 168, 78, 0.16);
}

.video-stage::after {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  content: "";
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), transparent 34%, rgba(0, 0, 0, 0.12));
}

.youtube-topbar {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  flex: 0 0 32px;
  gap: 8px;
  width: 100%;
  min-height: 32px;
  padding: 0 14px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 231, 160, 0.16);
  border-right: 0;
  border-left: 0;
  border-top: 0;
  background: linear-gradient(180deg, rgba(255, 231, 160, 0.12), rgba(0, 0, 0, 0.24));
  appearance: none;
}

.youtube-topbar span {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--gold-bright);
  opacity: 0.84;
}

.youtube-topbar:hover span {
  opacity: 1;
}

.youtube-topbar::after {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  content: "Collapse";
}

.video-stage.is-collapsed {
  aspect-ratio: auto;
}

.video-stage.is-collapsed .youtube-layer {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 220px;
  height: 124px;
  min-height: 0;
  overflow: hidden;
  opacity: 0.012;
  pointer-events: none;
}

.video-stage.is-collapsed .youtube-topbar {
  border-bottom: 0;
}

.video-stage.is-collapsed .youtube-topbar::after {
  color: var(--gold-bright);
  content: "Audio mode";
}

.youtube-layer {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  flex: 1 1 auto;
  min-height: 0;
  z-index: 1;
}

.youtube-layer iframe {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.now-playing,
.queue-panel {
  position: relative;
  z-index: 1;
}

.now-playing {
  display: grid;
  align-content: start;
  gap: 18px;
  min-height: 0;
}

.track-meta h2 {
  margin: 0;
  font-size: clamp(1.08rem, 1.8vw, 1.55rem);
  line-height: 1.16;
  letter-spacing: 0;
}

.track-meta p:last-child {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.progress-block {
  display: grid;
  gap: 8px;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--gold-bright);
}

.time-row,
.queue-top,
.volume-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.time-row {
  color: var(--dim);
  font-size: 0.82rem;
  font-weight: 800;
}

.control-deck {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.icon-button,
.play-button,
.mini-player button {
  position: relative;
  min-height: 46px;
  overflow: hidden;
  border: 1px solid rgba(255, 231, 160, 0.42);
  border-radius: var(--radius);
  color: #080705;
  background:
    linear-gradient(105deg, #8f5c1b 0%, #d7a84b 25%, #ffe7a0 45%, #f8f4e8 62%, #9a947e 100%);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.3), 0 0 26px rgba(216, 168, 78, 0.18);
  font-size: 0.94rem;
  font-weight: 950;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
  appearance: none;
}

.icon-button::before,
.play-button::before,
.mini-player button::before {
  position: absolute;
  inset: 1px;
  border-radius: 7px;
  content: "";
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.42), transparent 46%, rgba(0, 0, 0, 0.12));
  pointer-events: none;
}

.icon-button::after,
.play-button::after,
.mini-player button::after {
  position: absolute;
  top: -30%;
  bottom: -30%;
  left: -46%;
  width: 34%;
  content: "";
  background: rgba(255, 255, 255, 0.55);
  filter: blur(12px);
  transform: rotate(18deg);
  transition: left 180ms ease;
}

.icon-button:hover,
.play-button:hover,
.mini-player button:hover {
  border-color: rgba(255, 231, 160, 0.66);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.36), 0 0 34px rgba(216, 168, 78, 0.24);
  transform: translateY(-1px);
}

.icon-button:hover::after,
.play-button:hover::after,
.mini-player button:hover::after {
  left: 112%;
}

.icon-button:active,
.play-button:active,
.mini-player button:active {
  transform: translateY(0);
}

.icon-button span,
.play-button span {
  position: relative;
  z-index: 1;
}

.icon-button.is-active {
  border-color: rgba(255, 231, 160, 0.74);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.36), 0 0 38px rgba(255, 231, 160, 0.28);
}

.play-button {
  min-height: 54px;
  font-size: 1.02rem;
  box-shadow: 0 18px 38px rgba(216, 168, 78, 0.2);
}

.volume-control {
  padding: 12px;
  border: 1px solid rgba(255, 231, 160, 0.16);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.045);
}

.volume-control input {
  max-width: 210px;
}

.queue-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: var(--player-stack-height, auto);
  max-height: var(--player-stack-height, none);
  overflow: hidden;
  padding: 18px;
  border-radius: var(--radius);
}

.queue-top {
  margin-bottom: 18px;
}

.queue-top h2 {
  margin: 0;
  font-size: clamp(1.08rem, 1.45vw, 1.42rem);
}

#track-count {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.search-box {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.search-box input {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(255, 231, 160, 0.18);
  border-radius: var(--radius);
  padding: 0 13px;
  color: var(--ink);
  background: rgba(0, 0, 0, 0.32);
  outline: none;
}

.search-box input:focus {
  border-color: rgba(255, 231, 160, 0.72);
  box-shadow: 0 0 0 3px rgba(216, 168, 78, 0.16);
}

.message {
  min-height: 20px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.4;
}

.message.is-error {
  color: #ffd6c9;
}

.queue-list {
  display: grid;
  flex: 1 1 auto;
  gap: 9px;
  min-height: 0;
  max-height: none;
  overflow: auto;
  padding-right: 4px;
}

.queue-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: 1px solid rgba(255, 231, 160, 0.14);
  border-radius: var(--radius);
  padding: 9px;
  color: inherit;
  background: rgba(255, 255, 255, 0.045);
  text-align: left;
}

.queue-item:hover,
.queue-item.is-active {
  border-color: rgba(255, 231, 160, 0.5);
  background: rgba(232, 203, 129, 0.12);
}

.queue-item.is-active {
  position: relative;
  border-color: rgba(255, 231, 160, 0.78);
  background:
    linear-gradient(90deg, rgba(216, 168, 78, 0.24), rgba(255, 255, 255, 0.06)),
    rgba(232, 203, 129, 0.12);
  box-shadow: 0 0 0 1px rgba(255, 231, 160, 0.18) inset, 0 12px 34px rgba(0, 0, 0, 0.26);
}

.queue-item.is-active::before {
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 0;
  width: 3px;
  border-radius: 0 3px 3px 0;
  content: "";
  background: linear-gradient(180deg, var(--gold), var(--gold-bright), var(--silver));
}

.queue-item img {
  width: 64px;
  height: 64px;
  border-radius: 6px;
  object-fit: cover;
}

.queue-item strong {
  display: block;
  overflow: hidden;
  color: var(--white);
  font-size: 0.78rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-item small,
.queue-time {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.queue-time {
  white-space: nowrap;
}

.skeleton-row {
  height: 84px;
  border-radius: var(--radius);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.04), rgba(255, 231, 160, 0.12), rgba(255, 255, 255, 0.04));
  background-size: 240% 100%;
  animation: shimmer 1.4s linear infinite;
}

.mini-player {
  position: fixed;
  right: 12px;
  bottom: 12px;
  left: 12px;
  z-index: 10;
  display: none;
  grid-template-columns: 50px minmax(0, 1fr) 74px;
  align-items: center;
  gap: 11px;
  padding: 9px;
  border-radius: var(--radius);
}

.dtl-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 30px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

.dtl-footer p {
  margin: 0;
}

.dtl-footer nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dtl-footer a {
  padding: 8px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

.dtl-footer a:hover {
  color: var(--gold-bright);
  background: rgba(232, 203, 129, 0.12);
}

.mini-player img {
  width: 50px;
  height: 50px;
  border-radius: 6px;
  object-fit: cover;
}

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

.mini-player span {
  color: var(--muted);
  font-size: 0.78rem;
}

@keyframes shimmer {
  from {
    background-position: 0 0;
  }
  to {
    background-position: -240% 0;
  }
}

@media (max-width: 900px) {
  .site-header,
  .nav-links {
    align-items: stretch;
  }

  .site-header {
    flex-direction: column;
  }

  .nav-links {
    width: 100%;
    overflow-x: auto;
  }

  .player-shell {
    grid-template-columns: 1fr;
  }

  .queue-panel {
    display: block;
    height: auto;
    max-height: none;
    overflow: visible;
  }

  .queue-list {
    max-height: 52vh;
  }
}

@media (max-width: 640px) {
  .player-page {
    width: min(100% - 22px, 1180px);
    padding-bottom: 38px;
  }

  .hero-copy h1 {
    font-size: clamp(2.2rem, 10vw, 3.15rem);
  }

  .control-deck {
    grid-template-columns: repeat(5, minmax(50px, 1fr));
    overflow-x: auto;
  }

  .volume-control {
    display: grid;
  }

  .volume-control input {
    max-width: none;
  }

  .queue-item {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .queue-time {
    display: none;
  }

  .queue-item img {
    width: 56px;
    height: 56px;
  }

  .mini-player {
    display: grid;
  }

  .dtl-footer {
    flex-direction: column;
    align-items: flex-start;
    width: min(100% - 22px, 1120px);
    padding-bottom: 104px;
  }

  .dtl-footer nav {
    flex-wrap: wrap;
  }
}
