/* full-screen player: sleeve + spinning record, scrubber, controls, lyrics / queue panels */
#player { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; overflow: hidden;
  background: radial-gradient(120% 70% at 50% 0%, rgba(var(--tint), .38), transparent 70%), var(--bg);
  transform: translateY(100%); visibility: hidden; transition: transform .42s var(--ease), visibility 0s .42s; }
#player.open { transform: none; visibility: visible; transition: transform .42s var(--ease); }
#player .p-head { display: flex; align-items: center; justify-content: space-between; padding: calc(var(--safe-t) + 8px) 10px 0; }
#player .p-ctx { text-align: center; font-size: 12px; color: var(--sub); line-height: 1.4; }
#player .p-ctx b { display: block; color: var(--txt); font-size: 13.5px; font-weight: 600; }
.p-body { flex: 1; display: flex; flex-direction: column; justify-content: space-evenly; gap: 14px; width: 100%; max-width: 460px; margin: 0 auto; padding: 6px 24px calc(var(--safe-b) + 14px); min-height: 0; }

.stage { position: relative; width: min(74vw, 340px, 42dvh); aspect-ratio: 1; margin: 0 auto; transform: translateX(7%); }
[dir=ltr] .stage { transform: translateX(-7%); }
.record { position: absolute; inset: 4%; border-radius: 50%; transition: transform .7s var(--ease);
  background: radial-gradient(circle, transparent 0 17%, #0E0D14 17.4% 19%, transparent 19.4%),
              repeating-radial-gradient(circle, #17151F 0 1.2px, #211E2C 1.6px 3px), #13121A;
  box-shadow: 0 10px 40px rgba(0,0,0,.6), inset 0 0 0 1px rgba(255,255,255,.05); }
.record .label { position: absolute; inset: 31%; border-radius: 50%; background-size: cover; background-position: center; animation: spin 7s linear infinite; animation-play-state: paused; box-shadow: 0 0 0 3px #0E0D14; }
.record .label::after { content: ''; position: absolute; inset: 44%; border-radius: 50%; background: var(--bg); }
.record::before { content: ''; position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 30deg, transparent 0 10%, rgba(255,255,255,.07) 14%, transparent 20% 60%, rgba(255,255,255,.05) 64%, transparent 70%); }
.playing .record { transform: translateX(-26%); }
[dir=ltr] .playing .record { transform: translateX(26%); }
.playing .record .label { animation-play-state: running; }
.sleeve { position: absolute; inset: 0; border-radius: 18px; overflow: hidden; background: var(--s2); box-shadow: 0 24px 60px rgba(0,0,0,.55); transition: transform .5s var(--ease); }
.sleeve img { width: 100%; height: 100%; object-fit: cover; }
#player:not(.playing) .sleeve { transform: scale(.94); }

.p-meta { display: flex; align-items: center; gap: 12px; }
.p-meta .m { flex: 1; min-width: 0; }
.p-meta .p-title { font: 700 24px/1.25 var(--kufi); }
.p-meta .p-artist { color: var(--sub); font-size: 15px; cursor: pointer; }
.p-meta .p-artist:hover { color: var(--txt); text-decoration: underline; }

.scrub { position: relative; height: 26px; display: flex; align-items: center; cursor: pointer; touch-action: none; }
.scrub .tr { position: relative; width: 100%; height: 4px; border-radius: 4px; background: rgba(255,255,255,.14); overflow: visible; }
.scrub .bf { position: absolute; inset-block: 0; inset-inline-start: 0; border-radius: inherit; background: rgba(255,255,255,.12); }
.scrub .fl { position: absolute; inset-block: 0; inset-inline-start: 0; border-radius: inherit; background: var(--txt); }
.scrub .th { position: absolute; top: 50%; width: 14px; height: 14px; margin-top: -7px; margin-inline-start: -7px; border-radius: 50%; background: var(--txt); transform: scale(0); transition: transform .15s; box-shadow: 0 2px 8px rgba(0,0,0,.4); }
.scrub:hover .th, .scrub.drag .th { transform: scale(1); }
.scrub.drag .tr { height: 6px; }
.times { display: flex; justify-content: space-between; font-size: 12px; color: var(--sub); margin-top: -2px; font-variant-numeric: tabular-nums; }
.times.buffering::after { content: ''; }

.p-ctrl { display: flex; align-items: center; justify-content: space-between; }
.p-ctrl .ibtn svg.i { width: 30px; height: 30px; }
.p-ctrl .ibtn.sm svg.i { width: 22px; height: 22px; }
.p-ctrl .big { width: 76px; height: 76px; border-radius: 50%; background: var(--txt); color: var(--bg); display: grid; place-items: center; transition: transform .15s; position: relative; }
.p-ctrl .big:active { transform: scale(.93); }
.p-ctrl .big svg.i { width: 32px; height: 32px; }
.p-ctrl .big.loading::after { content: ''; position: absolute; inset: -5px; border-radius: 50%; border: 2.5px solid transparent; border-top-color: var(--sun); animation: spin .9s linear infinite; }
.ibtn .dot { position: absolute; margin-top: 30px; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }

/* four equal tabs, icon over a one-line label: long words (Télécharger, A continuación...) never wrap or push a neighbour */
.p-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.p-tabs .tab { min-width: 0; height: 56px; padding: 6px 4px; border-radius: 16px; font-size: 12px; line-height: 1.3; font-weight: 500; color: var(--sub);
  display: flex; flex-direction: column; gap: 4px; align-items: center; justify-content: center; transition: background .2s, color .2s; }
.p-tabs .tab span { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-tabs .tab:hover, .p-tabs .tab.on { background: rgba(255,255,255,.09); color: var(--txt); }
.p-tabs .tab svg.i { width: 18px; height: 18px; }

/* panel inside the player (lyrics / queue / related) */
.panel { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; background: rgba(21, 20, 29, .97); padding-top: var(--safe-t);
  transform: translateY(100%); transition: transform .38s var(--ease); }
.panel.open { transform: none; }
.panel-h { display: flex; align-items: center; gap: 10px; padding: 8px 12px; }
.panel-h .np { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.panel-h .np img { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; }
.panel-b { flex: 1; overflow-y: auto; padding: 8px 20px calc(var(--safe-b) + 24px); max-width: 640px; width: 100%; margin: 0 auto; }
.lyr { padding: 30vh 0 40vh; }
.lyr p { font: 700 25px/1.5 var(--ui); color: var(--txt); opacity: .28; padding: 7px 0; cursor: pointer; transition: opacity .3s, transform .3s var(--ease); transform-origin: right center; }
.lyr:dir(ltr) p { transform-origin: left center; } /* follows the words' own direction, not the app's */
.lyr p.past { opacity: .5; }
.lyr p.on { opacity: 1; transform: scale(1.03); }
.lyr.plain { padding: 16px 0 40px; }
.lyr.plain p { opacity: .9; font-size: 20px; font-weight: 600; cursor: default; padding: 3px 0; }
.lyr .src { font-size: 12px; color: var(--mute); margin-top: 24px; }
.sleep-on { color: var(--sun) !important; }

@media (min-width: 960px) {
  .p-body { max-width: 980px; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto auto auto auto auto; align-content: center; column-gap: 56px; }
  .stage { grid-row: 1 / 6; width: min(400px, 60dvh); align-self: center; }
}
