/* Mini player */
.mini {
  position: fixed; left: 10px; right: 10px; bottom: calc(var(--nav-h) + 18px + env(safe-area-inset-bottom)); z-index: 40;
  max-width: 700px; margin: 0 auto; height: var(--mini-h); border-radius: 20px; display: flex; align-items: center;
  gap: 4px; padding: 0 8px 0 8px; overflow: hidden; background: rgba(28, 28, 36, 0.72);
}
.mini-main { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; text-align: left; height: 100%; }
.mini .cover.sm { width: 46px; }
.mini .play-btn { background: var(--text); color: #000; }
.mini-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255, 255, 255, 0.1); }
.mini-bar i { display: block; height: 100%; width: 0; background: var(--accent); }

/* Full player: cahaya latar mengikuti warna cover lagu */
.full {
  --h: 140;
  position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; align-items: center; gap: 20px;
  padding: calc(14px + env(safe-area-inset-top)) 24px calc(24px + env(safe-area-inset-bottom));
  background:
    radial-gradient(90% 55% at 50% 0%, hsl(var(--h) 75% 38% / 0.65), transparent 72%),
    radial-gradient(60% 40% at 100% 100%, rgba(139, 60, 255, 0.28), transparent 70%),
    #0a0a0c;
  transform: translateY(102%); transition: transform 0.36s cubic-bezier(0.2, 0.8, 0.2, 1); overflow-y: auto; visibility: hidden;
}
.full.open { transform: none; visibility: visible; }
.full-head { width: 100%; max-width: 420px; display: flex; align-items: center; justify-content: space-between; font-weight: 700; font-size: 14px; color: var(--muted); }
.full-cover { margin-top: auto; }
.full-cover .cover.xl { width: min(320px, 76vw); transition: transform 0.4s; }
.full:not(.is-playing) .full-cover .cover.xl { transform: scale(0.92); }
.full-info { width: 100%; max-width: 420px; display: flex; align-items: center; gap: 8px; }
.full-info .meta b { font-size: 22px; font-weight: 800; letter-spacing: -0.01em; }
.full-info .meta > span { font-size: 15px; }
.full-info .icon { width: 44px; height: 44px; }
.seek { width: 100%; max-width: 420px; }
.times { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 4px; font-variant-numeric: tabular-nums; }

input[type='range'] { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: none; cursor: pointer; --p: 0%; }
input[type='range']::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--accent) var(--p), rgba(255, 255, 255, 0.2) var(--p)); }
input[type='range']::-moz-range-track { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.2); }
input[type='range']::-moz-range-progress { height: 4px; border-radius: 4px; background: var(--accent); }
input[type='range']::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: #fff; margin-top: -5px; }
input[type='range']::-moz-range-thumb { width: 14px; height: 14px; border: 0; border-radius: 50%; background: #fff; }

.controls { width: 100%; max-width: 420px; display: flex; align-items: center; justify-content: space-between; }
.controls .icon { width: 48px; height: 48px; color: var(--text); }
.controls .icon.on { color: var(--accent); }
.play-big { width: 68px; height: 68px; border-radius: 50%; background: var(--text); color: #000; display: grid; place-items: center; }
.vol { width: 100%; max-width: 420px; display: flex; align-items: center; gap: 10px; color: var(--muted); margin-bottom: auto; }
.vol input { flex: 1; }

/* Toast di atas layar saat pemutar penuh terbuka agar tidak menutupi kontrol */
body.no-scroll #toast { bottom: auto; top: calc(64px + env(safe-area-inset-top)); }

/* Lirik sinkron: menggantikan cover saat tombol lirik aktif */
.full-head .icon { width: 44px; height: 44px; }
.full-head #lyr-toggle[hidden] { display: grid; visibility: hidden; }
.full-head #lyr-toggle.on { color: var(--accent); }
.lyrics { display: none; }
.full.show-lyrics .full-cover { display: none; }
.full.show-lyrics .lyrics {
  display: block; flex: 1; min-height: 180px; width: 100%; max-width: 420px; overflow-y: auto; overscroll-behavior: contain;
  padding: 28vh 4px; scrollbar-width: none; text-align: left;
  -webkit-mask-image: linear-gradient(transparent, #000 18%, #000 82%, transparent);
  mask-image: linear-gradient(transparent, #000 18%, #000 82%, transparent);
}
.lyrics::-webkit-scrollbar { display: none; }
.lyrics p {
  margin: 0; padding: 9px 0; font-size: 24px; line-height: 1.3; font-weight: 800; letter-spacing: -0.01em;
  color: rgba(255, 255, 255, 0.32); transition: color 0.3s, transform 0.3s; transform-origin: left center; cursor: pointer;
}
.lyrics p.past { color: rgba(255, 255, 255, 0.24); }
.lyrics p.now { color: #fff; transform: scale(1.04); }
.lyrics p:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.lyrics.plain { padding: 8px 4px 24px; -webkit-mask-image: none; mask-image: none; }
.lyrics.plain p { font-size: 18px; font-weight: 600; color: rgba(255, 255, 255, 0.85); cursor: default; padding: 6px 0; }
