@import url('https://fonts.googleapis.com/css2?family=Pacifico&family=Nunito:wght@400;600;700;800&display=swap');

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --pink: #ff6b9d;
  --rose: #ff4d79;
  --purple: #c084fc;
  --light-purple: #e9d5ff;
  --dark: #1a0525;
  --card-bg: rgba(255, 255, 255, 0.09);
  --card-border: rgba(255, 255, 255, 0.18);
  --text: #fff;
  --text-dim: rgba(255, 255, 255, 0.65);
  --gold: #ffd700;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Nunito', sans-serif;
  background: linear-gradient(135deg, #12011e 0%, #2d0550 45%, #1a1640 100%);
  min-height: 100vh;
  color: var(--text);
  overflow-x: hidden;
}

/* ─── CANVAS HEARTS ─── */
#heartCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* ─── LAYOUT ─── */
.page {
  display: none;
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding: 24px 16px 48px;
}

.page.active {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ─── CARD ─── */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 24px;
  padding: 28px 22px;
  width: 100%;
  max-width: 480px;
}

/* ══════════════════════════════════════════════
   WELCOME PAGE
══════════════════════════════════════════════ */
#page-welcome {
  justify-content: center;
  gap: 22px;
  overflow: hidden;
}

/* Soft glow orbs */
.orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(60px);
  z-index: 0;
}

.orb-1 {
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(255, 107, 157, 0.35) 0%, transparent 70%);
  top: -60px;
  right: -60px;
  animation: orbFloat 6s ease-in-out infinite;
}

.orb-2 {
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(192, 132, 252, 0.3) 0%, transparent 70%);
  bottom: 40px;
  left: -40px;
  animation: orbFloat 8s ease-in-out infinite reverse;
}

@keyframes orbFloat {

  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  50% {
    transform: translateY(-20px) scale(1.05);
  }
}

.welcome-hero {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 480px;
  width: 100%;
}

.hero-badge {
  display: inline-block;
  background: linear-gradient(135deg, rgba(255, 107, 157, 0.25), rgba(192, 132, 252, 0.25));
  border: 1px solid rgba(255, 107, 157, 0.4);
  border-radius: 50px;
  padding: 6px 18px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--pink);
  margin-bottom: 18px;
}

.hero-title {
  font-family: 'Pacifico', cursive;
  font-size: clamp(2.2rem, 10vw, 3.8rem);
  line-height: 1.15;
  background: linear-gradient(135deg, #fff 0%, #ffd6e8 50%, #d8b4fe 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 10px;
  text-shadow: none;
}

.hero-heart {
  font-size: 3rem;
  animation: heartbeat 1.6s ease-in-out infinite;
  display: block;
  margin: 6px 0;
}

@keyframes heartbeat {

  0%,
  100% {
    transform: scale(1);
  }

  30% {
    transform: scale(1.18);
  }

  60% {
    transform: scale(1.05);
  }
}

.hero-sub {
  font-size: clamp(0.88rem, 3.5vw, 1rem);
  color: var(--text-dim);
  line-height: 1.7;
  max-width: 320px;
  margin: 0 auto;
}

/* Stats pills */
.welcome-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  position: relative;
  z-index: 1;
  max-width: 480px;
}

.stat-pill {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50px;
  padding: 7px 16px;
  font-size: 0.8rem;
  font-weight: 700;
  backdrop-filter: blur(10px);
  white-space: nowrap;
}

/* How-to card */
.how-card {
  text-align: left;
}

.how-title {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--pink);
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.how-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.how-step {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--text-dim);
}

.step-num {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 800;
  color: #fff;
}

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 50px;
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.18s, box-shadow 0.18s;
  padding: 14px 32px;
  width: 100%;
  max-width: 320px;
  position: relative;
  z-index: 1;
}

.btn:active {
  transform: scale(0.96);
}

.btn-lg {
  padding: 16px 40px;
  font-size: 1.05rem;
  max-width: 280px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--pink), var(--rose));
  color: #fff;
  box-shadow: 0 4px 28px rgba(255, 107, 157, 0.45);
}

.btn-primary:hover {
  box-shadow: 0 6px 36px rgba(255, 107, 157, 0.65);
  transform: translateY(-2px);
}

.btn-secondary {
  background: linear-gradient(135deg, var(--purple), #818cf8);
  color: #fff;
  box-shadow: 0 4px 24px rgba(192, 132, 252, 0.4);
}

.btn-secondary:hover {
  box-shadow: 0 6px 32px rgba(192, 132, 252, 0.6);
  transform: translateY(-2px);
}

.btn-ghost {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text-dim);
  backdrop-filter: blur(10px);
}

.btn-ghost:hover {
  border-color: var(--pink);
  color: var(--pink);
}

/* ─── HUD ─── */
.hud {
  width: 100%;
  max-width: 480px;
  padding: 14px 18px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(14px);
  border-radius: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.level-badge {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), #ff9f43);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.65rem;
  color: #1a0525;
  box-shadow: 0 0 14px rgba(255, 215, 0, 0.5);
}

.level-badge .lv-num {
  font-size: 1.1rem;
  line-height: 1;
}

.hud-right {
  flex: 1;
  min-width: 0;
}

.hud-label {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 4px;
  display: flex;
  justify-content: space-between;
}

.xp-track {
  height: 10px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  overflow: hidden;
}

.xp-fill {
  height: 100%;
  border-radius: 10px;
  background: linear-gradient(90deg, var(--pink), var(--purple));
  transition: width 0.6s cubic-bezier(.34, 1.56, .64, 1);
  box-shadow: 0 0 8px var(--pink);
}

/* ─── QUIZ ─── */
#page-quiz {
  gap: 12px;
}

.quiz-progress-track {
  width: 100%;
  max-width: 480px;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.quiz-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--pink), var(--purple));
  border-radius: 4px;
  transition: width 0.4s ease;
}

.question-counter {
  font-size: 0.78rem;
  color: var(--text-dim);
  text-align: right;
  width: 100%;
  max-width: 480px;
}

.question-card {
  text-align: left;
}

.q-category {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 50px;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  margin-bottom: 14px;
}

.q-icon {
  font-size: 2.2rem;
  margin-bottom: 10px;
  display: block;
}

.q-text {
  font-size: clamp(1rem, 4vw, 1.1rem);
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 20px;
  color: #fff;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.option-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 14px 16px;
  font-family: 'Nunito', sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
  width: 100%;
}

.option-btn:hover:not(:disabled) {
  border-color: var(--pink);
  background: rgba(255, 107, 157, 0.1);
  transform: translateX(4px);
}

.option-btn.correct {
  border-color: #4ade80;
  background: rgba(74, 222, 128, 0.12);
  color: #4ade80;
}

.option-btn.wrong {
  border-color: #f87171;
  background: rgba(248, 113, 113, 0.12);
  color: #f87171;
}

.option-btn:disabled {
  cursor: default;
}

.option-letter {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 800;
  flex-shrink: 0;
}

.correct .option-letter {
  background: #4ade80;
  color: #022c22;
}

.wrong .option-letter {
  background: #f87171;
  color: #450a0a;
}

/* ─── FEEDBACK TOAST ─── */
.feedback-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: rgba(20, 5, 35, 0.96);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(20px);
  border-radius: 16px;
  padding: 14px 22px;
  font-size: 0.9rem;
  font-weight: 700;
  transition: transform 0.35s cubic-bezier(.34, 1.56, .64, 1), opacity 0.35s;
  z-index: 999;
  opacity: 0;
  text-align: center;
  max-width: 320px;
  width: 90%;
}

.feedback-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.feedback-toast.correct-fb {
  border-color: #4ade80;
  color: #4ade80;
}

.feedback-toast.wrong-fb {
  border-color: #f87171;
  color: #f87171;
}

/* ─── LEVEL UP OVERLAY ─── */
.levelup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 0, 20, 0.88);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.levelup-overlay.show {
  opacity: 1;
  pointer-events: all;
}

.levelup-overlay .lu-emoji {
  font-size: 80px;
  animation: luPop 0.5s cubic-bezier(.34, 1.56, .64, 1);
}

.levelup-overlay .lu-title {
  font-family: 'Pacifico', cursive;
  font-size: 2.5rem;
  background: linear-gradient(135deg, var(--gold), var(--pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 12px 0 6px;
  animation: luPop 0.5s 0.1s cubic-bezier(.34, 1.56, .64, 1) both;
}

.levelup-overlay .lu-sub {
  color: var(--text-dim);
  font-size: 1rem;
  animation: luPop 0.5s 0.2s cubic-bezier(.34, 1.56, .64, 1) both;
}

@keyframes luPop {
  0% {
    transform: scale(0);
    opacity: 0;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* ─── CONFETTI ─── */
.confetti-piece {
  position: fixed;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  animation: confettiFall linear forwards;
  z-index: 1001;
  pointer-events: none;
}

@keyframes confettiFall {
  0% {
    transform: translateY(-20px) rotate(0deg);
    opacity: 1;
  }

  100% {
    transform: translateY(110vh) rotate(720deg);
    opacity: 0.2;
  }
}

/* ─── RESULT ─── */
#page-result {
  gap: 18px;
  text-align: center;
}

.result-emoji {
  font-size: 80px;
}

.result-title {
  font-family: 'Pacifico', cursive;
  font-size: clamp(1.6rem, 7vw, 2.4rem);
  background: linear-gradient(135deg, var(--gold), var(--pink), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.result-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
  max-width: 480px;
}

.stat-box {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 16px 10px;
  backdrop-filter: blur(12px);
}

.stat-box .s-num {
  font-family: 'Pacifico', cursive;
  font-size: 2rem;
  color: var(--pink);
}

.stat-box .s-label {
  font-size: 0.76rem;
  color: var(--text-dim);
  margin-top: 2px;
}

.puzzle-unlock-banner {
  background: linear-gradient(135deg, rgba(255, 107, 157, 0.15), rgba(192, 132, 252, 0.15));
  border: 1.5px solid var(--pink);
  border-radius: 18px;
  padding: 16px 20px;
  font-size: 0.9rem;
  width: 100%;
  max-width: 480px;
  line-height: 1.5;
}

/* ─── PUZZLE ─── */
#page-puzzle {
  gap: 18px;
}

.puzzle-header {
  text-align: center;
}

.puzzle-header h2 {
  font-family: 'Pacifico', cursive;
  font-size: clamp(1.4rem, 6vw, 2rem);
  background: linear-gradient(135deg, var(--pink), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.puzzle-header p {
  color: var(--text-dim);
  font-size: 0.86rem;
  margin-top: 6px;
}

.puzzle-controls {
  display: flex;
  gap: 8px;
  width: 100%;
  max-width: 480px;
  justify-content: center;
}

.size-btn {
  flex: 1;
  max-width: 70px;
  padding: 8px 4px;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  background: var(--card-bg);
  color: var(--text-dim);
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s;
  backdrop-filter: blur(10px);
}

.size-btn.active,
.size-btn:hover {
  border-color: var(--pink);
  color: var(--pink);
  background: rgba(255, 107, 157, 0.1);
}

.puzzle-wrapper {
  width: 100%;
  max-width: 480px;
}

#puzzle-board {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 16px;
  border: 2px solid var(--card-border);
  overflow: hidden;
  display: grid;
  position: relative;
  background: rgba(0, 0, 0, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.pz-slot {
  border: 1px solid rgba(255, 255, 255, 0.06);
  position: relative;
  overflow: hidden;
}

.pz-slot.drag-over {
  background: rgba(255, 107, 157, 0.2);
  border-color: var(--pink);
}

.pz-piece {
  width: 100%;
  height: 100%;
  cursor: grab;
  display: block;
  background-size: cover;
  background-repeat: no-repeat;
  transition: transform 0.15s;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.pz-piece:active {
  cursor: grabbing;
}

.pz-piece.dragging {
  opacity: 0.5;
  transform: scale(0.95);
}

.pz-piece.placed {
  cursor: default;
  animation: piecePop 0.3s cubic-bezier(.34, 1.56, .64, 1);
}

@keyframes piecePop {
  0% {
    transform: scale(1.15);
  }

  100% {
    transform: scale(1);
  }
}

.piece-tray-label {
  font-size: 0.74rem;
  color: var(--text-dim);
  text-align: center;
  margin: 4px 0;
}

#piece-tray {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  padding: 14px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  backdrop-filter: blur(14px);
  min-height: 80px;
  width: 100%;
  max-width: 480px;
}

.tray-piece {
  width: 60px;
  height: 60px;
  border-radius: 10px;
  cursor: grab;
  background-size: cover;
  background-repeat: no-repeat;
  border: 2px solid rgba(255, 255, 255, 0.12);
  transition: transform 0.15s;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  flex-shrink: 0;
}

.tray-piece:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 14px rgba(255, 107, 157, 0.4);
}

.tray-piece.dragging {
  opacity: 0.4;
  transform: scale(0.9);
}

.puzzle-complete-msg {
  text-align: center;
  padding: 20px;
  background: linear-gradient(135deg, rgba(255, 107, 157, 0.12), rgba(192, 132, 252, 0.12));
  border: 1.5px solid var(--pink);
  border-radius: 18px;
  display: none;
  width: 100%;
  max-width: 480px;
}

.puzzle-complete-msg h3 {
  font-family: 'Pacifico', cursive;
  font-size: 1.5rem;
  background: linear-gradient(135deg, var(--gold), var(--pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 10px 0 6px;
}

.puzzle-complete-msg p {
  color: var(--text-dim);
  font-size: 0.88rem;
}

.puzzle-complete-msg.show {
  display: block;
  animation: luPop 0.5s cubic-bezier(.34, 1.56, .64, 1);
}

/* ══════════════════════════════════════════════
   MUSIC PLAYER PAGE
══════════════════════════════════════════════ */
#page-music {
  gap: 0;
  justify-content: flex-start;
  padding-top: 28px;
  overflow: hidden;
}

.music-page-header {
  text-align: center;
  margin-bottom: 18px;
  position: relative;
  z-index: 1;
}

.music-from-label {
  display: inline-block;
  background: linear-gradient(135deg, rgba(255, 107, 157, 0.2), rgba(192, 132, 252, 0.2));
  border: 1px solid rgba(255, 107, 157, 0.4);
  border-radius: 50px;
  padding: 6px 22px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--pink);
  letter-spacing: 1px;
}

/* Album Art */
.album-art-wrap {
  position: relative;
  width: min(160px, 42vw);
  height: min(160px, 42vw);
  margin: 0 auto 20px;
  z-index: 1;
}

.album-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  animation: albumSpin linear infinite;
}

.ring-outer {
  border: 2px solid transparent;
  background: linear-gradient(#12011e, #12011e) padding-box,
    linear-gradient(135deg, var(--pink), var(--purple), var(--pink)) border-box;
  animation-duration: 6s;
  inset: -12px;
  opacity: 0.6;
}

.ring-inner {
  border: 1.5px solid transparent;
  background: linear-gradient(#12011e, #12011e) padding-box,
    linear-gradient(135deg, var(--purple), var(--pink), var(--purple)) border-box;
  animation-duration: 4s;
  animation-direction: reverse;
  inset: -6px;
  opacity: 0.4;
}

@keyframes albumSpin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.album-ring.paused {
  animation-play-state: paused;
}

.album-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  box-shadow: 0 0 40px rgba(255, 107, 157, 0.45), 0 0 80px rgba(192, 132, 252, 0.25);
  position: relative;
  z-index: 2;
  transition: box-shadow 0.4s;
}

.album-img.playing {
  box-shadow: 0 0 55px rgba(255, 107, 157, 0.7), 0 0 100px rgba(192, 132, 252, 0.4);
  animation: albumPulse 2s ease-in-out infinite;
}

@keyframes albumPulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.025);
  }
}

.album-shadow {
  position: absolute;
  bottom: -18px;
  left: 15%;
  right: 15%;
  height: 30px;
  background: rgba(255, 107, 157, 0.3);
  filter: blur(18px);
  border-radius: 50%;
  z-index: 0;
}

/* Song meta */
.song-meta {
  text-align: center;
  margin-bottom: 18px;
  position: relative;
  z-index: 1;
}

.song-name {
  font-family: 'Pacifico', cursive;
  font-size: clamp(1.05rem, 4vw, 1.4rem);
  color: #fff;
  margin-bottom: 4px;
}

.song-artist-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 0.5px;
}

/* Player card */
.music-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border-radius: 28px;
  padding: 20px 18px;
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  z-index: 1;
}

/* Progress */
.music-progress-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.time-label {
  font-size: 0.72rem;
  color: var(--text-dim);
  flex-shrink: 0;
  min-width: 30px;
  font-weight: 700;
}

.music-track {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  position: relative;
  cursor: pointer;
  overflow: visible;
}

.music-track-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--pink), var(--purple));
  width: 0%;
  box-shadow: 0 0 8px var(--pink);
}

.music-thumb {
  position: absolute;
  top: 50%;
  left: 0%;
  transform: translate(-50%, -50%);
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 3px var(--pink), 0 0 10px var(--pink);
  pointer-events: none;
}

/* Controls */
.music-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.ctrl-btn {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-dim);
  transition: all 0.2s;
}

.ctrl-btn:hover {
  border-color: var(--pink);
  color: var(--pink);
  background: rgba(255, 107, 157, 0.1);
  transform: scale(1.1);
}

.play-btn {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--pink), var(--rose));
  border: none;
  color: #fff;
  box-shadow: 0 4px 24px rgba(255, 107, 157, 0.5);
}

.play-btn:hover {
  box-shadow: 0 6px 32px rgba(255, 107, 157, 0.75);
  transform: scale(1.08);
  color: #fff;
}

/* Volume */
.volume-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

#vol-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.12);
  outline: none;
  cursor: pointer;
}

#vol-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--purple);
  cursor: pointer;
  box-shadow: 0 0 6px var(--purple);
}

#vol-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--purple);
  cursor: pointer;
  border: none;
}

/* ─── LAYOUT UTILITIES ─── */
.divider {
  width: 60px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--pink), var(--purple));
  margin: 4px auto;
}

.mt-auto {
  margin-top: auto;
}

.gap-12 {
  gap: 12px;
}

.flex-col {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.w-full {
  width: 100%;
  max-width: 480px;
}

.text-center {
  text-align: center;
}

/* ─── ANIMATIONS ─── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeInUp 0.5s ease both;
}

.fade-in-d1 {
  animation: fadeInUp 0.5s 0.1s ease both;
}

.fade-in-d2 {
  animation: fadeInUp 0.5s 0.2s ease both;
}

.fade-in-d3 {
  animation: fadeInUp 0.5s 0.3s ease both;
}

.fade-in-d4 {
  animation: fadeInUp 0.5s 0.4s ease both;
}

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar {
  width: 5px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--pink);
  border-radius: 5px;
}

/* ─── MOBILE ─── */
@media (max-width: 380px) {

  .card,
  .music-card {
    padding: 16px 12px;
  }

  .tray-piece {
    width: 52px;
    height: 52px;
  }

  .album-art-wrap {
    width: min(140px, 50vw);
    height: min(140px, 50vw);
  }

  .music-page-header {
    margin-bottom: 12px;
  }

  .song-meta {
    margin-bottom: 12px;
  }

  .music-controls {
    gap: 14px;
  }

  .play-btn {
    width: 54px;
    height: 54px;
  }

  .ctrl-btn {
    width: 40px;
    height: 40px;
  }
}