/* ============================================================
   DJ TRUNGBAO — Design System "Dark Neon EDM"
   Nền #0A0618 · Tím #A855F7 · Hồng #EC4899 · Cyan #22D3EE
   Font: Space Grotesk (tiêu đề) + Be Vietnam Pro (nội dung)
   ============================================================ */
:root {
  --bg: #0a0618;
  --bg-2: #120a26;
  --bg-3: #1a1030;
  --primary: #a855f7;
  --secondary: #ec4899;
  --tertiary: #22d3ee;
  --text: #e7def9;
  --text-dim: #948da6;
  --glass: rgba(168, 85, 247, .08);
  --glass-border: rgba(168, 85, 247, .22);
  --radius: 18px;
  --radius-lg: 28px;
  --header-h: 72px;
  --playerbar-h: 76px;
  --grad-main: linear-gradient(135deg, var(--primary), var(--secondary) 55%, var(--tertiary));
  --glow-primary: 0 0 24px rgba(168, 85, 247, .45);
  --glow-pink: 0 0 24px rgba(236, 72, 153, .4);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --font-display: 'Space Grotesk', 'Be Vietnam Pro', sans-serif;
  --font-body: 'Be Vietnam Pro', sans-serif;
  --ease-out: cubic-bezier(.22, .61, .36, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  overflow-x: hidden;
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
/* Icon SVG luôn căn giữa tuyệt đối trong button */
svg.ic { display: block; flex: none; }
button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-align: center; }
input, select, textarea { font-family: inherit; }

/* ── Scrollbar đồng bộ design system "Dark Neon EDM" ────── */
* {
  scrollbar-width: thin;                       /* Firefox */
  scrollbar-color: rgba(168, 85, 247, .45) rgba(168, 85, 247, .08);
}
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track {
  background: rgba(168, 85, 247, .08);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(168, 85, 247, .55), rgba(236, 72, 153, .55));
  border-radius: 999px;
  border: 2px solid rgba(10, 6, 24, .9);       /* tách thumb khỏi track */
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--primary), var(--secondary));
  box-shadow: 0 0 8px rgba(168, 85, 247, .6);
}
::-webkit-scrollbar-corner { background: transparent; }

/* ── Nền 3D + noise ─────────────────────────────────────── */
#bg3d {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: 0; pointer-events: none; opacity: .8;
}
.noise-overlay {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='128' height='128'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='128' height='128' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
}
.app-outlet { position: relative; z-index: 2; }

/* ── Header ─────────────────────────────────────────────── */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  height: var(--header-h);
  display: flex; align-items: center; gap: 28px;
  padding: 0 clamp(16px, 4vw, 48px);
  background: rgba(10, 6, 24, .55);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(168, 85, 247, .14);
  transition: background .3s;
}
.site-header.scrolled { background: rgba(10, 6, 24, .85); }
.brand { display: flex; align-items: baseline; gap: 10px; }
.brand-name {
  font-family: var(--font-display); font-weight: 700; font-size: 1.5rem;
  letter-spacing: .06em; color: #fff;
  text-shadow: 0 0 18px rgba(168, 85, 247, .8);
}
.brand-name b {
  background: var(--grad-main);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand-sub { font-size: .58rem; letter-spacing: .3em; color: var(--text-dim); text-transform: uppercase; }
.brand-eq { display: inline-flex; gap: 2px; align-items: flex-end; height: 16px; align-self: center; }
.brand-eq i {
  width: 3px; border-radius: 2px; background: var(--grad-main);
  animation: eq-bounce 1s ease-in-out infinite;
}
.brand-eq i:nth-child(1) { height: 60%; animation-delay: 0s; }
.brand-eq i:nth-child(2) { height: 100%; animation-delay: .18s; }
.brand-eq i:nth-child(3) { height: 45%; animation-delay: .36s; }
.brand-eq i:nth-child(4) { height: 80%; animation-delay: .54s; }
@keyframes eq-bounce { 0%, 100% { transform: scaleY(.45); } 50% { transform: scaleY(1); } }

.main-nav { display: flex; gap: 6px; margin-left: auto; }
.main-nav a {
  padding: 9px 16px; border-radius: 999px; font-size: .92rem; font-weight: 500;
  color: var(--text-dim); position: relative; transition: color .25s, background .25s;
}
.main-nav a:hover { color: #fff; background: var(--glass); }
.main-nav a.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(168,85,247,.25), rgba(236,72,153,.18));
  box-shadow: inset 0 0 0 1px var(--glass-border);
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 24px; border-radius: 999px; font-weight: 600; font-size: .95rem;
  transition: transform .4s var(--ease-spring), box-shadow .4s var(--ease-out), filter .4s var(--ease-out);
  will-change: transform;
}
.btn:active { transform: scale(.96); transition-duration: .15s; }
.btn-primary {
  color: #fff; background: var(--grad-main); background-size: 160% 160%;
  box-shadow: var(--glow-primary);
  animation: grad-shift 6s ease infinite, btn-breathe 3.2s var(--ease-out) infinite;
}
@keyframes grad-shift { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes btn-breathe {
  0%, 100% { box-shadow: 0 0 18px rgba(168,85,247,.35); }
  50% { box-shadow: 0 0 34px rgba(236,72,153,.55); }
}
.btn-primary:hover {
  transform: translateY(-3px) scale(1.02);
  animation-play-state: paused;
  box-shadow: 0 0 44px rgba(168,85,247,.7);
  filter: brightness(1.08);
}
.btn-ghost {
  color: var(--text); background: var(--glass);
  box-shadow: inset 0 0 0 1px var(--glass-border);
}
.btn-ghost:hover { background: rgba(168,85,247,.16); }
.nav-toggle { display: none; }

/* ── Hero ───────────────────────────────────────────────── */
.hero {
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: calc(var(--header-h) + 48px) clamp(20px, 6vw, 80px) 120px;
  position: relative;
  overflow: hidden;
}
/* Ảnh hero 16:9 phủ nền — gradient tối bên trái để chữ dễ đọc.
   Mask đáy Tan DẦN ra trong suốt (không đổ về màu đặc) để lộ nền 3D
   phía sau — nếu đổ màu đặc sẽ cắt lì với section dưới (cùng lộ 3D). */
.hero-bg {
  position: absolute; inset: 0; z-index: -1;
  background-size: cover; background-position: center;
  animation: hero-zoom 14s ease-out both;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 58%, rgba(0,0,0,.5) 78%, transparent 97%);
  mask-image: linear-gradient(180deg, #000 0%, #000 58%, rgba(0,0,0,.5) 78%, transparent 97%);
}
@keyframes hero-zoom { from { transform: scale(1.08); } to { transform: scale(1); } }
.hero-bg::before {
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(10,6,24,.92) 0%, rgba(10,6,24,.72) 34%, rgba(10,6,24,.28) 68%, rgba(10,6,24,.15) 100%),
    linear-gradient(180deg, rgba(10,6,24,.35) 0%, rgba(10,6,24,.12) 45%, rgba(10,6,24,.3) 100%);
}
.hero-kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: .78rem; letter-spacing: .28em; text-transform: uppercase;
  color: var(--tertiary); margin-bottom: 20px;
  animation: fade-up .8s .1s both;
}
.hero-kicker::before { content: ''; width: 34px; height: 1px; background: var(--tertiary); box-shadow: 0 0 8px var(--tertiary); }
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 6.4vw, 6rem);
  font-weight: 700; line-height: .98; letter-spacing: -.045em;
  background: linear-gradient(100deg, #fff 10%, var(--primary) 40%, var(--secondary) 65%, var(--tertiary) 95%);
  background-size: 220% 220%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 32px rgba(168,85,247,.45));
  animation: grad-shift 8s ease infinite, fade-up .9s .2s both;
}
.hero-tagline {
  font-family: var(--font-display); font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--text-dim); margin: 16px 0 12px; letter-spacing: .02em;
  animation: fade-up .9s .32s both;
}
.hero-desc { max-width: 46ch; color: #ddd2e7; font-size: .98rem; line-height: 1.65; margin-bottom: 32px; animation: fade-up .9s .42s both; }
/* Nút icon mạng xã hội trong hero — chỉ hiện những kênh admin đã điền link */
.hero-social {
  display: flex; gap: 12px; flex-wrap: wrap;
  margin-top: -6px; animation: fade-up .9s .52s both;
}
.hs-btn {
  width: 44px; height: 44px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text); background: var(--glass);
  box-shadow: inset 0 0 0 1px var(--glass-border);
  transition: transform .25s var(--ease-out), color .25s, box-shadow .25s;
}
.hs-btn:hover {
  transform: translateY(-3px); color: #fff;
  box-shadow: inset 0 0 0 1px var(--primary), var(--glow-primary);
}
.hero-stats {
  display: flex; gap: clamp(24px, 4vw, 56px); margin-top: 48px;
  animation: fade-up .9s .64s both;
}
.hstat b {
  font-family: var(--font-display); font-size: clamp(1.5rem, 3vw, 2.3rem);
  background: var(--grad-main); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hstat span { display: block; font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-dim); margin-top: 6px; }
.hero-visual { position: relative; animation: fade-up 1s .4s both; }
.hero-img-wrap {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: 0 30px 90px rgba(0,0,0,.6), var(--glow-primary);
  border: 1px solid rgba(168,85,247,.3);
  transform: perspective(1200px) rotateY(-6deg);
  transition: transform .6s ease;
}
.hero-img-wrap:hover { transform: perspective(1200px) rotateY(0deg) scale(1.01); }
.hero-img-wrap img { width: 100%; aspect-ratio: 4/4.7; object-fit: cover; object-position: center 20%; }
.hero-eq {
  display: flex; align-items: flex-end; gap: 4px; height: 44px; margin-top: 26px; opacity: .9;
  max-width: 620px;
}

/* ── Sections dùng chung ────────────────────────────────── */
.section { padding: clamp(48px, 8vw, 96px) clamp(20px, 6vw, 80px); position: relative; }
.section-head { margin-bottom: 36px; }
.section-kicker {
  font-size: .75rem; letter-spacing: .3em; text-transform: uppercase;
  color: var(--tertiary); margin-bottom: 12px; display: flex; align-items: center; gap: 10px;
}
.section-kicker::before { content: ''; width: 26px; height: 1px; background: var(--tertiary); }
.section-title {
  font-family: var(--font-display); font-size: clamp(1.7rem, 4vw, 2.8rem); font-weight: 700; color: #fff;
}
.section-sub { color: var(--text-dim); margin-top: 10px; max-width: 640px; line-height: 1.7; }
.glass {
  background: linear-gradient(160deg, rgba(168,85,247,.09), rgba(34,211,238,.04));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}

/* ── Tab thể loại ───────────────────────────────────────── */
.tabs-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 34px; }
.tab-pill {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 11px 22px; border-radius: 999px; font-weight: 600; font-size: .92rem;
  background: var(--glass); color: var(--text-dim);
  box-shadow: inset 0 0 0 1px var(--glass-border);
  transition: color .35s var(--ease-out), transform .35s var(--ease-spring),
    background .35s var(--ease-out), box-shadow .35s var(--ease-out);
}
.tab-pill:hover { color: #fff; transform: translateY(-2px); background: rgba(168,85,247,.14); }
/* Pill chưa chọn vẫn phải trông "bấm được", không tắt như disabled */
.tab-pill:not(.active) { color: #c9bdd7; background: #1b132d; box-shadow: inset 0 0 0 1px #45365b; }
.tab-pill:focus-visible { outline: 2px solid var(--tertiary); outline-offset: 2px; }
.tab-pill.active {
  color: #fff; background: var(--grad-main); background-size: 180% 180%;
  box-shadow: 0 0 22px rgba(168,85,247,.5);
  animation: grad-shift 6s ease infinite;
}

/* ── Lưới playlist ──────────────────────────────────────── */
.pl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
  gap: 20px;
}
.pl-card {
  position: relative; border-radius: 14px; overflow: hidden;
  background: #151024; border: 1px solid #302542;
  min-width: 0;
  transition: transform .45s var(--ease-spring), box-shadow .45s var(--ease-out), border-color .45s var(--ease-out);
  cursor: pointer;
}
.pl-card:hover {
  transform: translateY(-7px) scale(1.015);
  border-color: rgba(168,85,247,.55);
  box-shadow: 0 18px 50px rgba(0,0,0,.5), var(--glow-primary);
}
.pl-cover { position: relative; aspect-ratio: 1; overflow: hidden; }
.pl-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.pl-card:hover .pl-cover img { transform: scale(1.08); }
.pl-cover::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(10,6,24,.85), transparent 55%);
}
.pl-tab-chip {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  font-size: .6rem; font-weight: 600; letter-spacing: 0; text-transform: uppercase;
  padding: 4px 7px; border-radius: 999px; color: #fff;
  background: rgba(10,6,24,.6); backdrop-filter: blur(8px);
  border: 1px solid var(--glass-border);
  max-width: calc(100% - 16px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pl-playbtn {
  position: absolute; bottom: 12px; right: 12px; z-index: 3;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--grad-main); color: #fff; font-size: 1.15rem;
  display: grid; place-items: center;
  opacity: 0; transform: translateY(12px);
  transition: all .3s ease; box-shadow: var(--glow-pink);
}
.pl-card:hover .pl-playbtn, .pl-card:focus-visible .pl-playbtn { opacity: 1; transform: none; }
.pl-meta { padding: 10px 12px 12px; }
.pl-title {
  font-weight: 700; font-size: .9rem; color: #fff; line-height: 1.4;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
  min-height: 2.8em;
}
.pl-sub { font-size: .75rem; color: #b6abc5; margin-top: 4px; }

/* ── Danh sách bài hát ──────────────────────────────────── */
.track-list { display: grid; gap: 4px; }
.track-row {
  display: grid; grid-template-columns: 30px 48px minmax(0, 1fr) max-content max-content; align-items: center; gap: 14px;
  min-height: 56px; padding: 8px 14px; border-radius: 10px;
  background: rgba(168,85,247,.05); border: 1px solid transparent;
  transition: background .3s var(--ease-out), border-color .3s var(--ease-out), transform .3s var(--ease-out);
  cursor: pointer;
}
.track-row:hover, .track-row.playing {
  background: rgba(168,85,247,.13); border-color: var(--glass-border);
  transform: translateX(4px);
}
.track-row.playing .tr-title { color: var(--tertiary); text-shadow: 0 0 12px rgba(34,211,238,.5); }
.tr-num { color: var(--text-dim); font-size: .85rem; text-align: center; font-variant-numeric: tabular-nums; }
.tr-artwrap { position: relative; width: 44px; height: 44px; flex: none; }
.tr-art { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; background: var(--bg-3); }
.tr-play {
  position: absolute; inset: 0; display: grid; place-items: center;
  border-radius: 8px; background: rgba(10,6,24,.55); color: #fff;
  opacity: 0; transition: opacity .3s var(--ease-out);
}
.track-row:hover .tr-play, .track-row:focus-within .tr-play { opacity: 1; }
/* Cảm ứng (mobile): luôn hiện nút play trên ảnh */
@media (hover: none) { .tr-play { opacity: 1; } }
.tr-title {
  font-weight: 600; font-size: .95rem; color: #fff; line-height: 1.35;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
.tr-artist { font-size: .8rem; color: #b6abc5; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tr-src { font-size: .62rem; letter-spacing: .02em; padding: 3px 7px; border-radius: 999px; font-weight: 700; text-transform: uppercase; width: max-content; color: #c9bdd7; background: #251b34; }
.tr-dur { color: #b6abc5; font-size: .82rem; font-variant-numeric: tabular-nums; min-width: 44px; text-align: right; }
.tr-dur:empty { visibility: hidden; }

/* ── Điểm nhấn / khối thông tin ─────────────────────────── */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.feature-card { padding: 26px; }
.feature-card .fc-ico { font-size: 1.8rem; margin-bottom: 14px; }
.feature-card h3 { font-family: var(--font-display); color: #fff; font-size: 1.1rem; margin-bottom: 8px; }
.feature-card p { color: var(--text-dim); font-size: .9rem; line-height: 1.65; }

/* ── Gallery ────────────────────────────────────────────── */
.gal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.gal-item { border-radius: var(--radius); overflow: hidden; position: relative; cursor: pointer; }
.gal-item img {
  width: 100%; aspect-ratio: 3/4; object-fit: cover;
  transition: transform .5s ease, filter .5s ease; filter: saturate(.9);
}
.gal-item:hover img { transform: scale(1.06); filter: saturate(1.15); }

/* ── Booking / form ─────────────────────────────────────── */
.booking-wrap { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(24px, 4vw, 56px); align-items: start; }
.form-grid { display: grid; gap: 16px; }
.f-field label { display: block; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 8px; font-weight: 600; }
.f-field input, .f-field select, .f-field textarea {
  width: 100%; padding: 13px 16px; border-radius: 14px;
  background: rgba(168,85,247,.07); border: 1px solid var(--glass-border);
  color: var(--text); font-size: .95rem; outline: none;
  transition: border-color .25s, box-shadow .25s;
}
.f-field input:focus, .f-field select:focus, .f-field textarea:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px rgba(168,85,247,.18);
}
.socials-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.soc-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 999px; font-size: .88rem; font-weight: 600;
  background: var(--glass); box-shadow: inset 0 0 0 1px var(--glass-border);
  transition: all .25s;
}
.soc-btn:hover { transform: translateY(-2px); color: #fff; box-shadow: inset 0 0 0 1px var(--primary), var(--glow-primary); }

/* ── Footer ─────────────────────────────────────────────── */
.site-footer {
  position: relative; z-index: 2;
  padding: 56px clamp(20px, 6vw, 80px) 120px;
  background: linear-gradient(to bottom, transparent, rgba(18,10,38,.9));
  border-top: 1px solid rgba(168,85,247,.12);
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; max-width: 1120px; margin: 0 auto; }
.site-footer h4 { font-family: var(--font-display); color: #fff; margin-bottom: 14px; font-size: 1rem; }
.site-footer p, .site-footer a { color: var(--text-dim); font-size: .88rem; line-height: 1.9; }
.site-footer a:hover { color: var(--tertiary); }
.footer-copy { margin-top: 40px; text-align: center; color: var(--text-dim); font-size: .8rem; opacity: .7; }

/* Thẻ featured nổi ở hero: chỉ hiện khi CHƯA có track nào được load.
   Có track → playerbar sở hữu mặt phát, thẻ biến mất (tránh điều khiển trùng). */

/* ── Tabbar mobile (kiểu app) ───────────────────────────── */
.mobile-tabbar {
  display: none;
  position: fixed; left: 12px; right: 12px; bottom: calc(10px + var(--safe-bottom)); z-index: 75;
  border-radius: 22px;
  background: rgba(14, 9, 32, .92);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(168,85,247,.28);
  box-shadow: 0 14px 40px rgba(0,0,0,.55);
  padding: 8px;
}
.mobile-tabbar a, .mobile-tabbar button {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  padding: 6px 0; color: var(--text-dim); font-size: .66rem; font-weight: 600; border-radius: 14px;
}
.mobile-tabbar .active { color: #fff; background: linear-gradient(135deg, rgba(168,85,247,.3), rgba(236,72,153,.2)); }
@media (max-width: 760px) {
  .mobile-tabbar { display: flex; }
  body.np-open .player-embed { bottom: auto; top: calc(var(--header-h) + 10px); }
  .site-footer { padding-bottom: 150px; }
}

/* ── Player bar ─────────────────────────────────────────── */
.player-embed {
  position: fixed; left: -9999px; top: 0; width: 320px; height: 200px; opacity: .01;
  pointer-events: none; z-index: -1;
}
body.np-open .player-embed { left: auto; right: 16px; bottom: calc(var(--playerbar-h) + 16px + var(--safe-bottom)); top: auto; width: min(360px, 60vw); height: 220px; opacity: 1; pointer-events: auto; z-index: 80; }
#ytHost, #scHost { width: 100%; height: 100%; }
#ytHost iframe, #scHost iframe { width: 100%; height: 100%; }

.playerbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
  height: calc(var(--playerbar-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: rgba(12, 7, 28, .92);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(168,85,247,.22);
}
/* Trạng thái trống: cả bar bấm được → dẫn tới trang khám phá nhạc */
.playerbar.empty { cursor: pointer; }
.playerbar.empty .pb-title { color: var(--text-dim); font-weight: 500; }
/* Vạch tiến độ: thụt vào trong 12px hai bên + bo tròn 2 đầu —
   không bị góc bo của playerbar cắt vuông ở đầu/cuối vạch */
.playerbar-progress {
  position: absolute; top: -2px; left: 12px; right: 12px; height: 3px;
  border-radius: 999px; background: rgba(168,85,247,.15);
  transition: height .2s var(--ease-out); overflow: hidden;
}
.pb-fill { height: 100%; width: 0%; border-radius: 999px; background: var(--grad-main); box-shadow: 0 0 10px var(--primary); }
/* z-index 2 để nút luôn thắng vùng chồng lấn với seek; nhưng container
   trong suốt với con trỏ (chỉ con mới nhận click) — nếu không cả dải
   seek trên cùng sẽ bị container nuốt sự kiện */
.playerbar-main { position: relative; z-index: 2; pointer-events: none; display: flex; align-items: center; gap: 16px; height: var(--playerbar-h); padding: 0 clamp(12px, 3vw, 32px); }
.playerbar-main > * { pointer-events: auto; }
.pb-art-wrap { position: relative; width: 52px; height: 52px; flex: none; }
.pb-art { width: 100%; height: 100%; border-radius: 12px; object-fit: cover; background: var(--bg-3); }
/* Chưa có bài hát: ẩn img rỗng playerbar để không hiện icon "ảnh lỗi" */
.pb-art[src=""], .pb-art:not([src]) { visibility: hidden; }
/* Placeholder "chưa có bài hát": icon tai nghe + nhãn — hiện khi body.np-empty */
.pb-art-ph, .np-art-ph {
  position: absolute; inset: 0; z-index: 1;
  display: none; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; color: var(--text-dim); pointer-events: none;
}
.np-art-ph em { font-style: normal; font-size: .85rem; }
.np-art-ph svg, .pb-art-ph svg { opacity: .7; }
.pb-art-wrap:has(.pb-art[src=""]) .pb-art-ph, .pb-art-wrap:has(.pb-art:not([src])) .pb-art-ph { display: flex; }
/* Now Playing rỗng: placeholder là icon trôi giữa khung (KHÔNG card), canvas 3D ẩn */
.np-art-ph { position: static; }
body.np-empty .np-art-ph { display: flex; }
body.np-empty #npViz { visibility: hidden; }
.pb-eq { position: absolute; inset: 0; display: none; align-items: flex-end; justify-content: center; gap: 2px; padding: 8px 0; border-radius: 12px; background: rgba(10,6,24,.55); }
.pb-eq i { width: 3px; border-radius: 2px; background: var(--tertiary); animation: eq-bounce .9s ease-in-out infinite; }
.pb-eq i:nth-child(1) { height: 12px; animation-delay: 0s; } .pb-eq i:nth-child(2) { height: 20px; animation-delay: .2s; } .pb-eq i:nth-child(3) { height: 15px; animation-delay: .4s; }
.playerbar.playing .pb-eq { display: inline-flex; }
.pb-info { min-width: 0; width: 220px; }
.pb-title { font-weight: 700; font-size: .92rem; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pb-artist { font-size: .78rem; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pb-controls { display: flex; align-items: center; gap: 8px; margin: 0 auto; }
.pb-btn { font-size: 1.05rem; opacity: .8; transition: all .2s; padding: 8px; border-radius: 10px; }
.pb-btn:hover { opacity: 1; transform: scale(1.12); }
.pb-btn.on { color: var(--tertiary); opacity: 1; filter: drop-shadow(0 0 6px rgba(34,211,238,.7)); }
.pb-play {
  width: 48px; height: 48px; border-radius: 50%; font-size: 1.15rem;
  background: var(--grad-main); color: #fff; opacity: 1;
  box-shadow: var(--glow-primary); display: grid; place-items: center;
}
.pb-play:hover { transform: scale(1.08); }
.pb-vol { display: flex; align-items: center; gap: 8px; }
.pb-vol input { width: 90px; accent-color: var(--primary); }
.pb-time { font-size: .78rem; color: var(--text-dim); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pb-queue-btn { font-size: 1.1rem; opacity: .75; }
/* Seek của playerbar: vùng bấm nằm NGAY TRÊN vạch tiến độ (top) —
   KHÔNG đè lên các nút play/prev/next (trước đây nằm dưới, opacity 0,
   bấm play bị nuốt sự kiện). Vùng chạm 28px (đủ ngón tay) căn giữa
   trên vạch; .playerbar-main z-index 2 cao hơn nên nút luôn thắng
   ở vùng chồng lấn. appearance:none để không bao giờ vẽ track native
   (trước đây hover lộ ra → thành 2 vạch song song). */
.pb-seek {
  position: absolute; top: -14px; left: 12px; right: 12px; width: auto; height: 28px;
  opacity: 0; margin: 0; cursor: pointer; z-index: 1;
  appearance: none; -webkit-appearance: none; background: transparent; border: 0;
}
.pb-seek::-webkit-slider-runnable-track, .pb-seek::-webkit-slider-thumb,
.pb-seek::-moz-range-track, .pb-seek::-moz-range-thumb { appearance: none; -webkit-appearance: none; background: transparent; border: 0; }
/* Phản hồi hover: làm đậm vạch tiến độ duy nhất thay vì hiện track thứ hai */
.playerbar:hover .playerbar-progress { height: 5px; }

/* ── Now Playing overlay ────────────────────────────────── */
.nowplaying {
  position: fixed; inset: 0; z-index: 90;
  display: flex; flex-direction: column; align-items: center;
  padding: 18px clamp(20px, 6vw, 48px) calc(28px + var(--safe-bottom));
  background: var(--bg); /* nền đục tuyệt đối — không lộ trang bên dưới */
  visibility: hidden;
  overflow-x: clip; overflow-y: auto; overscroll-behavior: contain;
  box-sizing: border-box; max-width: 100%;
}
.nowplaying :is(.np-head, .np-meta, .np-seek-wrap, .np-controls) { min-width: 0; max-width: 100%; box-sizing: border-box; }
.nowplaying.open { visibility: visible; }
body.np-open { overflow: hidden; }
.np-bgwrap {
  position: absolute; inset: 0; overflow: clip; pointer-events: none;
}
.np-bg {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  filter: blur(60px) brightness(.4); transform: scale(1.3);
}
.np-bg::after { content: ''; position: absolute; inset: 0; background: rgba(10,6,24,.62); }
.np-grip { position: relative; z-index: 1; width: 100%; display: flex; justify-content: center; padding: 6px 0 10px; cursor: grab; touch-action: none; }
.np-grip span { width: 34px; height: 4px; border-radius: 999px; background: #766684; }
.np-head { position: relative; width: 100%; max-width: 520px; display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; gap: 8px; text-align: center; }
.np-label { font-size: .72rem; letter-spacing: .12em; color: #d8cde5; text-shadow: 0 1px 8px rgba(10,6,24,.85); }
.np-close { width: 44px; height: 44px; display: grid; place-items: center; opacity: .85; }
/* Khối nội dung chính của Now Playing — căn giữa, chiều rộng gọn gàng */
.np-body {
  position: relative; z-index: 1;
  width: min(100%, 440px); margin-inline: auto;
  display: flex; flex-direction: column; align-items: center;
}
/* (Cũ) khung "ảnh bìa" Now Playing đã bỏ — visualizer chạy full màn phía sau */
/* Visualizer 3D = layer full màn phía sau nội dung Đang Phát
   (trên nền blur, dưới chữ/nút; pointer-events:none để không nuốt chạm) */
#npViz {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: block; z-index: 0; pointer-events: none;
}
/* Scrim dìm nền 3D: đậm hơn ở đỉnh (label ĐANG PHÁT) và đáy (nút/danh sách),
   nhẹ ở giữa để visualizer vẫn nổi — đảm bảo chữ luôn đủ tương phản */
.np-scrim {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(180deg,
    rgba(10, 6, 24, 0.72) 0%,
    rgba(10, 6, 24, 0.38) 26%,
    rgba(10, 6, 24, 0.42) 58%,
    rgba(10, 6, 24, 0.62) 100%);
}
/* Khi đang phát: khung ô vuông nhỏ thu về placeholder trạng thái rỗng — 3D đã chiếm cả nền */
/* Đang Phát rỗng: ẩn hàng nút điều khiển + thanh tua (chưa có gì để điều khiển),
   thay bằng CTA về trang khám phá nhạc */
body.np-empty .np-controls { display: none; }
body.np-empty .np-seek-wrap { display: none; }
.np-empty-cta { display: none; }
body.np-empty .np-empty-cta { display: inline-flex; margin: 6px 0 2px; min-height: 44px; }
@keyframes spin-slow { to { transform: rotate(360deg); } }
.np-meta { position: relative; z-index: 1; text-align: center; width: 100%; margin: 0 0 12px; }
.np-title { font-family: var(--font-display); font-size: clamp(1.15rem, 5vw, 1.5rem); font-weight: 700; line-height: 1.25; color: #f7f2fc; overflow-wrap: anywhere; text-shadow: 0 1px 14px rgba(10,6,24,.85); }
.np-artist { color: #c9bdd7; font-size: .9rem; margin-top: 4px; text-shadow: 0 1px 10px rgba(10,6,24,.8); }
.np-seek-wrap { position: relative; z-index: 1; width: 100%; margin-top: 6px; }
.np-seek {
  width: 100%; height: 44px; cursor: pointer;
  appearance: none; -webkit-appearance: none; background: transparent; --v: 0;
}
.np-seek::-webkit-slider-runnable-track {
  height: 5px; border-radius: 999px;
  background: linear-gradient(90deg, var(--primary) calc(var(--v) * 0.1%), rgba(255,255,255,.18) 0);
}
.np-seek::-webkit-slider-thumb {
  -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%;
  background: #f7f2fc; margin-top: -4.5px; box-shadow: 0 0 10px rgba(168,85,247,.75);
}
.np-seek::-moz-range-track { height: 5px; border-radius: 999px; background: rgba(255,255,255,.18); }
.np-seek::-moz-range-progress { height: 5px; border-radius: 999px; background: var(--primary); }
.np-seek::-moz-range-thumb { width: 14px; height: 14px; border: none; border-radius: 50%; background: #f7f2fc; }
.np-seek:disabled { opacity: .45; cursor: default; }
.np-times { display: flex; justify-content: space-between; font-size: .78rem; color: #d8cde5; margin-top: 2px; font-variant-numeric: tabular-nums; text-shadow: 0 1px 8px rgba(10,6,24,.85); }
/* 3 vùng 1fr|auto|1fr (chuẩn app nhạc): nhóm trái căn PHẢI, play GIỮA, nhóm
   phải căn TRÁI → play luôn đúng tâm. Width 348 + gap đều 6/8 — hết giãn
   chen chúc (chủ dự án 2026-11-16: "icon giãn ra chen chúc nhìn chật") */
.np-controls { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; margin-top: 14px; width: min(100%, 348px); margin-inline: auto; }
.npc-side { display: flex; align-items: center; gap: 6px; min-width: 0; }
#npcLeft { justify-content: flex-end; }
#npcRight { justify-content: flex-start; }
/* Âm lượng NP — nút góc TRÊN PHẢI head (đối xứng nút thu nhỏ trái), pop slider
   dọc neo trong .np-head-right (position:relative) → tâm ray trùng tâm nút.
   Queue đóng: sat phải; queue mở: lùi trái cùng khối player (chủ dự án 2026-11-16). */
.np-head-right { position: relative; width: 44px; height: 44px; }
.np-vol-pop {
  position: absolute; top: calc(100% + 2px); right: 15px; z-index: 6;
  width: 14px; padding: 0; background: transparent; border: 0; box-shadow: none;
  --v: 85;
}
/* Ray là phần tử THẬT của pop (chủ dự án 2026-11-16: bo tròn 2 đầu) — 5px,
   border-radius 999px, căn giữa ngang pop, CHẠM SÁT cạnh dưới icon (top +2px,
   padding 0 — chủ dự án: tiết kiệm không gian). Input đè lên TRONG SUỐT
   (track ảo) → thumb (=input width 14px) tự căn đúng tâm ray mọi trình
   duyệt (fix bug thumb lệch ray). Gradient đổ đầy theo --v (var đặt TRÊN
   POP — inherit xuống ::before). */
.np-vol-pop::before {
  content: ''; position: absolute; top: 0; bottom: 0; left: 50%;
  transform: translateX(-50%); width: 5px; border-radius: 999px;
  background: linear-gradient(0deg, var(--primary) calc(var(--v) * 1%), rgba(255,255,255,.18) 0);
  pointer-events: none;
}
.np-vol-pop input {
  position: relative; z-index: 1;
  writing-mode: vertical-lr; direction: rtl; /* dọc — kéo lên = to */
  width: 14px; height: clamp(88px, 16vh, 132px); cursor: pointer; display: block;
  appearance: none; -webkit-appearance: none; background: transparent;
}
.np-vol-pop input::-webkit-slider-runnable-track { width: 14px; background: transparent; }
.np-vol-pop input::-webkit-slider-thumb {
  -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%;
  background: #f7f2fc; box-shadow: 0 0 10px rgba(168,85,247,.75);
}
.np-vol-pop input::-moz-range-track { width: 14px; background: transparent; }
.np-vol-pop input::-moz-range-progress { background: transparent; }
.np-vol-pop input::-moz-range-thumb { width: 14px; height: 14px; border: none; border-radius: 50%; background: #f7f2fc; }
.np-btn { min-width: 44px; min-height: 44px; display: grid; place-items: center; color: #e7ddef; transition: transform .25s var(--ease-spring), color .25s var(--ease-out); }
.np-btn:hover { transform: scale(1.12); }
.np-btn.on { color: var(--tertiary); filter: drop-shadow(0 0 6px rgba(34,211,238,.7)); }
.np-play {
  width: 64px; height: 64px; border-radius: 50%;
  background: #f7f2fc; color: #160d23;
  display: grid; place-items: center; transition: transform .25s var(--ease-spring), box-shadow .3s var(--ease-out);
}
.np-play:hover { transform: scale(1.06); box-shadow: 0 0 26px rgba(247,242,252,.35); }
/* Queue tích hợp trong Now Playing: desktop = cột phải full-height,
   mobile = phủ toàn màn. Không phải popup nổi lền lềnh góc màn hình. */
.np-queue-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(360px, 100%);
  background: #130b24; border: 1px solid var(--glass-border); border-radius: 18px;
  padding: 18px 14px calc(18px + var(--safe-bottom)); overflow: hidden;
  display: flex; flex-direction: column; z-index: 5;
  box-shadow: -18px 0 50px rgba(0,0,0,.45);
}
/* Chủ dự án 2026-11-16: header "Danh sách phát" + ✕ GHIM cố định —
   chỉ DANH SÁCH cuộn trong khung riêng (trước đây cả panel cuộn làm
   dòng tiêu đề + nút ✕ trôi mất). */
.npq-list {
  flex: 1 1 0; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  padding: 0 8px 6px;
}
/* Quan trọng: display:flex đè thuộc tính [hidden] mặc định — phải ghi đè lại */
.np-queue-panel[hidden] { display: none; }
.npq-head {
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; color: #fff;
  text-shadow: 0 1px 10px rgba(10,6,24,.85);
  margin-bottom: 14px; flex: none;
}
/* ✕ style BASE (mobile + desktop — mobile giờ cũng có ✕, 2026-11-16) */
.npq-close {
  width: 40px; height: 40px; display: grid; place-items: center;
  opacity: .8; border-radius: 10px; flex: none;
}
.npq-section {
  font-size: .68rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--tertiary); margin: 14px 0 8px; flex: none;
}
.npq-section:first-of-type { margin-top: 0; }
.npq-empty { color: var(--text-dim); font-size: .88rem; padding: 12px 4px; }
.npq-item {
  display: flex; gap: 12px; align-items: center; padding: 9px 10px; border-radius: 12px;
  cursor: pointer; transition: background .25s var(--ease-out); flex: none;
}
.npq-item:hover, .npq-item.playing { background: rgba(168,85,247,.14); }
.npq-item.playing .t { color: var(--tertiary); }
.npq-item img { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; }
.npq-item .t {
  font-size: .9rem; font-weight: 600; line-height: 1.35; color: #fff;
  text-shadow: 0 1px 8px rgba(10,6,24,.85);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
  overflow-wrap: anywhere;
}
.npq-item .a { font-size: .76rem; color: #b6a8c6; text-shadow: 0 1px 8px rgba(10,6,24,.8); }
/* Mobile: chia đôi màn Now Playing — player chiếm 3/5 trên,
   danh sách phát 2/5 dưới, cuộn RIÊNG trong khung danh sách. */
/* Ngưỡng NP desktop đã lên 1280px (chủ dự án 2026-11-15): dưới ngưỡng này
   player căn giữa trang sẽ CHẠM vào panel 360px phải → chuyển hẳn bố cục
   kiểu mobile (playlist dưới player) cho tới khi đủ chỗ 2 bên */
@media (max-width: 1279px) {
  /* Volume slider NGẮN trên mobile (chủ dự án 2026-11-16: bản clamp tới
     132px đè lên slider tua bài) — 54px + pop sát icon: ray kết thúc TRÊN
     vùng seek bar (seek top ~146, ray 84→138) dù layout co trên màn thấp. */
  .np-vol-pop input { height: 54px; }
  .nowplaying { overflow: hidden; } /* trang không cuộn — chỉ list cuộn */
  /* Player theo ĐÚNG chiều cao nội dung — không bị co. Co lại là hàng nút
     play tràn xuống dưới khung queue (z-index cao hơn) → playlist đè nút play
     và nuốt mất chạm trên màn thấp (bug 2026-11-15). Queue lấy phần còn lại. */
  .np-body {
    flex: 0 0 auto; min-height: 0; justify-content: space-evenly;
    width: 100%; padding: 0 4px;
    z-index: 2; /* hàng nút play LUÔN trên queue — hết bị đè/nuốt chạm */
  }
  /* Khung visualizer 3D co giãn theo chiều cao còn lại của khung 3/5 */
  .np-art-wrap {
    flex: 1 1 auto; min-height: 0; width: min(100%, 320px); aspect-ratio: auto;
    margin: 8px auto 12px;
  }
  /* Trạng thái rỗng: gọn trong khung player 1/3 */
  body.np-empty .np-meta { margin-bottom: 0; }
  .np-queue-panel {
    position: static; width: auto; align-self: stretch;
    flex: 1 1 0; min-height: 0;
    margin: 14px 10px 12px; /* thẻ nổi — bo tròn 4 góc, cách nút play một khoảng rõ ràng */
    background: rgba(10, 6, 24, 0.55); /* đậm hơn — nền 3D full màn dễ làm mờ chữ list */
    border: 1px solid var(--glass-border); border-radius: 18px;
    box-shadow: none;
    padding: 0; overflow: hidden; z-index: 1;
    display: flex; flex-direction: column;
  }
  .np-queue-panel[hidden] { display: none; }
  /* (2026-11-16) XOÁ ::before divider — panel đã có viền thẻ (border +
     radius 18px); ::before vẽ thêm 1 vạch nữa thành "2 vạch ngang chồng
     nhau" ở mép trên (chủ dự án bắt lỗi). Chỉ cần 1 vạch = viền thẻ. */
  .npq-head { flex: none; margin-bottom: 6px; padding: 0 16px; }
  .npq-list { flex: 1 1 0; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 6px calc(10px + var(--safe-bottom)); }
  /* ✕ HIỆN cả trên mobile (chủ dự án 2026-11-16): ẩn panel cho player rộng —
     mở lại bằng nút queue trên playerbar */
  .np-queue-tab { display: none; } /* tab mép phải chỉ thuộc desktop */
  .npq-item { padding: 11px 10px; } /* vùng chạm dễ hơn khi cuộn dọc */
  /* Mobile: queue ĐÓNG → thanh "Danh sách phát" đáy NP (chủ dự án 2026-11-16):
     bấm thanh → panel slide LÊN; ✕ trong panel → slide XUỐNG về thanh này */
  .npq-dock {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    align-self: stretch; flex: none; margin: auto 10px 12px; margin-top: auto;
    padding: 13px 16px;
    background: rgba(10, 6, 24, .55); border: 1px solid var(--glass-border);
    border-radius: 14px; color: var(--text); font-size: .92rem; font-weight: 600;
    z-index: 3; /* TRÊN np-body (z2, canvas vẽ nền đậm đè nút — pattern z-index cũ) */
  }
  .npq-dock[hidden] { display: none; }
}
/* Desktop (màn rộng): player trái + Danh sách phát phải width CỐ ĐỊNH 360px
   (phản hồi chủ dự án 2026-11-15: đủ cho list, không chiếm nửa màn).
   Queue GHIM được/ẨN được: cửa mở duy nhất khi ẩn = tab dọc mép phải; khi mở
   chỉ có ✕ góc trên phải của panel để đóng. */
@media (min-width: 1280px) {
  .nowplaying {
    display: grid;
    grid-template-columns: 1fr 360px;
    grid-template-rows: auto auto 1fr;
    overflow: hidden; /* clip panel khi tween trượt qua mép phải */
    /* Bỏ padding ngang clamp(20,6vw,48) của mobile — desktop mọi khối tự căn
       giữa/max-width riêng; giữ padding sẽ (a) tạo 48px chết bên phải queue,
       (b) lệch tâm player khỏi tâm trang do padding 2 biên không đối xứng */
    padding-left: 0; padding-right: 0;
  }
  .np-grip { grid-column: 1; grid-row: 1; }
  .np-head { grid-column: 1; grid-row: 2; }
  .np-body { grid-column: 1; grid-row: 3; min-height: 0; align-self: center; }
  .np-queue-panel {
    grid-column: 2; grid-row: 1 / -1;
    position: static; width: auto; height: auto;
    align-self: stretch;
    margin: 14px 16px 14px 0; /* thẻ nổi — bo tròn 4 góc, cách mép phải 16px */
    border: 1px solid var(--glass-border); border-radius: 18px;
    background: rgba(10, 6, 24, 0.52); /* đậm hơn — nền 3D full màn làm mờ chữ list */
    box-shadow: 0 12px 42px rgba(0,0,0,.35);
  }
  /* ✕ góc trên phải — đóng (ẩn) Danh sách phát; title trái, ✕ phải */
  .npq-dock { display: none; } /* thanh đáy chỉ thuộc mobile */
  .npq-head { padding-left: 18px; padding-right: 12px; }
  .npq-close {
    width: 40px; height: 40px; display: grid; place-items: center;
    opacity: .8; border-radius: 10px;
  }
  .npq-close:hover { opacity: 1; background: rgba(168,85,247,.14); }
  /* Trạng thái ẨN: player chiếm trọn viewport (panel đã hidden trong JS) */
  body.np-q-hidden .nowplaying { grid-template-columns: 1fr; }
  /* Tab mép phải — cổng mở lại Danh sách phát khi đang ẩn */
  .np-queue-tab {
    position: fixed; right: 0; top: 50%; transform: translateY(-50%);
    z-index: 6; width: 36px; padding: 16px 0 14px;
    display: flex; flex-direction: column; align-items: center; gap: 12px;
    background: rgba(19,11,36,.92); border: 1px solid var(--glass-border); border-right: 0;
    border-radius: 12px 0 0 12px; color: #e7ddef;
    backdrop-filter: blur(8px);
    transition: color .25s var(--ease-out), background .25s var(--ease-out);
  }
  .np-queue-tab:hover { color: var(--tertiary); background: rgba(30,18,56,.95); }
  /* display:flex đè [hidden] mặc định — phải ghi đè lại (bẫy cũ trong CLAUDE.md) */
  .np-queue-tab[hidden] { display: none; }
  /* Chủ dự án 2026-11-16 (giữ quyết định 2026-11-15): khi Danh sách phát mở,
     khối player VẪN CĂN GIỮA TRANG — KHÔNG dịch trái (chủ dự án phản hồi
     rõ: "không muốn dịch phần player sang trái"). Chỉ nút VOLUME góc phải
     head tấp vào TRÁI panel (head position:relative → absolute, hở 12px)
     để không đè panel. Màn < 1280px tự chuyển layout xếp tầng (player trên,
     playlist dưới) — gần đè là đổi, không bao giờ chồng lấn. */
  body:not(.np-q-hidden) .nowplaying :is(.np-grip, .np-head, .np-body) {
    grid-column: 1 / -1; justify-self: center;
  }
  body:not(.np-q-hidden) .np-head-right {
    position: absolute; right: calc(360px + 12px); top: 0;
  }
  .npqt-label {
    writing-mode: vertical-rl; font-size: .64rem; font-weight: 700;
    letter-spacing: .22em; text-transform: uppercase; color: inherit;
    font-family: var(--font-display);
  }
}

/* ── Toast ──────────────────────────────────────────────── */
.toast-wrap { position: fixed; top: calc(var(--header-h) + 12px); right: 16px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast {
  padding: 13px 20px; border-radius: 14px; font-size: .9rem; font-weight: 600; color: #fff;
  background: rgba(14,9,32,.95); border: 1px solid var(--glass-border);
  box-shadow: 0 10px 40px rgba(0,0,0,.5); backdrop-filter: blur(10px);
  animation: toast-in .35s cubic-bezier(.2,.8,.2,1);
}
.toast.err { border-color: rgba(255,107,107,.5); color: #ffb3b3; }
.toast.success { border-color: rgba(34,211,238,.5); }
@keyframes toast-in { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }

/* ── Trang nội dung chung ───────────────────────────────── */
.page-wrap { max-width: 1120px; margin: 0 auto; }
/* Trong page-wrap, section không tự thêm padding ngang — 1 mép trái duy nhất */
.page-wrap .section, .page-wrap .page-hero { padding-inline: 0; }
.page-hero {
  padding: calc(var(--header-h) + clamp(36px, 7vw, 72px)) clamp(16px, 4vw, 32px) 24px;
}
.breadcrumb { font-size: .82rem; color: var(--text-dim); margin-bottom: 14px; }
.breadcrumb a:hover { color: var(--tertiary); }
.playlist-head {
  display: grid; grid-template-columns: clamp(150px, 20vw, 200px) minmax(0, 1fr);
  grid-template-rows: auto auto auto; gap: 0 clamp(18px, 3vw, 28px);
  align-items: end;
}
.playlist-head img { grid-row: 1 / span 3; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.playlist-head .head-main { grid-column: 2; min-width: 0; }
.playlist-head .section-sub { grid-column: 2; margin-top: 8px; }
.playlist-head .pl-actions { grid-column: 2; margin-top: 14px; display: flex; gap: 10px; flex-wrap: wrap; }
.playlist-head .section-title { font-size: clamp(1.9rem, 3.4vw, 3rem); line-height: 1.08; }
.empty-note { color: var(--text-dim); text-align: center; padding: 60px 20px; font-size: .95rem; }
.back-link { display: none; }

/* ── GSAP reveal mặc định (dự phòng nếu JS chưa kịp) ────── */
.reveal { opacity: 0; transform: translateY(30px); }
.reveal-ready { opacity: 1; transform: none; }
.tab-ic { display: inline-flex; }
.fc-ico { color: var(--primary); filter: drop-shadow(0 0 10px rgba(168,85,247,.5)); }

/* ── Responsive / Mobile app shell ──────────────────────── */
@media (max-width: 900px) {
  /* Padding-top LỚN: mặt nhân vật trong ảnh hero nằm ở ~20% trên của ảnh —
     đẩy text xuống dưới để mặt nằm gọn vùng trống trên (ChatGPT review
     2026-11-16: mặt đè kicker/title là crowded; chỉnh y-position không cứu
     được vì ảnh cover khít chiều cao → chỉ dịch text mới tách composition) */
  .hero { padding: calc(var(--header-h) + 130px) 16px 40px; gap: 12px; min-height: auto; }
  /* background-position KHÔNG đặt ở đây nữa — mỗi ảnh hero tự mang position
     riêng (inline style từ app.js, neo theo vị trí nhân vật trong ảnh) */
  .hero-bg::before {
    /* Độy nhẹ cho chữ dễ đọc — NHẸ hơn desktop vì pool hero giờ gồm cả ảnh
       gallery (ảnh studio tối): đậm quá → ảnh gần như tàng hình (feedback
       chủ dự án 2026-11-16). Đáy để mask của .hero-bg lo (tan trong suốt) */
    background:
      linear-gradient(90deg, rgba(10,6,24,.62) 0%, rgba(10,6,24,.38) 55%, rgba(10,6,24,.12) 100%),
      linear-gradient(180deg, rgba(10,6,24,.38) 0%, rgba(10,6,24,.05) 45%, rgba(10,6,24,.22) 100%);
  }
  .hero-bg {
    /* Ảnh gallery tối → kéo sáng nhẹ để luôn nhìn thấy hero phía sau chữ */
    filter: brightness(1.18) saturate(1.05);
    -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 50%, rgba(0,0,0,.45) 74%, transparent 95%);
    mask-image: linear-gradient(180deg, #000 0%, #000 50%, rgba(0,0,0,.45) 74%, transparent 95%);
  }
  .hero-title { font-size: clamp(2rem, 11vw, 2.9rem); }
  .hero-kicker { font-size: .62rem; letter-spacing: .12em; }
  .hero-tagline { color: #e4d9ef; font-size: .88rem; }
  .hero-desc { font-size: .92rem; margin-bottom: 24px; }
  .hero-stats { margin: 22px 0 0; gap: 24px; }
  .hstat b { font-size: 1.5rem; }
  .hstat span { color: #ddd1e8; font-size: .64rem; }
  .hero-eq { height: 30px; margin-top: 18px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  :root { --header-h: 56px; --playerbar-h: 64px; }
  .brand-sub { display: none; }
  .site-header { gap: 12px; padding: 0 16px; }
  .nav-toggle { width: 44px; height: 44px; margin-left: auto; }
  .main-nav {
    position: fixed; top: var(--header-h); right: 12px; flex-direction: column;
    background: rgba(14,9,32,.97); border: 1px solid var(--glass-border); border-radius: 18px;
    padding: 10px; min-width: 200px; box-shadow: 0 20px 60px rgba(0,0,0,.6);
    display: none; z-index: 60;
  }
  .main-nav.open { display: flex; }
  /* Trang trong page-wrap: 1 mép trái duy nhất 16px */
  .page-wrap { padding-inline: 16px; }
  .page-hero { padding: calc(var(--header-h) + 20px) 0 18px; }
  .breadcrumb { display: none; }
  .back-link {
    display: inline-flex; align-items: center; gap: 6px; min-height: 40px;
    margin-bottom: 8px; font-size: .84rem; color: #c9bdd7;
  }
  .playlist-head { grid-template-columns: 96px minmax(0, 1fr); gap: 4px 12px; align-items: start; }
  .playlist-head img { width: 96px; border-radius: 12px; align-self: start; }
  .playlist-head .head-main { align-self: center; }
  .playlist-head .section-sub, .playlist-head .pl-actions { grid-column: 1 / -1; margin-top: 8px; }
  .playlist-head .pl-actions { gap: 8px; }
  .playlist-head .pl-actions .btn { min-height: 44px; padding-inline: 14px; }
  .playlist-head .section-title { font-size: clamp(1.2rem, 5.4vw, 1.6rem); line-height: 1.15; }
  /* Player rút gọn thành mini player dạng app */
  .playerbar-main { gap: 10px; padding: 0 12px; }
  .pb-info { flex: 1; width: auto; }
  .pb-controls { margin: 0; gap: 2px; }
  .pb-vol, .pb-time, #pbShuffle, #pbRepeat, .pb-queue-btn { display: none; }
  .pb-play { width: 42px; height: 42px; font-size: 1rem; }
  .pb-btn { font-size: .92rem; padding: 6px; }
  .pb-art-wrap { width: 44px; height: 44px; }
  .track-row { grid-template-columns: 34px 44px 1fr auto; gap: 10px; }
  .tr-num { display: none; }
  .tr-dur { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
  .np-art { width: min(78vw, 300px); }
}

@media (max-width: 760px) {
  .pl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .tabs-row { flex-wrap: nowrap; overflow-x: auto; padding: 4px 2px 6px; scrollbar-width: none; }
  .tabs-row::-webkit-scrollbar { display: none; }
  .tab-pill { flex: none; min-height: 40px; padding: 9px 16px; }
  .tabs-row .tab-pill.active { box-shadow: none; }
  /* Track: art + text max-width + badge — tiêu đề luôn đủ chỗ */
  .track-row { grid-template-columns: 44px minmax(0, 1fr) max-content; gap: 10px; min-height: 60px; padding: 8px 10px; }
  .tr-num, .tr-dur { display: none; }
  .tr-title { font-size: .88rem; }
  .tr-artist { font-size: .74rem; }
  .tr-src { font-size: .58rem; padding: 3px 6px; }
  /* Tabbar dạng dock full-width, nội dung chừa chỗ */
  .mobile-tabbar {
    left: 0; right: 0; bottom: 0; border-radius: 0;
    border-left: none; border-right: none; border-bottom: none;
    background: #100b20;
    padding: 0 var(--safe-bottom) 0 0;
  }
  .mobile-tabbar a, .mobile-tabbar button { min-height: 56px; border-radius: 0; }
  .mobile-tabbar .active { background: none; color: #f0d9ff; }
  /* Mini player trôi phía trên dock — không bị dock che */
  .playerbar {
    left: 12px; right: 12px; bottom: calc(70px + var(--safe-bottom));
    border-radius: 16px; border: 1px solid rgba(168,85,247,.3);
    height: 60px; padding-bottom: 0;
    box-shadow: 0 12px 34px rgba(0,0,0,.55);
  }
  body { padding-bottom: calc(64px + var(--safe-bottom)); }
  .page-hero { padding-top: calc(var(--header-h) + 22px); }
  .playlist-head img { width: 96px; }
}

/* Chủ dự án yêu cầu animation LUÔN BẬT — không tôn trọng prefers-reduced-motion
   (máy chủ dự án đang bật reduce-motion ở cấp hệ điều hành) */

/* ══════════════════════════════════════════════════════════
   MUA NHẠC VIP (/mua-nhac) — port MusicBot vào web
   ══════════════════════════════════════════════════════════ */
/* Banner VIP trang chủ */
.vip-banner {
  display: flex; align-items: center; gap: 22px; padding: 26px 30px;
  border-radius: var(--radius-lg); transition: transform .35s var(--ease-spring), box-shadow .35s var(--ease-out);
}
.vip-banner:hover { transform: translateY(-3px); box-shadow: inset 0 0 0 1px var(--primary), var(--glow-primary); }
.vip-banner .vipb-ico {
  flex: none; width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(168,85,247,.28), rgba(236,72,153,.18)); color: #f2c9ff;
}
.vip-banner .vipb-copy { min-width: 0; flex: 1; }
.vip-banner h3 { font-family: var(--font-display); color: #fff; font-size: 1.15rem; }
.vip-banner p { color: var(--text-dim); font-size: .88rem; margin-top: 6px; line-height: 1.6; }

/* 3 điểm mạnh */
.vip-points { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; padding: 0 clamp(20px, 6vw, 80px); margin-top: 8px; }
.vip-point { display: flex; gap: 14px; align-items: flex-start; padding: 18px 20px; border-radius: var(--radius); color: var(--tertiary); }
.vip-point b { display: block; color: #fff; font-size: .95rem; margin-bottom: 4px; }
.vip-point span { color: var(--text-dim); font-size: .8rem; line-height: 1.55; }
.vip-point svg { flex: none; margin-top: 2px; }

/* Lưới gói */
.pkg-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.pkg-card { position: relative; padding: 30px 26px 26px; border-radius: var(--radius-lg); display: flex; flex-direction: column; }
.pkg-badge {
  position: absolute; top: 18px; right: 18px; font-size: .64rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; padding: 5px 12px; border-radius: 999px;
  background: linear-gradient(135deg, rgba(168,85,247,.3), rgba(236,72,153,.2)); color: #f2c9ff;
}
.pkg-name { font-family: var(--font-display); font-size: 1.06rem; color: #fff; }
.pkg-price {
  margin: 14px 0 4px; font-family: var(--font-display); font-weight: 700; font-size: 2rem;
  background: var(--grad-main); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.pkg-price span { font-size: .8rem; font-weight: 500; color: var(--text-dim); -webkit-text-fill-color: var(--text-dim); }
.pkg-perks { list-style: none; margin: 16px 0 22px; display: grid; gap: 10px; }
.pkg-perks li { display: flex; align-items: center; gap: 10px; color: var(--text-dim); font-size: .88rem; }
.pkg-perks svg { color: var(--tertiary); flex: none; }
.pkg-buy { margin-top: auto; width: 100%; }

/* Hướng dẫn 3 bước */
.buy-how { margin-top: 22px; padding: 24px 28px; border-radius: var(--radius); }
.buy-how h3 { font-family: var(--font-display); color: #fff; font-size: 1.02rem; margin-bottom: 16px; }
.buy-how-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.buy-how-steps div {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px;
  background: rgba(168,85,247,.06); color: var(--text-dim); font-size: .84rem;
}
.buy-how-steps b {
  flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--grad-main); color: #fff; font-size: .82rem;
}

/* Playerbar: chỉ ẢNH BÌA + TÊN BÀI/TÁC GIẢ (+ nút queue desktop) mở Đang Phát —
   gợi ý con trỏ đúng trên 2 vùng đó, nền bar còn lại giữ cursor thường */
.playerbar:not(.empty) .pb-art-wrap, .playerbar:not(.empty) .pb-info { cursor: pointer; }

@media (max-width: 760px) {
  .vip-points { grid-template-columns: 1fr; padding: 0; }
  .vip-banner { flex-direction: column; align-items: flex-start; gap: 14px; padding: 22px; }
  .vip-banner .btn { margin-top: 4px; }
  .pkg-grid { grid-template-columns: 1fr; }
  .buy-how-steps { grid-template-columns: 1fr; }
  .order-body { grid-template-columns: 1fr; }
  .qr-wrap { justify-self: center; width: min(300px, 100%); }
  .kv span { min-width: 92px; }
}

/* Trang Mua nhạc (giới thiệu — mua qua Telegram) */
.pkg-no-bot { margin-top: auto; text-align: center; color: var(--text-dim); font-size: .82rem; padding: 10px; }
.buy-cta { margin-top: 18px; }

/* ── DẤU ẤN DJ TRUNGBAO: banner VIP + gallery + hero Mua nhạc ── */
.vip-banner .vipb-img {
  flex: none; width: clamp(110px, 14vw, 170px); aspect-ratio: 4/3; object-fit: cover;
  border-radius: 16px; box-shadow: 0 10px 30px rgba(0,0,0,.45);
}
.dj-gallery {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr; grid-template-rows: repeat(2, minmax(140px, 22vh));
  gap: 12px; padding: 0 clamp(20px, 6vw, 80px);
}
.dj-gal-item { overflow: hidden; border-radius: var(--radius); position: relative; background: var(--bg-2); min-height: 0; }
.dj-gal-item:first-child { grid-row: 1 / -1; }
.dj-gal-item img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .7s var(--ease-out), filter .7s var(--ease-out);
  filter: saturate(.92) brightness(.94);
}
.dj-gal-item:hover img { transform: scale(1.07); filter: saturate(1.1) brightness(1.05); }
.dj-gal-item::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(10,6,24,.42), transparent 45%); opacity: .8;
}
.buy-hero {
  position: relative; max-width: 100%; border-radius: var(--radius-lg); overflow: hidden;
  margin: 0 clamp(20px, 6vw, 80px); box-shadow: 0 18px 50px rgba(0,0,0,.45);
}
.buy-hero img { width: 100%; aspect-ratio: 21/8; object-fit: cover; display: block; }
.buy-hero-tag {
  position: absolute; left: 22px; bottom: 18px; padding: 8px 16px; border-radius: 999px;
  background: rgba(10,6,24,.72); backdrop-filter: blur(10px); color: #fff;
  font-family: var(--font-display); font-weight: 700; font-size: .88rem; letter-spacing: .04em;
}
@media (max-width: 760px) {
  .dj-gallery { grid-template-columns: 1fr 1fr; grid-template-rows: repeat(2, 34vw); }
  .dj-gal-item:first-child { grid-column: 1 / -1; grid-row: auto; }
  .buy-hero { margin: 0; }
  .buy-hero img { aspect-ratio: 16/9; }
  .vip-banner .vipb-img { width: 100%; aspect-ratio: 16/7; }
}
