/* HV Video Xem – trình xem kiểu TikTok / Facebook Watch (veduhoc.vn + hvsc.vn) */
*,*::before,*::after{box-sizing:border-box}
html,body{margin:0;height:100%;overflow:hidden;background:#0b0f1e}
body.hvx-body{font-family:"Be Vietnam Pro",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;-webkit-font-smoothing:antialiased}
.hvx{--pw:400px;--bg:#fff;--bg2:#f5f6fa;--tx:#16203f;--mut:#5b6382;--ln:#e6e9f2;--chip:#fff1ec;--ok:#16a34a;
  position:fixed;inset:0;display:grid;grid-template-columns:minmax(0,1fr) var(--pw);grid-template-rows:100%;color:var(--tx);overflow:hidden;transition:grid-template-columns .28s ease}
.hvx[data-eff=dark]{--bg:#141a2d;--bg2:#0e1324;--tx:#eef0f8;--mut:#a9b1cb;--ln:#262e4a;--chip:#2a2030}
.hvx[data-pm="0"]{--pw:0px}
.hvx button,.hvx input,.hvx textarea,.hvx a{font-family:inherit}
.hvx button{cursor:pointer}
.hvx svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex:0 0 auto}
.hvx-bg{position:absolute;inset:0;overflow:hidden;background:#0b0f1e;z-index:0}
.hvx-bg img{width:100%;height:100%;object-fit:cover;filter:blur(46px) saturate(1.25) brightness(.5);transform:scale(1.35)}
.hvx-bg::after{content:"";position:absolute;inset:0;background:rgba(6,9,20,.35)}

/* thanh trên */
.hvx-top{position:absolute;left:0;top:0;right:var(--pw);z-index:6;display:flex;align-items:center;gap:10px;padding:10px 14px;color:#fff;transition:right .28s ease;pointer-events:none}
.hvx-top>*{pointer-events:auto}.hvx-sp{flex:1;pointer-events:none}
.hvx-ic{width:40px;height:40px;border-radius:50%;border:0;background:rgba(255,255,255,.14);color:#fff;display:flex;align-items:center;justify-content:center;padding:0;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}
.hvx-ic:hover,.hvx-nav button:hover{background:var(--hvx-acc)}
.hvx-brand{display:flex;align-items:center;gap:7px;color:#fff;text-decoration:none;font-weight:800;font-size:15px;letter-spacing:.01em}.hvx-brand img{border-radius:6px}
.hvx-cnt{font-size:13px;font-weight:600;color:rgba(255,255,255,.85);padding:5px 10px;border-radius:999px;background:rgba(255,255,255,.12);white-space:nowrap}
.hvx-ori{display:flex;gap:2px;padding:3px;border-radius:999px;background:rgba(255,255,255,.12);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}
.hvx-ori button{padding:6px 12px;border:0;border-radius:999px;background:none;color:#d6dbec;font:600 12.5px/1 inherit;white-space:nowrap}.hvx-ori button.on{background:#fff;color:#16203f}

/* sân khấu */
.hvx-stage{position:relative;z-index:1;min-width:0;display:flex;flex-direction:column;padding:60px 76px 18px 20px}
.hvx-fw{flex:1;min-height:0;display:flex;align-items:center;justify-content:center;container-type:size}
.hvx-frame{position:relative;background:#000;border-radius:18px;overflow:hidden;box-shadow:0 30px 80px -20px rgba(0,0,0,.8)}
.hvx-frame.o-v{aspect-ratio:9/16;height:min(100cqh,calc(100cqw * 16 / 9))}
.hvx-frame.o-h{aspect-ratio:16/9;width:min(100cqw,calc(100cqh * 16 / 9))}
.hvx-poster{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;transition:opacity .35s}
.hvx-pl,.hvx-pl iframe{position:absolute;inset:0;width:100%;height:100%;border:0}
.hvx-frame.ready .hvx-poster{opacity:0;pointer-events:none}
.hvx-start{position:absolute;inset:0;margin:auto;width:84px;height:60px;border:0;background:none;padding:0;transition:opacity .2s,transform .2s;z-index:2}.hvx-start:hover{transform:scale(1.08)}.hvx-start svg{width:68px;height:48px;stroke:none;fill:none}
.hvx-frame.ready .hvx-start,.hvx-frame.loading .hvx-start{opacity:0;pointer-events:none}
.hvx-frame.loading::after{content:"";position:absolute;left:50%;top:50%;width:34px;height:34px;margin:-17px 0 0 -17px;border-radius:50%;border:3px solid rgba(255,255,255,.3);border-top-color:#fff;animation:hvxs .8s linear infinite;z-index:2}
@keyframes hvxs{to{transform:rotate(360deg)}}
.hvx-unmute{position:absolute;left:12px;bottom:64px;z-index:4;padding:9px 16px;border:0;border-radius:999px;background:rgba(15,20,36,.88);color:#fff;font:700 13px/1 inherit;box-shadow:0 8px 24px -8px rgba(0,0,0,.6);animation:hvxp 1.6s ease-in-out infinite}
@keyframes hvxp{50%{box-shadow:0 0 0 6px rgba(255,255,255,.18)}}
.hvx-toast{position:absolute;left:50%;top:66px;transform:translateX(-50%);max-width:min(560px,86%);padding:10px 16px;border-radius:12px;background:rgba(22,32,63,.96);color:#fff;font-size:13px;line-height:1.45;text-align:center;opacity:0;transition:opacity .3s;pointer-events:none;z-index:8;box-shadow:0 12px 30px -12px rgba(0,0,0,.6)}.hvx-toast.on{opacity:1}
.hvx-nav{position:absolute;right:20px;top:50%;transform:translateY(-50%);display:flex;flex-direction:column;gap:12px;z-index:5}
.hvx-nav button{width:46px;height:46px;border-radius:50%;border:0;background:rgba(255,255,255,.16);color:#fff;display:flex;align-items:center;justify-content:center;padding:0;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}
.hvx-swz,.hvx-rail,.hvx-cap{display:none}

/* thẻ thu/mở cột phải */
.hvx-tog{position:absolute;z-index:7;top:50%;right:var(--pw);width:26px;height:68px;margin-top:-34px;border:0;border-radius:14px 0 0 14px;background:var(--bg);color:var(--tx);display:flex;align-items:center;justify-content:center;padding:0;box-shadow:-6px 0 20px -8px rgba(0,0,0,.5);transition:right .28s ease}
.hvx-tog svg{width:18px;height:18px;transition:transform .28s}.hvx[data-pm="0"] .hvx-tog svg{transform:rotate(180deg)}
.hvx-tog:hover{background:var(--hvx-acc);color:#fff}

/* cột phải */
.hvx-panel{position:relative;z-index:3;min-width:0;background:var(--bg);color:var(--tx);display:flex;flex-direction:column;overflow:hidden;border-left:1px solid var(--ln);width:400px;transition:transform .28s ease}
.hvx[data-pm="0"] .hvx-panel{transform:translateX(100%);pointer-events:none;visibility:hidden}
.hvx-sh{display:none}
.hvx-sc{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}
.hvx-info{padding:18px 18px 4px}
.hvx-info h1{margin:0 0 6px;font-size:18px;line-height:1.38;font-weight:800;color:var(--tx)}
.hvx-ch{margin:0 0 6px;font-size:13px;color:var(--mut)}.hvx-ch a{color:var(--hvx-acc);font-weight:700;text-decoration:none}
.hvx-ex{margin:0 0 12px;font-size:14px;line-height:1.6;color:var(--tx);display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.hvx-ex:empty{display:none}
.hvx-act{display:flex;flex-wrap:wrap;gap:8px}
.hvx-b{display:inline-flex;align-items:center;gap:7px;padding:8px 13px;border:1px solid var(--ln);border-radius:999px;background:var(--bg2);color:var(--tx);font:600 13px/1.2 inherit;text-decoration:none;white-space:nowrap}
.hvx-b svg{width:16px;height:16px}.hvx-b i{font-style:normal;color:var(--mut);font-weight:600}
.hvx-b:hover{border-color:var(--hvx-acc);color:var(--hvx-acc)}.hvx-b[aria-pressed=true]{background:var(--hvx-acc);border-color:var(--hvx-acc);color:#fff}.hvx-b[aria-pressed=true] i{color:#fff}.hvx-b[aria-pressed=true] svg{fill:#fff}
.hvx-bi{padding:8px 10px}
.hvx-stars{display:flex;align-items:center;gap:10px;margin-top:12px}
.hvx-stars .s{display:inline-flex}.hvx-stars button{border:0;background:none;padding:0 2px;font-size:24px;line-height:1;color:#c9cfdf}.hvx[data-eff=dark] .hvx-stars button{color:#444c6b}.hvx[data-eff=dark] .hvx-stars button.on{color:#f5a623}.hvx-stars button.on{color:#f5a623}
.hvx-stars em{font-style:normal;font-size:12.5px;color:var(--mut)}
.hvx-pop{margin-top:10px;padding:8px;border:1px solid var(--ln);border-radius:14px;background:var(--bg2);display:flex;flex-wrap:wrap;gap:6px}
.hvx-pop[hidden]{display:none}.hvx-pop a,.hvx-pop button{padding:8px 12px;border:1px solid var(--ln);border-radius:10px;background:var(--bg);color:var(--tx);font:600 13px/1 inherit;text-decoration:none}
.hvx-chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:12px}.hvx-chips:empty{display:none}
.hvx-chips a,.hvx-chips span{padding:5px 12px;border-radius:999px;background:var(--chip);color:var(--hvx-acc);font-size:12.5px;font-weight:700;text-decoration:none}.hvx-chips span{background:var(--bg2);color:var(--mut)}
.hvx-cta{margin:14px 0 6px;padding:14px 16px;border-radius:16px;background:linear-gradient(120deg,#16203f,#2a1f4f);color:#fff;display:flex;flex-direction:column;gap:3px}
.hvx-cta b{font-size:14.5px}.hvx-cta span{font-size:13px;color:rgba(255,255,255,.78);line-height:1.5}.hvx-cta a{margin-top:8px;align-self:flex-start;padding:8px 16px;border-radius:999px;background:linear-gradient(135deg,var(--hvx-acc2),var(--hvx-acc));color:#fff;font-weight:700;font-size:13px;text-decoration:none}
.hvx-tabs{position:sticky;top:0;z-index:2;display:flex;gap:4px;padding:6px 14px 0;margin-top:8px;background:var(--bg);border-bottom:1px solid var(--ln)}
.hvx-tabs button{padding:10px 12px;border:0;border-bottom:2px solid transparent;background:none;color:var(--mut);font:700 13.5px/1 inherit}.hvx-tabs button[aria-selected=true]{color:var(--tx);border-bottom-color:var(--hvx-acc)}.hvx-tabs i{font-style:normal;font-weight:600;color:var(--mut);font-size:12px}
.hvx [hidden]{display:none!important}
.hvx-cm,.hvx-rl{padding:12px 18px 18px}
.hvx-empty{margin:18px 0;text-align:center;color:var(--mut);font-size:13.5px;line-height:1.55}
.hvx-c{display:flex;gap:10px;margin:0 0 14px}.hvx-c.rp{margin:-6px 0 12px 42px}
.hvx-av{flex:0 0 32px;width:32px;height:32px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,var(--hvx-acc2),var(--hvx-acc));color:#fff;font-weight:800;font-size:13px}.rp .hvx-av{flex-basis:26px;width:26px;height:26px;font-size:11px}
.hvx-cb{min-width:0;flex:1}.hvx-cb b{font-size:13px;color:var(--tx)}.hvx-cb b u{text-decoration:none;margin-left:6px;padding:1px 6px;border-radius:6px;background:var(--hvx-acc);color:#fff;font-size:10.5px;font-weight:700}
.hvx-cb time{margin-left:8px;font-size:11.5px;color:var(--mut)}
.hvx-cb p{margin:2px 0 4px;font-size:14px;line-height:1.5;color:var(--tx);white-space:pre-wrap;word-break:break-word;overflow-wrap:anywhere}
.hvx-cb button{border:0;background:none;padding:0;color:var(--mut);font:600 12px/1 inherit}.hvx-cb button:hover{color:var(--hvx-acc)}
.hvx-c.ghost{opacity:.7}.hvx-c.ghost em{font-style:normal;font-size:11.5px;color:#b45309;margin-left:8px}
.hvx-scope{display:flex;border:1px solid var(--ln);border-radius:12px;overflow:hidden;margin-bottom:12px}.hvx-scope button{flex:1;padding:9px 6px;border:0;background:none;color:var(--mut);font:600 12.5px/1 inherit}.hvx-scope button.on{background:var(--hvx-acc);color:#fff}
.hvx-rg{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.hvx-rg button{display:flex;flex-direction:column;gap:6px;padding:0;border:2px solid transparent;border-radius:12px;background:none;color:var(--tx);text-align:left}.hvx-rg button.cur{border-color:var(--hvx-acc)}
.hvx-rg .th{position:relative;display:block;aspect-ratio:9/16;border-radius:10px;overflow:hidden;background:#0e1322}.hvx-rg .o-h .th{aspect-ratio:16/9}
.hvx-rg img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}.hvx-rg .tt{font-size:12.5px;line-height:1.35;font-weight:600;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;padding:0 2px 4px}
.hvx-rg .o-h{grid-column:span 2}
.hvx-form{flex:0 0 auto;padding:10px 14px calc(10px + env(safe-area-inset-bottom));border-top:1px solid var(--ln);background:var(--bg)}
.hvx-fr{display:flex;gap:8px;align-items:flex-end;margin-bottom:6px;position:relative}
.hvx-form input[name=name],.hvx-form textarea{flex:1;min-width:0;padding:9px 12px;border:1px solid var(--ln);border-radius:12px;background:var(--bg2);color:var(--tx);font:14px/1.4 inherit;outline:0;resize:none;max-height:110px;overflow-y:auto;scrollbar-width:none}
.hvx-form input:focus,.hvx-form textarea:focus{border-color:var(--hvx-acc)}
.hvx-send{flex:0 0 42px;width:42px;height:42px;border:0;border-radius:50%;background:linear-gradient(135deg,var(--hvx-acc2),var(--hvx-acc));color:#fff;display:flex;align-items:center;justify-content:center;padding:0}.hvx-send[disabled]{opacity:.5}
.hvx-note{margin:0;font-size:11.5px;color:var(--mut)}.hvx-note.er{color:#c4151c}.hvx-note.ok{color:var(--ok)}
.hvx-rp{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:6px;padding:6px 10px;border-radius:10px;background:var(--bg2);font-size:12.5px;color:var(--mut)}.hvx-rp button{border:0;background:none;color:var(--mut);padding:2px 4px}
.hp{position:absolute!important;left:-9999px!important;width:1px;height:1px;overflow:hidden}

/* toàn màn hình */
.hvx.fs{grid-template-columns:minmax(0,1fr) 0}.hvx.fs .hvx-panel,.hvx.fs .hvx-tog{display:none}.hvx.fs .hvx-top{right:0}.hvx.fs .hvx-stage{padding:0 0 0}
.hvx.fs .hvx-frame{border-radius:0;box-shadow:none}.hvx.fs .hvx-fw{padding:0}.hvx.fs .hvx-top{opacity:0;transition:opacity .25s}.hvx.fs:hover .hvx-top,.hvx.fs .hvx-top:focus-within{opacity:1}
.hvx.fs .hvx-nav{right:16px}

/* ===== mobile: kiểu TikTok + bottom sheet ===== */
@media (max-width:899px){
  .hvx{display:block}
  .hvx-top{right:0;padding:max(8px,env(safe-area-inset-top)) 10px 8px;background:linear-gradient(rgba(0,0,0,.55),transparent)}
  .hvx-brand span,.hvx-cnt{display:none}.hvx-ori{order:3}.hvx-ori button{padding:6px 10px}
  .hvx-stage{position:absolute;inset:0;padding:54px 0 0}
  .hvx-fw{padding:0}
  .hvx-frame{border-radius:0;box-shadow:none}
  .hvx-frame.o-v{height:min(100cqh,calc(100cqw * 16 / 9));}
  .hvx-nav{display:none}
  .hvx-tog{display:none}
  .hvx-swz{display:block;position:absolute;z-index:3;touch-action:none}
  .hvx-swz-t{left:0;right:0;top:54px;height:16%}.hvx-swz-r{right:0;top:20%;bottom:0;width:76px}
  .hvx-rail{display:flex;position:absolute;z-index:5;right:6px;bottom:calc(86px + env(safe-area-inset-bottom));flex-direction:column;gap:14px;align-items:center}
  .hvx-rail button{width:54px;border:0;background:none;color:#fff;display:flex;flex-direction:column;align-items:center;gap:3px;padding:0;text-shadow:0 1px 6px rgba(0,0,0,.7)}
  .hvx-rail svg{width:32px;height:32px;filter:drop-shadow(0 1px 4px rgba(0,0,0,.6))}.hvx-rail b{font-size:12px;font-weight:700}
  .hvx-rail button.on svg{fill:var(--hvx-acc);stroke:var(--hvx-acc)}
  .hvx-cap{display:block;position:absolute;z-index:4;left:0;right:76px;bottom:0;padding:34px 14px calc(14px + env(safe-area-inset-bottom));background:linear-gradient(transparent,rgba(0,0,0,.78));color:#fff;pointer-events:none}
  .hvx-cap small{display:block;font-size:12.5px;opacity:.85;margin-bottom:4px}.hvx-cap b{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:15px;line-height:1.35}
  .hvx-bd{position:fixed;inset:0;z-index:20;background:rgba(0,0,0,.5);opacity:0;pointer-events:none;transition:opacity .25s}.hvx.cm-open .hvx-bd{opacity:1;pointer-events:auto}
  .hvx-panel{position:fixed;left:0;right:0;bottom:0;top:auto;width:auto;height:76dvh;z-index:21;border-left:0;border-radius:20px 20px 0 0;transform:translateY(105%);transition:transform .3s ease;box-shadow:0 -20px 50px -20px rgba(0,0,0,.6)}
  .hvx[data-pm="0"] .hvx-panel{transform:translateY(105%);visibility:visible}
  .hvx.cm-open .hvx-panel{transform:none;pointer-events:auto}
  .hvx-sh{display:flex;align-items:center;justify-content:center;position:relative;height:30px;flex:0 0 auto}
  .hvx-grab{width:42px;height:5px;border-radius:3px;background:var(--ln)}.hvx-shx{position:absolute;right:8px;top:0;width:32px;height:32px;background:var(--bg2);color:var(--tx);-webkit-backdrop-filter:none;backdrop-filter:none}
  .hvx-info h1{font-size:16px}
  .hvx.fs .hvx-top{opacity:1}
}
@media (min-width:900px) and (max-width:1199px){.hvx{--pw:360px}.hvx-panel{width:360px}}
@media (min-width:900px){.hvx-panel{width:var(--pw)}.hvx-panel>*{min-width:360px}}
@media (min-width:900px) and (max-height:620px){.hvx-stage{padding-top:52px}}
@media (prefers-reduced-motion:reduce){.hvx,.hvx *{transition:none!important;animation:none!important}}
