/* ============================================================
   xh-theme-v3.css  — Dark video-grid theme for xHaccess v1.0
   Single consolidated stylesheet (merged from xh-theme + patches)
   ============================================================ */

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: 'Roboto', Arial, Helvetica, sans-serif;
  background: #1b1b1b;
  color: #e0e0e0;
  line-height: 1.5;
  min-height: 100vh;
}
a { color: #e0e0e0; text-decoration: none; transition: color .15s; }
a:hover { color: #ff9800; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }

/* ---------- Layout Shell ---------- */
.xh-wrap {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}
.xh-topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #272727;
  border-bottom: 1px solid #333;
  padding: 0 16px;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.xh-topbar .logo a {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}
.xh-topbar .logo img { height: 32px; width: auto; }
.xh-topbar .logo strong { display: none; }

/* Search */
.xh-search {
  flex: 1;
  max-width: 480px;
  position: relative;
}
.xh-search form { display: flex; }
.xh-search input[type="text"] {
  flex: 1;
  background: #1b1b1b;
  border: 1px solid #444;
  border-radius: 4px 0 0 4px;
  color: #e0e0e0;
  padding: 8px 12px;
  outline: none;
}
.xh-search input[type="text"]:focus { border-color: #ff9800; }
.xh-search .search-btn {
  background: #ff9800;
  border: none;
  border-radius: 0 4px 4px 0;
  color: #fff;
  padding: 8px 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
}
.xh-search .search-btn:hover { background: #e68900; }
.xh-search .search-btn i { font-size: 1rem; }

/* Top links */
.xh-toplinks {
  display: flex;
  gap: 12px;
  margin-left: auto;
  white-space: nowrap;
}
.xh-toplinks a { color: #aaa; font-size: .85rem; }
.xh-toplinks a:hover { color: #ff9800; }

/* Hamburger */
.xh-hamburger {
  display: none;
  background: none;
  border: none;
  color: #e0e0e0;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

/* ---------- Body (sidebar + main) ---------- */
.xh-body {
  display: flex;
  flex: 1;
}

/* Left Sidebar — desktop */
.xh-sidebar {
  width: 220px;
  min-width: 220px;
  background: #222;
  border-right: 1px solid #333;
  padding: 12px 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.xh-sidebar::-webkit-scrollbar {
  display: none;
}
.xh-sidebar h4 {
  padding: 8px 16px 4px;
  color: #888;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.xh-sidebar ul { margin-bottom: 8px; }
.xh-sidebar li a {
  display: block;
  padding: 6px 16px;
  font-size: .9rem;
  color: #ccc;
  transition: background .15s, color .15s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.xh-sidebar li a:hover,
.xh-sidebar li a.active {
  background: #333;
  color: #ff9800;
}
.xh-sidebar .all-cats-link {
  display: block;
  padding: 8px 16px;
  color: #ff9800;
  font-size: .85rem;
  font-weight: 500;
}
.xh-sidebar .all-cats-link:hover { text-decoration: underline; }

/* ---------- Main Content ---------- */
.xh-main {
  flex: 1;
  min-width: 0;
  padding: 16px 20px;
}

/* Page heading */
.xh-page-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid #ff9800;
}

/* ---------- Video Grid ---------- */
.xh-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

/* Video Card */
.video-card {
  background: #252525;
  border-radius: 6px;
  overflow: hidden;
  transition: transform .15s, box-shadow .15s;
}
.video-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,.4);
}
.video-card .thumb {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #111;
}
.video-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.video-card .duration {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(0,0,0,.8);
  color: #fff;
  font-size: .75rem;
  padding: 2px 6px;
  border-radius: 3px;
  font-weight: 500;
}
.video-card .info {
  padding: 8px 10px;
}
.video-card .info h3 {
  font-size: .85rem;
  font-weight: 500;
  color: #e0e0e0;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.video-card .info h3 a { color: inherit; }
.video-card .info h3 a:hover { color: #ff9800; }
.video-card .meta {
  margin-top: 4px;
  font-size: .75rem;
  color: #888;
}
.video-card .meta .views::before {
  content: '👁 ';
}

/* ---------- Categories Grid ---------- */
.xh-cat-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}
a.cat-card {
  position: relative;
  display: block;
  border-radius: 4px;
  overflow: hidden;
  text-decoration: none;
  background: #2b2b2b;
}
a.cat-card::before {
  content: '';
  display: block;
  padding-top: 56.25%;          /* 16:9 aspect ratio */
}
a.cat-card:hover { text-decoration: none; }
a.cat-card:hover .cat-img {
  transform: scale(1.06);
}
.cat-img {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}
.cat-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px 10px 7px;
  background: linear-gradient(transparent, rgba(0,0,0,.85));
  font-size: .875rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
  text-shadow: 0 1px 3px rgba(0,0,0,.5);
  letter-spacing: .01em;
}

@media (max-width: 1200px) {
  .xh-cat-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 768px) {
  .xh-cat-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 480px) {
  .xh-cat-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .cat-label { font-size: .78rem; padding: 18px 8px 5px; }
}

/* ---------- Single Video Page ---------- */
.xh-player-wrap {
  max-width: 960px;
  margin: 0 auto 24px;
}
.xh-player-wrap .fluidPlayer,
.xh-player-wrap video {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 16/9;
  background: #000;
  border-radius: 6px;
}
.xh-video-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  margin: 12px 0 8px;
}
.xh-video-desc {
  font-size: .9rem;
  color: #aaa;
  margin-bottom: 12px;
}

/* Download buttons */
.xh-downloads {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 16px 0;
  justify-content: center;
}
.xh-dl-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 24px;
  border-radius: 5px;
  font-weight: 600;
  font-size: .95rem;
  color: #fff;
  transition: opacity .15s;
}
.xh-dl-btn:hover { opacity: .85; color: #fff; }
.xh-dl-btn.q480 { background: #e53935; }
.xh-dl-btn.q720 { background: #fb8c00; }
.xh-dl-btn.q1080 { background: #e91e63; }

/* Tags & Pills — labeled sections */
.xh-tag-section {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 14px 0 6px;
}
.xh-tag-label {
  font-size: .85rem;
  font-weight: 700;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: .5px;
  white-space: nowrap;
}
.xh-tag-section .xh-tags {
  margin: 0;
}
.xh-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.xh-tags a {
  background: #333;
  color: #ccc;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: .8rem;
  transition: background .15s, color .15s;
}
.xh-tags a:hover { background: #ff9800; color: #fff; }

/* Pornstar pill — pink-to-purple gradient */
.xh-tags a.model-tag {
  background: linear-gradient(135deg, #e91e63, #9c27b0);
  color: #fff;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: .8rem;
  transition: background .15s, color .15s;
}
.xh-tags a.model-tag:hover {
  background: linear-gradient(135deg, #f44336, #ab47bc);
  color: #fff;
}

/* Channel pill — blue gradient */
.xh-tags a.channel-tag {
  background: linear-gradient(135deg, #1e88e5, #1565c0);
  color: #fff;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: .8rem;
  transition: background .15s, color .15s;
}
.xh-tags a.channel-tag:hover {
  background: linear-gradient(135deg, #42a5f5, #1976d2);
  color: #fff;
}

/* Related section */
.xh-related-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin: 24px 0 12px;
  padding-bottom: 6px;
  border-bottom: 2px solid #ff9800;
}

/* ---------- Download Page ---------- */
.xh-download-box {
  text-align: center;
  padding: 40px 20px;
  max-width: 600px;
  margin: 0 auto;
}
.xh-download-box h1 {
  font-size: 1.3rem;
  color: #fff;
  margin-bottom: 24px;
}
.xh-download-box .xh-dl-btn {
  font-size: 1.1rem;
  padding: 14px 40px;
}

/* ---------- Contact / DMCA / Static Pages ---------- */
.xh-static-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 24px;
  background: #252525;
  border-radius: 6px;
  color: #ccc;
  line-height: 1.7;
}
.xh-static-page h2 {
  color: #fff;
  margin-bottom: 16px;
}
.xh-static-page p { margin-bottom: 12px; }
.xh-static-page a { color: #ff9800; }

/* ---------- Pagination ---------- */
.xh-pagination {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin: 24px 0;
  flex-wrap: wrap;
}
.xh-pagination a,
.xh-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: 4px;
  font-size: .9rem;
  font-weight: 500;
  color: #ccc;
  background: #2b2b2b;
  transition: background .15s, color .15s;
}
.xh-pagination a:hover { background: #444; color: #fff; }
.xh-pagination .current,
.xh-pagination span.current {
  background: #ff9800;
  color: #fff;
}

/* ---------- Footer ---------- */
.xh-footer {
  background: #1a1a1a;
  border-top: 1px solid #333;
  padding: 16px 20px;
  text-align: center;
  font-size: .85rem;
  color: #666;
  margin-top: auto;
}
.xh-footer a { color: #888; }
.xh-footer a:hover { color: #ff9800; }

/* ---------- Ad Slots ---------- */
.xh-ad-slot { margin: 16px 0; text-align: center; }

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.hidden { display: none !important; }
.clearfix::after { content: ''; display: table; clear: both; }

/* ---------- AJAX Search Dropdown ---------- */
#live-search_sb {
  background: #2b2b2b !important;
  border: 1px solid #444;
  border-radius: 4px;
}
#live-search_sb .live-search_main { padding: 0; }
#live-search_sb li { padding: 0; }
#live-search_sb li a {
  display: block;
  padding: 8px 12px;
  color: #e0e0e0;
  font-size: .9rem;
}
#live-search_sb li a:hover,
#live-search_sb .live-search_selected a {
  background: #333;
  color: #ff9800;
}

/* ---------- Font Awesome (kept from original) ---------- */
.fa { font-family: 'Material Icons'; }
.fa-search::before { content: 'search'; }

/* ============================================================
   Responsive
   ============================================================ */

/* Tablet: 3 columns */
@media (max-width: 1200px) {
  .xh-grid { grid-template-columns: repeat(3, 1fr); }
  .xh-cat-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Small tablet / large phone: collapse sidebar into off-canvas drawer */
@media (max-width: 992px) {
  .xh-sidebar {
    position: fixed;
    left: -260px;
    top: 0;
    bottom: 0;
    width: 250px;
    min-width: 250px;
    z-index: 999;
    transition: left .3s cubic-bezier(.4,0,.2,1);
    box-shadow: none;
    background: #222;
    padding-top: 60px;
    padding-bottom: 40px;
    overflow-x: hidden;
    overflow-y: scroll;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
    scrollbar-width: thin;
    scrollbar-color: #555 #222;
  }
  .xh-sidebar::-webkit-scrollbar {
    width: 4px;
  }
  .xh-sidebar::-webkit-scrollbar-track {
    background: #222;
  }
  .xh-sidebar::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 4px;
  }
  .xh-sidebar.open {
    left: 0;
    box-shadow: 4px 0 20px rgba(0,0,0,.5);
  }
  .xh-hamburger { display: block; }
  .xh-grid { grid-template-columns: repeat(3, 1fr); }
  body.sidebar-open {
    overflow: hidden;
  }
  .xh-sidebar .sidebar-cat-extra {
    display: none;
  }
}

/* Tags Listing */
.xh-tag-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.tag-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 18px 12px;
  background: #2b2b2b;
  border-radius: 6px;
  text-decoration: none;
  transition: background .2s;
}
.tag-card:hover {
  background: #363636;
  text-decoration: none;
}
.tag-card .tag-name {
  font-size: .9rem;
  font-weight: 700;
  color: #fff;
  text-align: center;
  line-height: 1.3;
}
.tag-card .tag-count {
  font-size: .8rem;
  color: #888;
  margin-top: 4px;
}

/* Mobile overlay */
.xh-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 998;
}
.xh-overlay.active { display: block; }

/* Mobile: 2 columns */
@media (max-width: 768px) {
  .xh-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .xh-cat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .xh-tag-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .xh-main { padding: 12px; }
  .xh-topbar { padding: 0 10px; }
  .xh-toplinks { display: none; }
  .xh-search { max-width: 100%; }
  .xh-page-title { font-size: 1.1rem; }
  .xh-downloads { flex-direction: column; align-items: center; }
  .xh-dl-btn { width: 80%; justify-content: center; }
}

/* Small phone */
@media (max-width: 480px) {
  .xh-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .xh-cat-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .xh-tag-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .tag-card { padding: 14px 8px; }
  .tag-card .tag-name { font-size: .8rem; }
  .video-card .info { padding: 6px 8px; }
  .video-card .info h3 { font-size: .8rem; }
}
