/* =========================================================================
   MODULE "NHAC QUANG NINH" - trinh phat nhac noi (floating player)
   ========================================================================= */
.hlx-nhac-player {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 1500;
  font-family: 'Be Vietnam Pro', 'Segoe UI', Arial, sans-serif;
}

/* ---------- Nut thu gon (dia nhac xoay) ---------- */
.hlx-nhac-collapsed-btn {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--navy-light,#0ea5e9), var(--navy-deep,#0c4a6e) 70%);
  box-shadow: 0 10px 26px rgba(2,132,199,.45), 0 0 0 4px rgba(255,255,255,.08);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.3rem;
  border: none;
  position: relative;
}
.hlx-nhac-player:not(.hlx-nhac-mo-rong) .hlx-nhac-collapsed-btn { animation: hlxNhacDiaXoay 6s linear infinite; }
.hlx-nhac-collapsed-btn::after {
  content: "";
  position: absolute; inset: 8px;
  border-radius: 50%;
  border: 2px dashed rgba(255,255,255,.35);
}
@keyframes hlxNhacDiaXoay { to { transform: rotate(360deg); } }
.hlx-nhac-collapsed-label {
  position: absolute; left: 64px; top: 50%; transform: translateY(-50%);
  background: #06141c; color: #fff; font-size: .78rem; font-weight: 700;
  padding: 6px 12px; border-radius: 999px; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity .15s ease, left .15s ease;
}
.hlx-nhac-collapsed-btn:hover + .hlx-nhac-collapsed-label { opacity: 1; left: 68px; }

.hlx-nhac-player.hlx-nhac-mo-rong .hlx-nhac-collapsed-btn,
.hlx-nhac-player.hlx-nhac-mo-rong .hlx-nhac-collapsed-label { display: none; }
.hlx-nhac-player:not(.hlx-nhac-mo-rong) .hlx-nhac-bar { display: none; }

/* ---------- Thanh phat mo rong ---------- */
/* Ca video (khi la bai YouTube) lan phan thong tin/dieu khien deu nam CHUNG
   trong 1 the duy nhat (1 khung hinh) - khong con la 2 o noi roi nhau nhu
   truoc, nhin gon va chuyen nghiep hon. */
.hlx-nhac-bar {
  width: min(340px, 92vw);
  background: linear-gradient(165deg, rgba(6,20,28,.97), rgba(12,74,110,.96));
  border: 1px solid rgba(34,211,238,.25);
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(0,0,0,.4);
  overflow: hidden;
  backdrop-filter: blur(8px);
  animation: hlxNhacBarIn .18s ease;
  position: relative;
}
@keyframes hlxNhacBarIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.hlx-nhac-bar-main {
  padding: 12px 14px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px 12px;
  align-items: center;
}

/* ---------- Nut "Tat nhac" - goc tren-phai the, giong nut dong cua so quen
   thuoc nen de nhan ra ngay, khong lan trong hang icon dieu khien nua. ---------- */
.hlx-nhac-close-corner {
  position: absolute;
  top: 8px; right: 8px;
  z-index: 6;
  display: flex; align-items: center; gap: 5px;
  padding: 5px 10px 5px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.28);
  background: rgba(6,20,28,.6);
  backdrop-filter: blur(3px);
  color: #fff;
  font-size: .74rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.hlx-nhac-close-corner i { font-size: .78rem; }
.hlx-nhac-close-corner:hover {
  background: rgba(220,38,38,.85);
  border-color: rgba(220,38,38,.9);
  transform: scale(1.04);
}
.hlx-nhac-close-label { line-height: 1; }

.hlx-nhac-toggle { display: none; }

.hlx-nhac-cover {
  grid-row: 1 / span 2;
  width: 52px; height: 52px;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255,255,255,.08);
  flex-shrink: 0;
  box-shadow: 0 6px 14px rgba(0,0,0,.35);
}
.hlx-nhac-bar.hlx-nhac-dang-phat .hlx-nhac-cover { animation: hlxNhacCoverPulse 2.6s ease-in-out infinite; }
@keyframes hlxNhacCoverPulse { 0%,100% { box-shadow: 0 6px 14px rgba(0,0,0,.35); } 50% { box-shadow: 0 6px 22px rgba(34,211,238,.55); } }
.hlx-nhac-cover img { width: 100%; height: 100%; object-fit: cover; }

.hlx-nhac-info { min-width: 0; grid-column: 2; }
.hlx-nhac-ten { color: #fff; font-weight: 700; font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hlx-nhac-casi { color: #9fd6e6; font-size: .74rem; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.hlx-nhac-progress-wrap { display: flex; align-items: center; gap: 8px; }
.hlx-nhac-seek {
  flex: 1; height: 4px; -webkit-appearance: none; appearance: none;
  background: rgba(255,255,255,.22); border-radius: 999px; outline: none; cursor: pointer;
}
.hlx-nhac-seek::-webkit-slider-thumb {
  -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%;
  background: var(--teal,#22d3ee); box-shadow: 0 0 0 3px rgba(34,211,238,.25);
}
.hlx-nhac-time { color: #bcdce7; font-size: .68rem; white-space: nowrap; font-variant-numeric: tabular-nums; }

.hlx-nhac-vis { display: none; }

.hlx-nhac-controls {
  grid-column: 1 / -1;
  display: flex; align-items: center; justify-content: center; gap: 4px;
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 10px;
  flex-wrap: wrap;
}
.hlx-nhac-controls button {
  background: transparent; border: none; color: #cfe8f2;
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .95rem; transition: background .15s ease, color .15s ease;
}
.hlx-nhac-controls button:hover { background: rgba(255,255,255,.12); color: #fff; }
.hlx-nhac-btn-active { color: var(--teal,#22d3ee) !important; }
.hlx-nhac-play-btn {
  width: 42px !important; height: 42px !important;
  background: linear-gradient(135deg, var(--gold,#fb923c), var(--gold-dark,#ea580c)) !important;
  color: #06141c !important; font-size: 1.15rem !important;
}
.hlx-nhac-play-btn:hover { filter: brightness(1.08); }

.hlx-nhac-volume-wrap { display: flex; align-items: center; gap: 4px; }
.hlx-nhac-volume-wrap input[type=range] {
  width: 60px; height: 3px; -webkit-appearance: none; appearance: none;
  background: rgba(255,255,255,.25); border-radius: 999px; outline: none;
}
.hlx-nhac-volume-wrap input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 10px; height: 10px; border-radius: 50%; background: #fff;
}

/* ---------- Ngan xep danh sach phat ---------- */
.hlx-nhac-drawer {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 0;
  width: min(360px, 92vw);
  max-height: 340px;
  overflow-y: auto;
  background: #06141c;
  border: 1px solid rgba(34,211,238,.25);
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0,0,0,.5);
  display: none;
  flex-direction: column;
}
.hlx-nhac-drawer.hlx-nhac-drawer-mo { display: flex; }
.hlx-nhac-drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; color: #fff; font-weight: 700; font-size: .85rem;
  border-bottom: 1px solid rgba(255,255,255,.1); position: sticky; top: 0; background: #06141c;
}
.hlx-nhac-drawer-head a { color: var(--teal,#22d3ee); font-size: .75rem; font-weight: 600; text-decoration: none; }
.hlx-nhac-drawer-list { list-style: none; margin: 0; padding: 6px; }
.hlx-nhac-drawer-item {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 8px; border-radius: 10px; cursor: pointer;
}
.hlx-nhac-drawer-item:hover { background: rgba(255,255,255,.08); }
.hlx-nhac-drawer-item-active { background: rgba(34,211,238,.16); }
.hlx-nhac-drawer-thumb {
  width: 36px; height: 36px; border-radius: 8px; overflow: hidden; flex-shrink: 0;
  background: rgba(255,255,255,.08); display: flex; align-items: center; justify-content: center; color: #9fd6e6;
}
.hlx-nhac-drawer-thumb img { width: 100%; height: 100%; object-fit: cover; }
.hlx-nhac-drawer-meta { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.hlx-nhac-drawer-meta strong { color: #fff; font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hlx-nhac-drawer-meta small { color: #8fb9c7; font-size: .68rem; }
.hlx-nhac-drawer-badge { color: #7fd9ea; font-size: .64rem; background: rgba(34,211,238,.12); padding: 2px 8px; border-radius: 999px; white-space: nowrap; }

/* ---------- Video YouTube trong CUNG 1 khung voi thanh phat ----------
   Khac voi truoc (1 o video noi rieng, tach roi, nhin roi mat): gio video
   nam LIEN MACH ngay tren cung the .hlx-nhac-bar, dung 1 border/1 bong do
   duy nhat cho ca video lan phan dieu khien ben duoi - giong 1 khung hinh
   thong nhat. Chi hien khi bai dang chon co nguon YouTube. */
.hlx-nhac-yt-holder {
  display: none;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}
.hlx-nhac-yt-holder.hlx-nhac-yt-holder-active { display: block; }
.hlx-nhac-yt-holder iframe { width: 100%; height: 100%; display: block; border: none; }

@media (max-width: 576px) {
  .hlx-nhac-player { left: 10px; right: 10px; bottom: 78px; }
  .hlx-nhac-bar { width: 100%; }
  .hlx-nhac-drawer { width: 100%; }
}

/* =========================================================================
   Trang cong khai "/nhac-quang-ninh" - playlist dang DANH SACH (list), toi uu
   ca desktop (hang gon, thay ngay ca playlist) va dien thoai (moi hang la 1
   vung bam rong rai, de cham chinh xac).
   ========================================================================= */
.hero-nhac .hero-inner { background: linear-gradient(120deg, var(--navy-deep,#0c4a6e), var(--navy,#0284c7) 60%, #0891b2); }

.btn-gold {
  background: linear-gradient(135deg, var(--gold,#fb923c), var(--gold-dark,#ea580c));
  color: #fff;
  border: none;
  font-weight: 700;
}
.btn-gold:hover { color: #fff; filter: brightness(1.06); transform: translateY(-1px); }

.nhac-list {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 4px 18px rgba(2,54,84,.08);
  overflow: hidden;
}

.nhac-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid #eef4f8;
  transition: background .12s ease;
}
.nhac-row:last-child { border-bottom: none; }
.nhac-row:hover { background: var(--bg-soft,#f0f9ff); }
.nhac-row-active { background: #eafbff; }
.nhac-row-active .nhac-row-meta strong { color: var(--navy,#0284c7); }

.nhac-row-index {
  position: relative;
  width: 26px; height: 26px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted,#4f6b7a);
  font-size: .85rem;
  font-variant-numeric: tabular-nums;
}
.nhac-row-so { display: block; }
.nhac-row-play-icon { display: none; font-size: 1.1rem; color: var(--navy,#0284c7); }
.nhac-row-eq { display: none; align-items: flex-end; gap: 2px; height: 14px; }
.nhac-row-eq i { width: 3px; background: var(--navy,#0284c7); border-radius: 2px; animation: nhacEqBar .9s ease-in-out infinite; }
.nhac-row-eq i:nth-child(1) { height: 40%; animation-delay: 0s; }
.nhac-row-eq i:nth-child(2) { height: 100%; animation-delay: .15s; }
.nhac-row-eq i:nth-child(3) { height: 65%; animation-delay: .3s; }
@keyframes nhacEqBar { 0%,100% { transform: scaleY(.4); } 50% { transform: scaleY(1); } }

.nhac-row:hover .nhac-row-so { display: none; }
.nhac-row:hover .nhac-row-play-icon { display: block; }
.nhac-row-dang-phat .nhac-row-so,
.nhac-row-dang-phat .nhac-row-play-icon { display: none !important; }
.nhac-row-dang-phat .nhac-row-eq { display: flex; }

.nhac-row-cover {
  width: 46px; height: 46px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  background: var(--sky,#bae6fd);
}
.nhac-row-cover img { width: 100%; height: 100%; object-fit: cover; }
.nhac-row-cover-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: var(--navy,#0284c7);
  background: linear-gradient(135deg, var(--sky,#bae6fd), #fff);
}

.nhac-row-meta { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.nhac-row-meta strong { color: var(--navy-deep,#0c4a6e); font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nhac-row-meta small { color: var(--text-muted,#4f6b7a); font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.nhac-row-badge {
  flex-shrink: 0;
  font-size: .7rem;
  font-weight: 600;
  color: var(--navy,#0284c7);
  background: var(--sky,#bae6fd);
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.nhac-row-source { flex-shrink: 0; color: #b9c9d1; font-size: 1rem; width: 20px; text-align: center; }

@media (max-width: 576px) {
  .nhac-row { padding: 10px; }
  .nhac-row-meta strong { font-size: .86rem; }
}
