:root {
  color-scheme: dark;
  --bg: #0a0b0d;
  --panel: rgba(20, 22, 27, .66);
  --panel-2: rgba(30, 33, 40, .78);
  --line: rgba(255, 255, 255, .16);
  --text: #eceef1;
  --muted: #8d95a1;
  --pink: #e2b366;
  --pink-2: #f0cf95;
  --purple: #8b93a1;
  --green: #4ade80;
  --red: #f87171;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  background: transparent;
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  min-height: 100vh;
  padding: 24px 16px 60px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ============ AMBIENT BACKGROUND ============ */
/* Pure CSS: tanpa request gambar, aman untuk banyak user bersamaan. */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background: linear-gradient(168deg, #101216 0%, #0a0b0d 44%, #07080a 100%);
}

.bg-orb {
  position: absolute;
  border-radius: 50%;
  will-change: transform;
}

.bg-orb-1 {
  width: 68vmax; height: 68vmax;
  left: -20vmax; top: -24vmax;
  background: radial-gradient(circle at 50% 50%,
    rgba(226, 179, 102, .34), rgba(226, 179, 102, .10) 45%, transparent 72%);
  animation: bgFloat1 26s ease-in-out infinite alternate;
}
.bg-orb-2 {
  width: 60vmax; height: 60vmax;
  right: -18vmax; top: -10vmax;
  background: radial-gradient(circle at 50% 50%,
    rgba(139, 147, 161, .30), rgba(139, 147, 161, .09) 45%, transparent 72%);
  animation: bgFloat2 32s ease-in-out infinite alternate;
}
.bg-orb-3 {
  width: 74vmax; height: 74vmax;
  left: 22vmax; bottom: -36vmax;
  background: radial-gradient(circle at 50% 50%,
    rgba(226, 179, 102, .26), rgba(226, 179, 102, .08) 46%, transparent 72%);
  animation: bgFloat3 38s ease-in-out infinite alternate;
}
.bg-orb-4 {
  width: 44vmax; height: 44vmax;
  right: 8vmax; bottom: -18vmax;
  background: radial-gradient(circle at 50% 50%,
    rgba(74, 222, 128, .14), transparent 68%);
  animation: bgFloat1 44s ease-in-out infinite alternate-reverse;
}

@keyframes bgFloat1 {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(6vmax, 5vmax, 0) scale(1.14); }
}
@keyframes bgFloat2 {
  from { transform: translate3d(0, 0, 0) scale(1.1); }
  to   { transform: translate3d(-7vmax, 6vmax, 0) scale(1); }
}
@keyframes bgFloat3 {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(5vmax, -6vmax, 0) scale(1.12); }
}

.bg-grain {
  position: absolute;
  inset: 0;
  opacity: .18;
  mix-blend-mode: overlay;
  background-size: 140px 140px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.bg-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(125% 90% at 50% 0%, transparent 38%, rgba(4, 2, 10, .6) 100%);
}

.bg-topline {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent, rgba(226, 179, 102, .6), rgba(139, 147, 161, .55), transparent);
}

@media (prefers-reduced-motion: reduce) {
  .bg-orb { animation: none !important; }
  html { scroll-behavior: auto; }
}

/* scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(139, 147, 161, .28);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(226, 179, 102, .45);
  background-clip: content-box;
}

.wrap { max-width: 1080px; margin: 0 auto; position: relative; z-index: 1; }

/* header */
.top {
  display: flex; flex-wrap: wrap; gap: 16px;
  align-items: center; justify-content: space-between;
  margin-bottom: 26px;
}
.brand { display: flex; align-items: center; gap: 14px; }
.logo {
  font-size: 30px; width: 56px; height: 56px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  border-radius: 18px; box-shadow: 0 8px 24px rgba(226,179,102,.35);
}
.brand h1 {
  font-size: 22px; letter-spacing: .3px;
  background: linear-gradient(92deg, #fff 18%, #ffc9e2 58%, #c9a6ff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand p { color: var(--muted); font-size: 13px; margin-top: 2px; }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab {
  background: var(--panel); color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 9px 18px; font-size: 14px; cursor: pointer;
  transition: .18s;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.tab:hover { color: var(--text); border-color: var(--pink); }
.tab.active {
  background: linear-gradient(135deg, var(--pink), var(--purple));
  color: #fff; border-color: transparent; font-weight: 600;
  box-shadow: 0 6px 18px rgba(226,179,102,.3);
}

/* panel */
.panel { animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; } }
.hidden { display: none !important; }

.sec-title {
  font-size: 17px; margin: 22px 0 12px;
  display: flex; align-items: center; gap: 8px;
}
.badge {
  background: var(--pink); color: #fff; font-size: 12px;
  padding: 2px 9px; border-radius: 999px; font-weight: 700;
}

/* search */
.searchbar { display: flex; gap: 8px; margin-bottom: 14px; }
input[type=text] {
  flex: 1; background: var(--panel); border: 1px solid var(--line);
  color: var(--text); border-radius: 12px; padding: 12px 16px; font-size: 14px;
  outline: none; transition: .18s;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
input[type=text]::placeholder { color: rgba(163,150,180,.7); }
input[type=text]:focus { border-color: var(--pink); box-shadow: 0 0 0 3px rgba(226,179,102,.15); }

.btn {
  background: var(--panel-2); color: var(--text);
  border: 1px solid var(--line); border-radius: 12px;
  padding: 11px 18px; font-size: 14px; cursor: pointer; transition: .18s;
  white-space: nowrap;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.btn:hover { border-color: var(--pink); transform: translateY(-1px); }
.btn.primary {
  background: linear-gradient(135deg, var(--pink), var(--purple));
  border-color: transparent; font-weight: 600; color: #fff;
  box-shadow: 0 6px 18px rgba(226,179,102,.28);
}
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.quick { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.chip {
  background: var(--panel); border: 1px solid var(--line);
  color: var(--pink-2); border-radius: 999px; padding: 7px 15px;
  font-size: 13px; cursor: pointer; transition: .18s;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.chip:hover { background: var(--panel-2); border-color: var(--pink); }

/* list */
.list { display: flex; flex-direction: column; gap: 8px; }
.row {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; padding: 12px 14px;
  display: flex; align-items: center; gap: 13px; transition: .18s;
}
.row:hover { border-color: rgba(226,179,102,.55); background: var(--panel-2); }
.thumb {
  width: 54px; height: 54px; border-radius: 10px; object-fit: cover;
  background: #241b30; flex-shrink: 0;
}
.thumb.ph { display: grid; place-items: center; font-size: 22px; }
.meta { flex: 1; min-width: 0; }
.title { font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sub { font-size: 12.5px; color: var(--muted); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tags { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.tag {
  font-size: 11px; color: var(--muted); background: rgba(36, 27, 48, .7);
  border: 1px solid var(--line); border-radius: 6px; padding: 2px 7px;
}

.dl-btn { flex-shrink: 0; }

/* pemilih resolusi MP4 (muncul di dalam .row) */
.row { flex-wrap: wrap; }
.res-pick {
  flex-basis: 100%; width: 100%;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 6px; padding: 9px 12px;
  background: rgba(255,255,255,.03); border: 1px dashed var(--line);
  border-radius: 10px;
}
.rp-label { font-size: 12.5px; color: var(--muted); }
.rp-label.err { color: var(--red); }
.rp-select {
  background: var(--panel-2); color: var(--text);
  border: 1px solid var(--line); border-radius: 9px;
  padding: 8px 10px; font-size: 13px; outline: none; cursor: pointer;
}
.rp-select:focus { border-color: var(--pink); }
.rp-go, .rp-cancel { padding: 8px 14px; font-size: 13px; }

/* progress */
.prog { min-width: 190px; }
.bar { height: 6px; background: rgba(43, 34, 55, .8); border-radius: 999px; overflow: hidden; }
.bar > i {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--pink), var(--purple));
  transition: width .3s;
}
.pstat { font-size: 11.5px; color: var(--muted); margin-top: 5px; display: flex; justify-content: space-between; gap: 8px; }
.pstat .ok { color: var(--green); }
.pstat .err { color: var(--red); }

/* grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 15px; cursor: pointer; transition: .18s;
}
.card:hover { border-color: var(--pink); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,.35); }
.card .cname { font-size: 14px; font-weight: 600; }
.card .csub { font-size: 12px; color: var(--muted); margin-top: 4px; }

.pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 18px; }
.pager span { color: var(--muted); font-size: 13px; }

/* header detail (mis. daftar lagu satu artis) */
.detail-head {
  display: flex; align-items: center; gap: 14px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; padding: 12px 14px; margin-bottom: 10px;
}
.detail-head .meta { text-align: right; }
.back-btn { flex-shrink: 0; }
.back-btn:hover { border-color: var(--pink); transform: translateX(-2px); }

.lib-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* grup folder di library (per artis / per playlist) */
.lib-group { margin-bottom: 18px; }
.lib-group-head {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700; letter-spacing: .03em;
  color: var(--text); margin: 14px 0 8px;
  padding-bottom: 6px; border-bottom: 1px solid rgba(255,255,255,.08);
}

/* catatan info di atas hasil */
.hint {
  color: var(--muted); font-size: 12.5px; margin: 0 0 14px;
  padding: 8px 12px; border-left: 2px solid var(--pink);
  background: rgba(255,255,255,.02); border-radius: 0 8px 8px 0;
}
/* judul sub-seksi di hasil pencarian */
.sub-head {
  font-size: 12px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--pink);
  margin: 18px 0 10px;
}
.sub-head:first-child { margin-top: 4px; }

audio { width: 100%; margin-top: 8px; }

/* toast */
.toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
  background: var(--panel-2); border: 1px solid var(--pink);
  padding: 11px 22px; border-radius: 999px; font-size: 13.5px;
  box-shadow: 0 10px 30px rgba(0,0,0,.45); z-index: 99;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.toast.err { border-color: var(--red); }

/* ================= PLAYER ================= */
#pl-bar {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 380px;
  max-width: calc(100vw - 32px);
  background: linear-gradient(135deg, rgba(30, 25, 45, .97), rgba(20, 18, 30, .99));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(226, 179, 102, .2);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0,0,0,.55), 0 0 0 1px rgba(226,179,102,.08);
  overflow: hidden;
  transition: width .3s cubic-bezier(0.4, 0, 0.2, 1), border-radius .3s;
}

/* Mini player collapsed state - hanya cover + title + play/pause */
#pl-bar.collapsed {
  width: 300px;
  border-radius: 50px;
}
#pl-bar.collapsed .pl-mid,
#pl-bar.collapsed .pl-right,
#pl-bar.collapsed .pl-seekrow,
#pl-bar.collapsed .pl-controls,
#pl-bar.collapsed .pl-type {
  display: none;
}
#pl-bar.collapsed .pl-left {
  width: 100%;
  padding: 8px 12px 8px 8px;
}
#pl-bar.collapsed .pl-media {
  width: 44px;
  height: 44px;
}
#pl-bar.collapsed .pl-info {
  flex: 1;
}
#pl-bar.collapsed .pl-expand-btn {
  display: flex;
}

/* Expand button (only visible when collapsed) */
.pl-expand-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(226, 179, 102, .15);
  color: var(--pink);
  border: 1px solid rgba(226, 179, 102, .3);
  cursor: pointer;
  transition: all .2s;
  flex-shrink: 0;
}
.pl-expand-btn:hover {
  background: rgba(226, 179, 102, .25);
  transform: scale(1.06);
}

/* Header row with expand/collapse + close */
.pl-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px 4px;
  border-bottom: 1px solid rgba(226, 179, 102, .1);
}
.pl-header-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.pl-header-actions {
  display: flex;
  gap: 4px;
}
.pl-header-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
}
.pl-header-btn:hover {
  background: rgba(226, 179, 102, .12);
  color: var(--text);
}
.pl-header-btn svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Collapsed: hide header */
#pl-bar.collapsed .pl-header {
  display: none;
}

body { padding-bottom: 0; }

/* SVG icons */
.pl-btn svg, .q-btn svg, .icon svg {
  width: 18px; height: 18px; display: block;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}
.pl-btn.play svg { width: 20px; height: 20px; }
.pl-btn.play svg polygon, .pl-btn.play svg rect { fill: currentColor; stroke: none; }

.pl-left {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  min-width: 0;
}

.pl-media {
  position: relative;
  width: 56px; height: 56px;
  border-radius: 10px;
  overflow: hidden;
  background: #241b30;
  border: 1px solid rgba(226, 179, 102, .2);
  box-shadow: 0 4px 14px rgba(0,0,0,.4);
  flex-shrink: 0;
}

.pl-cover, .pl-video {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

.pl-video {
  background: #000;
  cursor: pointer;
}

.pl-media:hover .pl-video {
  filter: brightness(1.2);
}

.pl-cover, .pl-video {
  transition: opacity .3s, filter .2s;
}

.pl-info {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pl-type {
  font-size: 10px;
  color: var(--pink);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.85;
  margin-top: 2px;
}
#pl-title {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}
#pl-artist {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
  margin-top: 1px;
}

.pl-mid {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 0 12px 12px;
}
.pl-controls { display: flex; align-items: center; gap: 6px; }
.pl-btn {
  position: relative;
  background: none; border: none; color: var(--muted);
  cursor: pointer; padding: 8px; border-radius: 10px;
  transition: color .15s, background .15s, transform .12s;
  display: grid; place-items: center;
}
.pl-btn:hover {
  color: var(--text);
  background: rgba(226, 179, 102, .15);
  border-color: rgba(226, 179, 102, .35);
  transform: scale(1.06);
  box-shadow: 0 4px 16px rgba(226, 179, 102, .15);
}
.pl-btn:active { transform: scale(.92); transition-duration: .1s; }
.pl-btn.on { color: var(--pink); background: rgba(226,179,102,.12); }
.pl-btn:disabled { opacity: .3; cursor: not-allowed; background: none; transform: none; }
.pl-btn.play {
  background: linear-gradient(135deg, var(--pink), var(--purple));
  color: #fff; width: 42px; height: 42px; border-radius: 50%;
  margin: 0 4px;
  box-shadow: 0 5px 18px rgba(226,179,102,.35);
}
.pl-btn.play:hover {
  filter: brightness(1.12);
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(226, 179, 102, .45);
}
.pl-btn.play:disabled { opacity: .45; }

/* badge "1" untuk repeat one */
.ic-badge {
  position: absolute; right: 2px; bottom: 1px;
  font-size: 8.5px; font-weight: 700; line-height: 1;
  color: var(--pink); background: #241b30;
  border-radius: 3px; padding: 1px 2px;
}

.pl-seekrow {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 2px 0;
}
.pl-seekrow span {
  font-size: 11px;
  color: var(--muted);
  min-width: 42px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

input[type=range] {
  -webkit-appearance: none; appearance: none;
  height: 6px; border-radius: 999px;
  background: linear-gradient(90deg, rgba(226,179,102,.3), rgba(58,46,72,.7));
  outline: none; flex: 1;
  transition: background .2s;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 15px; height: 15px; border-radius: 50%;
  background: var(--pink); cursor: pointer;
  box-shadow: 0 0 0 4px rgba(226,179,102,.2), 0 2px 8px rgba(226,179,102,.35);
  transition: transform .15s;
}
input[type=range]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 0 0 5px rgba(226,179,102,.25), 0 4px 16px rgba(226,179,102,.5);
}
input[type=range]::-moz-range-thumb {
  width: 14px; height: 14px; border: none; border-radius: 50%;
  background: var(--pink); cursor: pointer;
  box-shadow: 0 0 0 4px rgba(226,179,102,.2), 0 2px 8px rgba(226,179,102,.35);
}

.pl-right {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px 12px;
  justify-content: flex-end;
}
.pl-right input[type=range] { width: 100px; }

/* queue panel */
#pl-queue {
  position: fixed; right: 0; top: 0; bottom: 96px; width: 340px; z-index: 79;
  background: rgba(20, 16, 28, .96);
  border-left: 1px solid var(--line);
  transform: translateX(100%); transition: transform .26s ease;
  display: flex; flex-direction: column;
  box-shadow: -14px 0 40px rgba(0,0,0,.4);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
#pl-queue.open { transform: translateX(0); }
.q-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 16px; border-bottom: 1px solid var(--line);
}
.q-head-txt h3 { font-size: 15px; }
.q-count { font-size: 11.5px; color: var(--muted); }
.q-head-actions { display: flex; gap: 4px; }
.q-btn {
  background: none; border: none; color: var(--muted); cursor: pointer;
  padding: 6px; border-radius: 8px; transition: .15s;
  display: grid; place-items: center;
}
.q-btn:hover { color: var(--text); background: rgba(42,33,54,.75); }
#pl-queue-list { flex: 1; overflow-y: auto; padding: 8px; }
.q-empty { text-align: center; color: var(--muted); font-size: 13px; padding: 28px 0; }
.q-item {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 8px; border-radius: 10px; cursor: pointer; transition: .15s;
}
.q-item:hover { background: var(--panel-2); }
.q-item.playing { background: rgba(226,179,102,.12); }
.q-idx { width: 18px; text-align: center; font-size: 11.5px; color: var(--muted); }
.q-item.playing .q-idx { color: var(--pink); }
.q-cover { width: 34px; height: 34px; border-radius: 7px; object-fit: cover; background: #241b30; flex-shrink: 0; }
.q-meta { flex: 1; min-width: 0; }
.q-title { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-sub { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-item .q-btn { padding: 4px; opacity: 0; }
.q-item .q-btn svg { width: 14px; height: 14px; }
.q-item:hover .q-btn { opacity: 1; }

/* playlist cards */
.pl-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px; cursor: pointer; transition: .18s; position: relative;
}
.pl-card:hover { border-color: var(--pink); transform: translateY(-2px); }
.pl-card .pl-cname { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.pl-card .pl-csub { font-size: 12px; color: var(--muted); }
.pl-card .pl-del {
  position: absolute; top: 8px; right: 8px;
  background: none; border: none; color: var(--muted); cursor: pointer;
  opacity: 0; transition: .15s; font-size: 13px;
}
.pl-card:hover .pl-del { opacity: 1; }
.pl-card .pl-del:hover { color: var(--red); }

.lib-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.topbar { margin: -12px 0 18px; }
.topbar .picker { max-width: 260px; }
.picker {
  background: var(--panel-2); color: var(--text); border: 1px solid var(--line);
  border-radius: 12px; padding: 10px 12px; font-size: 13px; outline: none;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

@media (max-width: 860px) {
  #pl-bar {
    right: 8px;
    bottom: 8px;
    width: calc(100vw - 16px);
    max-width: 360px;
  }
  #pl-bar.collapsed {
    width: 280px;
  }
  .pl-media { width: 48px; height: 48px; }
  .pl-btn.play { width: 38px; height: 38px; }
  .pl-btn { padding: 6px; }
  .pl-media { width: 52px; height: 52px; }
  .pl-btn.play { width: 40px; height: 40px; }
  #pl-queue { width: 100%; bottom: 150px; }
}

.spin { display: inline-block; animation: rot 1s linear infinite; }
@keyframes rot { to { transform: rotate(360deg); } }

@media (max-width: 640px) {
  .top { flex-direction: column; align-items: stretch; }
  .tabs { justify-content: center; }
  .row { flex-wrap: wrap; }
  .prog { min-width: 100%; }
  .bg-orb-3 { display: none; }
  .detail-head { flex-wrap: wrap; }
  .detail-head .meta { text-align: left; }
  .detail-head .back-btn { width: 100%; }
}


/* ===== Player bar mode video: area media diperbesar ===== */
#pl-bar.has-video {
  width: 470px;
}

#pl-bar.has-video .pl-media {
  width: 230px;
  height: 130px;
  border-radius: 12px;
}

#pl-bar.has-video .pl-video {
  object-fit: contain;
  background: #000;
}

#pl-bar.has-video.collapsed {
  width: 300px;
}

#pl-bar.has-video.collapsed .pl-media {
  width: 48px;
  height: 48px;
  border-radius: 10px;
}

@media (max-width: 560px) {
  #pl-bar.has-video { width: calc(100vw - 32px); }
  #pl-bar.has-video .pl-media { width: 100%; height: 180px; }
}


/* ============================================================
   Player v2: frame video besar + ukuran bisa di-adjust + reopen pill
   ============================================================ */

/* --- video: jadi frame 16:9 di dalam player --- */
#pl-bar.has-video {
  width: var(--pl-vw, 560px);
  max-width: calc(100vw - 32px);
}

#pl-bar.has-video .pl-left {
  flex-direction: column;
  align-items: stretch;
}

#pl-bar.has-video .pl-media {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
}

#pl-bar.has-video .pl-video {
  object-fit: contain;
  background: #000;
}

#pl-bar.has-video .pl-info {
  margin-top: 10px;
}

#pl-bar.has-video .pl-expand-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 4;
}

/* --- mode teater (besar, ala YouTube) --- */
#pl-bar.video-large {
  width: min(980px, 94vw);
  right: 50%;
  transform: translateX(50%);
  bottom: 20px;
}

#pl-bar.video-large .pl-media {
  aspect-ratio: 16 / 9;
}

#pl-bar.video-large .pl-video {
  object-fit: contain;
}

/* --- collapsed tetap kecil walau mode video --- */
#pl-bar.has-video.collapsed {
  width: 300px;
}

#pl-bar.has-video.collapsed .pl-left {
  flex-direction: row;
  align-items: center;
}

#pl-bar.has-video.collapsed .pl-media {
  width: 48px;
  height: 48px;
  aspect-ratio: auto;
}

#pl-bar.has-video.collapsed .pl-info {
  margin-top: 0;
}

/* --- handle drag untuk ubah lebar --- */
.pl-resize {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 20px;
  height: 20px;
  cursor: ew-resize;
  display: none;
  background: linear-gradient(135deg, transparent 48%, rgba(226, 179, 102, .85) 48%, rgba(226, 179, 102, .85) 62%, transparent 62%);
  border-bottom-right-radius: 10px;
  touch-action: none;
}

#pl-bar.has-video:not(.collapsed) .pl-resize {
  display: block;
}

/* --- pill kecil untuk buka lagi player --- */
.pl-reopen {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: 280px;
  padding: 9px 16px 9px 11px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(30, 25, 45, .98), rgba(20, 18, 30, .99));
  border: 1px solid rgba(226, 179, 102, .3);
  color: #e8e3f2;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  box-shadow: 0 12px 34px rgba(0, 0, 0, .55);
  animation: pl-pop .18s ease-out;
}

.pl-reopen:hover {
  border-color: rgba(226, 179, 102, .7);
}

.pl-reopen svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: #e2b366;
}

.pl-reopen span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@keyframes pl-pop {
  from { opacity: 0; transform: translateY(10px) scale(.96); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 560px) {
  #pl-bar.has-video { width: calc(100vw - 32px); }
  #pl-bar.video-large { width: calc(100vw - 16px); bottom: 8px; }
}

/* ============================================================
   FIX: <video id="video"> & <audio id="audio"> hanya player
   sinkronisasi (duplikat) -> harus hidden supaya video tidak
   bocor tampil gede di belakang daftar lagu.
   ============================================================ */
#audio,
#video {
  display: none !important;
}

/* ============================================================
   FIX: mode video-large jangan sampai header (tombol shrink)
   kelewat layar. Tinggi dibatasi + bisa di-scroll.
   ============================================================ */
#pl-bar.video-large {
  max-height: calc(100vh - 24px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

#pl-bar.video-large .pl-media {
  aspect-ratio: 16 / 9;
  max-height: 55vh;
}

#pl-bar.video-large .pl-video {
  height: 100%;
  width: 100%;
  object-fit: contain;
}

#pl-bar.video-large .pl-header {
  position: sticky;
  top: 0;
  z-index: 6;
  background: linear-gradient(135deg, rgba(30, 25, 45, .98), rgba(20, 18, 30, .99));
  backdrop-filter: blur(12px);
}


/* ============================================================
   ETERNA BAND THEME - minimal, elegant, dark + gold
   ============================================================ */
:root {
  --bg: #0a0b0d;
  --panel: rgba(20, 22, 27, .72);
  --panel-2: rgba(30, 33, 40, .82);
  --line: rgba(255, 255, 255, .08);
  --text: #eceef1;
  --muted: #8d95a1;
  --pink: #e2b366;
  --pink-2: #f0cf95;
  --purple: #8b93a1;
}

body {
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  letter-spacing: .005em;
}

.bg {
  background: linear-gradient(168deg, #101216 0%, #0a0b0d 46%, #07080a 100%);
}

/* orb dikecilin biar elegan, gak norak */
.bg-orb-1 {
  background: radial-gradient(circle at 50% 50%,
    rgba(226, 179, 102, .15), rgba(226, 179, 102, .04) 45%, transparent 72%);
}
.bg-orb-2 {
  background: radial-gradient(circle at 50% 50%,
    rgba(139, 147, 161, .12), rgba(139, 147, 161, .03) 45%, transparent 72%);
}
.bg-orb-3 {
  background: radial-gradient(circle at 50% 50%,
    rgba(226, 179, 102, .09), rgba(226, 179, 102, .02) 46%, transparent 72%);
}
.bg-orb-4 {
  background: radial-gradient(circle at 50% 50%,
    rgba(122, 180, 160, .07), transparent 68%);
}

/* brand */
.brand {
  align-items: center;
  gap: 14px;
}

.brand .logo {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: linear-gradient(160deg, rgba(226, 179, 102, .20), rgba(226, 179, 102, .03));
  border: 1px solid rgba(226, 179, 102, .30);
  color: #e2b366;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .06);
  font-size: 0;
}

.brand .logo svg {
  width: 23px;
  height: 23px;
  display: block;
}

.brand h1 {
  font-size: 1.32rem;
  font-weight: 650;
  letter-spacing: -.015em;
  color: #f5f6f8;
}

.brand p {
  color: #8d95a1;
  font-size: .82rem;
  margin-top: 2px;
}

/* tombol & input lebih kalem */
.btn {
  border-radius: 10px;
  transition: background .16s ease, border-color .16s ease, transform .12s ease;
}

.btn.primary {
  background: linear-gradient(180deg, #e8bf7a, #d8a755);
  border-color: transparent;
  color: #17130c;
  font-weight: 600;
}

.btn.primary:hover {
  filter: brightness(1.06);
}

.tab {
  border-radius: 9px;
  transition: background .15s ease, color .15s ease;
}

.tab.active {
  background: rgba(226, 179, 102, .14);
  color: #f0cf95;
}

.chip {
  border-radius: 999px;
}

.row {
  border-radius: 12px;
  border-color: rgba(255, 255, 255, .06);
  transition: background .15s ease, border-color .15s ease;
}

.row:hover {
  border-color: rgba(226, 179, 102, .38);
  background: rgba(30, 33, 40, .9);
}

/* player bar elegan */
#pl-bar {
  border-color: rgba(255, 255, 255, .07);
  background: linear-gradient(160deg, rgba(24, 26, 31, .98), rgba(16, 18, 21, .99));
  box-shadow: 0 18px 48px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .04);
}

.pl-btn.on {
  color: #e2b366;
  background: rgba(226, 179, 102, .14);
}

.pl-reopen {
  background: linear-gradient(160deg, rgba(24, 26, 31, .98), rgba(16, 18, 21, .99));
  border-color: rgba(226, 179, 102, .32);
}

.pl-reopen svg { color: #e2b366; }

/* scrollbar halus */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, .12);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, .22); background-clip: content-box; }
