@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400&family=Dancing+Script:wght@400;500;600&display=swap");

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

:root {
  --cream: #f5efe6;
  --gold: #c4a574;
  --overlay: rgba(0, 0, 0, 0.35);
  --glass: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 255, 255, 0.2);
  --font-serif: "Cormorant Garamond", Georgia, serif;
  --font-script: "Dancing Script", cursive;
}

html {
  height: 100%;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100dvh;
  font-family: var(--font-serif);
  color: var(--cream);
  overflow-x: hidden;
}

/* ── Background ── */
.hero-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  background: #1a1410 url("../assets/cover.png") center / cover no-repeat;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.25) 0%,
    rgba(0, 0, 0, 0.05) 40%,
    rgba(0, 0, 0, 0.45) 100%
  );
}

/* ── Header ── */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
}

.header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.65rem;
}

.heart-btn {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  background: rgba(232, 160, 191, 0.22);
  backdrop-filter: blur(8px);
  color: #e8a0bf;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s, box-shadow 0.2s, color 0.2s;
}

.heart-btn:hover {
  transform: scale(1.08);
  background: rgba(232, 160, 191, 0.38);
  color: #f0b4c8;
}

.heart-btn:active {
  transform: scale(0.96);
}

.heart-btn.is-active {
  color: #ff8fab;
  background: rgba(232, 160, 191, 0.45);
  border-color: rgba(255, 255, 255, 0.45);
  box-shadow: 0 0 18px rgba(232, 160, 191, 0.55);
  animation: heart-glow 1.6s ease-in-out infinite;
}

@keyframes heart-glow {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.07);
  }
}

.logo {
  font-family: var(--font-script);
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}

.header-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--cream);
  text-decoration: none;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
  transition: opacity 0.2s;
}

.header-link:hover {
  opacity: 0.8;
}

.header-link.hidden {
  display: none;
}

/* ── Radio switcher (header) ── */
.radio-switcher {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.4rem;
}

.radio-switcher.hidden {
  display: none;
}

.radio-chip {
  padding: 0.35rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(196, 165, 116, 0.18);
  backdrop-filter: blur(8px);
  color: var(--cream);
  font-family: var(--font-serif);
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  cursor: pointer;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}

.radio-chip:hover {
  background: rgba(196, 165, 116, 0.35);
  border-color: rgba(255, 255, 255, 0.45);
}

.radio-chip.is-active {
  background: rgba(196, 165, 116, 0.5);
  border-color: rgba(255, 255, 255, 0.55);
  font-weight: 600;
}

.radio-chip:active {
  transform: scale(0.97);
}

/* ── Signature ── */
.signature {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 15;
  font-family: var(--font-script);
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--cream);
  opacity: 0.88;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.55);
  pointer-events: none;
}

/* ── Hero copy ── */
.hero {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100dvh;
  padding: 6rem 1.75rem 12rem;
  max-width: 32rem;
}

.hero-headline {
  font-size: clamp(2rem, 5.5vw, 3rem);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: 0.01em;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.5);
}

.hero-divider {
  width: 2.5rem;
  height: 1px;
  margin: 1.25rem 0;
  background: rgba(245, 239, 230, 0.5);
}

.hero-tagline {
  font-family: var(--font-script);
  font-size: 1.35rem;
  margin-bottom: 0.35rem;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}

.hero-sub {
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.85;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}

/* ── Language picker ── */
.language-picker {
  margin-top: 2.5rem;
}

.language-picker.hidden {
  display: none;
}

.language-picker-label {
  font-size: 1rem;
  margin-bottom: 1rem;
  opacity: 0.9;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}

.language-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.language-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  min-width: 8.5rem;
  padding: 0.9rem 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 1rem;
  background: rgba(196, 165, 116, 0.25);
  backdrop-filter: blur(8px);
  color: var(--cream);
  cursor: pointer;
  font-family: var(--font-serif);
  text-align: left;
  transition: transform 0.2s, background 0.2s, border-color 0.2s;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.language-btn:hover {
  transform: scale(1.03);
  background: rgba(196, 165, 116, 0.4);
  border-color: rgba(255, 255, 255, 0.45);
}

.language-btn:active {
  transform: scale(0.98);
}

.language-btn-title {
  font-size: 1.35rem;
  font-weight: 500;
  line-height: 1.2;
}

.language-btn-sub {
  font-size: 0.8rem;
  opacity: 0.75;
  letter-spacing: 0.04em;
}

.language-btn-mix {
  min-width: 7rem;
}

.now-playing-label {
  margin-top: 1.25rem;
  font-family: var(--font-script);
  font-size: 1.15rem;
  opacity: 0.9;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}

.now-playing-label.hidden {
  display: none;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  margin-top: 2.5rem;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--cream);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
  transition: transform 0.2s, opacity 0.2s;
}

.hero-cta:hover {
  transform: scale(1.03);
}

.hero-cta:active {
  transform: scale(0.98);
}

.play-ring {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: rgba(196, 165, 116, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transition: background 0.2s;
}

.hero-cta:hover .play-ring {
  background: rgba(196, 165, 116, 0.5);
}

.play-ring svg {
  margin-left: 2px;
}

/* ── Player ── */
.player-wrap {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  justify-content: center;
  padding: 0 1.25rem 2rem;
  transform: translateY(120%);
  opacity: 0;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.5s ease;
  pointer-events: none;
}

.player-wrap.visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.player {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  max-width: 36rem;
  padding: 0.75rem 1.25rem 0.75rem 0.75rem;
  border-radius: 999px;
  background: var(--glass);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  border: 1px solid var(--glass-border);
  box-shadow:
    0 8px 40px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

/* Vinyl disc */
.disc-wrap {
  position: relative;
  flex-shrink: 0;
  width: 5rem;
  height: 5rem;
}

.disc {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.2);
  animation: spin 8s linear infinite;
  animation-play-state: paused;
}

.disc.playing {
  animation-play-state: running;
}

.disc img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.disc-hole {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0.75rem;
  height: 0.75rem;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
  border: 2px solid rgba(255, 255, 255, 0.4);
  pointer-events: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Track info */
.track-info {
  flex: 1;
  min-width: 0;
}

.track-title {
  font-size: 0.95rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.track-artist {
  font-size: 0.8rem;
  opacity: 0.7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Progress bar */
.progress-wrap {
  position: relative;
  height: 0.5rem;
  margin-top: 0.5rem;
  cursor: pointer;
}

.progress-bg {
  position: absolute;
  inset: 0.15rem 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  transition: width 0.1s linear;
}

.progress-thumb {
  position: absolute;
  top: 50%;
  left: 0%;
  width: 0.75rem;
  height: 0.75rem;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: white;
  opacity: 0;
  transition: opacity 0.15s;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.progress-wrap:hover .progress-thumb {
  opacity: 1;
}

.time-row {
  display: flex;
  justify-content: space-between;
  margin-top: 0.2rem;
  font-size: 0.65rem;
  font-variant-numeric: tabular-nums;
  opacity: 0.6;
}

/* Controls */
.controls {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  flex-shrink: 0;
}

.ctrl-btn {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}

.ctrl-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

.ctrl-btn:active {
  transform: scale(0.93);
}

.ctrl-btn.play-btn {
  width: 2.75rem;
  height: 2.75rem;
  background: white;
  color: #1a1410;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  position: relative;
}

.ctrl-btn.play-btn .play-icon,
.ctrl-btn.play-btn .pause-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: none;
}

.ctrl-btn.play-btn .play-icon.is-visible {
  display: block;
}

.ctrl-btn.play-btn .pause-icon.is-visible {
  display: block;
}

.ctrl-btn.play-btn .play-icon.is-visible {
  margin-left: 2px;
}

.ctrl-btn.play-btn:hover {
  background: #fff;
  transform: scale(1.05);
}

.ctrl-btn.play-btn:active {
  transform: scale(0.95);
}

#btn-queue.is-open {
  background: rgba(255, 255, 255, 0.18);
}

/* Current playlist overlay (inspired by hornokplease.xyz queue UX) */
.queue-panel {
  position: fixed;
  inset: 0;
  z-index: 25;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 5.5rem 1.25rem 9.5rem;
  background: linear-gradient(
    to bottom,
    rgba(10, 8, 6, 0.28) 0%,
    rgba(10, 8, 6, 0.45) 100%
  );
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.queue-panel:not([hidden]) {
  opacity: 1;
  pointer-events: auto;
}

.queue-panel-inner {
  width: 100%;
  max-width: 36rem;
  display: flex;
  flex-direction: column;
  max-height: 100%;
}

.queue-title {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 8vw, 4.5rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-align: center;
  line-height: 0.95;
  text-shadow: 0 4px 28px rgba(0, 0, 0, 0.45);
  margin-bottom: 0.35rem;
}

.queue-sub {
  text-align: center;
  font-family: var(--font-script);
  font-size: 1.15rem;
  opacity: 0.85;
  margin-bottom: 1.1rem;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.queue-list-wrap {
  flex: 1;
  min-height: 0;
  overflow: auto;
  border-radius: 1.35rem;
  background: rgba(18, 14, 12, 0.42);
  backdrop-filter: blur(28px) saturate(140%);
  -webkit-backdrop-filter: blur(28px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow:
    0 16px 50px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.queue-list {
  list-style: none;
  margin: 0;
  padding: 0.45rem;
}

.queue-item {
  display: grid;
  grid-template-columns: 2.4rem minmax(0, 1fr) minmax(5rem, 38%);
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.72rem 0.85rem;
  border: none;
  border-radius: 0.85rem;
  background: transparent;
  color: inherit;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.queue-item:hover,
.queue-item:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

.queue-item.is-current {
  background: rgba(245, 239, 230, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.queue-num {
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  opacity: 0.5;
  text-align: right;
}

.queue-item.is-current .queue-num {
  opacity: 0.85;
}

.queue-item-title {
  display: block;
  font-size: 0.98rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.queue-item-artist {
  font-size: 0.82rem;
  opacity: 0.62;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.queue-item.is-current .queue-item-artist {
  opacity: 0.8;
}

body.queue-open .hero {
  opacity: 0.28;
  transition: opacity 0.35s ease;
}

/* YouTube player host — off-screen but sized for reliable playback */
.yt-host {
  position: fixed;
  left: -9999px;
  top: 0;
  width: 320px;
  height: 180px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.yt-host iframe {
  width: 320px;
  height: 180px;
}

/* ── Birthday button ── */
.birthday-btn {
  position: fixed;
  left: 1.25rem;
  bottom: 1.5rem;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(6px);
  color: var(--cream);
  cursor: pointer;
  font-family: var(--font-script);
  font-size: 0.95rem;
  line-height: 1.2;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}

.birthday-btn:hover {
  background: rgba(196, 165, 116, 0.28);
  border-color: rgba(255, 255, 255, 0.38);
}

.birthday-btn.is-playing {
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(196, 165, 116, 0.35);
}

.birthday-btn.needs-sound {
  animation: birthday-pulse 1.4s ease-in-out infinite;
}

@keyframes birthday-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(244, 211, 94, 0.45);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(244, 211, 94, 0);
  }
}

.birthday-btn.is-burst {
  transform: scale(0.96);
}

.birthday-btn-emoji {
  font-size: 0.9rem;
  line-height: 1;
}

.birthday-btn-label {
  white-space: nowrap;
}

.birthday-frame {
  position: fixed;
  width: 320px;
  height: 180px;
  left: -9999px;
  top: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

body.player-active .birthday-btn {
  bottom: 8.5rem;
}

/* ── Confetti canvas ── */
.confetti-canvas {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}

.confetti-canvas.is-active {
  opacity: 1;
}

/* ── Balloons ── */
.balloon-layer {
  position: fixed;
  inset: 0;
  z-index: 35;
  pointer-events: none;
  overflow: hidden;
  opacity: 0;
}

.balloon-layer.is-active {
  opacity: 1;
}

.balloon {
  position: absolute;
  bottom: -4rem;
  width: 2.2rem;
  height: 2.8rem;
  border-radius: 50% 50% 48% 48%;
  box-shadow: inset -6px -8px 16px rgba(0, 0, 0, 0.12);
  animation: balloon-rise linear forwards;
}

.balloon::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -1.4rem;
  width: 1px;
  height: 1.4rem;
  background: rgba(255, 255, 255, 0.45);
  transform: translateX(-50%);
}

@keyframes balloon-rise {
  0% {
    transform: translateY(0) translateX(0);
    opacity: 0;
  }
  8% {
    opacity: 0.95;
  }
  100% {
    transform: translateY(-115vh) translateX(var(--drift, 0px));
    opacity: 0.2;
  }
}

/* ── Sparkle flash ── */
body.birthday-sparkle::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 34;
  pointer-events: none;
  background: radial-gradient(
    circle at 50% 45%,
    rgba(255, 255, 255, 0.35) 0%,
    rgba(244, 211, 94, 0.15) 35%,
    transparent 70%
  );
  animation: sparkle-flash 2.2s ease-out forwards;
}

@keyframes sparkle-flash {
  0% {
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

/* ── Responsive ── */
@media (min-width: 768px) {
  .hero {
    padding-left: 3.5rem;
    max-width: 36rem;
  }

  .header {
    padding: 1.5rem 2rem;
  }
}

@media (max-width: 480px) {
  .header-right {
    align-items: flex-end;
  }

  .radio-chip {
    font-size: 0.72rem;
    padding: 0.3rem 0.6rem;
  }

  .signature {
    right: 1rem;
    bottom: 7.5rem;
    font-size: 0.95rem;
  }

  .birthday-btn {
    left: 1rem;
    bottom: 1rem;
    font-size: 0.85rem;
    padding: 0.35rem 0.65rem;
    max-width: calc(100% - 2rem);
  }

  body.player-active .birthday-btn {
    bottom: 9.5rem;
  }

  .queue-panel {
    padding: 5rem 0.85rem 11.5rem;
  }

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

  .queue-item-artist {
    grid-column: 2;
    text-align: left;
    margin-top: -0.15rem;
  }

  .player {
    border-radius: 1.25rem;
    flex-wrap: wrap;
    padding: 1rem;
  }

  .disc-wrap {
    width: 4rem;
    height: 4rem;
  }

  .controls {
    width: 100%;
    justify-content: center;
    padding-top: 0.25rem;
  }
}
