:root {
  --night: #080510;
  --gold: #d7af65;
  --gold-bright: #ffe3a2;
  --cream: #fbf2dc;
  --muted: #c9bfd0;
  --dark-ink: #241205;
  --radius-xl: 30px;
  --radius-lg: 21px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--night);
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--cream);
  background-color: var(--night);
  background-image:
    linear-gradient(to bottom, rgba(5, 3, 10, 0.18), rgba(5, 3, 10, 0.60)),
    url("../img/ecate-e-tara.jpg");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: 124% auto;
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 49% 28%, rgba(255, 250, 220, 0.14), transparent 19%),
    linear-gradient(
      90deg,
      rgba(25, 8, 45, 0.20) 0%,
      rgba(11, 7, 17, 0.03) 45%,
      rgba(255, 229, 155, 0.06) 56%,
      rgba(12, 8, 16, 0.22) 100%
    );
}

button,
input {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

/* INTRO */
.intro {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at center, rgba(123, 80, 168, 0.22), transparent 28%),
    #07040c;
  transition: opacity 1.2s ease, visibility 1.2s ease;
}

.intro.is-gone {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.intro__veil {
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(circle, rgba(255,255,255,0.18) 0 1px, transparent 1.5px) 0 0 / 38px 38px,
    radial-gradient(circle, rgba(255,218,143,0.16) 0 1px, transparent 1.4px) 14px 9px / 51px 51px;
  animation: introDrift 18s linear infinite;
}

.intro__content {
  position: relative;
  z-index: 2;
  width: min(92vw, 760px);
  text-align: center;
  padding: 32px;
}

.intro__moon {
  width: clamp(92px, 16vw, 156px);
  aspect-ratio: 1;
  object-fit: contain;
  filter:
    drop-shadow(0 0 16px rgba(255, 238, 191, 0.30))
    drop-shadow(0 0 42px rgba(150, 104, 203, 0.20));
  animation: moonBreathe 3.2s ease-in-out infinite;
}

.intro__eyebrow,
.hero__kicker,
.modal__kicker {
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dark-ink);
  font-size: 0.88rem;
  background: rgba(255, 240, 203, 0.80);
  display: inline-block;
  padding: 7px 16px;
  border-radius: 999px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.22);
}

.intro h1 {
  margin: 10px 0 8px;
  font-size: clamp(2rem, 7vw, 4.8rem);
  font-weight: normal;
  line-height: 1;
  letter-spacing: 0.035em;
  text-shadow:
    0 0 20px rgba(228, 190, 112, 0.18),
    0 10px 36px rgba(0,0,0,0.56);
}

.intro__subtitle {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: clamp(0.95rem, 2.2vw, 1.18rem);
}

/* GLITTER */
.spark-field {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  overflow: hidden;
}

.spark-field i {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  opacity: 0;
  background: white;
  box-shadow:
    0 0 6px white,
    0 0 13px rgba(255, 222, 145, 0.86);
  animation: twinkle 7s ease-in-out infinite;
}

.spark-field i:nth-child(1) { left: 8%; top: 18%; animation-delay: 0s; }
.spark-field i:nth-child(2) { left: 24%; top: 62%; animation-delay: 2.1s; }
.spark-field i:nth-child(3) { left: 42%; top: 29%; animation-delay: 4.3s; }
.spark-field i:nth-child(4) { left: 54%; top: 77%; animation-delay: 1.3s; }
.spark-field i:nth-child(5) { left: 68%; top: 20%; animation-delay: 5.1s; }
.spark-field i:nth-child(6) { left: 79%; top: 55%; animation-delay: 2.9s; }
.spark-field i:nth-child(7) { left: 91%; top: 31%; animation-delay: 6.0s; }
.spark-field i:nth-child(8) { left: 15%; top: 86%; animation-delay: 3.6s; }

.glitter-ribbon {
  position: fixed;
  z-index: 4;
  left: -60vw;
  width: 58vw;
  height: 6px;
  pointer-events: none;
  opacity: 0;
  border-radius: 999px;
  transform: rotate(-11deg);
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255,255,255,0.16) 16%,
    rgba(255,232,167,0.92) 46%,
    rgba(255,255,255,0.98) 52%,
    rgba(197,160,236,0.54) 67%,
    transparent
  );
  box-shadow:
    0 0 10px rgba(255,255,255,0.72),
    0 0 25px rgba(255,223,152,0.38),
    0 0 42px rgba(159,108,204,0.20);
}

.glitter-ribbon--one { top: 22%; animation: ribbonSweep 19s linear infinite; }
.glitter-ribbon--two { top: 55%; transform: rotate(8deg); animation: ribbonSweep 24s linear infinite 7s; }
.glitter-ribbon--three { top: 81%; transform: rotate(-4deg); animation: ribbonSweep 29s linear infinite 15s; }

@keyframes ribbonSweep {
  0%,20% { left:-65vw; opacity:0; }
  21% { opacity:0.10; }
  25% { opacity:0.85; }
  31% { left:115vw; opacity:0; }
  100% { left:115vw; opacity:0; }
}

@keyframes twinkle {
  0%,72%,100% { opacity:0; transform:scale(0.4); }
  78% { opacity:0.88; transform:scale(1.7); }
  84% { opacity:0.18; transform:scale(0.8); }
}

@keyframes introDrift {
  to { transform: translate3d(4%, 3%, 0) rotate(1deg); }
}

@keyframes moonBreathe {
  0%,100% { transform: scale(0.98); }
  50% { transform: scale(1.03); }
}

@keyframes haloPulse {
  0%,100% { transform: scale(0.94); opacity: 0.34; }
  50% { transform: scale(1.06); opacity: 0.84; }
}

@keyframes orbPulse {
  0%,100% { transform: scale(0.75); opacity: 0.58; }
  50% { transform: scale(1.08); opacity: 1; }
}

@keyframes trackShine {
  0%,45% { transform: translateX(-120%); }
  70%,100% { transform: translateX(120%); }
}

/* MAIN */
.app {
  position: relative;
  z-index: 5;
  width: min(1380px, 100%);
  margin: 0 auto;
  padding: 28px 24px 34px;
}

.hero {
  text-align: center;
  margin-bottom: 24px;
}

.book-portal {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--cream);
  margin-bottom: 16px;
}

.book-portal img {
  position: relative;
  z-index: 2;
  width: 116px;
  height: 116px;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid rgba(255, 226, 161, 0.55);
  box-shadow:
    0 10px 30px rgba(0,0,0,0.48),
    inset 0 0 22px rgba(255,255,255,0.08);
  transition: transform 0.28s ease;
}

.book-portal:hover img {
  transform: translateY(-3px) scale(1.025);
}

.book-portal__halo {
  position: absolute;
  top: -9px;
  width: 132px;
  height: 132px;
  border-radius: 22px;
  border: 1px solid rgba(255, 226, 161, 0.22);
  animation: haloPulse 3.4s ease-in-out infinite;
}

.book-portal__label {
  font-size: 0.96rem;
  letter-spacing: 0.14em;
  color: var(--dark-ink);
  background: rgba(255, 240, 203, 0.85);
  padding: 9px 18px;
  border-radius: 999px;
  font-weight: bold;
  box-shadow: 0 8px 20px rgba(0,0,0,0.22);
}

.hero__title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.hero__title h2 {
  position: relative;
  display: inline-block;
  margin: 10px 0 0;
  padding: 0 12px 10px;
  font-size: clamp(2rem, 5vw, 3.8rem);
  line-height: 0.95;
  font-weight: bold;
  letter-spacing: 0.035em;
  color: #f0cc86;
  text-shadow:
    0 1px 0 #8e6425,
    0 2px 0 #8e6425,
    0 3px 0 #7b541a,
    0 12px 30px rgba(0,0,0,0.60);
  font-family: "Palatino Linotype", "Book Antiqua", Georgia, serif;
}

.hero__title h2::after {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 0;
  height: 16px;
  border-radius: 50%;
  background: radial-gradient(
    ellipse at center,
    rgba(255,235,185,0.88) 0%,
    rgba(255,224,145,0.42) 35%,
    rgba(255,224,145,0.00) 75%
  );
  filter: blur(6px);
  z-index: -1;
}

.hero__kicker {
  margin: 0;
}

.blessing {
  width: min(820px, 100%);
  margin: 16px auto 0;
  padding: 15px 20px;
  border: 1px solid rgba(231, 199, 133, 0.26);
  border-radius: 999px;
  background: rgba(9, 6, 16, 0.49);
  backdrop-filter: blur(8px);
  box-shadow: 0 10px 28px rgba(0,0,0,0.22);
  color: #e3d8c5;
  line-height: 1.55;
  font-style: italic;
}

.temple {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px minmax(0, 1fr);
  gap: 20px;
  padding: 21px;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(231, 199, 133, 0.23);
  background:
    radial-gradient(circle at center, rgba(255,240,190,0.05), transparent 29%),
    rgba(7, 5, 13, 0.66);
  backdrop-filter: blur(10px);
  box-shadow:
    0 24px 58px rgba(0,0,0,0.35),
    inset 0 1px 0 rgba(255,255,255,0.035);
}

.playlist-card,
.console {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(230, 197, 130, 0.18);
  background: linear-gradient(to bottom, rgba(11,8,20,0.72), rgba(7,5,13,0.86));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.035),
    0 10px 28px rgba(0,0,0,0.15);
}

.playlist-card {
  padding: 17px;
}

.playlist-card--ecate {
  background: linear-gradient(to bottom, rgba(38,20,58,0.58), rgba(8,5,15,0.90));
}

.playlist-card--tara {
  background: linear-gradient(to bottom, rgba(69,54,24,0.28), rgba(8,5,15,0.90));
}

.playlist-card__heading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  margin-bottom: 14px;
  text-align: left;
}

.playlist-card__heading .sigil {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(232, 198, 126, 0.28);
  color: var(--gold-bright);
  font-size: 1.4rem;
  background: rgba(255,255,255,0.025);
}

.playlist-card__heading h3 {
  margin: 0;
  color: var(--gold-bright);
  font-size: 1.55rem;
  font-weight: normal;
  letter-spacing: 0.10em;
}

.track-list {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: track;
}

.track-list li {
  counter-increment: track;
}

.track-list li + li {
  margin-top: 8px;
}

.track-btn {
  position: relative;
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 7px;
  width: 100%;
  min-height: 52px;
  padding: 10px 12px;
  overflow: hidden;
  border: 1px solid rgba(232, 198, 126, 0.15);
  border-radius: 14px;
  color: var(--cream);
  text-align: left;
  cursor: pointer;
  background: rgba(255,255,255,0.026);
  transition:
    transform 0.20s ease,
    border-color 0.20s ease,
    background-color 0.20s ease,
    box-shadow 0.20s ease;
}

.track-btn::before {
  content: counter(track, decimal-leading-zero);
  color: var(--gold);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
}

.track-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(
    110deg,
    transparent 12%,
    rgba(255, 229, 157, 0.08) 43%,
    rgba(255,255,255,0.11) 50%,
    transparent 61%
  );
  transform: translateX(-120%);
}

.track-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(232, 198, 126, 0.34);
  background: rgba(255,255,255,0.045);
}

.track-btn.active {
  border-color: rgba(255, 221, 147, 0.58);
  background: rgba(210, 168, 91, 0.10);
  box-shadow:
    0 0 0 1px rgba(255, 223, 154, 0.06) inset,
    0 0 17px rgba(208, 161, 86, 0.12);
}

.track-btn.active::after {
  opacity: 1;
  animation: trackShine 3.2s ease-in-out infinite;
}

.track-btn__title {
  font-size: 0.89rem;
  line-height: 1.28;
  display: block;
  width: 100%;
}

.playlist-card--ecate .track-btn__title {
  text-align: left;
}

.playlist-card--tara .track-btn {
  grid-template-columns: 1fr 34px;
}

.playlist-card--tara .track-btn::before {
  grid-column: 2;
  text-align: right;
}

.playlist-card--tara .track-btn__title {
  grid-column: 1;
  text-align: right;
}

.console {
  padding: 19px 17px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
}

.now-playing {
  text-align: center;
  padding: 16px 12px;
  border: 1px solid rgba(231,199,133,0.18);
  border-radius: 18px;
  background: rgba(255,255,255,0.025);
}

.now-playing__orb {
  width: 46px;
  height: 46px;
  margin: 0 auto 9px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(231,199,133,0.30);
  box-shadow: 0 0 22px rgba(189, 140, 233, 0.12);
}

.now-playing__orb span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 228, 161, 0.82);
  box-shadow: 0 0 13px rgba(255, 227, 158, 0.70);
  animation: orbPulse 2.4s ease-in-out infinite;
}

.now-playing__label {
  margin: 0 0 7px;
  color: var(--gold);
  font-size: 0.70rem;
  letter-spacing: 0.18em;
}

#nowPlayingTitle {
  margin: 0 0 6px;
  min-height: 2.45em;
  display: grid;
  place-items: center;
  font-weight: normal;
  font-size: 1.13rem;
  line-height: 1.23;
}

#nowPlayingMeta {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.now-playing__choice span {
  display: block;
  text-align: center;
}

.now-playing__choice span:first-child {
  color: var(--gold-bright);
  font-size: 0.72rem;
  letter-spacing: 0.20em;
  margin-bottom: 3px;
}

.now-playing__choice span:nth-child(2),
.now-playing__choice span:nth-child(3) {
  color: #e7dbc5;
  font-size: 0.82rem;
}

.timeline {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  gap: 8px;
  align-items: center;
  color: #c9becb;
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
}

.range {
  width: 100%;
  accent-color: var(--gold);
  cursor: pointer;
}

.controls {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 7px;
}

.control-btn {
  min-width: 0;
  padding: 10px 5px 8px;
  border: 1px solid rgba(231,199,133,0.20);
  border-radius: 13px;
  color: var(--cream);
  cursor: pointer;
  background: rgba(255,255,255,0.026);
  transition: 0.20s ease;
}

.control-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(231,199,133,0.43);
  background: rgba(217,175,101,0.09);
}

.control-btn__icon {
  display: block;
  margin-bottom: 5px;
  color: var(--gold-bright);
  font-size: 1rem;
}

.control-btn span:last-child {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.57rem;
  letter-spacing: 0.05em;
}

.control-btn--main {
  border-color: rgba(255, 226, 161, 0.42);
  background: rgba(217,175,101,0.095);
}

.volume-box {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 0.67rem;
  letter-spacing: 0.08em;
}

.moon-bonus {
  position: relative;
  align-self: center;
  width: 210px;
  height: 210px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  transition: transform 0.22s ease;
}

.moon-bonus:hover {
  transform: translateY(-2px) scale(1.02);
}

.moon-bonus::before {
  content: "";
  position: absolute;
  inset: 28px;
  border-radius: 50%;
  border: 1px solid rgba(255, 226, 161, 0.20);
  animation: haloPulse 3.4s ease-in-out infinite;
}

.moon-bonus img {
  position: absolute;
  inset: 44px;
  width: 122px;
  height: 122px;
  object-fit: contain;
  filter: drop-shadow(0 0 14px rgba(255,239,199,0.30));
}

.moon-bonus__arc {
  position: absolute;
  inset: 0;
  overflow: visible;
}

.moon-bonus__arc text {
  fill: var(--dark-ink);
  stroke: rgba(255, 244, 214, 0.82);
  stroke-width: 0.8px;
  paint-order: stroke fill;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.09em;
  filter: drop-shadow(0 0 8px rgba(255, 242, 218, 0.74));
}

.credits {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 10px;
  padding: 16px 18px;
  color: var(--dark-ink);
  font-size: 1rem;
  font-weight: bold;
  text-align: center;
  background: rgba(255, 240, 203, 0.80);
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.22);
}

.credits__star {
  color: #7b541a;
}

/* MODAL */
.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 18px;
}

.modal.hidden {
  display: none;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 2, 7, 0.80);
  backdrop-filter: blur(9px);
}

.modal__panel {
  position: relative;
  z-index: 2;
  width: min(720px, 100%);
  max-height: 84vh;
  overflow-y: auto;
  padding: 30px 20px 22px;
  border-radius: 28px;
  border: 1px solid rgba(233, 200, 131, 0.28);
  background:
    radial-gradient(circle at top, rgba(118,79,158,0.22), transparent 34%),
    linear-gradient(to bottom, rgba(13,9,22,0.98), rgba(6,4,11,0.99));
  box-shadow:
    0 30px 70px rgba(0,0,0,0.52),
    inset 0 1px 0 rgba(255,255,255,0.05);
}

.modal__close {
  position: sticky;
  top: 0;
  float: right;
  z-index: 3;
  width: 42px;
  height: 42px;
  margin-top: -17px;
  border: 1px solid rgba(233,200,131,0.18);
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  color: var(--cream);
  cursor: pointer;
  font-size: 1.7rem;
  line-height: 1;
}

.modal__moon {
  width: 92px;
  height: 92px;
  margin: 0 auto 8px;
}

.modal__moon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter:
    drop-shadow(0 0 12px rgba(255,244,212,0.22))
    drop-shadow(0 0 28px rgba(137,90,183,0.15));
}

.modal__subtitle,
.modal__panel h3 {
  text-align: center;
}

.modal__panel h3 {
  margin: 8px 0 0;
  color: var(--gold-bright);
  font-weight: normal;
  font-size: 1.8rem;
  letter-spacing: 0.08em;
  text-shadow: 0 8px 24px rgba(0,0,0,0.45);
}

.modal__subtitle {
  margin: 10px 0 18px;
  color: var(--muted);
  font-size: 0.88rem;
}

.track-list--extras .track-btn {
  grid-template-columns: 34px 1fr;
}

/* RESPONSIVE */
@media (max-width: 1020px) {
  body {
    background-attachment: scroll;
    background-size: cover;
    background-position: center top;
  }

  .temple {
    grid-template-columns: 1fr;
  }

  .console {
    order: -1;
  }

  .playlist-card {
    backdrop-filter: blur(8px);
  }

  .blessing {
    border-radius: 20px;
  }
}

@media (max-width: 560px) {
  .app {
    padding: 18px 10px 24px;
  }

  .temple {
    gap: 12px;
    padding: 11px;
    border-radius: 23px;
  }

  .book-portal img {
    width: 100px;
    height: 100px;
  }

  .book-portal__halo {
    width: 114px;
    height: 114px;
  }

  .book-portal__label,
  .hero__kicker {
    font-size: 0.84rem;
  }

  .hero__title h2 {
    font-size: 1.86rem;
  }

  .blessing {
    padding: 13px 14px;
    font-size: 0.88rem;
  }

  .console,
  .playlist-card {
    padding: 13px;
  }

  .controls {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
  }

  .control-btn {
    padding-inline: 2px;
  }

  .control-btn span:last-child {
    font-size: 0.47rem;
  }

  .moon-bonus {
    width: 180px;
    height: 180px;
  }

  .moon-bonus img {
    inset: 40px;
    width: 100px;
    height: 100px;
  }

  .moon-bonus__arc text {
    font-size: 15px;
  }

  .credits {
    display: grid;
    gap: 5px;
    font-size: 0.92rem;
    border-radius: 18px;
  }

  .credits__star {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }

  .glitter-ribbon,
  .spark-field {
    display: none;
  }
}