/* ============================== Global player ============================== */
zz-player { display: contents; }
.player {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; height: var(--player-h);
  display: grid; grid-template-columns: minmax(220px, 1fr) minmax(320px, 1.4fr) minmax(220px, 1fr); align-items: center; gap: var(--s-6);
  padding: 0 var(--s-6);
  background: var(--glass-strong); backdrop-filter: saturate(160%) blur(24px); -webkit-backdrop-filter: saturate(160%) blur(24px);
  border-top: 1px solid var(--line);
  transform: translateY(110%); transition: transform var(--t-slow) var(--ease);
}
.player.is-visible { transform: none; }
.player-now { display: flex; align-items: center; gap: var(--s-3); min-width: 0; }
.player-now .art { width: 56px; border-radius: var(--r-sm); box-shadow: var(--shadow-1); }
.player-meta { min-width: 0; }
.player-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: var(--fs-md); }
.player-sub { font-size: var(--fs-sm); color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; gap: 6px; align-items: center; }
.player-sub a:hover { text-decoration: underline; }
.player-center { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.player-controls { display: flex; align-items: center; gap: var(--s-2); }
.player-play {
  width: 44px; height: 44px; border-radius: 50%; background: var(--text); color: var(--text-inverse);
  display: grid; place-items: center; transition: transform var(--t-fast);
}
.player-play:hover { transform: scale(1.06); }
.player-play svg { width: 20px; height: 20px; }
.player-play.is-buffering svg { animation: spin 1s linear infinite; }
.player-timeline { display: flex; align-items: center; gap: var(--s-3); width: 100%; font-size: 11px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.player-timeline .time { min-width: 42px; text-align: center; }
.range {
  -webkit-appearance: none; appearance: none; flex: 1; height: 4px; border-radius: 999px; cursor: pointer;
  background: linear-gradient(to right, var(--text) var(--pct, 0%), var(--surface-3) var(--pct, 0%));
}
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; background: var(--text); opacity: 0; transition: opacity var(--t-fast); }
.range:hover::-webkit-slider-thumb, .range:focus-visible::-webkit-slider-thumb { opacity: 1; }
.range::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: var(--text); }
.range:hover { background: linear-gradient(to right, var(--ember) var(--pct, 0%), var(--surface-3) var(--pct, 0%)); }
.range[disabled] { cursor: default; }

.live-bar { display: flex; align-items: center; gap: var(--s-3); width: 100%; font-size: var(--fs-xs); color: var(--text-3); }
.live-bar .live-track { flex: 1; height: 4px; background: var(--surface-3); border-radius: 999px; overflow: hidden; position: relative; }
.live-bar .live-track span { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, var(--onair), var(--ember)); border-radius: inherit; }
.onair-chip { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; letter-spacing: 0.08em; font-size: 10px; color: var(--onair); text-transform: uppercase; }
.onair-chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--onair); box-shadow: 0 0 0 0 rgba(255, 45, 85, 0.6); animation: ring 1.6s infinite; }
@keyframes ring { 0% { box-shadow: 0 0 0 0 rgba(255, 45, 85, 0.55); } 70% { box-shadow: 0 0 0 8px rgba(255, 45, 85, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 45, 85, 0); } }
.btn-return-live { height: 26px; padding: 0 10px; font-size: 11px; border-radius: 999px; background: var(--onair-soft); color: var(--onair); font-weight: 700; }

.player-right { display: flex; align-items: center; justify-content: flex-end; gap: var(--s-1); }
.player-volume { display: flex; align-items: center; gap: var(--s-2); width: 140px; }
.speed-btn { min-width: 44px; height: 30px; border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--text-2); background: var(--surface-2); }
.player-next { font-size: var(--fs-xs); color: var(--text-3); max-width: 200px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-video {
  position: fixed; right: var(--s-6); bottom: calc(var(--player-h) + var(--s-4)); z-index: 65; width: min(420px, 40vw);
  border-radius: var(--r-lg); overflow: hidden; background: #000; box-shadow: var(--shadow-3); border: 1px solid var(--line-strong);
}
.player-video video { width: 100%; aspect-ratio: 16 / 9; background: #000; }
.player-video .pv-head { position: absolute; top: 8px; left: 8px; right: 8px; display: flex; justify-content: space-between; align-items: center; z-index: 2; }

@media (max-width: 1100px) {
  .player { grid-template-columns: 1fr auto; gap: var(--s-3); }
  .player-center { display: contents; }
  .player-center .player-timeline, .player-center .live-bar { display: none; }
  .player-right .player-volume, .player-right .player-next, .player-right .hide-tablet { display: none; }
  .player-right { order: 3; }
}
@media (max-width: 720px) {
  .player { grid-template-columns: minmax(0, 1fr) auto auto; }
  .player-right > :not(.player-close) { display: none !important; }
  .player { bottom: calc(var(--bottomnav-h) + env(safe-area-inset-bottom)); height: 64px; left: 8px; right: 8px; border-radius: var(--r-md); border: 1px solid var(--line-strong); padding: 0 var(--s-3); box-shadow: var(--shadow-2); }
  .player-now .art { width: 44px; }
  .player-play { width: 38px; height: 38px; }
  .player-controls .hide-mobile, .player-right .hide-mobile { display: none; }
  .player::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 0; height: 2px; background: linear-gradient(to right, var(--ember) var(--mini-pct, 0%), transparent var(--mini-pct, 0%)); }
  .player-video { right: var(--s-3); left: var(--s-3); width: auto; bottom: calc(var(--bottomnav-h) + 84px); }
}

.p2p-chip { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 9px; border-radius: 999px; background: var(--mint-soft); color: var(--mint); font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; cursor: help; }
.p2p-chip svg { width: 13px; height: 13px; }

/* Queue drawer */
.queue-drawer { position: fixed; right: var(--s-4); bottom: calc(var(--player-h) + var(--s-3)); width: min(380px, calc(100vw - 32px)); max-height: 60vh; overflow: auto; z-index: 75; padding: var(--s-4); }
