/* ============ dmusic — style.css ============ */
:root {
  --bg: #09090b;
  --panel: #111114;
  --card: #17171b;
  --line: #26262c;
  --pink: #ff3d81;
  --pink-2: #d61f69;
  --purple: #a21caf;
  --text: #ffffff;
  --muted: #a1a1aa;
  --radius: 16px;
  --bar-h: 88px;
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html,
body {
  height: 100%;
}
body {
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter,
    "Segoe UI",
    system-ui,
    -apple-system,
    Roboto,
    Arial,
    sans-serif;
  font-size: 14px;
  line-height: 1.4;
  overflow: hidden;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}
input {
  font: inherit;
  color: inherit;
}
small,
.small {
  font-size: 12px;
}
.muted {
  color: var(--muted);
}
[hidden] {
  display: none !important;
}

.ic {
  width: 20px;
  height: 20px;
  flex: none;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Layout ---------- */
#app {
  display: grid;
  height: 100vh;
  height: 100dvh;
  grid-template-columns: 240px minmax(0, 1fr) 290px;
  grid-template-rows: minmax(0, 1fr) var(--bar-h);
  grid-template-areas: "side main right" "bar bar bar";
}
#sidebar {
  grid-area: side;
}
#main {
  grid-area: main;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}
#rightbar {
  grid-area: right;
}
#playerbar {
  grid-area: bar;
}

/* ---------- Sidebar ---------- */
#sidebar {
  background: var(--bg);
  padding: 28px 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  border-right: 1px solid #16161a;
}
.logo {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.3px;
  margin-bottom: 18px;
  display: inline-block;
}
.logo span {
  color: var(--pink);
}
.logo.big {
  font-size: 34px;
  text-align: center;
  display: block;
}
#sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}
.side-title {
  color: var(--muted);
  font-size: 13px;
  margin: 18px 0 8px;
}
#sidebar nav > a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 10px;
  border-radius: 12px;
  font-size: 15px;
  color: #e4e4e7;
  transition: 0.15s;
}
#sidebar nav > a:hover {
  background: #18181c;
}
#sidebar nav > a.active {
  color: var(--pink);
  background: rgba(255, 61, 129, 0.1);
}
#sidebar nav > a.active .ic {
  stroke: var(--pink);
}
.side-pl {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 10px;
  color: #e4e4e7;
  border-radius: 10px;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.side-pl:hover {
  background: #18181c;
}
.side-pl i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
}
.link-pink {
  color: var(--pink);
  font-size: 15px;
  text-align: left;
  padding: 14px 10px 6px;
}
.link-pink:hover {
  text-decoration: underline;
}
#side-user {
  padding-top: 12px;
}
.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 12px;
  background: var(--card);
}
.user-chip span:last-child {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.user-chip b,
.user-chip small {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-chip small {
  color: var(--muted);
}
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  display: inline-grid;
  place-items: center;
  font-weight: 700;
  flex: none;
}

/* ---------- Topbar ---------- */
#topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px 28px 10px;
}
#search-form {
  flex: 1;
  max-width: 520px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #18181c;
  border-radius: 999px;
  padding: 0 18px;
  height: 46px;
  border: 1px solid transparent;
}
#search-form:focus-within {
  border-color: var(--pink);
}
#search-form .ic {
  color: var(--muted);
}
#search-input {
  flex: 1;
  background: none;
  border: 0;
  outline: 0;
  height: 100%;
  min-width: 0;
}
#search-input::placeholder {
  color: #71717a;
}
.net {
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  white-space: nowrap;
}
.net.on {
  color: #4ade80;
  border-color: #14532d;
  background: #052e16;
}
.net.off {
  color: #fbbf24;
  border-color: #78350f;
  background: #2a1a04;
}
#top-user {
  margin-left: auto;
  display: flex;
  align-items: center;
}
#offline-banner {
  margin: 6px 28px 0;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #2a1a04;
  border: 1px solid #78350f;
  color: #fcd34d;
  border-radius: 12px;
  padding: 10px 14px;
}

/* ---------- View ---------- */
#view {
  flex: 1;
  overflow-y: auto;
  padding: 14px 28px 40px;
  scroll-behavior: smooth;
}
.loading,
.empty {
  color: var(--muted);
  padding: 40px 0;
  text-align: center;
}
.empty .btn {
  margin-top: 14px;
}
h2.h {
  font-size: 22px;
  margin: 10px 0 16px;
}
h3.h {
  font-size: 18px;
  margin: 26px 0 12px;
}
.page-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 10px 0 18px;
}
.page-head h2 {
  font-size: 24px;
  flex: 1;
  min-width: 140px;
}
.note {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--muted);
  margin-bottom: 16px;
}
.note b {
  color: #fff;
}
.note.warn {
  border-color: #78350f;
  color: #fcd34d;
  background: #2a1a04;
}
.note.err {
  border-color: #7f1d1d;
  color: #fca5a5;
  background: #2a0a0a;
}

/* ---------- Tombol & input ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--pink);
  color: #fff;
  border-radius: 999px;
  padding: 10px 20px;
  font-weight: 600;
  transition: 0.15s;
}
.btn:hover {
  background: var(--pink-2);
}
.btn.small {
  padding: 7px 16px;
  font-size: 13px;
}
.btn.ghost {
  background: transparent;
  border: 1px solid var(--line);
}
.btn.ghost:hover {
  border-color: var(--pink);
  color: var(--pink);
}
.btn.white {
  background: #fff;
  color: #000;
}
.btn.white:hover {
  background: #e5e5e5;
}
.btn.danger {
  background: #7f1d1d;
}
.btn.danger:hover {
  background: #991b1b;
}
.btn.block {
  display: flex;
  width: 100%;
}
.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  color: #d4d4d8;
  transition: 0.15s;
  flex: none;
}
.icon-btn:hover {
  background: #222227;
  color: #fff;
}
.icon-btn.sm {
  width: 32px;
  height: 32px;
}
.icon-btn.sm .ic {
  width: 17px;
  height: 17px;
}
.icon-btn.on {
  color: var(--pink);
}
.fav-btn.on .ic {
  fill: var(--pink);
  stroke: var(--pink);
}
.mobile-only {
  display: none;
}
.input {
  width: 100%;
  background: #18181c;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  outline: 0;
}
.input:focus {
  border-color: var(--pink);
}
label.f {
  display: block;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 13px;
}
label.f .input {
  margin-top: 6px;
  color: #fff;
}

/* ---------- Home ---------- */
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr);
  gap: 20px;
}
.hero {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  min-height: 230px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 26px;
  background: linear-gradient(100deg, #a3269c 0%, #c22f84 50%, #3a3a1c 100%);
}
.hero .info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 1;
  min-width: 0;
}
.hero .tag {
  font-size: 11px;
  opacity: 0.8;
}
.hero h1 {
  font-size: 30px;
  line-height: 1.15;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hero .actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
}
.hero .cover {
  width: 46%;
  max-width: 380px;
  aspect-ratio: 16/10;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  flex: none;
}
.hero .cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pod {
  border-radius: 20px;
  background: var(--pink);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 230px;
}
.pod small {
  opacity: 0.9;
}
.pod h3 {
  font-size: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.pod .cover {
  margin-top: 8px;
  flex: 1;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  min-height: 100px;
  display: block;
  width: 100%;
}
.pod .cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}
.pod .cover .play-circle {
  position: absolute;
  right: 10px;
  bottom: 10px;
  background: #fff;
  color: #000;
  border-color: #fff;
  width: 44px;
  height: 44px;
}
.eq {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
}
.eq i {
  width: 3px;
  background: #fff;
  border-radius: 2px;
  height: 40%;
  animation: eq 1s ease-in-out infinite;
}
.eq i:nth-child(2) {
  animation-delay: 0.2s;
}
.eq i:nth-child(3) {
  animation-delay: 0.4s;
}
.eq i:nth-child(4) {
  animation-delay: 0.1s;
}
@keyframes eq {
  0%,
  100% {
    height: 25%;
  }
  50% {
    height: 100%;
  }
}
body:not(.is-playing) .eq i {
  animation-play-state: paused;
}

.artists {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(120px, 1fr);
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 6px;
}
.artist {
  position: relative;
  aspect-ratio: 1;
  border-radius: 14px;
  overflow: hidden;
  text-align: left;
  background: #222;
}
.artist img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.artist::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 45%, rgba(0, 0, 0, 0.85));
}
.artist span {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 8px;
  z-index: 1;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.artist:hover img {
  transform: scale(1.05);
  transition: 0.3s;
}

.tabs {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--line);
  margin: 28px 0 8px;
}
.tab {
  padding: 10px 14px;
  color: var(--muted);
  font-size: 15px;
  position: relative;
}
.tab.on {
  color: #fff;
}
.tab.on::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: -1px;
  height: 2px;
  background: var(--pink);
  border-radius: 2px;
}

/* ---------- Daftar lagu ---------- */
.list {
  display: flex;
  flex-direction: column;
}
.row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 12px;
  transition: 0.15s;
}
.row:hover {
  background: #15151a;
}
.row.playing .meta b {
  color: var(--pink);
}
.row-main {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  padding: 2px;
}
.meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.meta b {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.meta small {
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.thumb {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  object-fit: cover;
  flex: none;
  background: #222;
}
.thumb.sm {
  width: 52px;
  height: 52px;
}
.thumb.big {
  width: 100%;
  height: 100%;
  border-radius: 20px;
}
.thumb.ph {
  background: linear-gradient(135deg, #3b0a2a, #7b1fa2);
  display: grid;
  place-items: center;
  color: #fff;
}
.badge {
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #1f1f25;
  color: var(--muted);
  flex: none;
}
.badge.local {
  color: #86efac;
  background: #0b2a17;
}
.badge.youtube {
  color: #fca5a5;
  background: #2a1010;
}
.row .date {
  color: var(--muted);
  font-size: 12px;
  flex: none;
  width: 90px;
  text-align: right;
}

.mini-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 6px;
  border-radius: 12px;
}
.mini-row:hover {
  background: #17171b;
}
.mini-row .thumb {
  width: 44px;
  height: 44px;
}

/* Kartu playlist */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 16px;
}
.pcard {
  background: var(--card);
  border-radius: 16px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: 0.15s;
}
.pcard:hover {
  background: #1d1d22;
}
.pcard .cv {
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  background: linear-gradient(135deg, #3b0a2a, #7b1fa2);
  display: grid;
  place-items: center;
}
.pcard .cv img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pcard .cv .ic {
  width: 40px;
  height: 40px;
  opacity: 0.8;
}
.pcard .acts {
  display: flex;
  gap: 6px;
  align-items: center;
}
.pcard .acts .grow {
  flex: 1;
}

/* Dropzone */
.drop {
  border: 2px dashed #3a3a42;
  border-radius: 16px;
  padding: 28px;
  text-align: center;
  color: var(--muted);
  transition: 0.15s;
  margin-bottom: 18px;
}
.drop.over {
  border-color: var(--pink);
  background: rgba(255, 61, 129, 0.07);
  color: #fff;
}
.drop .btn {
  margin-top: 12px;
}

/* Auth & profil */
.auth-wrap {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 10px 0;
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--card);
  border-radius: 20px;
  padding: 28px;
}
.auth-card .tabs {
  margin: 18px 0 18px;
  justify-content: center;
}
.form .btn {
  width: 100%;
  margin-top: 4px;
}
.form-msg {
  color: #fca5a5;
  font-size: 13px;
  min-height: 18px;
  margin-bottom: 8px;
}
.grid2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
}
.panel {
  background: var(--card);
  border-radius: 18px;
  padding: 20px;
}
.panel h3 {
  margin-bottom: 14px;
  font-size: 17px;
}
.profile-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.profile-head .avatar {
  width: 64px;
  height: 64px;
  font-size: 26px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}
.stat {
  background: var(--card);
  border-radius: 14px;
  padding: 14px;
  text-align: center;
}
.stat b {
  display: block;
  font-size: 24px;
  color: var(--pink);
}
.stat span {
  color: var(--muted);
  font-size: 12px;
}
.switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.switch input {
  width: 20px;
  height: 20px;
  accent-color: var(--pink);
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  background: #1b1b20;
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
}
.chip:hover {
  background: var(--pink);
}

/* Halaman Player */
.player-page {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}
.stage {
  aspect-ratio: 16/9;
  border-radius: 20px;
  overflow: hidden;
  background: #000;
  position: relative;
}
.yt-slot {
  width: 100%;
  height: 100%;
}
.cover-big {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 30% 20%, #7b1fa2, #3b0a2a 60%, #0b0b0d);
}
.cover-big .vinyl {
  width: min(70%, 260px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: repeating-radial-gradient(circle, #111 0 3px, #1c1c1c 3px 6px);
  display: grid;
  place-items: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}
.cover-big .vinyl i {
  width: 34%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pink), var(--purple));
}
body.is-playing .cover-big .vinyl {
  animation: spin 6s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.np-info h2 {
  font-size: 26px;
  margin-bottom: 4px;
}
.np-info p {
  color: var(--muted);
  margin-bottom: 18px;
}
.np-ctrls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

/* ---------- Panel kanan ---------- */
#rightbar {
  padding: 28px 22px 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
#rightbar h4 {
  font-size: 13px;
  font-weight: 600;
  margin: 14px 0 8px;
}
#rightbar h4:first-child {
  margin-top: 0;
}
#rightbar .meta b {
  font-size: 13px;
}

/* ---------- Pemutar bawah ---------- */
#playerbar {
  position: relative;
  background: #0e0e11;
  border-top: 1px solid #1b1b20;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 0 24px;
}
.np {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.np .meta b {
  font-size: 14px;
}
.pb-center {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ctrls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.play-circle {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 2px solid #fff;
  display: grid;
  place-items: center;
  transition: 0.15s;
  flex: none;
}
.play-circle:hover {
  border-color: var(--pink);
  color: var(--pink);
  transform: scale(1.05);
}
.play-circle .ic {
  width: 20px;
  height: 20px;
}
.seek-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
}
.seek-row span {
  width: 38px;
  text-align: center;
  flex: none;
}
.pb-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  color: #d4d4d8;
}
.pb-right input {
  width: 110px;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 5px;
  border-radius: 5px;
  outline: 0;
  cursor: pointer;
  flex: 1;
  background: linear-gradient(
    to right,
    var(--pink) var(--p, 0%),
    #34343b var(--p, 0%)
  );
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #fff;
  border: 0;
}
input[type="range"]::-moz-range-thumb {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #fff;
  border: 0;
}

/* ---------- Video YouTube melayang ---------- */
#yt-wrap {
  position: fixed;
  z-index: 40;
  background: #000;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}
#yt-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
#yt-wrap.hidden {
  visibility: hidden;
  pointer-events: none;
  opacity: 0;
}
#yt-wrap.mini {
  right: 18px;
  bottom: calc(var(--bar-h) + 14px);
  width: 220px;
  height: 124px;
  left: auto;
  top: auto;
}

/* ---------- Modal & toast ---------- */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
}
.modal-card {
  width: 100%;
  max-width: 420px;
  background: var(--card);
  border-radius: 20px;
  padding: 24px;
  max-height: 85vh;
  overflow-y: auto;
}
.modal-card h3 {
  margin-bottom: 14px;
}
.modal-card .actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 14px;
}
.modal-card .pick {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 10px;
  border-radius: 12px;
}
.modal-card .pick:hover {
  background: #222;
}
#toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--bar-h) + 18px);
  transform: translate(-50%, 20px);
  background: #fff;
  color: #000;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: 0.25s;
  z-index: 120;
  max-width: 90vw;
  text-align: center;
}
#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

#backdrop {
  display: none;
}
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-thumb {
  background: #2a2a31;
  border-radius: 8px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  #app {
    grid-template-columns: 220px minmax(0, 1fr);
    grid-template-areas: "side main" "bar bar";
  }
  #rightbar {
    display: none;
  }
}
@media (max-width: 860px) {
  :root {
    --bar-h: 116px;
  }
  #app {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "main" "bar";
  }
  #sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 270px;
    z-index: 70;
    transform: translateX(-100%);
    transition: transform 0.25s;
  }
  body.nav-open #sidebar {
    transform: none;
  }
  body.nav-open #backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 65;
  }
  .mobile-only {
    display: inline-grid;
  }
  #topbar {
    padding: 14px 14px 8px;
    gap: 10px;
  }
  #net-badge {
    display: none;
  }
  #view {
    padding: 10px 14px 30px;
  }
  #offline-banner {
    margin: 6px 14px 0;
  }
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .hero {
    min-height: 190px;
    padding: 18px;
  }
  .hero h1 {
    font-size: 22px;
  }
  .hero .cover {
    width: 40%;
  }
  .player-page {
    grid-template-columns: 1fr;
  }
  .row .badge,
  .row .date {
    display: none;
  }
  #playerbar {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    padding: 0 12px;
  }
  .pb-center {
    display: contents;
  }
  .ctrls {
    grid-column: 2;
    grid-row: 1;
  }
  .ctrls .sm,
  .ctrls .fav-btn {
    display: none;
  }
  .seek-row {
    grid-column: 1/-1;
    grid-row: 2;
    align-self: start;
    margin-top: -26px;
  }
  .np {
    grid-row: 1;
  }
  .pb-right {
    display: none;
  }
  #yt-wrap.mini {
    width: 160px;
    height: 90px;
    right: 10px;
  }
}
@media (max-width: 480px) {
  .ctrls .icon-btn {
    width: 34px;
    height: 34px;
  }
  .artists {
    grid-auto-columns: 110px;
  }
}

/* Lapisan penutup: klik pada video tidak membuka YouTube */
#yt-shield {
  position: absolute;
  inset: 0;
  z-index: 2;
  cursor: pointer;
  background: transparent;
}
.yt-expand {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 3;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.65);
  display: grid;
  place-items: center;
  font-size: 16px;
  color: #fff;
}
.yt-expand:hover {
  background: var(--pink);
}
#yt-wrap:not(.mini) .yt-expand {
  display: none;
}

/* Sampul penutup: menyembunyikan tombol/logo YouTube saat video tidak sedang diputar */
#yt-cover {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: #000 center/cover no-repeat;
  display: grid;
  place-items: center;
}
#yt-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}
#yt-cover .cv-play {
  position: relative;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--pink);
  display: grid;
  place-items: center;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
}
#yt-cover .cv-play .ic {
  width: 24px;
  height: 24px;
  color: #fff;
}
#yt-wrap.is-playing #yt-cover {
  display: none;
}
#yt-wrap.mini #yt-cover .cv-play {
  width: 40px;
  height: 40px;
}

/* Chip pencarian terakhir dengan tombol hapus */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 6px 0 14px;
}
.chip > button:first-child {
  padding: 7px 0;
}
.chip-x {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 11px;
  color: var(--muted);
  display: grid;
  place-items: center;
}
.chip-x:hover {
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
}

.lib-btn.on {
  color: var(--pink);
}
.lib-btn.on .ic {
  fill: rgba(255, 61, 129, 0.3);
  stroke: var(--pink);
}
.row.dim {
  opacity: 0.45;
}
