/* css/site.css — CORE dùng chung: player, TVC, like, ads. Bố cục nằm ở themes/{id}/theme.css */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; background: #111; color: #ddd; }
.vb-hidden { display: none !important; }

.vb-player { aspect-ratio: 16/9; background: #000; border-radius: 10px; overflow: hidden; margin-bottom: 12px; position: relative; }
.vb-player iframe { width: 100%; height: 100%; border: 0; }
.vb-player-empty { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: #475569; font-size: 13px; }

/* TVC pre-roll */
.vb-tvc { position: absolute; inset: 0; background: #000; }
.vb-tvc-video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.vb-tvc-hit { position: absolute; inset: 0; z-index: 2; }
/* Nhãn Quảng cáo — góc trái trên */
.vb-tvc-label {
  position: absolute; top: 10px; left: 10px; z-index: 4;
  font-size: 11px; color: #fff; background: rgba(225,29,72,.92);
  padding: 4px 10px; border-radius: 4px; font-weight: 700; letter-spacing: .03em;
  pointer-events: none; box-shadow: 0 1px 4px rgba(0,0,0,.35);
}
/* Nút Bỏ qua — góc phải dưới */
.vb-tvc-bar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3;
  display: flex; align-items: center; justify-content: flex-end;
  padding: 10px 12px; background: linear-gradient(transparent, rgba(0,0,0,.7));
  pointer-events: none;
}
.vb-tvc-skip {
  pointer-events: auto; border: 0; border-radius: 6px; cursor: pointer;
  font-size: 12px; font-weight: 600; padding: 7px 14px;
  background: rgba(255,255,255,.94); color: #0f172a;
}
.vb-tvc-skip:disabled { opacity: .55; cursor: not-allowed; }
.vb-tvc-skip:not(:disabled):hover { background: #fff; }
.vb-tvc-tap {
  position: absolute; inset: 0; z-index: 6;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; cursor: pointer;
  background: rgba(0,0,0,.55);
  color: #fff; border: 0; width: 100%;
  font-size: 15px; font-weight: 600;
}
.vb-tvc-tap span {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.95); color: #0f172a;
  padding: 12px 20px; border-radius: 999px;
  box-shadow: 0 4px 16px rgba(0,0,0,.35);
}
.vb-tvc-tap small { opacity: .85; font-size: 12px; font-weight: 500; }


.vb-server-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.vb-server-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 0;
  flex: 1 1 auto;
}
.vb-server-btn {
  font-size: 12px;
  padding: 7px 14px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.15);
  background: transparent;
  color: #cbd5e1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.vb-server-btn:hover:not(:disabled) { border-color: #38bdf8; }
.vb-server-btn.vb-active { background: #0284c7; border-color: #0284c7; color: #fff; }
.vb-server-btn:disabled { opacity: .3; cursor: not-allowed; }
.vb-like-btn { margin-left: auto; }


.vb-detail-content { font-size: 14px; line-height: 1.7; color: #cbd5e1; }
.vb-detail-content p { margin: 0 0 0.6em; }
.vb-detail-content a { color: #38bdf8; text-decoration: none; }
.vb-detail-content a:hover { text-decoration: underline; }
.vb-detail-content em { font-style: italic; }
.vb-detail-content strong { font-weight: 600; color: #e2e8f0; }

.vb-hidden { display: none !important; }

/* Ads */
/* ===== Ads — PC ~25% ngang (như demo), mobile gần full ===== */
.vb-ad {
  text-align: center;
  position: relative;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}
.vb-ad-body {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  position: relative;
  display: block;
}

/* Mobile: gần full; PC: ~25vw / max 420px — nhiều khoảng trống quanh */
.vb-ad-header,
.vb-ad-player,
.vb-ad-footer {
  padding: 2px 0 8px;
  margin: 0 auto 0;
  display: block;
  width: 72%;
  max-width: 72%;
  box-sizing: border-box;
  background: transparent !important;
  border: 0 !important;
  position: relative;
  z-index: 1; /* dưới .vb-header sticky */
  overflow: visible;
  isolation: isolate;
  line-height: 0;
}
.vb-ad-header { margin-bottom: 0; }
.vb-ad-player { margin-top: 4px; margin-bottom: 6px; }
@media screen and (min-width: 768px) {
  .vb-ad-header,
  .vb-ad-player,
  .vb-ad-footer {
    width: 25vw;
    max-width: 420px;
    min-width: 300px;
  }
}

.vb-ad-banners {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
  width: 100%;
  margin: 0 auto;
  position: relative;
}
.vb-ad-item {
  display: block;
  line-height: 0;
  width: 100%;
  margin: 0;
  cursor: pointer;
}
.vb-ad-item img,
.vb-ad-banners > img,
.vb-ad-body > a > img,
.vb-ad-body > img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 38px;
  object-fit: fill;
  margin: 0 auto;
  border-radius: 0;
}
@media screen and (min-width: 768px) {
  .vb-ad-item img,
  .vb-ad-banners > img,
  .vb-ad-body > a > img,
  .vb-ad-body > img {
    max-height: 52px;
  }
}

.vb-ad-square {
  display: block;
  max-width: 220px;
  margin: 0 auto;
}
.vb-ad-square img {
  width: 100%;
  max-width: 220px;
  height: auto;
  border-radius: 0;
  object-fit: contain;
}
@media screen and (min-width: 768px) {
  .vb-ad-square,
  .vb-ad-square img {
    max-width: 286px;
  }
}

.vb-ad-closeable { position: relative; }
.vb-ad-dismiss {
  position: absolute;
  z-index: 2;
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 50%;
  background-color: #fff;
  color: #e11d48;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.28);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  /* tránh lệch % + transform cha trên iOS */
  transform: none !important;
  -webkit-transform: none !important;
}
.vb-ad-dismiss:hover { background-color: #f8fafc; color: #be123c; }
@media screen and (min-width: 768px) {
  .vb-ad-dismiss { width: 26px; height: 26px; font-size: 16px; }
}

.vb-ad-body > .vb-ad-dismiss,
.vb-ad-header .vb-ad-dismiss,
.vb-ad-player .vb-ad-dismiss,
.vb-ad-footer .vb-ad-dismiss {
  top: auto;
  bottom: -6px;
  right: -6px;
  transform: none !important;
}

/* Catfish Top — cùng cỡ ngang header */
.vb-ad-catfish-top {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  /* Sát đỉnh màn hình, trên header */
  top: 0;
  z-index: 100;
  background: transparent !important;
  border: 0 !important;
  padding: 4px 0 6px;
  width: 72%;
  max-width: 72%;
  box-sizing: border-box;
  pointer-events: none;
  overflow: visible;
}
@media screen and (min-width: 768px) {
  .vb-ad-catfish-top {
    width: 25vw;
    max-width: 420px;
    min-width: 300px;
  }
}
.vb-ad-catfish-top .vb-ad-body,
.vb-ad-catfish-top .vb-ad-catfish-inner {
  width: 100%;
  margin: 0 auto;
  position: relative;
  pointer-events: auto;
}
.vb-ad-catfish-top .vb-ad-banners { gap: 2px; width: 100%; }
.vb-ad-catfish-top .vb-ad-item { width: 100%; pointer-events: auto; }
.vb-ad-catfish-top .vb-ad-item img {
  width: 100%;
  height: auto;
  max-height: 38px;
  object-fit: fill;
}
@media screen and (min-width: 768px) {
  .vb-ad-catfish-top .vb-ad-item img {
    max-height: 52px;
  }
}
.vb-ad-catfish-top .vb-ad-dismiss {
  top: auto;
  bottom: -6px;
  right: -6px;
  transform: none !important;
  pointer-events: auto;
  z-index: 5;
}

/* Catfish Bottom */
.vb-ad-catfish,
.vb-ad-catfish-bottom {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  z-index: 90;
  background: transparent !important;
  border: 0 !important;
  padding: 0;
  margin: 0;
  width: 72%;
  max-width: 72%;
  box-sizing: border-box;
  pointer-events: none;
  overflow: visible;
  line-height: 0;
}
@media screen and (min-width: 768px) {
  .vb-ad-catfish,
  .vb-ad-catfish-bottom {
    width: 25vw;
    max-width: 420px;
    min-width: 300px;
  }
}
.vb-ad-catfish .vb-ad-body,
.vb-ad-catfish-inner {
  width: 100%;
  margin: 0 auto;
  position: relative;
  pointer-events: auto;
}
.vb-ad-catfish .vb-ad-banners {
  gap: 2px;
  pointer-events: auto;
  width: 100%;
  align-items: stretch;
}
.vb-ad-catfish .vb-ad-item { pointer-events: auto; width: 100%; }
.vb-ad-catfish .vb-ad-item img {
  width: 100%;
  height: auto;
  max-height: 38px;
  object-fit: fill;
}
@media screen and (min-width: 768px) {
  .vb-ad-catfish .vb-ad-item img {
    max-height: 52px;
  }
}
.vb-ad-catfish .vb-ad-dismiss,
.vb-ad-catfish-close {
  top: -6px;
  right: -6px;
  bottom: auto;
  transform: none !important;
  pointer-events: auto;
  z-index: 5;
}

/* Preload */
.vb-ad-preload {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  z-index: 9999 !important;
  background: transparent;
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 20px;
  pointer-events: none;
  margin: 0 !important;
  transform: none !important;
}
.vb-ad-preload .vb-ad-preload-box {
  pointer-events: auto;
}
.vb-ad-preload.vb-ad-preload-hidden {
  display: none !important;
  pointer-events: none !important;
  visibility: hidden !important;
}
.vb-ad-preload-box {
  position: relative;
  background: transparent;
  border: 0;
  padding: 0;
  max-width: min(220px, 66vw);
  width: auto;
  box-shadow: none;
  pointer-events: auto;
  border-radius: 0;
}
@media screen and (min-width: 768px) {
  .vb-ad-preload-box {
    max-width: 360px;
  }
}
.vb-ad-preload-close,
.vb-ad-preload .vb-ad-dismiss {
  top: -10px;
  right: -10px;
  bottom: auto;
  left: auto;
  transform: none;
  z-index: 6;
}
.vb-ad-preload-inner {
  text-align: center;
  line-height: 0;
}
.vb-ad-preload-inner img,
.vb-ad-preload-inner a img,
.vb-ad-preload-inner .vb-ad-item img {
  width: auto;
  max-width: min(220px, 66vw);
  max-height: min(200px, 42vh);
  height: auto;
  border-radius: 0;
  display: block;
  margin: 0 auto;
  object-fit: contain;
}
@media screen and (min-width: 768px) {
  .vb-ad-preload-inner img,
  .vb-ad-preload-inner a img,
  .vb-ad-preload-inner .vb-ad-item img {
    max-width: 360px;
    max-height: 360px;
  }
}
.vb-ad-preload .vb-ad-square {
  max-width: 220px;
  width: auto;
  margin: 0 auto;
}
.vb-ad-preload .vb-ad-square img {
  border-radius: 0;
  object-fit: contain;
  max-width: 220px;
  max-height: 220px;
}
@media screen and (min-width: 768px) {
  .vb-ad-preload .vb-ad-square {
    max-width: 360px;
  }
  .vb-ad-preload .vb-ad-square img {
    max-width: 360px;
    max-height: 360px;
  }
}

/* Chỉ chừa đúng chiều cao catfish — JS cập nhật --vb-catfish-h */
body.vb-has-catfish {
  padding-bottom: var(--vb-catfish-h, 0px);
}

/* Catfish top nằm dưới .vb-header — không padding-top body (tránh header bị “dài”) */
body.vb-has-catfish-top .vb-container {
  padding-top: calc(32px + 8px);
}



.vb-nav-link{display:inline-flex!important;align-items:center!important;gap:4px!important;line-height:1!important}
.vb-nav-ico{display:inline-flex!important;align-items:center!important;width:13px!important;height:13px!important;position:relative!important;top:0!important}
.vb-nav-ico img,.vb-nav-link img.vb-menu-ico{width:13px!important;height:13px!important;display:block!important;margin:0!important;position:relative!important;top:0!important}
