/* Karaoke KTV — giao diện tối neon (điện thoại, đăng nhập, quản trị) */
:root {
  --nen: #0b0716;
  --nen2: #150c29;
  --the: rgba(255, 255, 255, .045);
  --the2: rgba(255, 255, 255, .08);
  --vien: rgba(180, 107, 255, .28);
  --hong: #ff4fa3;
  --xanh: #3ee0ff;
  --tim: #b46bff;
  --vang: #ffd84d;
  --do: #ff5a6a;
  --luc: #4dffa6;
  --chu: #f6efff;
  --mo: #a99bc4;
  --bo: 16px;
  --glow-hong: 0 0 14px rgba(255, 79, 163, .55), 0 0 2px rgba(255, 79, 163, .9);
  --glow-xanh: 0 0 14px rgba(62, 224, 255, .5), 0 0 2px rgba(62, 224, 255, .9);
  --an-toan-duoi: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  background: radial-gradient(120% 70% at 10% -10%, #3a1366 0%, transparent 55%), radial-gradient(90% 60% at 110% 10%, #0f3d5c 0%, transparent 50%), var(--nen);
  background-attachment: fixed;
  color: var(--chu);
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: var(--xanh); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
.an { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
[hidden] { display: none !important; }

/* ---------- Nút ---------- */
.nut {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 42px; padding: 0 16px; border-radius: 999px; cursor: pointer;
  background: var(--the2); border: 1px solid var(--vien); color: var(--chu); font-weight: 600;
  transition: transform .12s, box-shadow .2s, background .2s; white-space: nowrap;
}
.nut:active { transform: scale(.96); }
.nut-chinh { background: linear-gradient(135deg, #ff4fa3, #b46bff); border-color: transparent; box-shadow: var(--glow-hong); color: #fff; }
.nut-xanh { background: linear-gradient(135deg, #18b8e0, #3ee0ff); border-color: transparent; color: #04121a; box-shadow: var(--glow-xanh); }
.nut-do { border-color: rgba(255, 90, 106, .5); color: #ffb3bb; }
.nut-nho { min-height: 34px; padding: 0 12px; font-size: 13px; }
.nut-tron { width: 42px; padding: 0; }
.nut .ic { width: 18px; height: 18px; }
.rong { width: 100%; }
.nut[disabled] { opacity: .4; pointer-events: none; }

/* ---------- Form ---------- */
label { display: block; margin: 12px 0; color: var(--mo); font-size: 13px; }
label small { color: var(--mo); opacity: .8; }
input[type=text], input[type=password], input[type=number], input[type=search], input:not([type]), select, textarea {
  display: block; width: 100%; margin-top: 6px; padding: 12px 14px; border-radius: 12px;
  background: rgba(0, 0, 0, .35); border: 1px solid var(--vien); color: var(--chu); outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--hong); box-shadow: var(--glow-hong); }
textarea { min-height: 110px; resize: vertical; }
fieldset { border: 1px solid var(--vien); border-radius: var(--bo); padding: 6px 14px 10px; margin: 0 0 14px; }
legend { padding: 0 6px; color: var(--hong); font-weight: 700; }
.hang-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.chon-hop { display: flex; align-items: center; gap: 10px; color: var(--chu); font-size: 15px; }
.chon-hop input { width: 20px; height: 20px; accent-color: var(--hong); margin: 0; }

/* ---------- Thông báo ---------- */
.flash { position: fixed; z-index: 90; left: 12px; right: 12px; top: 12px; padding: 12px 16px; border-radius: 14px; background: #241540; border: 1px solid var(--vien); box-shadow: 0 10px 30px rgba(0,0,0,.5); animation: tha .3s ease; }
.flash.tinh { position: static; margin: 0 0 14px; }
.flash-success { border-color: rgba(77, 255, 166, .5); }
.flash-error { border-color: rgba(255, 90, 106, .6); }
.flash-warning { border-color: rgba(255, 216, 77, .6); }
@keyframes tha { from { transform: translateY(-10px); opacity: 0; } }

/* ---------- Trang hộp (đăng nhập, cài đặt) ---------- */
.trang-hop { display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.hop { width: 100%; max-width: 440px; padding: 28px 22px; border-radius: 24px; background: rgba(21, 12, 41, .85); border: 1px solid var(--vien); box-shadow: 0 0 40px rgba(180, 107, 255, .18); }
.hop h1 { margin: 6px 0 2px; text-align: center; font-size: 24px; letter-spacing: .5px; text-shadow: var(--glow-hong); }
.logo-lon { font-size: 44px; text-align: center; filter: drop-shadow(0 0 12px rgba(255, 79, 163, .8)); }
.mo { color: var(--mo); text-align: center; margin: 6px 0 16px; }
.mo.ok { color: var(--luc); }
.mo.loi-nho { color: #ffb3bb; }
.nho { font-size: 12.5px; }

/* ---------- App điện thoại ---------- */
.ic { width: 22px; height: 22px; flex: none; display: inline-block; vertical-align: middle; }
.trang-app {
  --cao-dau: 58px; --cao-tab: 62px; --trai: 0px;
  --an-trai: env(safe-area-inset-left, 0px); --an-phai: env(safe-area-inset-right, 0px);
  min-height: 100vh; min-height: 100dvh;
  padding-bottom: calc(var(--cao-tab) + 14px + var(--an-toan-duoi));
}
.trang-app::before { /* đèn sân khấu mờ phía sau */
  content: ""; position: fixed; top: -20%; right: -40%; left: -40%; height: 80vh; z-index: -1; pointer-events: none; opacity: .5;
  background: conic-gradient(from 200deg at 50% 0%, transparent 0deg, rgba(255, 79, 163, .16) 18deg, transparent 34deg, transparent 60deg, rgba(62, 224, 255, .12) 78deg, transparent 96deg, transparent 130deg, rgba(180, 107, 255, .14) 148deg, transparent 166deg);
  filter: blur(18px);
}
.dau {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 10px; height: var(--cao-dau);
  padding: 0 calc(14px + var(--an-phai)) 0 calc(14px + var(--an-trai)); padding-top: env(safe-area-inset-top, 0px); box-sizing: content-box;
  background: rgba(11, 7, 22, .78); backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid rgba(180, 107, 255, .16);
}
.logo-nho { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 11px; background: linear-gradient(135deg, var(--hong), var(--tim)); box-shadow: var(--glow-hong); color: #fff; }
.logo-nho .ic { width: 19px; height: 19px; }
.dau .ten-phong { flex: 1; min-width: 0; font-weight: 900; font-size: 17px; letter-spacing: 1.5px; text-transform: uppercase; background: linear-gradient(90deg, #fff 0%, #ffc2e2 40%, var(--xanh)); -webkit-background-clip: text; background-clip: text; color: transparent; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-trang-thai { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px 0 9px; border-radius: 999px; font-size: 12px; background: rgba(255, 90, 106, .13); border: 1px solid rgba(255, 90, 106, .3); color: #ffb3bb; white-space: nowrap; flex: none; }
.tv-trang-thai .ic { width: 16px; height: 16px; }
.tv-trang-thai b { font-weight: 600; }
.tv-trang-thai.on { background: rgba(77, 255, 166, .1); border-color: rgba(77, 255, 166, .3); color: var(--luc); }
.tv-trang-thai::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.tv-trang-thai.on::after { animation: nhay-tv 2s ease-in-out infinite; }
@keyframes nhay-tv { 50% { opacity: .35; } }
.nut-ava { width: 36px; height: 36px; flex: none; border-radius: 50%; border: 0; background: linear-gradient(135deg, #ff4fa3, #3ee0ff); padding: 2px; font-weight: 800; color: #fff; cursor: pointer; box-shadow: 0 0 12px rgba(255, 79, 163, .4); background-clip: padding-box; position: relative; }
.nut-ava::before { content: ""; position: absolute; top: 2px; right: 2px; bottom: 2px; left: 2px; border-radius: 50%; background: #1d1036; z-index: -1; }
.nut-ava { isolation: isolate; display: flex; align-items: center; justify-content: center; }
.nut-ava .ic { width: 20px; height: 20px; }
.nut-xoay { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 12px; border: 1px solid rgba(180, 107, 255, .35); background: rgba(180, 107, 255, .12); color: #e6dbff; cursor: pointer; transition: background .2s, color .2s, transform .3s; }
.nut-xoay .ic { width: 21px; height: 21px; }
.nut-xoay:active { transform: rotate(-20deg) scale(.92); }
.nut-xoay.khoa { color: #fff; border-color: rgba(62, 224, 255, .6); background: rgba(62, 224, 255, .18); box-shadow: 0 0 12px rgba(62, 224, 255, .4); }

/* Bài đang hát */
.cot-trai { padding: 12px calc(12px + var(--an-phai)) 0 calc(12px + var(--an-trai)); }
.dang-hat { position: relative; overflow: hidden; isolation: isolate; padding: 16px; border-radius: 24px; background: linear-gradient(160deg, rgba(48, 18, 82, .92), rgba(16, 10, 34, .94)); border: 1px solid rgba(255, 255, 255, .09); box-shadow: 0 18px 40px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 79, 163, .12), 0 0 40px rgba(180, 107, 255, .14); }
.dh-nen { position: absolute; top: -30px; right: -30px; bottom: -30px; left: -30px; z-index: -1; background: var(--anh, none) center / cover no-repeat; filter: blur(26px) saturate(1.6); opacity: .42; transform: scale(1.1); transition: opacity .6s; }
.dang-hat::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: -1; background: linear-gradient(180deg, rgba(14, 8, 30, .1), rgba(14, 8, 30, .7) 70%); }
.dh-tren { display: flex; gap: 14px; align-items: center; }
.dh-anh-khung { position: relative; flex: none; width: 112px; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: #000; box-shadow: 0 6px 18px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 255, 255, .1); }
.dh-anh { width: 100%; height: 100%; object-fit: cover; display: block; }
.eq { position: absolute; right: 6px; bottom: 6px; display: flex; align-items: flex-end; gap: 2px; height: 14px; padding: 3px 4px; border-radius: 6px; background: rgba(0, 0, 0, .55); opacity: 0; transition: opacity .3s; }
.eq i { width: 3px; height: 30%; border-radius: 2px; background: var(--xanh); box-shadow: 0 0 4px var(--xanh); }
.dang-phat .eq { opacity: 1; }
.dang-phat .eq i { animation: eq .9s ease-in-out infinite alternate; }
.eq i:nth-child(2) { animation-delay: -.3s !important; background: var(--hong); box-shadow: 0 0 4px var(--hong); }
.eq i:nth-child(3) { animation-delay: -.6s !important; }
.eq i:nth-child(4) { animation-delay: -.15s !important; background: var(--vang); box-shadow: 0 0 4px var(--vang); }
@keyframes eq { 0% { height: 20%; } 100% { height: 100%; } }
.dh-chu { min-width: 0; flex: 1; }
.dh-nhan { display: inline-flex; align-items: center; gap: 6px; font-size: 10.5px; letter-spacing: 1.8px; color: var(--hong); font-weight: 800; text-transform: uppercase; }
.dang-phat .dh-nhan::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--hong); box-shadow: 0 0 8px var(--hong); animation: nhay-tv 1.2s infinite; }
.dh-ten { font-weight: 800; font-size: 16px; line-height: 1.3; margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.dh-nguoi { display: flex; align-items: center; gap: 5px; min-width: 0; color: var(--xanh); font-size: 13.5px; font-weight: 700; margin-top: 5px; white-space: nowrap; }
.dh-nguoi .ic { width: 15px; height: 15px; flex: none; filter: drop-shadow(0 0 4px rgba(62, 224, 255, .7)); }
.dh-nguoi span { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.dh-nguoi em { flex: none; font-style: normal; font-weight: 600; font-size: 11px; color: #ffd1e8; padding: 2px 8px; border-radius: 99px; background: rgba(255, 79, 163, .18); border: 1px solid rgba(255, 79, 163, .35); }
.dh-nguoi:empty { display: none; }
.dh-tien-do { display: flex; align-items: center; gap: 10px; margin: 16px 0 2px; font-size: 11.5px; color: var(--mo); font-variant-numeric: tabular-nums; }
.dh-tien-do span { min-width: 34px; }
.dh-tien-do span:last-child { text-align: right; }
.thanh { flex: 1; height: 5px; border-radius: 5px; background: rgba(255, 255, 255, .12); position: relative; }
.thanh i { position: relative; display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--hong), var(--tim), var(--xanh)); transition: width .45s linear; }
.thanh i::after { content: ""; position: absolute; right: -6px; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; background: #fff; box-shadow: 0 0 10px var(--xanh), 0 0 0 3px rgba(62, 224, 255, .25); }
.dang-hat:not(.co-bai) .thanh i::after { display: none; }
.dh-diem { margin-top: 12px; padding: 10px; border-radius: 14px; text-align: center; background: linear-gradient(90deg, rgba(255, 216, 77, .08), rgba(255, 216, 77, .18), rgba(255, 216, 77, .08)); border: 1px solid rgba(255, 216, 77, .3); color: var(--vang); font-weight: 800; font-size: 17px; text-shadow: 0 0 10px rgba(255, 216, 77, .6); }
.dk { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 12px; padding: 0 2px; }
.dk button { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .1); background: rgba(255, 255, 255, .06); color: #f0e6ff; cursor: pointer; transition: transform .12s, box-shadow .2s, background .2s; }
.dk button .ic { width: 24px; height: 24px; }
.dk button:active { transform: scale(.9); background: rgba(62, 224, 255, .15); box-shadow: var(--glow-xanh); }
.dk .chinh { width: 66px; height: 66px; border: 0; color: #fff; background: radial-gradient(circle at 30% 25%, #ff86c3, #ff4fa3 45%, #a347ff); box-shadow: 0 0 0 5px rgba(255, 79, 163, .14), 0 8px 26px rgba(255, 79, 163, .55); }
.dk .chinh .ic { width: 30px; height: 30px; }
.dk2 { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 8px 10px; border-radius: 16px; background: rgba(0, 0, 0, .25); border: 1px solid rgba(255, 255, 255, .06); }
.dk2 button { display: grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: 12px; border: 0; background: transparent; color: #e6dbff; cursor: pointer; transition: background .2s, color .2s; }
.dk2 button:active { background: rgba(255, 255, 255, .1); }
.dk2 button.bat { color: var(--hong); background: rgba(255, 79, 163, .14); box-shadow: inset 0 0 0 1px rgba(255, 79, 163, .45); }
.dk2 .nut-vt { color: var(--vang); }
.am-luong { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--mo); font-variant-numeric: tabular-nums; }
.am-luong span { width: 24px; text-align: right; }
input[type=range] { flex: 1; accent-color: var(--hong); height: 28px; margin: 0; }
#amLuong { -webkit-appearance: none; appearance: none; min-width: 0; height: 28px; background: transparent; cursor: pointer; --pt: 80%; }
#amLuong::-webkit-slider-runnable-track { height: 6px; border-radius: 6px; background: linear-gradient(90deg, var(--hong), var(--xanh)) 0 0 / var(--pt) 100% no-repeat, rgba(255, 255, 255, .14); }
#amLuong::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; margin-top: -7px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 0 0 4px rgba(255, 79, 163, .3), 0 0 12px rgba(255, 79, 163, .8); }
#amLuong::-moz-range-track { height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .14); }
#amLuong::-moz-range-progress { height: 6px; border-radius: 6px; background: linear-gradient(90deg, var(--hong), var(--xanh)); }
#amLuong::-moz-range-thumb { width: 18px; height: 18px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px rgba(255, 79, 163, .3); }
.hen-gio { font-size: 12px; color: var(--vang); text-align: center; margin-top: 10px; }
.tiep-mini { margin: 10px 0 0; }
.tiep-mini h4 { margin: 0 4px 6px; font-size: 11px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--mo); }
.tiep-mini .tm { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 14px; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .06); margin-bottom: 6px; font-size: 13px; min-width: 0; }
.tiep-mini .tm b { flex: none; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 79, 163, .2); color: var(--hong); font-size: 11px; }
.tiep-mini .tm span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tiep-mini .tm small { flex: none; max-width: 34%; color: var(--xanh); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tiep-mini .tm:nth-of-type(n+2) { display: none; }

/* Tab */
.khung-tab { padding: 0 calc(12px + var(--an-phai)) 0 calc(12px + var(--an-trai)); min-width: 0; }
.tieu-de-tab { display: flex; align-items: center; gap: 8px; margin: 16px 2px 12px; }
.tieu-de-tab h2 { flex: 1; min-width: 0; margin: 0; font-size: 19px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tieu-de-tab h2 span { color: var(--hong); }
.tieu-de-tab .nut .ic { width: 18px; height: 18px; }
.phan-doan { position: relative; z-index: 0; display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(255, 255, 255, .045); border: 1px solid rgba(180, 107, 255, .18); margin: 14px 0 12px; overflow-x: auto; scrollbar-width: none; }
.phan-doan::-webkit-scrollbar { display: none; }
.phan-doan button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 999px; border: 0; background: transparent; color: var(--mo); font-weight: 600; font-size: 13.5px; cursor: pointer; white-space: nowrap; transition: background .2s, color .2s; }
.phan-doan button .ic { width: 17px; height: 17px; }
.phan-doan button.chon { background: linear-gradient(135deg, #ff4fa3, #a347ff); color: #fff; box-shadow: 0 4px 14px rgba(255, 79, 163, .35); }

.o-tim { display: flex; gap: 8px; position: sticky; top: calc(var(--cao-dau) + env(safe-area-inset-top, 0px)); z-index: 5; padding: 12px calc(12px + var(--an-phai)) 8px calc(12px + var(--an-trai)); margin: 0 calc(-12px - var(--an-phai)) 0 calc(-12px - var(--an-trai)); background: #0d0819; box-shadow: 0 12px 12px -4px #0d0819; }
.o-tim-khung { position: relative; flex: 1; min-width: 0; }
.o-tim-khung > .ic { position: absolute; left: 15px; top: 50%; margin-top: -10px; width: 20px; height: 20px; color: var(--mo); pointer-events: none; }
.o-tim input { margin: 0; height: 48px; border-radius: 999px; padding: 0 16px 0 44px; font-size: 16px; background: rgba(255, 255, 255, .06); border-color: rgba(180, 107, 255, .3); }
.o-tim input::placeholder { color: rgba(169, 155, 196, .75); }
.o-tim .nut { flex: none; height: 48px; padding: 0 20px; }
.chip-hang { position: relative; z-index: 0; display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 8px; scrollbar-width: none; }
.chip-hang::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .1); background: rgba(255, 255, 255, .05); color: var(--chu); font-size: 13px; cursor: pointer; }
.chip .cham { width: 8px; height: 8px; border-radius: 50%; background: var(--m, var(--hong)); box-shadow: 0 0 6px var(--m, var(--hong)); }
.chip.chon { border-color: var(--xanh); background: rgba(62, 224, 255, .12); color: #fff; box-shadow: 0 0 12px rgba(62, 224, 255, .3); }
.chip .yt-logo { width: 20px; height: 14px; flex: none; }
.chip.mo { opacity: .4; }
.chip-yt.chon { border-color: #ff3355; background: rgba(255, 0, 51, .14); box-shadow: 0 0 12px rgba(255, 0, 51, .35); }
.the-yt { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 6px; background: #ff0033; color: #fff; font-size: 10px; font-weight: 700; letter-spacing: .3px; vertical-align: middle; }
.luoi-chu-de { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 6px 0 14px; }
.chu-de { position: relative; overflow: hidden; isolation: isolate; height: 78px; padding: 12px 14px; border-radius: 18px; border: 1px solid rgba(255, 255, 255, .08); background: linear-gradient(145deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .02)); text-align: left; font-weight: 800; font-size: 15px; line-height: 1.2; cursor: pointer; display: flex; align-items: flex-end; transition: transform .15s; }
.chu-de:active { transform: scale(.97); }
.chu-de::before { content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: -1; background: linear-gradient(135deg, var(--mau, var(--hong)) 0%, transparent 75%); opacity: .38; }
.chu-de::after { content: ""; position: absolute; right: -20px; top: -20px; width: 76px; height: 76px; border-radius: 50%; z-index: -1; border: 10px solid var(--mau, var(--hong)); opacity: .35; }
.chu-de > span { position: relative; z-index: 1; text-shadow: 0 1px 8px rgba(0, 0, 0, .6); overflow-wrap: anywhere; }
.nhom-kq h3 { display: flex; align-items: center; gap: 8px; font-size: 11.5px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--mo); margin: 16px 2px 10px; }
.nhom-kq h3::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(180, 107, 255, .35), transparent); }
.trong { padding: 34px 16px; text-align: center; color: var(--mo); }
.trong .to { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 79, 163, .22), rgba(255, 79, 163, 0) 70%); color: var(--hong); font-size: 30px; }
.trong .to .ic { width: 30px; height: 30px; }
.dang-tai { padding: 24px; text-align: center; color: var(--mo); }
.dang-tai::before { content: ""; display: inline-block; width: 18px; height: 18px; margin-right: 8px; vertical-align: -3px; border-radius: 50%; border: 2px solid var(--hong); border-right-color: transparent; animation: xoay .8s linear infinite; }
@keyframes xoay { to { transform: rotate(360deg); } }
.ghi-chu { font-size: 12.5px; color: var(--mo); padding: 6px 4px; }
.ghi-chu.loi { color: #ffb3bb; }

/* Dòng bài hát */
.ds { list-style: none; margin: 0; padding: 0; }
.bai { display: flex; align-items: center; gap: 10px; padding: 8px; margin-bottom: 8px; border-radius: 16px; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .06); min-width: 0; transition: background .2s; }
.bai .so { width: 22px; text-align: center; font-weight: 800; color: var(--hong); flex: none; font-variant-numeric: tabular-nums; }
.bai:first-child .so { color: var(--vang); text-shadow: 0 0 8px rgba(255, 216, 77, .6); }
.bai img { width: 88px; aspect-ratio: 16 / 9; height: auto; border-radius: 10px; object-fit: cover; flex: none; background: #120a24; }
.bai .chu { flex: 1; min-width: 0; }
.bai .ten { font-weight: 600; font-size: 14px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.bai .phu { font-size: 12px; color: var(--mo); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 3px; }
.bai .phu b { color: var(--xanh); font-weight: 600; }
.bai .diem { color: var(--vang); font-weight: 800; }
.bai .nut-chon { flex: none; display: inline-flex; align-items: center; gap: 4px; height: 36px; padding: 0 13px 0 9px; border-radius: 999px; border: 0; background: linear-gradient(135deg, #ff4fa3, #a347ff); color: #fff; font-weight: 700; font-size: 13.5px; cursor: pointer; box-shadow: 0 4px 12px rgba(255, 79, 163, .35); transition: transform .12s; }
.bai .nut-chon .ic { width: 17px; height: 17px; }
.bai .nut-chon:active { transform: scale(.94); }
.bai .nut-them { flex: none; display: grid; place-items: center; width: 32px; height: 36px; margin-left: -4px; border-radius: 10px; border: 0; background: transparent; cursor: pointer; color: var(--mo); }
.bai .hd { display: flex; gap: 2px; flex: none; }
.bai .hd button { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; border: 0; background: rgba(255, 255, 255, .05); color: #d9ccf2; cursor: pointer; }
.bai .hd button .ic { width: 18px; height: 18px; }
.bai .hd button[data-hd="xoa_cho"] { color: #ff9aa6; }
.bai.cua-toi { border-color: rgba(62, 224, 255, .28); background: linear-gradient(90deg, rgba(62, 224, 255, .07), rgba(255, 255, 255, .03)); }
.tim-do { color: var(--hong); }
.tim-do .ic { width: 13px; height: 13px; vertical-align: -1px; }

/* Xếp hạng */
.bxh { list-style: none; margin: 0; padding: 0; }
.bxh li { display: flex; align-items: center; gap: 12px; padding: 12px; margin-bottom: 8px; border-radius: 16px; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .06); }
.bxh .hang { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--the2); font-weight: 800; flex: none; }
.bxh li:nth-child(1) { border-color: rgba(255, 216, 77, .35); background: linear-gradient(90deg, rgba(255, 216, 77, .1), rgba(255, 255, 255, .03)); }
.bxh li:nth-child(1) .hang { background: linear-gradient(135deg, #ffd84d, #ff9f1c); color: #2a1600; box-shadow: 0 0 12px rgba(255, 216, 77, .6); }
.bxh li:nth-child(2) .hang { background: linear-gradient(135deg, #e6e6f0, #9aa0b5); color: #111; }
.bxh li:nth-child(3) .hang { background: linear-gradient(135deg, #e0a070, #a0582a); color: #160800; }
.bxh .ten { flex: 1; min-width: 0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bxh .ten small { display: block; font-weight: 400; color: var(--mo); font-size: 12px; }
.bxh .tb { font-weight: 900; color: var(--vang); font-size: 20px; text-shadow: 0 0 10px rgba(255, 216, 77, .5); }

/* Playlist */
.pl { display: flex; align-items: center; gap: 12px; padding: 12px; margin-bottom: 8px; border-radius: 16px; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .06); cursor: pointer; min-width: 0; }
.pl .bieu { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: linear-gradient(135deg, #ff4fa3, #3ee0ff); color: #fff; flex: none; box-shadow: 0 4px 12px rgba(255, 79, 163, .3); }
.pl .ten { flex: 1; min-width: 0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl .ten small { display: block; color: var(--mo); font-weight: 400; font-size: 12px; }
.pl .mui { color: var(--mo); transform: rotate(180deg); }

/* Thanh tab dưới */
.tab-duoi {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  height: calc(var(--cao-tab) + var(--an-toan-duoi)); padding: 0 var(--an-phai) var(--an-toan-duoi) var(--an-trai);
  background: rgba(13, 8, 26, .9); backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-top: 1px solid rgba(180, 107, 255, .18);
}
.tab-duoi button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-width: 0; border: 0; background: none; color: var(--mo); font-size: 11px; font-weight: 600; cursor: pointer; transition: color .2s; }
.tab-duoi button span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.tab-duoi button .ic { width: 23px; height: 23px; transition: transform .2s, filter .2s; }
.tab-duoi button.chon { color: #fff; }
.tab-duoi button.chon .ic { color: var(--hong); filter: drop-shadow(0 0 6px rgba(255, 79, 163, .9)); transform: translateY(-1px); }
.tab-duoi button.chon::before { content: ""; position: absolute; top: 0; left: 50%; width: 28px; height: 3px; margin-left: -14px; border-radius: 0 0 3px 3px; background: var(--hong); box-shadow: var(--glow-hong); }
.huy-hieu { position: absolute; top: 6px; left: calc(50% + 5px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--hong); color: #fff; font-size: 10.5px; font-weight: 800; line-height: 18px; text-align: center; box-shadow: var(--glow-hong); }

/* Sheet (hộp trượt từ dưới lên) */
.man-mo { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 60; background: rgba(4, 2, 10, .62); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); animation: mo-ra .2s ease; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 61; max-width: 560px; margin: 0 auto; max-height: 85vh; max-height: 85dvh; overflow-y: auto; overscroll-behavior: contain; padding: 8px calc(16px + var(--an-phai, 0px)) calc(18px + var(--an-toan-duoi)) calc(16px + var(--an-trai, 0px)); border-radius: 24px 24px 0 0; background: linear-gradient(180deg, #1d1138, #130b26); border: 1px solid rgba(180, 107, 255, .25); border-bottom: 0; box-shadow: 0 -10px 40px rgba(0, 0, 0, .5); animation: truot .24s cubic-bezier(.2, .9, .3, 1); }
.sheet::before { content: ""; display: block; width: 44px; height: 5px; border-radius: 5px; background: rgba(255, 255, 255, .2); margin: 4px auto 14px; }
.sheet h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; font-size: 16px; line-height: 1.35; overflow-wrap: anywhere; }
.sheet h3 .ic { color: var(--hong); }
.sheet .phu { color: var(--mo); font-size: 13px; margin-bottom: 14px; }
.sheet .hd-ds { display: grid; gap: 8px; }
.sheet .hd-ds button { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 50px; padding: 0 14px; border-radius: 14px; border: 1px solid rgba(255, 255, 255, .07); background: rgba(255, 255, 255, .05); font-size: 15px; text-align: left; cursor: pointer; }
.sheet .hd-ds button:active { background: rgba(255, 79, 163, .14); }
.sheet .hd-ds button > .ic { color: var(--hong); width: 21px; height: 21px; }
.sheet .hd-ds.luoi { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sheet .hd-ds.luoi button { justify-content: center; font-weight: 700; }
@keyframes truot { from { transform: translateY(100%); } }
@keyframes mo-ra { from { opacity: 0; } }

.toast { position: fixed; left: 50%; bottom: calc(var(--cao-tab, 62px) + 16px + var(--an-toan-duoi)); z-index: 80; transform: translateX(-50%); width: max-content; max-width: min(calc(100% - 32px), 480px); padding: 11px 18px; border-radius: 999px; background: rgba(42, 22, 80, .96); border: 1px solid rgba(255, 79, 163, .45); box-shadow: 0 8px 30px rgba(0, 0, 0, .5), 0 0 18px rgba(255, 79, 163, .35); font-size: 14px; text-align: center; animation: toast-vao .3s cubic-bezier(.2, .9, .3, 1.3); }
@keyframes toast-vao { from { transform: translate(-50%, 14px) scale(.92); opacity: 0; } }
.toast.dai { border-radius: 16px; }
.toast.loi { border-color: rgba(255, 90, 106, .7); box-shadow: 0 8px 30px rgba(0, 0, 0, .5); }

/* ---------- Quản trị ---------- */
.trang-qt { padding: 0 0 40px; }
.qt-dau { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: rgba(11, 7, 22, .9); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(180, 107, 255, .15); }
.qt-dau h1 { flex: 1; margin: 0; font-size: 18px; }
.qt-menu { display: flex; gap: 6px; overflow-x: auto; padding: 10px 12px; scrollbar-width: none; }
.qt-menu::-webkit-scrollbar { display: none; }
.qt-menu a { flex: none; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--vien); color: var(--mo); font-size: 14px; }
.qt-menu a.chon { color: #fff; border-color: var(--hong); box-shadow: var(--glow-hong); }
.qt-than { max-width: 820px; margin: 0 auto; padding: 0 12px; }
.the { padding: 16px; margin: 0 0 14px; border-radius: 18px; background: rgba(21, 12, 41, .8); border: 1px solid var(--vien); }
.the h2 { margin: 0 0 10px; font-size: 16px; color: var(--hong); }
.the p { color: var(--mo); margin: 6px 0; }
.bang { width: 100%; border-collapse: collapse; font-size: 14px; }
.bang th, .bang td { padding: 9px 8px; border-bottom: 1px solid rgba(255, 255, 255, .06); text-align: left; vertical-align: middle; }
.bang th { color: var(--mo); font-weight: 600; font-size: 12.5px; }
.bang td.so-lieu { font-variant-numeric: tabular-nums; text-align: right; }
.o-so { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.o-so div { padding: 14px; border-radius: 14px; background: var(--the); }
.o-so b { display: block; font-size: 24px; color: var(--xanh); }
.o-so span { color: var(--mo); font-size: 12.5px; }
.cot-ngay { display: flex; align-items: flex-end; gap: 4px; height: 120px; padding-top: 10px; }
.cot-ngay div { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; font-size: 10px; color: var(--mo); }
.cot-ngay i { display: block; width: 100%; min-height: 2px; border-radius: 4px 4px 0 0; background: linear-gradient(var(--hong), var(--tim)); }
.nhom-nut { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.nhom-nut form { margin: 0; }
.ma-code { font-family: ui-monospace, Consolas, monospace; background: rgba(0, 0, 0, .35); padding: 2px 6px; border-radius: 6px; }

/* ----- Máy tính bảng dọc: canh giữa ----- */
@media (min-width: 700px) and (orientation: portrait) {
  .trang-app .khung-app { max-width: 680px; margin: 0 auto; }
  .tab-duoi { max-width: 680px; margin: 0 auto; border-radius: 20px 20px 0 0; border: 1px solid rgba(180, 107, 255, .18); border-bottom: 0; }
  .luoi-chu-de { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tiep-mini .tm:nth-of-type(-n+3) { display: flex; }
}

/* ----- Màn ngang: 2 cột (trái: bài đang hát, phải: danh sách) ----- */
@media (orientation: landscape) and (min-width: 560px) {
  .trang-app { --trai: clamp(300px, 40vw, 430px); --cao-dau: 52px; --cao-tab: 56px; }
  .cot-trai {
    position: fixed; z-index: 20; left: 0; top: calc(var(--cao-dau) + env(safe-area-inset-top, 0px)); bottom: 0;
    width: calc(var(--trai) + var(--an-trai)); padding: 12px 10px calc(12px + var(--an-toan-duoi)) calc(12px + var(--an-trai));
    overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; border-right: 1px solid rgba(180, 107, 255, .14);
    background: linear-gradient(180deg, rgba(20, 10, 40, .55), rgba(11, 7, 22, .2));
  }
  .cot-trai::-webkit-scrollbar { display: none; }
  .khung-tab { margin-left: calc(var(--trai) + var(--an-trai)); padding-left: 16px; }
  .o-tim { margin-left: -16px; padding-left: 16px; }
  .tab-duoi { left: calc(var(--trai) + var(--an-trai)); padding-left: 0; }
  .toast { left: calc(var(--trai) + (100% - var(--trai)) / 2); max-width: min(calc(100% - var(--trai) - 32px), 480px); }
  .tiep-mini .tm:nth-of-type(-n+3) { display: flex; }
  .luoi-chu-de { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .sheet { max-height: 92dvh; border-radius: 22px 22px 0 0; }
  .sheet .hd-ds { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sheet .hd-ds.luoi { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
/* Điện thoại xoay ngang (chiều cao thấp): thu gọn khối điều khiển */
@media (orientation: landscape) and (min-width: 560px) and (max-height: 520px) {
  .tab-duoi { --cao-tab: 52px; }
  .trang-app { --cao-tab: 52px; }
  .tab-duoi button { flex-direction: row; gap: 6px; font-size: 12px; }
  .tab-duoi button .ic { width: 20px; height: 20px; }
  .huy-hieu { top: 4px; left: auto; right: 6px; }
  .tab-duoi button.chon::before { width: 40px; margin-left: -20px; }
  .dang-hat { padding: 12px; border-radius: 20px; }
  .dh-anh-khung { width: 96px; border-radius: 12px; }
  .dh-ten { font-size: 14.5px; }
  .dh-tien-do { margin-top: 10px; }
  .dk { margin-top: 8px; }
  .dk button { width: 42px; height: 42px; }
  .dk button .ic { width: 21px; height: 21px; }
  .dk .chinh { width: 54px; height: 54px; }
  .dk .chinh .ic { width: 26px; height: 26px; }
  .dk2 { margin-top: 8px; padding: 4px 8px; }
  .dk2 button { width: 34px; height: 34px; }
  .o-tim { padding-top: 8px; }
  .o-tim input, .o-tim .nut { height: 42px; }
  .sheet { max-width: 640px; }
}
@media (orientation: landscape) and (min-width: 1100px) {
  .khung-tab { padding-right: calc(24px + var(--an-phai)); padding-left: 24px; }
  .o-tim { margin: 0 calc(-24px - var(--an-phai)) 0 -24px; padding-left: 24px; padding-right: calc(24px + var(--an-phai)); }
  .khung-tab > section { max-width: 900px; }
}
@media (max-width: 419px) {
  .dau .ten-phong { font-size: 16px; letter-spacing: .6px; }
  .tv-trang-thai { padding: 0 9px; }
  .tv-trang-thai b { display: none; }
  .bai .nut-chon { padding: 0 13px; }
  .bai .nut-chon .ic { display: none; }
}
@media (max-width: 339px) {
  .logo-nho { display: none; }
  .bai img { width: 72px; }
  .bai .nut-chon { padding: 0 11px; font-size: 13px; }
}
/* ---------- Hiệu ứng ---------- */
.bai .phu .cs { font-style: normal; color: #c9b8ff; }
.tone { display: inline-block; vertical-align: 1px; margin-left: 2px; padding: 1px 6px; border-radius: 6px; font-style: normal; font-size: 10px; font-weight: 700; letter-spacing: .2px; white-space: nowrap; color: #bff4ff; background: rgba(62, 224, 255, .14); border: 1px solid rgba(62, 224, 255, .3); }
.sheet .phu.nho { font-size: 11.5px; margin-top: -8px; opacity: .7; }
.bai.vao { animation: len-vao .42s cubic-bezier(.2, .8, .3, 1) both; animation-delay: calc(var(--i, 0) * 38ms); }
@keyframes len-vao { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.khung-tab > section:not([hidden]) { animation: tab-vao .32s cubic-bezier(.2, .8, .3, 1); }
@keyframes tab-vao { from { opacity: 0; transform: translateX(10px); } }
.dang-hat.doi-bai .dh-anh-khung { animation: anh-doi .7s cubic-bezier(.2, .9, .3, 1.25); }
.dang-hat.doi-bai .dh-chu { animation: chu-doi .55s cubic-bezier(.2, .8, .3, 1); }
.dang-hat.doi-bai::before { content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 2; pointer-events: none; border-radius: inherit; background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .22) 50%, transparent 70%); background-size: 250% 100%; animation: quet-sang 1s ease-out forwards; }
@keyframes anh-doi { from { transform: scale(.6) rotate(-6deg); opacity: 0; } }
@keyframes chu-doi { from { transform: translateY(10px); opacity: 0; } }
@keyframes quet-sang { from { background-position: 120% 0; } to { background-position: -120% 0; opacity: 0; } }
.dang-hat.dang-phat { animation: vien-sang 3s ease-in-out infinite; }
@keyframes vien-sang { 50% { box-shadow: 0 18px 40px rgba(0, 0, 0, .45), 0 0 0 1px rgba(62, 224, 255, .25), 0 0 46px rgba(255, 79, 163, .3); } }
.khung-xuong .bai { animation: none; }
.khung-xuong .x-anh, .khung-xuong .x-dong { display: block; border-radius: 10px; background: linear-gradient(90deg, rgba(255, 255, 255, .05) 20%, rgba(255, 255, 255, .13) 40%, rgba(255, 255, 255, .05) 60%); background-size: 300% 100%; animation: shimmer 1.2s linear infinite; }
.khung-xuong .x-anh { width: 88px; aspect-ratio: 16 / 9; flex: none; }
.khung-xuong .x-dong { height: 12px; margin: 6px 0; }
.khung-xuong .x-dong.ngan { width: 55%; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.nut, .nut-chon, .dk button, .dk2 button, .chip, .phan-doan button, .tab-duoi button, .hd-ds button, .chu-de, .gy, .pl { position: relative; overflow: hidden; }
.gon { position: absolute !important; flex: none !important; display: block !important; margin: 0 !important; padding: 0 !important; z-index: 0; border-radius: 50%; pointer-events: none; background: radial-gradient(circle, rgba(255, 255, 255, .35), rgba(255, 255, 255, 0) 70%); transform: scale(0); animation: gon .6s ease-out forwards; }
@keyframes gon { to { transform: scale(1); opacity: 0; } }
.bai .nut-chon.da-chon { background: linear-gradient(135deg, #2bd98a, #3ee0ff); box-shadow: 0 4px 14px rgba(62, 224, 255, .45); }
.anh-bay { position: fixed; z-index: 90; border-radius: 10px; object-fit: cover; pointer-events: none; box-shadow: 0 0 0 2px #fff, 0 0 24px rgba(255, 79, 163, .8); }
.tab-duoi button.nay .ic { animation: nay .5s cubic-bezier(.3, 1.6, .5, 1); }
.huy-hieu.nay { animation: nay .5s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes nay { 40% { transform: scale(1.45); } }
.goi-y-tim { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 20; max-height: min(60vh, 360px); overflow-y: auto; padding: 6px; border-radius: 18px; background: rgba(26, 14, 50, .98); border: 1px solid rgba(180, 107, 255, .35); box-shadow: 0 18px 40px rgba(0, 0, 0, .6), 0 0 24px rgba(180, 107, 255, .2); animation: tha .2s ease; }
.gy { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px; border: 0; border-radius: 12px; background: transparent; color: var(--chu); text-align: left; cursor: pointer; }
.gy:active, .gy:hover { background: rgba(255, 79, 163, .12); }
.gy img { width: 64px; aspect-ratio: 16 / 9; border-radius: 8px; object-fit: cover; flex: none; background: #120a24; }
.gy span { flex: 1; min-width: 0; }
.gy b { display: block; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gy small { display: block; font-size: 12px; color: var(--mo); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gy > .ic { color: var(--hong); width: 20px; height: 20px; }
.gy-tim { color: var(--xanh); border-top: 1px solid rgba(255, 255, 255, .06); border-radius: 0 0 12px 12px; padding: 11px 9px; }
.gy-tim span { font-size: 13.5px; }
.gy-tim b { display: inline; }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
@media (max-width: 419px) { .bai .hd button[data-hd="len"] { display: none; } }
label input[type=range] { display: block; width: 100%; margin-top: 6px; }

/* ---- Vuốt thẻ "Đang hát" → xem video đang phát trên TV ---- */
.dh-video { margin: 0 -4px; animation: dhv-vao .28s ease; }
.dang-hat.xem-video .dh-tren { display: none; }
.dhv-khung { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: #000; box-shadow: 0 6px 18px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 255, 255, .1); }
.dhv-khung iframe, #ytDt { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; pointer-events: none; }
.dhv-trong { position: absolute; top: 0; right: 0; bottom: 0; left: 0; display: flex; align-items: center; justify-content: center; color: var(--mo); font-size: 13px; }
.dhv-trong[hidden] { display: none; }
.dhv-duoi { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; font-size: 12px; color: var(--mo); }
.dhv-tieng { width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .06); color: #fff; font-size: 16px; cursor: pointer; }
.dh-cham { display: flex; align-items: center; justify-content: center; margin-top: 10px; }
.dh-cham button { width: 7px; height: 7px; margin: 0 4px; padding: 0; border: 0; border-radius: 99px; background: rgba(255, 255, 255, .25); cursor: pointer; transition: width .2s, background .2s; }
.dh-cham button.on { width: 18px; background: var(--hong); box-shadow: 0 0 8px var(--hong); }
.dh-cham span { margin-left: 8px; font-size: 11px; color: var(--mo); }
.dang-hat.xem-video .dh-cham span { visibility: hidden; }
.dang-hat:not(.co-bai) .dh-cham span { visibility: hidden; }
@keyframes dhv-vao { from { opacity: 0; transform: translateX(24px); } }
.dang-hat .dh-tren { animation: dhv-vao-trai .28s ease; }
@keyframes dhv-vao-trai { from { opacity: 0; transform: translateX(-24px); } }

.nut-xem-them { display: block; width: 100%; margin: 12px 0 18px; }

/* ---------- Vào phòng bằng mã QR (không tài khoản) ---------- */
.trang-vao .hop.vao { text-align: center; }
.vao-qr { position: relative; width: 108px; height: 108px; margin: 0 auto 6px; border-radius: 26px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(145deg, rgba(255, 79, 163, .2), rgba(62, 224, 255, .14)); border: 1px solid rgba(255, 79, 163, .45); box-shadow: 0 0 30px rgba(255, 79, 163, .3); overflow: hidden; }
.vao-qr .ic { width: 64px; height: 64px; color: #fff; filter: drop-shadow(0 0 8px rgba(62, 224, 255, .8)); }
.vao-quet { position: absolute; left: 10px; right: 10px; height: 3px; top: 12px; border-radius: 3px; background: var(--xanh); box-shadow: 0 0 12px var(--xanh); animation: vaoQuet 2.2s ease-in-out infinite; }
@keyframes vaoQuet { 50% { top: 92px; } }
.vao-tieu { margin: 4px 0 16px; font-size: 16px; font-weight: 600; }
.vao-tv { display: inline-flex; align-items: center; margin: 0 auto 16px; padding: 6px 12px; border-radius: 99px; font-size: 13px; color: var(--mo); background: var(--the); border: 1px solid var(--vien); }
.vao-tv i { width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: #6b5a85; }
.vao-tv.bat { color: var(--luc); }
.vao-tv.bat i { background: var(--luc); box-shadow: 0 0 8px var(--luc); }
.nut-quet { font-size: 16px; padding: 14px 18px; }
.nut-quet .ic { width: 22px; height: 22px; margin-right: 8px; }
.vao-buoc { list-style: none; padding: 0; margin: 18px 0 14px; text-align: left; }
.vao-buoc li { display: flex; align-items: center; padding: 7px 0; color: var(--chu); font-size: 14px; }
.vao-buoc li b { flex: none; width: 26px; height: 26px; margin-right: 10px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; background: linear-gradient(135deg, #ff4fa3, #b46bff); }
.vao-buoc em { font-style: normal; color: var(--vang); }
.trang-vao .flash.tinh { text-align: left; }

/* Màn quét QR (camera) */
html.dang-quet, html.dang-quet body { overflow: hidden; }
.quet-man { position: fixed; z-index: 200; top: 0; right: 0; bottom: 0; left: 0; background: #000; color: #fff; }
.quet-video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
.quet-toi { position: absolute; top: 0; right: 0; bottom: 0; left: 0; pointer-events: none;
  background: radial-gradient(circle at 50% 46%, transparent 0, transparent min(34vw, 170px), rgba(0, 0, 0, .62) calc(min(34vw, 170px) + 1px)); }
.quet-tren { position: absolute; left: 0; right: 0; top: 0; padding: calc(18px + env(safe-area-inset-top, 0px)) 20px 12px; text-align: center; background: linear-gradient(rgba(0, 0, 0, .7), transparent); }
.quet-tren b { display: block; font-size: 18px; }
.quet-tren span { display: block; margin-top: 4px; font-size: 13.5px; color: #d9cdef; }
.quet-khung { position: absolute; left: 50%; top: 46%; width: min(64vw, 300px); height: min(64vw, 300px); transform: translate(-50%, -50%); }
.quet-khung i { position: absolute; width: 34px; height: 34px; border: 4px solid var(--xanh); filter: drop-shadow(0 0 6px var(--xanh)); }
.quet-khung i:nth-child(1) { top: 0; left: 0; border-right: 0; border-bottom: 0; border-top-left-radius: 14px; }
.quet-khung i:nth-child(2) { top: 0; right: 0; border-left: 0; border-bottom: 0; border-top-right-radius: 14px; }
.quet-khung i:nth-child(3) { bottom: 0; left: 0; border-right: 0; border-top: 0; border-bottom-left-radius: 14px; }
.quet-khung i:nth-child(4) { bottom: 0; right: 0; border-left: 0; border-top: 0; border-bottom-right-radius: 14px; }
.quet-khung em { position: absolute; left: 8%; right: 8%; top: 8%; height: 2px; background: var(--hong); box-shadow: 0 0 12px var(--hong); animation: quetDong 2s ease-in-out infinite; }
@keyframes quetDong { 50% { top: 92%; } }
.quet-khung.xong i { border-color: var(--luc); filter: drop-shadow(0 0 10px var(--luc)); }
.quet-khung.xong em { display: none; }
.quet-duoi { position: absolute; left: 0; right: 0; bottom: 0; padding: 16px 16px calc(18px + env(safe-area-inset-bottom, 0px)); background: linear-gradient(transparent, rgba(0, 0, 0, .8) 30%); text-align: center; }
.quet-tin { min-height: 40px; margin: 0 auto 12px; max-width: 460px; font-size: 14px; line-height: 1.4; color: #eee; }
.quet-tin.loi { color: #ffc2c8; }
.quet-tin.ok { color: var(--luc); font-weight: 700; }
.quet-nut { display: flex; justify-content: center; flex-wrap: wrap; }
.quet-nut > * { margin: 4px 6px; padding: 11px 18px; border-radius: 99px; font: inherit; font-size: 14.5px; color: #fff; cursor: pointer; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .25); }
.quet-dong { background: linear-gradient(135deg, #ff4fa3, #b46bff) !important; border-color: transparent !important; }

/* Phiên hát kết thúc (TV thoát app / tắt / mở lại) → quét mã mới ngay trên trang */
.het-phong { position: fixed; z-index: 150; top: 0; right: 0; bottom: 0; left: 0; display: flex; align-items: center; justify-content: center; padding: 20px 16px;
  background: rgba(8, 4, 18, .9); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); animation: hienDan .3s ease; }
@keyframes hienDan { from { opacity: 0; } }
.het-phong .hop { text-align: center; }
.het-phong .hp-tieu { margin: 10px 0 6px; font-size: 20px; font-weight: 800; text-shadow: var(--glow-hong); }
.het-phong .hp-chu { margin: 0 0 18px; color: var(--mo); line-height: 1.5; }
.het-phong .hp-tv { margin: -6px 0 16px; }

/* ---------- Quản trị → Thử hệ thống ---------- */
.thu-bang td:first-child { width: 28px; text-align: center; vertical-align: top; }
.thu-luoi { display: flex; flex-wrap: wrap; align-items: flex-start; margin: 12px -6px 0; }
.thu-o { margin: 6px; min-width: 0; }
.thu-o-tv { flex: 1 1 520px; }
.thu-o-dt { flex: 0 0 390px; max-width: 100%; }
.thu-nhan { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; font-weight: 700; }
.thu-tv-khung { position: relative; width: 100%; height: 300px; overflow: hidden; border-radius: 12px; background: #000; border: 1px solid var(--vien); }
.thu-tv-khung iframe { position: absolute; top: 0; left: 0; width: 1280px; height: 720px; border: 0; transform-origin: 0 0; }
.thu-o-dt iframe { display: block; width: 390px; max-width: 100%; height: 760px; border: 1px solid var(--vien); border-radius: 22px; background: #0b0716; }
/* 2.1.0 Quản trị → Cách tìm bài */
.chon-nhom { border: 1px solid var(--vien); border-radius: 12px; padding: 8px 12px 4px; margin: 10px 0; }
.chon-nhom legend { padding: 0 6px; font-weight: 700; font-size: 14px; }
