:root {
  --atune-navy: #061a2d;
  --atune-navy-2: #0b2a44;
  --atune-navy-3: #020b14;
  --atune-gold: #d8aa4f;
  --atune-gold-2: #f4cf78;
  --atune-text: #fff8e6;
  --atune-muted: rgba(255, 248, 230, 0.74);
  --atune-faint: rgba(255, 248, 230, 0.44);
  --atune-card: rgba(4, 18, 31, 0.68);
  --atune-card-strong: rgba(4, 18, 31, 0.84);
  --atune-border: rgba(216, 170, 79, 0.20);
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--atune-navy-3);
  color: var(--atune-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

cast-media-player {
  /* Keep CAF player active but visually behind our custom display surface. */
  --theme-hue: 42;
  --progress-color: var(--atune-gold);
  --splash-size: cover;
  --font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  position: fixed;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.atune-root {
  position: fixed;
  inset: 0;
  isolation: isolate;
  background:
    radial-gradient(circle at 18% 18%, rgba(216, 170, 79, 0.24), transparent 34%),
    radial-gradient(circle at 86% 78%, rgba(11, 42, 68, 0.72), transparent 38%),
    var(--atune-navy-3);
}

.atune-bg {
  position: absolute;
  inset: -4%;
  z-index: -3;
  background-position: center;
  background-size: cover;
  filter: blur(42px) saturate(1.18);
  opacity: 0.38;
  transform: scale(1.08);
  transition: background-image 360ms ease, opacity 360ms ease;
}

.atune-scrim {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(2, 11, 20, 0.93), rgba(6, 26, 45, 0.60) 48%, rgba(2, 11, 20, 0.82)),
    linear-gradient(180deg, rgba(2, 11, 20, 0.24), rgba(2, 11, 20, 0.90));
}

.atune-shell {
  box-sizing: border-box;
  width: 100vw;
  height: 100vh;
  padding: 5.2vh 5.2vw;
  display: grid;
  grid-template-rows: minmax(0, 2.1fr) minmax(0, 1fr);
  gap: 3vh;
}

.atune-hero {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(320px, 42vw) minmax(420px, 1fr);
  gap: 4.5vw;
  align-items: center;
}

.art-wrap {
  position: relative;
  width: min(42vw, 58vh);
  aspect-ratio: 1 / 1;
  justify-self: center;
  border-radius: 4.2vh;
  overflow: hidden;
  box-shadow: 0 34px 88px rgba(0, 0, 0, 0.50), 0 0 0 1px rgba(216, 170, 79, 0.24);
  background: linear-gradient(145deg, rgba(216, 170, 79, 0.18), rgba(6, 26, 45, 0.94));
}

.artwork {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.artwork[hidden],
.artwork-empty[hidden] {
  display: none;
}

.artwork-empty {
  position: absolute;
  inset: 0;
  display: block;
  background:
    radial-gradient(circle at 34% 22%, rgba(216, 170, 79, 0.28), transparent 36%),
    linear-gradient(135deg, rgba(11, 42, 68, 0.96), rgba(2, 11, 20, 0.98));
}

.info-card,
.lyrics-card,
.future-card {
  box-sizing: border-box;
  border: 1px solid var(--atune-border);
  border-radius: 3vh;
  background: var(--atune-card);
  box-shadow: 0 22px 58px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(20px);
}

.info-card {
  min-width: 0;
  padding: 4.2vh 3.6vw;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 0.9vw;
  color: var(--atune-muted);
  font-size: clamp(16px, 1.45vw, 27px);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.brand-dot {
  width: clamp(12px, 1.1vw, 18px);
  height: clamp(12px, 1.1vw, 18px);
  border-radius: 50%;
  background: var(--atune-gold);
  box-shadow: 0 0 30px rgba(216, 170, 79, 0.78);
}

.source-badge {
  margin-left: auto;
  padding: 0.44em 0.72em;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: var(--atune-muted);
  font-size: 0.75em;
  text-transform: none;
}

.title {
  margin: 2.4vh 0 0;
  font-size: clamp(44px, 6vw, 104px);
  line-height: 0.96;
  letter-spacing: -0.06em;
  font-weight: 850;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.subtitle,
.album {
  margin: 1.4vh 0 0;
  color: var(--atune-muted);
  font-size: clamp(22px, 2.45vw, 44px);
  line-height: 1.18;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.album {
  color: var(--atune-faint);
  font-size: clamp(18px, 1.55vw, 30px);
}

.progress-block {
  margin-top: 4.2vh;
}

.progress-row {
  display: flex;
  justify-content: space-between;
  color: var(--atune-muted);
  font-size: clamp(16px, 1.38vw, 25px);
  font-variant-numeric: tabular-nums;
}

.progress-track {
  margin-top: 1.15vh;
  height: clamp(10px, 1.05vh, 16px);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--atune-gold), var(--atune-gold-2));
  box-shadow: 0 0 24px rgba(216, 170, 79, 0.58);
  transition: width 260ms linear;
}

.transport-row {
  margin-top: 3.3vh;
  display: flex;
  gap: 1.4vw;
  align-items: center;
  justify-content: center;
}

.transport-btn {
  width: clamp(70px, 7.2vw, 136px);
  height: clamp(70px, 7.2vw, 136px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  color: var(--atune-text);
  background: rgba(255, 255, 255, 0.09);
  font-size: clamp(28px, 3.3vw, 58px);
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(14px);
}

.transport-btn.play {
  width: clamp(84px, 8.2vw, 156px);
  height: clamp(84px, 8.2vw, 156px);
  background: linear-gradient(145deg, var(--atune-gold), var(--atune-gold-2));
  box-shadow: 0 16px 40px rgba(216, 170, 79, 0.32);
}

.transport-btn:disabled {
  opacity: 0.34;
  cursor: default;
}

.lower-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 2vw;
}

.lyrics-card,
.future-card {
  min-height: 0;
  padding: 2.3vh 2.4vw;
  background: var(--atune-card-strong);
}

.section-heading {
  color: var(--atune-faint);
  font-size: clamp(15px, 1.25vw, 24px);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lyrics {
  margin-top: 1.3vh;
  font-size: clamp(24px, 2.6vw, 52px);
  line-height: 1.18;
  font-weight: 720;
  display: grid;
  gap: 0.62vh;
}

.lyric-line {
  opacity: 0.82;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lyric-line:first-child {
  opacity: 1;
  color: var(--atune-gold-2);
}

.lyrics-empty {
  color: var(--atune-faint);
  font-size: clamp(20px, 1.8vw, 34px);
  font-weight: 600;
}

.future-actions {
  margin-top: 1.7vh;
  display: flex;
  flex-wrap: wrap;
  gap: 1vh 0.8vw;
}

.future-actions span {
  padding: 0.72em 0.92em;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--atune-muted);
  background: rgba(255, 255, 255, 0.06);
  font-size: clamp(17px, 1.4vw, 27px);
  font-weight: 700;
}


@media (max-aspect-ratio: 4 / 3) {
  .atune-shell {
    padding: 4vh 4vw;
    grid-template-rows: minmax(0, 1.7fr) minmax(0, 1fr);
  }

  .atune-hero {
    grid-template-columns: minmax(260px, 40vw) minmax(360px, 1fr);
    gap: 3vw;
  }

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

  .future-card {
    display: none;
  }
}
