/* site/css/site.css
   Toàn bộ class ở đây đặt tiền tố "vb-" (video blog) để không trùng với css/js bên admin.
*/
* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0; min-height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: #0f1420; color: #e5e9f2;
}

.vb-header {
  position: sticky; top: 0; z-index: 10; min-height: 56px; display: flex; align-items: center;
  justify-content: space-between; gap: 12px; flex-wrap: nowrap;
  padding: 10px 16px; background: rgba(15,20,32,.95);
  border-bottom: 1px solid rgba(255,255,255,.08); backdrop-filter: blur(6px);
}
.vb-brand { flex-shrink: 0; }
.vb-header-actions { flex-shrink: 0; }
.vb-brand { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.vb-brand strong { font-weight: 600; color: #fff; }
.vb-header-actions { display: flex; align-items: center; gap: 14px; }
.vb-nav-link { font-size: 13px; color: #7dd3fc; text-decoration: none; font-weight: 500; }
.vb-nav-link:hover { color: #fff; text-decoration: underline; }
.vb-admin-link { font-size: 12px; color: #cbd5e1; text-decoration: none; display: flex; align-items: center; gap: 5px; }
.vb-admin-link:hover { color: #fff; }

.vb-container { max-width: 1024px; margin: 0 auto; padding: 32px 20px; }
.vb-page-title { font-size: 24px; font-weight: 600; margin: 0 0 4px; color: #fff; }
.vb-page-sub { color: #94a3b8; font-size: 13px; margin: 0 0 24px; }
.vb-filter-bar { display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; }
.vb-filter-row { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; }
.vb-filter-bar .vb-tag-pill { text-decoration: none; }
.vb-filter-bar .vb-tag-pill:hover { background: rgba(56,189,248,.3); }

.vb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.vb-card {
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); border-radius: 10px;
  overflow: hidden; cursor: pointer; transition: border-color .2s ease;
}
.vb-card:hover { border-color: rgba(56,189,248,.5); }
.vb-card__thumb { aspect-ratio: 16/9; background: #1e293b; position: relative; overflow: hidden; }
.vb-card__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.vb-card:hover .vb-card__thumb img { transform: scale(1.06); }
.vb-card__thumb-empty { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: #475569; }
.vb-card__play {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.25); opacity: 0; transition: opacity .2s ease;
}
.vb-card:hover .vb-card__play { opacity: 1; }
.vb-card__body { padding: 12px; }
.vb-card__title { font-size: 13.5px; font-weight: 500; margin: 0 0 8px; line-height: 1.4; color: #f1f5f9; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vb-card__cats { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.vb-tag-pill { font-size: 10.5px; padding: 3px 8px; border-radius: 999px; background: rgba(56,189,248,.15); color: #7dd3fc; text-decoration: none; display: inline-block; }
a.vb-tag-pill:hover { background: rgba(56,189,248,.3); }
.vb-tag-pill-alt { background: rgba(255,255,255,.08); color: #cbd5e1; }
a.vb-tag-pill-alt:hover { background: rgba(255,255,255,.16); }
.vb-card__meta { font-size: 11px; color: #64748b; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.vb-card__meta-item { display: inline-flex; align-items: center; gap: 4px; }
.vb-empty { color: #64748b; font-size: 13px; }

.vb-back-link { background: none; border: none; color: #94a3b8; font-size: 12px; cursor: pointer; display: flex; align-items: center; gap: 5px; padding: 0; margin-bottom: 16px; }
.vb-back-link:hover { color: #fff; }

.vb-detail-title { font-size: 22px; font-weight: 600; margin: 0 0 12px; color: #fff; }
.vb-detail-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 8px; }
.vb-detail-stats { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-bottom: 16px; }
.vb-detail-stats .vb-updated,
.vb-detail-meta .vb-updated { margin-left: 0; font-size: 11px; color: #64748b; display: inline-flex; align-items: center; gap: 4px; }

.vb-player { aspect-ratio: 16/9; background: #000; border-radius: 10px; overflow: hidden; margin-bottom: 12px; }
.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; }

.vb-server-tabs { display: flex; gap: 8px; margin-bottom: 24px; }
.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; }
.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-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; }


/* Phân trang */
.vb-pagination {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 6px; margin-top: 28px; padding-top: 8px;
}
.vb-page-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; height: 36px; padding: 0 10px;
  border-radius: 8px; border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04); color: #cbd5e1;
  font-size: 13px; text-decoration: none; cursor: pointer;
}
a.vb-page-btn:hover { border-color: #38bdf8; color: #fff; background: rgba(56,189,248,.12); }
.vb-page-current {
  background: #0284c7; border-color: #0284c7; color: #fff; font-weight: 600; cursor: default;
}
.vb-page-disabled { opacity: .35; cursor: not-allowed; }
.vb-page-ellipsis { color: #64748b; padding: 0 4px; font-size: 13px; }
.vb-page-count { color: #64748b; font-size: 12px; }

/* Nút + xem thêm tag/chuyên mục */
.vb-tag-more {
  font-weight: 600; text-align: center; white-space: nowrap;
  background: rgba(56,189,248,.25) !important; color: #e0f2fe !important;
}
.vb-tag-more:hover { background: rgba(56,189,248,.4) !important; }
a.vb-tag-pill-alt.vb-tag-more {
  background: rgba(255,255,255,.12) !important; color: #e2e8f0 !important;
}
a.vb-tag-pill-alt.vb-tag-more:hover { background: rgba(255,255,255,.2) !important; }

/* Danh sách chuyên mục / thẻ */
.vb-term-list {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px;
}
.vb-term-item {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 12px 14px; border-radius: 10px;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08);
  color: #e5e9f2; text-decoration: none; font-size: 13.5px;
  transition: border-color .15s ease, background .15s ease;
}
.vb-term-item:hover { border-color: rgba(56,189,248,.45); background: rgba(56,189,248,.08); }
.vb-term-name { font-weight: 500; }
.vb-term-arrow { color: #64748b; font-size: 12px; }
.vb-term-item:hover .vb-term-arrow { color: #7dd3fc; }

/* Video liên quan */
.vb-related { margin-top: 36px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.08); }
.vb-related-title { font-size: 18px; font-weight: 600; color: #fff; margin: 0 0 16px; }


/* Search header */
.vb-search-form {
  display: flex; align-items: center; flex: 1 1 auto; min-width: 0; max-width: 360px;
  margin: 0; height: 36px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px; overflow: hidden;
}
.vb-search-input {
  flex: 1; min-width: 0; width: 100%; border: 0; background: transparent; color: #e2e8f0;
  padding: 0 4px 0 14px; font-size: 13px; outline: none; height: 100%;
  -webkit-appearance: none; appearance: none;
}
.vb-search-input::placeholder { color: #64748b; }
.vb-search-btn {
  flex-shrink: 0; border: 0; background: transparent; color: #94a3b8;
  padding: 0 12px; height: 100%; cursor: pointer; display: inline-flex; align-items: center;
}
.vb-search-btn:hover { color: #38bdf8; }

/* Footer + top search */
.vb-footer {
  margin-top: 40px; border-top: 1px solid rgba(255,255,255,.08);
  background: rgba(0,0,0,.25); padding: 22px 16px 28px;
}
.vb-footer-inner { max-width: 1100px; margin: 0 auto; }
.vb-top-search-title {
  font-size: 13px; font-weight: 600; color: #94a3b8; margin-bottom: 12px;
  text-transform: uppercase; letter-spacing: .04em;
}
.vb-top-search-list {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.vb-top-search-item {
  display: inline-flex; align-items: center; gap: 6px;
  text-decoration: none; font-size: 12.5px; color: #cbd5e1;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08);
  border-radius: 999px; padding: 5px 10px 5px 6px;
}
.vb-top-search-item:hover { color: #fff; border-color: rgba(56,189,248,.4); background: rgba(56,189,248,.12); }
.vb-top-search-rank {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%; font-size: 10px; font-weight: 700;
  background: rgba(56,189,248,.2); color: #7dd3fc;
}
.vb-footer-copy {
  max-width: 1100px; margin: 18px auto 0; font-size: 12px; color: #64748b; text-align: center;
}

@media (max-width: 720px) {
  .vb-header { flex-wrap: wrap; row-gap: 10px; }
  .vb-search-form {
    order: 3; flex: 1 1 100%; max-width: none; width: 100%;
    margin: 0;
  }
  .vb-brand { order: 1; }
  .vb-header-actions { order: 2; margin-left: auto; }
}


/* Ads */
.vb-ad { text-align: center; }
.vb-ad-header { padding: 8px 12px; background: rgba(0,0,0,.25); border-bottom: 1px solid rgba(255,255,255,.06); }
.vb-ad-header img, .vb-ad-player img, .vb-ad-footer img { max-width: 100%; height: auto; }
.vb-ad-player { margin: 0 0 20px; }
.vb-ad-footer { padding: 12px 16px; max-width: 1100px; margin: 0 auto; }

.vb-ad-catfish {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  background: rgba(15,20,32,.96); border-top: 1px solid rgba(255,255,255,.12);
  padding: 8px 36px 8px 12px; box-shadow: 0 -4px 24px rgba(0,0,0,.35);
}
.vb-ad-catfish-inner { max-width: 1100px; margin: 0 auto; text-align: center; }
.vb-ad-catfish-close {
  position: absolute; top: 6px; right: 8px; width: 28px; height: 28px;
  border: 0; border-radius: 6px; background: rgba(255,255,255,.1); color: #e2e8f0;
  font-size: 18px; line-height: 1; cursor: pointer;
}
.vb-ad-catfish-close:hover { background: rgba(255,255,255,.2); }

.vb-ad-preload {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,.72); display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.vb-ad-preload-box {
  position: relative; background: #0f1420; border-radius: 12px;
  border: 1px solid rgba(255,255,255,.12); padding: 28px 16px 16px;
  max-width: min(96vw, 420px); max-height: 90vh; overflow: auto;
  box-shadow: 0 20px 50px rgba(0,0,0,.5);
}
.vb-ad-preload-close {
  position: absolute; top: 6px; right: 8px; width: 30px; height: 30px;
  border: 0; border-radius: 6px; background: rgba(255,255,255,.1); color: #fff;
  font-size: 20px; cursor: pointer;
}
.vb-ad-preload-inner { text-align: center; }


/* Server row + Like (cùng style nút server) */
.vb-server-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.vb-server-row .vb-server-tabs {
  margin-bottom: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  flex: 1;
}
.vb-like-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  font-size: 12px;
  padding: 7px 14px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.15);
  background: transparent;
  color: #cbd5e1;
  cursor: pointer;
  font-weight: 500;
  transition: border-color .15s, background .15s, color .15s;
}
.vb-like-btn:hover:not(:disabled) {
  border-color: #38bdf8;
  color: #e0f2fe;
}
.vb-like-btn.vb-liked {
  background: #0284c7;
  border-color: #0284c7;
  color: #fff;
}
.vb-like-btn.vb-liked:hover:not(:disabled) {
  background: #0369a1;
  border-color: #0369a1;
  color: #fff;
}
.vb-like-btn:disabled { opacity: .45; cursor: wait; }
.vb-like-btn svg { flex-shrink: 0; }
.vb-like-label { opacity: .95; }
