/* نغم "Dusk" layer: illustrations on pastel panels, the home hero, record-style cards, chart numbers, motion details.
   Loaded last, so it refines the base components. */

/* illustrations: a soft pastel blob behind each one */
.illo { position: relative; display: grid; place-items: center; margin: 0; flex: none; }
.illo::before { content: ''; position: absolute; inset: 6% 4%; border-radius: 46% 54% 52% 48% / 55% 45% 55% 45%; background: var(--pl); opacity: .95;
  animation: blob 14s ease-in-out infinite alternate; }
.illo img { position: relative; width: 82%; height: auto; }
.illo.tone-pp::before { background: var(--pp); } .illo.tone-pm::before { background: var(--pm); } .illo.tone-pb::before { background: var(--pb); }
@keyframes blob { to { border-radius: 58% 42% 44% 56% / 46% 58% 42% 54%; transform: rotate(8deg); } }
.illo.sm { width: 190px; height: 160px; margin: 0 auto 14px; }
.illo.xs { width: 64px; height: 56px; }
.illo.xs::before { inset: 0; }

/* empty states */
.empty { padding: 36px 24px 48px; }
.empty b { font: 600 18px/1.4 var(--kufi); margin-top: 4px; }
.empty p { max-width: 300px; margin: 4px auto 0; font-size: 13.5px; }

/* home hero: a pastel stage with a time-of-day illustration, the greeting and a play-my-mood button */
.hero-card { position: relative; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 10px; padding: 20px 20px 18px; border-radius: var(--r3); overflow: hidden;
  background: linear-gradient(135deg, var(--pl) 0%, #EBD9F7 48%, var(--pp) 100%); color: var(--ink); box-shadow: 0 18px 40px rgba(8, 6, 16, .35); isolation: isolate; }
.hero-card::after { content: ''; position: absolute; z-index: -1; width: 220px; height: 220px; border-radius: 50%; inset-inline-start: -70px; bottom: -120px;
  background: repeating-radial-gradient(circle, rgba(34, 28, 56, .06) 0 2px, transparent 2px 9px); }
.hero-card .hc-k { font-size: 13px; font-weight: 500; color: var(--ink2); }
.hero-card .hello { font: 700 26px/1.3 var(--kufi); margin-top: 2px; }
.hero-card .hello .w, h1 .w { display: inline-block; }
.hc-row { display: flex; align-items: center; gap: 14px; margin-top: 14px; flex-wrap: wrap; }
.hc-play { height: 44px; padding: 0 18px 0 20px; background: var(--ink); color: #fff; box-shadow: 0 8px 20px rgba(34, 28, 56, .3); }
.hc-play:hover { background: #352C55; }
.hc-play svg.i { width: 18px; height: 18px; }
.hero-card .hc-art { width: 132px; height: 120px; }
.hero-card .hc-art::before { background: rgba(255, 255, 255, .55); }
.hero-card .hc-art img { width: 100%; animation: float 5s ease-in-out infinite; }
.hero-card .avatar { position: absolute; top: 14px; inset-inline-end: 14px; width: 36px; height: 36px; font-size: 15px; box-shadow: 0 4px 12px rgba(34, 28, 56, .18); }
.hero-card .avatar.ghost { background: rgba(255, 255, 255, .7); color: var(--ink); }
.hero-card .hc-art { margin-top: 26px; }
/* a little live sound wave */
.wave { display: inline-flex; align-items: center; gap: 3px; height: 24px; }
.wave i { width: 4px; height: 100%; border-radius: 4px; background: linear-gradient(var(--sun), var(--ember)); transform-origin: center; animation: wave 1.1s ease-in-out infinite; }
.wave i:nth-child(2) { animation-delay: -.2s; } .wave i:nth-child(3) { animation-delay: -.5s; } .wave i:nth-child(4) { animation-delay: -.8s; }
.wave i:nth-child(5) { animation-delay: -.35s; } .wave i:nth-child(6) { animation-delay: -.65s; } .wave i:nth-child(7) { animation-delay: -.95s; }
@keyframes wave { 0%, 100% { transform: scaleY(.25); } 50% { transform: scaleY(1); } }
@media (min-width: 700px) {
  .hero-card { padding: 30px 34px; }
  .hero-card .hello { font-size: 36px; }
  .hero-card .hc-art { width: 230px; height: 190px; margin-top: 0; }
  .hero-card .avatar { position: static; grid-column: 2; grid-row: 1; justify-self: end; display: none; }
}

.home-h + .quick { margin-top: 18px; }
.quick { gap: 10px; }
.qk { border-radius: 16px; height: 60px; background: var(--s1); box-shadow: inset 0 0 0 1px var(--line); transition: background .2s, transform .3s var(--spring); }
.qk img { width: 48px; height: 48px; margin-inline-start: 6px; border-radius: 12px; }
.qk:hover { transform: translateY(-2px); }

.taste-card .illo.xs::before { background: var(--pl); }
.notice .illo.xs::before { background: var(--pb); }

/* search hint */
.search-hint { display: flex; align-items: center; gap: 14px; margin-top: 14px; padding: 14px 16px; border-radius: var(--r2); background: var(--s1); box-shadow: inset 0 0 0 1px var(--line); }
.search-hint .illo.sm { width: 104px; height: 88px; margin: 0; }
.search-hint b { font: 600 16px/1.4 var(--kufi); display: block; }
.search-hint p { color: var(--sub); font-size: 13px; }
.genre { border-radius: var(--r2); transition: transform .3s var(--spring); }
.genre b { color: var(--ink); }
.genre::after { border-color: rgba(34, 28, 56, .08); }
.genre:hover { transform: translateY(-3px) rotate(-1deg); }

/* account: signed out card with the sync illustration */
.acct-out { flex-direction: column; align-items: stretch; text-align: start; }
.acct-out .illo { width: 100%; max-width: 280px; height: 170px; margin: 0 auto 6px; }

/* onboarding header with its illustration */
.onb-h { display: flex; align-items: center; gap: 16px; }
.onb-h .onb-art { width: 110px; height: 100px; order: 2; }
.onb-h .t-display { font-size: 28px; }
@media (min-width: 700px) { .onb-h .onb-art { width: 180px; height: 150px; } .onb-h .t-display { font-size: 36px; } }

/* cards: rounded sleeve with a record that slides out on hover / focus */
.card { width: 152px; }
.card .art-w { position: relative; }
.card .art { border-radius: var(--r2); z-index: 1; transition: transform .45s var(--spring), box-shadow .3s; }
.card .vinyl { position: absolute; top: 6%; bottom: 6%; inset-inline-start: 6%; aspect-ratio: 1; border-radius: 50%; z-index: 0;
  background: radial-gradient(circle, var(--ember) 0 13%, #13121A 13.5% 15%, transparent 15.5%), repeating-radial-gradient(circle, #17151F 0 1.2px, #24212F 1.6px 3px);
  box-shadow: 0 6px 18px rgba(0,0,0,.4); transition: transform .5s var(--spring); }
.card:hover .vinyl, .card:focus-visible .vinyl { transform: translateX(-24%) rotate(-40deg); }
[dir=ltr] .card:hover .vinyl, [dir=ltr] .card:focus-visible .vinyl { transform: translateX(24%) rotate(40deg); }
.card:hover .art { transform: translateY(-4px); box-shadow: 0 14px 28px rgba(0, 0, 0, .35); }
.card:hover .art img { transform: none; }
.card.round .art { border-radius: 50%; box-shadow: 0 0 0 3px var(--s1), 0 0 0 5px rgba(184, 166, 255, .25); }
.card.round:hover .art { box-shadow: 0 0 0 3px var(--s1), 0 0 0 5px var(--sun); }
.mix .art::after { background: linear-gradient(to top, rgba(var(--mc), .92) 6%, rgba(var(--mc), .25) 60%, rgba(var(--mc), .05)); }
.mix .mix-name { font-size: 22px; }
.rail { gap: 16px; padding-top: 4px; padding-bottom: 10px; }

/* song rows: rounded art, the equaliser sits on the cover of the song that's playing */
.row { border-radius: 16px; }
.row .r-art { position: relative; flex: none; display: block; }
.row .r-art img { border-radius: 12px; }
.row .r-art .eq { position: absolute; inset: 0; width: auto; height: auto; display: none; align-items: flex-end; justify-content: center; gap: 3px; padding: 15px 14px;
  border-radius: 12px; background: rgba(21, 20, 29, .62); }
.row .r-art .eq i { width: 4px; background: var(--sun-2); }
.row.now .r-art .eq { display: flex; }
.row.now { background: rgba(184, 166, 255, .08); }
/* chart ranks: big outlined numbers */
.row .rank { min-width: 34px; font: 700 26px/1 var(--kufi); color: transparent; -webkit-text-stroke: 1.3px rgba(184, 166, 255, .55); }
.row:nth-child(-n+3) .rank { -webkit-text-stroke: 0; background: linear-gradient(180deg, var(--sun), var(--ember)); -webkit-background-clip: text; background-clip: text; }

/* library tiles on pastel */
.tile { border-radius: var(--r2); position: relative; overflow: hidden; transition: transform .3s var(--spring); }
.tile:hover { transform: translateY(-3px); }
.tile::after { content: ''; position: absolute; width: 90px; height: 90px; border-radius: 50%; inset-inline-end: -26px; bottom: -34px; border: 12px solid rgba(34, 28, 56, .07); }
.tile b, .tile span { display: block; position: relative; z-index: 1; }
.tile span { color: var(--ink2); opacity: 1; }

/* liked / downloads / history covers: the same pastel as their library tile, a big icon on rings */
.cover.pastel { background: var(--pl); position: relative; overflow: hidden; }
.cover.pastel.pc-liked { background: var(--pp); } .cover.pastel.pc-downloads { background: var(--pm); }
.cover.pastel::before { content: ''; position: absolute; inset: 0; background: repeating-radial-gradient(circle at 50% 50%, rgba(34, 28, 56, .06) 0 2px, transparent 2px 14px); }
.cover.pastel .ph { position: relative; color: var(--ink); width: 100%; height: 100%; }
.cover.pastel .ph svg { width: 34%; height: 34%; stroke-width: 1.6; animation: float 5s ease-in-out infinite; }

/* section titles get a small rhythm mark */
.shelf-h .t-h2::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-inline-end: 8px; vertical-align: middle;
  background: linear-gradient(135deg, var(--sun), var(--ember)); box-shadow: 0 0 0 4px rgba(184, 166, 255, .12); }

/* taps: ripple and heart burst */
.has-ripple { overflow: hidden; isolation: isolate; }
.ripple { position: absolute; border-radius: 50%; pointer-events: none; background: currentColor; opacity: .18; transform: scale(0); animation: ripple .6s var(--ease) forwards; z-index: -1; }
@keyframes ripple { to { transform: scale(1); opacity: 0; } }
.burst { position: fixed; z-index: 400; width: 0; height: 0; pointer-events: none; }
.burst i { position: absolute; width: 7px; height: 7px; margin: -3.5px; border-radius: 50%; background: var(--c); }
.ibtn.love.on { color: var(--ember); }

/* buttons: a soft lift */
.btn-soft, .btn-line { transition: transform .3s var(--spring), background .2s, box-shadow .2s; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: scale(.95); }
.chip { transition: background .2s, color .2s, transform .3s var(--spring); }
.chip.on { background: linear-gradient(135deg, var(--sun), var(--ember)); color: var(--sun-ink); }
.chip:active { transform: scale(.94); }

/* the full player uses the same soft gradient for its main button */
#player .play-fab, #player [data-pp] { background: linear-gradient(135deg, var(--sun), var(--ember)); color: var(--sun-ink); }

@media (prefers-reduced-motion: reduce) { .card:hover .vinyl { transform: none; } .hero-card .hc-art img, .illo::before { animation: none; } }
