/* The public media player (player.html, js/player.js): mobile first, the
   artist page's language (blurred artist hero, pills, rounded cards, the red
   accent) on a dark, glassy stage. */
:root {
  --bg: #07080c;
  --bg2: #0e1017;
  --card: rgba(255, 255, 255, .045);
  --card-hi: rgba(255, 255, 255, .08);
  --line: rgba(255, 255, 255, .08);
  --text: #f4f5f8;
  --muted: #9aa0ad;
  --acc: #ff3b47;
  --acc2: #ff8a3d;
  --acc-soft: rgba(255, 59, 71, .14);
  --glow: 0 0 0 1px rgba(255, 59, 71, .35), 0 10px 40px rgba(255, 59, 71, .25);
  --radius: 20px;
  color-scheme: dark;
  --bs-body-font-family: system-ui, -apple-system, "Segoe UI", Arial, sans-serif;   /* fonts.css leads with Inter + Heebo, then this */
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
/* English letters a little smaller than the Hebrew beside them: song titles
   come in capitals, which stand taller than Hebrew letters (Heebo's own Latin,
   scaled, digits with them; signs keep their size) */
@font-face { font-family: 'PxLatin'; font-style: normal; font-weight: 400; font-display: swap; size-adjust: 86%;
  src: url(../lib/heebo/files/heebo-latin-400-normal.woff2) format('woff2'); unicode-range: U+0030-0039, U+0041-005A, U+0061-007A, U+00C0-00FF; }
@font-face { font-family: 'PxLatin'; font-style: normal; font-weight: 500; font-display: swap; size-adjust: 86%;
  src: url(../lib/heebo/files/heebo-latin-500-normal.woff2) format('woff2'); unicode-range: U+0030-0039, U+0041-005A, U+0061-007A, U+00C0-00FF; }
@font-face { font-family: 'PxLatin'; font-style: normal; font-weight: 600; font-display: swap; size-adjust: 86%;
  src: url(../lib/heebo/files/heebo-latin-600-normal.woff2) format('woff2'); unicode-range: U+0030-0039, U+0041-005A, U+0061-007A, U+00C0-00FF; }
@font-face { font-family: 'PxLatin'; font-style: normal; font-weight: 700; font-display: swap; size-adjust: 86%;
  src: url(../lib/heebo/files/heebo-latin-700-normal.woff2) format('woff2'); unicode-range: U+0030-0039, U+0041-005A, U+0061-007A, U+00C0-00FF; }
body { font-family: "PxLatin", "Heebo", "Inter", system-ui, sans-serif;   /* one font for Hebrew and English: the same size */ font-weight: 500; -webkit-font-smoothing: antialiased;
  min-height: 100vh; overflow-x: hidden;
  background: radial-gradient(1200px 600px at 100% -10%, rgba(255, 59, 71, .10), transparent 60%),
              radial-gradient(900px 500px at -10% 30%, rgba(120, 80, 255, .08), transparent 60%), var(--bg); }
button { font: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
img { display: block; }
[hidden] { display: none !important; }
.px-grow { flex: 1; min-width: 0; }
.px-num { font-family: "Inter", "Heebo", sans-serif; font-variant-numeric: tabular-nums; }

/* ---- the top bar ---- */
.px-top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 10px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px; background: rgba(7, 8, 12, .72);
  -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4); border-bottom: 1px solid var(--line); }
.px-brand { height: 26px; width: auto; }
.px-live-tag { display: inline-flex; align-items: center; gap: 6px; font-size: .72rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--acc); padding: 4px 10px; border-radius: 999px; background: var(--acc-soft);
  white-space: nowrap; flex: none; }
/* a phone: the live tag is its dot alone, so the Channels button fits */
@media (max-width: 479px) {
  .px-top { gap: 8px; padding-inline: 12px; }
  .px-brand { height: 22px; }
  .px-live-tag { padding: 0; width: 26px; height: 26px; justify-content: center; }
  .px-live-tag > span { display: none; }
  .px-chbtn { padding: 0 12px; }
}
.px-live-tag i, .px-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--acc); box-shadow: 0 0 10px var(--acc);
  animation: px-pulse 1.6s ease-in-out infinite; display: inline-block; }
.px-top-end { margin-inline-start: auto; display: flex; gap: 6px; }
@keyframes px-pulse { 50% { opacity: .35; transform: scale(.8); } }

.px-icon { width: 42px; height: 42px; flex: none; border-radius: 14px; border: 1px solid var(--line); background: var(--card);
  display: inline-grid; place-items: center; font-size: .95rem; transition: background .15s, transform .1s; }
.px-icon:active { transform: scale(.94); }
.px-icon:hover { background: var(--card-hi); }
.px-chbtn { white-space: nowrap; flex: none; height: 42px; padding: 0 14px; border-radius: 14px; border: 1px solid rgba(255, 59, 71, .4); background: var(--acc-soft);
  color: var(--text); font-weight: 600; font-size: .88rem; display: inline-flex; align-items: center; gap: 8px; transition: transform .1s; }
.px-chbtn i { color: var(--acc); }
.px-chbtn:active { transform: scale(.95); }
#langBtn { font-size: .78rem; font-weight: 700; font-family: "Inter", sans-serif; }
.px-fav.on { color: var(--acc); border-color: rgba(255, 59, 71, .4); background: var(--acc-soft); }

.px-layout { max-width: 1320px; margin: 0 auto; padding: 0 0 24px; }

/* ---- the stage: the selected channel, its song now ---- */
.px-stage { position: relative; overflow: hidden; isolation: isolate; }
.px-stage-bg { position: absolute; inset: -40px; z-index: -2; background-size: cover; background-position: center 30%;
  filter: blur(40px) brightness(.5) saturate(1.5); transform: scale(1.1); transition: background-image .6s; }
.px-stage::after { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(7, 8, 12, .2) 0%, rgba(7, 8, 12, .55) 55%, var(--bg) 100%); }
.px-stage-in { padding: 14px 16px 18px; max-width: 520px; margin: 0 auto; }
.px-stage-ch { display: flex; align-items: center; gap: 10px; }
.px-ch-logo { width: 46px; height: 46px; border-radius: 14px; object-fit: contain; background: #fff; flex: none;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .35); }
.px-ch-logo.none { visibility: hidden; }
.px-stage-chname { font-weight: 700; font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.px-stage-state { font-size: .78rem; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.px-stage-state.on { color: #4ade80; }
.px-stage-state.on .px-dot { background: #4ade80; box-shadow: 0 0 10px #4ade80; }

.px-art-wrap { position: relative; width: min(68vw, 300px); aspect-ratio: 1; margin: 22px auto 18px; }
.px-art { width: 100%; height: 100%; border-radius: 28px; object-fit: cover; background: #1c1f29;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .55); position: relative; z-index: 1; transition: transform .4s; }
.px-art-ring { position: absolute; inset: -10px; border-radius: 36px; z-index: 0; opacity: 0;
  background: conic-gradient(from 0deg, var(--acc), var(--acc2), #8b5cf6, var(--acc));
  filter: blur(14px); transition: opacity .5s; animation: px-spin 8s linear infinite; }
.px-app.playing .px-art-ring { opacity: .75; }
.px-app.playing .px-art { transform: scale(1.02); }
@keyframes px-spin { to { transform: rotate(360deg); } }
.px-eq { position: absolute; z-index: 2; bottom: 12px; inset-inline-start: 12px; display: flex; align-items: flex-end; gap: 3px;
  height: 22px; padding: 6px 8px; border-radius: 10px; background: rgba(0, 0, 0, .5); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .3s; }
.px-eq i { width: 3px; height: 30%; border-radius: 2px; background: var(--acc); }
.px-app.playing .px-eq { opacity: 1; }
.px-app.playing .px-eq i { animation: px-eq 1s ease-in-out infinite; }
.px-eq i:nth-child(2) { animation-delay: -.3s !important; } .px-eq i:nth-child(3) { animation-delay: -.6s !important; }
.px-eq i:nth-child(4) { animation-delay: -.15s !important; } .px-eq i:nth-child(5) { animation-delay: -.45s !important; }
@keyframes px-eq { 0%, 100% { height: 25%; } 50% { height: 100%; } }

.px-stage-song { text-align: center; min-height: 64px; }
.px-stage-title { font-size: 1.5rem; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.px-stage-artist { font-size: 1rem; color: #cfd3dc; margin-top: 4px; overflow-wrap: anywhere; }
.px-stage-title.idle { color: var(--muted); font-size: 1.15rem; font-weight: 600; }
.px-prog { height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .12); margin: 16px 4px 0; overflow: hidden; direction: ltr; }
.px-prog > span { display: block; height: 100%; width: 0; border-radius: 3px; background: linear-gradient(90deg, var(--acc), var(--acc2));
  box-shadow: 0 0 12px var(--acc); transition: width 1s linear; }
.px-prog-times { display: flex; justify-content: space-between; font-size: .72rem; color: var(--muted); margin: 6px 4px 0;
  font-family: "Inter", sans-serif; font-variant-numeric: tabular-nums; direction: ltr; }
.px-prog.off, .px-prog.off + .px-prog-times { visibility: hidden; }
.px-controls { display: flex; align-items: center; justify-content: center; gap: 26px; margin-top: 14px; }
.px-ctl { width: 50px; height: 50px; border-radius: 50%; font-size: 1.1rem; }
[dir=rtl] .px-ctl i { transform: scaleX(-1); }
.px-play { width: 74px; height: 74px; border-radius: 50%; border: 0; flex: none; display: inline-grid; place-items: center; font-size: 1.6rem;
  color: #fff; background: linear-gradient(135deg, var(--acc), var(--acc2)); box-shadow: var(--glow); transition: transform .1s, opacity .2s; }
.px-play:active { transform: scale(.94); }
.px-play:disabled { opacity: .35; cursor: default; box-shadow: none; }
.px-play .fa-play { margin-inline-start: 4px; }
[dir=rtl] .px-play .fa-play { margin: 0 0 0 4px; }
.px-play-sm { width: 46px; height: 46px; font-size: 1.05rem; }
.px-note { text-align: center; font-size: .78rem; color: var(--muted); min-height: 1.2em; margin-top: 10px; }

/* ---- pills and cards ---- */
.px-panel, .px-channels { padding: 0 16px; }
.px-tabs { display: flex; gap: 8px; padding: 6px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); margin-top: 6px; }
.px-tabs button { flex: 1; height: 44px; border: 0; border-radius: 12px; background: transparent; font-weight: 600; font-size: .92rem;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; color: var(--muted); }
.px-tabs button.on { background: #f4f5f8; color: #0b0c10; }
.px-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin-top: 12px; overflow: hidden; }
.px-list { list-style: none; margin: 0; padding: 0; }
.px-row { display: flex; align-items: center; gap: 12px; min-height: 66px; padding: 10px 14px; border-top: 1px solid var(--line); }
.px-row:first-child { border-top: 0; }
.px-row.now { background: linear-gradient(90deg, var(--acc-soft), transparent); }
[dir=rtl] .px-row.now { background: linear-gradient(270deg, var(--acc-soft), transparent); }
.px-thumb { width: 48px; height: 48px; flex: none; border-radius: 12px; object-fit: cover; background: #1c1f29; }
.px-t1 { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.px-t2 { font-size: .8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.px-end { flex: none; text-align: end; font-size: .78rem; color: var(--muted); }
.px-end b { display: block; color: var(--text); font-size: .95rem; font-family: "Inter", sans-serif; }
.px-empty { padding: 28px 16px; text-align: center; color: var(--muted); font-size: .9rem; }
.px-spin { padding: 28px; text-align: center; color: var(--muted); }
.px-badge { display: inline-flex; align-items: center; gap: 5px; font-size: .66rem; font-weight: 700; letter-spacing: .08em;
  color: var(--acc); background: var(--acc-soft); border-radius: 6px; padding: 2px 6px; text-transform: uppercase; }

/* the weekly chart */
.px-chart-h { padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; border-bottom: 1px solid var(--line); }
.px-seg { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: rgba(0, 0, 0, .25); }
.px-seg button { flex: 1; height: 38px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-size: .88rem; font-weight: 600; }
.px-seg button.on { background: var(--acc-soft); color: var(--acc); }
.px-chart-range { font-size: .78rem; color: var(--muted); text-align: center; }
.px-rank { width: 30px; flex: none; text-align: center; font-family: "Inter", sans-serif; font-weight: 800; font-size: 1.15rem; color: var(--muted); }
.px-rank.top { background: linear-gradient(135deg, var(--acc), var(--acc2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.px-move { display: block; font-size: .64rem; font-weight: 700; margin-top: 2px; letter-spacing: 0; }
.px-move.up { color: #4ade80; } .px-move.down { color: #f87171; } .px-move.same { color: var(--muted); } .px-move.new { color: var(--acc2); }
.px-bar { height: 3px; border-radius: 2px; background: var(--line); margin-top: 7px; }
.px-bar > span { display: block; height: 100%; border-radius: 2px; background: linear-gradient(90deg, var(--acc), var(--acc2)); }
/* day and night: the bar split, the counts, the key */
.px-bar > span { display: flex; gap: 2px; background: none; }
.px-bar i, .px-k { display: block; height: 100%; border-radius: 2px; }
.px-bar i.day, .px-k.day { background: linear-gradient(90deg, #ffb020, var(--acc2)); }
.px-bar i.night, .px-k.night { background: linear-gradient(90deg, #8b5cf6, #5b6cff); }
.px-dn { display: flex; gap: 8px; justify-content: flex-end; margin-top: 2px; font-family: "Inter", sans-serif; font-size: .72rem; white-space: nowrap; }
.px-dn > span { display: inline-flex; align-items: center; gap: 3px; }
.px-dn .fa-sun { color: #ffb020; font-size: .66rem; }
.px-dn .fa-moon { color: #9b8cff; font-size: .66rem; }
.px-dn-key { display: flex; justify-content: center; gap: 16px; padding: 8px 14px; font-size: .74rem; color: var(--muted); }
.px-dn-key > span { display: inline-flex; align-items: center; gap: 6px; }
.px-k { width: 14px; height: 6px; }

/* ---- the channels ---- */
.px-channels { margin-top: 26px; }
.px-sec-h { display: flex; align-items: baseline; gap: 10px; }
.px-sec-h h2 { margin: 0; font-size: 1.3rem; font-weight: 700; }
.px-count { color: var(--muted); font-size: .85rem; font-family: "Inter", sans-serif; }
.px-search { display: flex; align-items: center; gap: 10px; height: 50px; padding: 0 16px; margin-top: 12px; border-radius: 16px;
  background: var(--card); border: 1px solid var(--line); color: var(--muted); }
.px-search:focus-within { border-color: rgba(255, 59, 71, .5); box-shadow: 0 0 0 3px var(--acc-soft); }
.px-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 16px; }
.px-chips { display: flex; gap: 8px; overflow-x: auto; padding: 12px 0 2px; scrollbar-width: none; }
.px-chips::-webkit-scrollbar { display: none; }
.px-chips button { flex: none; height: 38px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--card);
  font-size: .88rem; font-weight: 600; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; color: #d6d9e0; }
.px-chips button.on { background: #f4f5f8; border-color: #f4f5f8; color: #0b0c10; }
.px-chips button[data-f=fav] i { color: var(--acc); }

.px-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin-top: 12px; }
.px-ch { position: relative; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 18px; border: 1px solid var(--line);
  background: var(--card); text-align: start; width: 100%; transition: background .15s, border-color .15s, transform .1s; min-height: 76px; }
.px-ch:hover { background: var(--card-hi); }
.px-ch:active { transform: scale(.985); }
.px-ch.sel { border-color: rgba(255, 59, 71, .55); box-shadow: var(--glow); background: linear-gradient(135deg, rgba(255, 59, 71, .12), rgba(255, 138, 61, .04)); }
.px-ch-pic { position: relative; width: 56px; height: 56px; flex: none; }
.px-ch-pic .px-a { width: 56px; height: 56px; border-radius: 14px; object-fit: cover; background: #1c1f29; }
.px-ch-pic .px-l { position: absolute; bottom: -4px; inset-inline-end: -4px; width: 26px; height: 26px; border-radius: 8px; background: #fff;
  object-fit: contain; border: 2px solid var(--bg2); }
.px-ch-pic .px-l.none { display: none; }
.px-ch-name { font-weight: 700; font-size: .95rem; display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.px-ch-name .px-dot { flex: none; width: 6px; height: 6px; }
.px-ch-name .px-dot.off { background: #555b68; box-shadow: none; animation: none; }
.px-ch-song { font-size: .82rem; color: #d6d9e0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 3px; }
.px-ch-song.idle { color: var(--muted); }
.px-ch-heart { width: 40px; height: 40px; flex: none; border: 0; border-radius: 12px; background: transparent; color: var(--muted); font-size: 1.05rem; }
.px-ch-heart.on { color: var(--acc); }
.px-ch-heart:active { transform: scale(.85); }

.px-foot { text-align: center; color: var(--muted); font-size: .75rem; padding: 18px 16px calc(96px + env(safe-area-inset-bottom)); }

/* ---- the mini player ---- */
.px-mini { position: fixed; z-index: 40; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); max-width: 560px; margin: 0 auto;
  display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 8px; border-radius: 20px; border: 1px solid var(--line);
  background: rgba(20, 22, 30, .82); -webkit-backdrop-filter: blur(20px) saturate(1.5); backdrop-filter: blur(20px) saturate(1.5);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .5); cursor: pointer; animation: px-up .25s ease-out; }
@keyframes px-up { from { transform: translateY(20px); opacity: 0; } }
.px-mini img { width: 46px; height: 46px; border-radius: 12px; object-fit: cover; background: #1c1f29; }
.px-mini-t1 { font-weight: 700; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.px-mini-t2 { font-size: .78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.px-toast { position: fixed; z-index: 50; left: 50%; top: calc(70px + env(safe-area-inset-top)); transform: translate(-50%, -20px); opacity: 0;
  pointer-events: none; padding: 10px 16px; border-radius: 12px; background: #f4f5f8; color: #0b0c10; font-size: .88rem; font-weight: 600;
  transition: opacity .2s, transform .2s; max-width: calc(100vw - 32px); text-align: center; }
.px-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---- a wider screen ---- */
@media (min-width: 640px) {
  .px-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .px-layout { display: grid; grid-template-columns: 420px minmax(0, 1fr); gap: 48px; padding: 20px 24px 24px; align-items: start; }
  .px-side { position: sticky; top: 76px; max-height: calc(100vh - 92px); overflow-y: auto; scrollbar-width: none; border-radius: 28px; }
  .px-side::-webkit-scrollbar { display: none; }   /* scrolls by wheel and touch, no bar */
  .px-stage { border-radius: 28px; border: 1px solid var(--line); }
  .px-panel { padding: 0; }
  .px-channels { margin-top: 0; padding: 0; }
  .px-art-wrap { width: 240px; }
  .px-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .px-mini { display: none !important; }
  .px-chbtn { display: none; }
  .px-top { padding-inline: 24px; }
  .px-foot { padding-bottom: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* the brand's slogan, above the foot's line */
.px-slogan { font-weight: 700; font-size: .95rem; color: var(--text); margin-bottom: 6px; }

/* a long title cut at its end, whichever its language: an English title in a
   Hebrew card keeps its beginning; the line stays aligned as the card */
.px-ch-song, .px-t1, .px-t2, .px-mini-t1, .px-mini-t2 { unicode-bidi: plaintext; text-align: match-parent; }
.px-ch-name bdi { min-width: 0; overflow: hidden; text-overflow: ellipsis; unicode-bidi: plaintext; }
.px-ch { cursor: pointer; }

/* a channel box: its name, the song's title, the song's artist - each on its
   own line - beside a picture as tall as the three */
.px-ch-pic, .px-ch-pic .px-a { width: 72px; height: 72px; }
.px-ch-pic .px-a { border-radius: 16px; }
.px-ch-pic .px-l { width: 30px; height: 30px; }
.px-ch-artist { font-size: .8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px;
  unicode-bidi: plaintext; text-align: match-parent; }
html[dir="rtl"] :is(.px-ch-song, .px-ch-artist, .px-t1, .px-t2, .px-mini-t1, .px-mini-t2) { text-align: right; }
html[dir="ltr"] :is(.px-ch-song, .px-ch-artist, .px-t1, .px-t2, .px-mini-t1, .px-mini-t2) { text-align: left; }
/* over fonts.css (:root[dir] body): the scaled Latin first, in both directions */
:root[dir] body { font-family: "PxLatin", "Heebo", "Inter", system-ui, sans-serif; }

/* a box whose song just changed turns over slowly, whole, like a billboard
   panel tipping in from above on its level axis with the new song */
@keyframes px-billboard-v {
  0%   { transform: perspective(900px) rotateX(90deg); opacity: 0; }
  12%  { opacity: 1; }
  70%  { transform: perspective(900px) rotateX(-6deg); }
  85%  { transform: perspective(900px) rotateX(2deg); }
  100% { transform: perspective(900px) rotateX(0deg); opacity: 1; }
}
.px-ch.flipv { animation: px-billboard-v 2.6s cubic-bezier(.4, .05, .3, 1) both; will-change: transform, opacity; }
@media (prefers-reduced-motion: reduce) { .px-ch.flipv { animation: none; } }
