/* ==========================================================================
   VIET69.SITE - MINIMALIST ULTRA-FAST STYLESHEET (MATCHING SEXTOP2 STYLE)
   Clean Navigation | Red Featured Badge | Crisp Typography | Mobile First
   ========================================================================== */

:root {
  --bg-main: #14151a;
  --bg-card: #1c1e24;
  --bg-card-hover: #22252e;
  --bg-header: #181920;
  --border-color: #262933;
  --border-light: #323644;
  --text-main: #e2e8f0;
  --text-sub: #94a3b8;
  --text-dim: #64748b;
  --brand-red: #c92a2a;
  --brand-red-hover: #e03131;
  --accent-gold: #f59e0b;
  --radius-sm: 3px;
  --radius-md: 4px;
  --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-stack);
  font-size: 13px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  padding-bottom: 70px;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ================= 1. HEADER & NAVIGATION ================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-header);
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.header-top {
  max-width: 1360px;
  margin: 0 auto;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.header-left-group {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}
.header-left-group::-webkit-scrollbar { display: none; }

/* LOGO VNSEXTOP1 */
.site-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 900;
  font-size: 24px;
  letter-spacing: -0.5px;
  line-height: 1;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.site-logo:hover {
  transform: scale(1.03);
  opacity: 0.95;
}
.logo-badge-vn {
  background: #dc2626;
  color: #ffffff;
  padding: 3px 7px;
  border-radius: 5px;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.5px;
  margin-right: 5px;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.45);
  line-height: 1;
  display: inline-block;
}
.logo-brand-main {
  color: #ffffff;
  letter-spacing: 0.2px;
}
.logo-brand-accent {
  color: #f59e0b;
  margin-left: 1px;
  letter-spacing: 0.2px;
}
@media (max-width: 640px) {
  .site-logo {
    font-size: 20px;
  }
  .logo-badge-vn {
    font-size: 13px;
    padding: 2px 5px;
    margin-right: 4px;
  }
}

/* 6 NAVIGATION CATEGORIES (MATCHING SEXTOP2 HEADER TABS) */
.nav-categories {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  white-space: nowrap;
}
.nav-categories::-webkit-scrollbar { display: none; }

.cat-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  color: #cbd5e1;
  background: transparent;
  transition: all 0.15s ease;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.cat-item:hover {
  background: #262933;
  color: #ffffff;
}
.cat-item.active {
  background: var(--brand-red) !important;
  color: #ffffff !important;
}

/* Featured VIET69TV tab (Red badge like SEXTOP) */
.cat-item.cat-featured {
  background: var(--brand-red);
  color: #ffffff;
}
.cat-item.cat-featured:hover {
  background: var(--brand-red-hover);
}

/* SEARCH BOX */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 300px;
  width: 100%;
}
@media (max-width: 768px) {
  .header-actions { max-width: 100%; order: 3; }
}

.search-box {
  position: relative;
  width: 100%;
}
.search-input {
  width: 100%;
  background: #20232c;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 6px 34px 6px 12px;
  color: #fff;
  font-size: 13px;
  outline: none;
}
.search-input:focus {
  border-color: #4b5563;
  background: #272a36;
}
.search-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
}
.search-btn:hover { color: #fff; }

/* ================= 2. TELEGRAM NOTICE BAR ================= */
.telegram-notice-bar {
  background: #0f172a;
  border-bottom: 1px solid #1e293b;
  padding: 6px 12px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.telegram-notice-bar a {
  color: #38bdf8;
  text-decoration: underline;
}

/* ================= 3. ADS CONTAINER ================= */
.ad-slot {
  max-width: 1360px;
  margin: 10px auto;
  padding: 0 12px;
  text-align: center;
}
.ad-slot img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  display: inline-block;
}

/* ================= 4. MAIN LAYOUT & SECTION HEADING ================= */
.container {
  max-width: 1360px;
  margin: 0 auto;
  padding: 10px 14px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 12px 0 10px 0;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-color);
}
.section-title {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
}
.section-title i { color: var(--accent-gold); }
.section-badge-count {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  background: #1e212b;
  padding: 2px 8px;
  border-radius: 10px;
}

/* ================= 5. VIDEO GRID & CARDS (MATCHING SEXTOP2) ================= */
.video-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 10px;
}

@media (min-width: 600px) {
  .video-grid { grid-template-columns: repeat(3, 1fr); gap: 14px 12px; }
}
@media (min-width: 900px) {
  .video-grid { grid-template-columns: repeat(4, 1fr); gap: 16px 14px; }
}
@media (min-width: 1200px) {
  .video-grid { grid-template-columns: repeat(4, 1fr); gap: 18px 14px; }
}

.video-card {
  display: flex;
  flex-direction: column;
  background: transparent;
  overflow: hidden;
  position: relative;
}

.card-thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.card-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
}
.video-card:hover .card-thumb {
  transform: scale(1.03);
}

.thumb-preview-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}
.card-thumb-wrap.is-previewing .thumb-preview-video {
  opacity: 1;
}

/* BADGES ON THUMBNAIL (MATCHING SEXTOP2) */
.badge-top-left {
  position: absolute;
  top: 4px;
  left: 4px;
  background: rgba(0, 0, 0, 0.75);
  color: #f59e0b;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 2px;
  z-index: 2;
  letter-spacing: 0.5px;
}
.badge-bunny-pin {
  background: var(--brand-red);
  color: #fff;
}

.badge-bottom-right {
  position: absolute;
  bottom: 4px;
  right: 4px;
  background: rgba(0, 0, 0, 0.75);
  color: #cbd5e1;
  font-size: 10px;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 2px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 3px;
}

.badge-duration {
  position: absolute;
  bottom: 4px;
  left: 4px;
  background: rgba(0, 0, 0, 0.75);
  color: #cbd5e1;
  font-size: 10px;
  font-weight: 600;
  padding: 1px 4px;
  border-radius: 2px;
  z-index: 2;
}

/* TITLE BELOW THUMBNAIL (CLEAN TEXT MATCHING SEXTOP2) */
.card-info {
  padding: 6px 2px 2px 2px;
}
.card-title {
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.15s ease;
}
.video-card:hover .card-title {
  color: var(--accent-gold);
}

.card-meta {
  margin-top: 4px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.card-cat-name {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  transition: color 0.15s ease;
}

.video-card:hover .card-cat-name {
  color: #f59e0b;
}

/* ================= 6. PAGINATION ================= */
.pagination-wrapper {
  margin: 28px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-wrap: wrap;
}
.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  background: #1c1e24;
  border: 1px solid var(--border-color);
  color: var(--text-sub);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
}
.page-btn:hover {
  background: #282c37;
  color: #fff;
}
.page-btn.active {
  background: var(--brand-red);
  color: #fff;
  border-color: var(--brand-red);
}

/* ================= 7. VIDEO PLAYER PAGE & CONTROLS ================= */
.player-theater-target {
  max-width: 1100px;
  margin: 0 auto 20px auto;
}
.theater-mode-active .player-theater-target {
  max-width: 100% !important;
  width: 100vw !important;
  margin-left: calc(-50vw + 50%) !important;
  margin-right: calc(-50vw + 50%) !important;
}

.player-box {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0,0,0,0.6);
}
.player-box iframe, .player-box video {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.player-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.server-selectors {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.server-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-dim);
}
.btn-server {
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: #20232c;
  border: 1px solid var(--border-color);
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 700;
}
.btn-server.active {
  background: var(--brand-red);
  border-color: var(--brand-red);
  color: #fff;
}

.player-extra-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.btn-action-tool {
  background: #20232c;
  border: 1px solid var(--border-color);
  color: #94a3b8;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.btn-action-tool:hover { color: #fff; background: #2a2e3a; }
.btn-action-report { color: #f87171; }

.video-detail-header { margin-top: 14px; }
.video-detail-title {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  line-height: 1.4;
  margin-bottom: 6px;
}
.video-detail-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-dim);
  font-size: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.video-desc-box {
  background: #1a1c22;
  border: 1px solid var(--border-color);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: #cbd5e1;
  line-height: 1.5;
  margin: 10px 0;
}
.video-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.tag-pill {
  background: #242732;
  border: 1px solid var(--border-color);
  color: #94a3b8;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
}
.tag-pill:hover { color: #fff; }

/* ================= 8. SECTION TAGS & FOOTER (MATCHING SCREENSHOT 1) ================= */
.seo-tags-block {
  margin: 24px 0;
  padding: 14px 0;
  border-top: 1px solid var(--border-color);
}
.seo-block-title {
  font-size: 14px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.seo-block-title .title-prefix { color: var(--accent-gold); font-weight: 900; }
.seo-block-title .title-arrow { color: var(--accent-gold); font-size: 12px; }

.tags-cloud-flex {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tag-cloud-item {
  display: inline-block;
  background: #1e212b;
  border: 1px solid #2d313f;
  color: #cbd5e1;
  font-size: 12px;
  padding: 4px 9px;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}
.tag-cloud-item:hover {
  background: #2b303e;
  color: #ffffff;
}

/* FOOTER (MATCHING SCREENSHOT 1) */
.site-footer {
  background: #0f1014;
  border-top: 1px solid var(--border-color);
  padding: 24px 14px;
  color: var(--text-sub);
  font-size: 12px;
}
.footer-grid {
  max-width: 1360px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 220px 140px 1fr; }
}

.footer-col-title {
  color: var(--accent-gold);
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 10px;
  text-transform: uppercase;
}
.footer-links-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.footer-links-list a { color: #cbd5e1; }
.footer-links-list a:hover { color: var(--accent-gold); }

.footer-desc-text { line-height: 1.6; color: #94a3b8; }
.footer-desc-text strong { color: var(--accent-gold); }

.dmca-badge {
  display: inline-flex;
  align-items: center;
  background: #111;
  border: 1px solid #333;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 800;
  margin-top: 10px;
  overflow: hidden;
}
.dmca-tag { background: #84cc16; color: #000; padding: 2px 6px; }
.dmca-label { background: #000; color: #fff; padding: 2px 6px; }

/* MODALS */
.modal-backdrop {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.8);
  z-index: 999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-backdrop.open { display: flex; }
.modal-dialog {
  background: #1a1c24;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  width: 100%;
  max-width: 400px;
  padding: 18px;
  position: relative;
}
.modal-close-btn {
  position: absolute;
  top: 12px; right: 12px;
  color: var(--text-dim);
  font-size: 18px;
}
.report-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  background: #232632;
  margin-bottom: 6px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.modal-submit-btn {
  width: 100%;
  background: var(--brand-red);
  color: #fff;
  padding: 9px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  margin-top: 8px;
}

/* STICKY BOTTOM ADS */
.bottom-sticky-ad {
  position: fixed;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  z-index: 90;
  max-width: 728px; width: 100%;
  background: rgba(20, 21, 26, 0.95);
  border-top: 1px solid var(--border-color);
  padding: 4px;
  text-align: center;
  display: none;
}
.bottom-sticky-ad.show { display: block; }
.btn-close-sticky-ad {
  position: absolute;
  top: -22px; right: 6px;
  background: #181920;
  color: #fff;
  border: 1px solid var(--border-color);
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}
