/* ── Base ─────────────────────────────────────────────────────── */
:root {
  --bg:         #0f0f0f;
  --bg-card:    #1a1a1a;
  --bg-hover:   #242424;
  --header-bg:  #111111;
  --border:     #2a2a2a;
  --accent:     #ff2020;
  --accent-h:   #ff4444;
  --text:       #e0e0e0;
  --muted:      #888;
  --radius:     8px;
}
*{box-sizing:border-box;}
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--text); text-decoration: none; }
a:hover { color: #fff; }
main { flex: 1; }

/* ── Header ───────────────────────────────────────────────────── */
.site-header {
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 99;
}
.site-header .container-fluid { max-width: 1500px; }
.site-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.site-logo img { height: 36px; }
.site-logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -.3px;
}
.site-logo-text span { color: var(--accent); }

/* Search */
.search-form { width: 420px; max-width: 760px; }
.search-form .input-group { background: #222; border-radius: 24px; overflow: hidden; }
.search-form input {
  background: transparent;
  border: 1px solid var(--border);
  border-right: none;
  color: var(--text);
  border-radius: 24px 0 0 24px !important;
}
.search-form input:focus {
  background: #252525;
  border-color: var(--accent);
  color: #fff;
  box-shadow: none;
}
.search-form input::placeholder { color: var(--muted); }
.search-form .btn-search {
  background: var(--accent);
  border: none;
  color: #fff;
  border-radius: 0 24px 24px 0 !important;
  padding: 0 18px;
}
.search-form .btn-search:hover { background: var(--accent-h); }

/* ── Category Nav ─────────────────────────────────────────────── */
.cat-nav {
  background: #161616;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
}
.cat-nav::-webkit-scrollbar { display: none; }
.cat-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 4px;
  white-space: nowrap;
  flex-wrap: nowrap;
}
.cat-nav li a {
  display: block;
  padding: 9px 14px;
  color: var(--muted);
  font-size: 13.5px;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
.cat-nav li a:hover,
.cat-nav li a.active {
  color: #fff;
  border-bottom-color: var(--accent);
}

/* ── Video Card ───────────────────────────────────────────────── */
.video-card {
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
  cursor: pointer;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: transparent;
}
.video-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,.35);
}
.video-card:hover .card-thumb img { transform: scale(1.05); }
.card-thumb {
  position: relative;
  width: 100%;
  padding-top: 68.75%; /* 320x220 */
  overflow: hidden;
  background: #111;
}
.card-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s;
}
.card-thumb .no-poster {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1e0808, #2d1010);
}
.card-thumb .no-poster i { font-size: 2.5rem; color: #333; }
.card-label {
  position: absolute;
  top: 7px; left: 7px;
  background: rgba(0,0,0,.72);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  padding: 2px 7px;
  border-radius: 4px;
  line-height: 1.6;
  pointer-events: none;
  z-index: 2;
}
.card-body-inner {
  padding: 8px 4px 4px;
  flex: 1;
  text-align: center;
}
.card-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.45;
  margin-bottom: 0;
  text-align: center;
}
.card-meta {
  margin-top: 5px;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.card-category-badge {
  font-size: 11px;
  background: rgba(229,9,20,.15);
  color: #e57070;
  padding: 1px 7px;
  border-radius: 3px;
  white-space: nowrap;
}
.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--muted);
}
.empty-state i { font-size: 3.5rem; display: block; margin-bottom: 16px; }

.card-stats {
  margin-bottom: 5px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 10px;
  font-size: 13px;
  color: #9aa5b4;
  align-items: center;
}
.card-stats i { margin-right: 2px; }
.card-rating { color: #e57070; font-size: 11.5px; }

/* ── Section headings ─────────────────────────────────────────── */
.section-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  border-bottom: 2px solid var(--border);
  padding-bottom: 10px;
}
.section-head h2 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.section-head .accent-bar {
  width: 4px;
  height: 22px;
  background: var(--accent);
  border-radius: 2px;
}

/* ── Breadcrumb ───────────────────────────────────────────────── */
.breadcrumb-bar {
  background: #141414;
  border-bottom: 1px solid var(--border);
  padding: 8px 0;
}
.breadcrumb { margin: 0; font-size: 13px; }
.breadcrumb-item a { color: var(--muted); }
.breadcrumb-item.active { color: var(--text); }
.breadcrumb-item + .breadcrumb-item::before { color: #444; }

/* ── Pagination ───────────────────────────────────────────────── */
.pagination { gap: 4px; }
.page-link {
  background: var(--bg-card);
  border-color: var(--border);
  color: var(--text);
  border-radius: 6px !important;
  min-width: 38px;
  text-align: center;
  padding: .35rem .65rem;
  transition: background .15s, color .15s;
}
.page-link:hover {
  background: var(--bg-hover);
  border-color: var(--accent);
  color: #fff;
}
.page-item.active .page-link {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.page-item.disabled .page-link {
  background: var(--bg-card);
  border-color: var(--border);
  color: #444;
}

/* ── Video detail ─────────────────────────────────────────────── */
.player-wrap {
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16/9;
  width: 100%;
  position: relative;
}
.player-wrap iframe,
.player-wrap video { width: 100%; height: 100%; display: block; }
.stream-tabs .nav-link {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 6px;
  padding: .4rem 1rem;
  margin-right: 6px;
  margin-bottom: 6px;
  font-size: 13px;
  transition: all .15s;
}
.stream-tabs .nav-link.active,
.stream-tabs .nav-link:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.video-info-box {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid var(--border);
}
.video-info-box h1 { font-size: 1.2rem; font-weight: 700; line-height: 1.4; color: #fff; }
.meta-row { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--muted); margin: 12px 0; align-items: center; }
.meta-row i { margin-right: 4px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-pill {
  background: #222;
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 20px;
  padding: 3px 12px;
  font-size: 12.5px;
  transition: all .15s;
}
.tag-pill:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ── Like / Dislike bar ───────────────────────────────────────── */
.like-dislike-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0 4px;
}
.react-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 20px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s;
  user-select: none;
}
.react-btn:hover { border-color: #aaa; color: var(--text); }
.react-btn.liked    { background: rgba(255,32,32,.10);  border-color: #ff6060; color: #ff6060; }
.react-btn.disliked { background: rgba(229,9,20,.10);   border-color: var(--accent); color: var(--accent); }

/* ── Sidebar / Top Videos ─────────────────────────────────────── */
.sidebar-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.top-tab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: 13px;
  padding: 8px 14px;
  cursor: pointer;
  transition: color .15s, border-color .15s;
}
.top-tab-btn:hover { color: #fff; }
.top-tab-btn.active {
  color: #fff;
  border-bottom-color: var(--accent);
}
.top-video-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  transition: background .15s;
}
.top-video-item:last-child { border-bottom: none; }
.top-video-item:hover {
  color: #fff;
}
.top-video-item:hover .top-video-title { color: #fff; }
.top-video-rank {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  background: #222;
  border-radius: 5px;
}
.top-video-item:nth-child(1) .top-video-rank { background: var(--accent); color: #fff; }
.top-video-item:nth-child(2) .top-video-rank { background: #b45309; color: #fff; }
.top-video-item:nth-child(3) .top-video-rank { background: #92400e; color: #fff; }
.top-video-title {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.45;
  transition: color .15s;
}
.top-video-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}
.top-video-meta i { margin-right: 2px; }

/* ── Footer ───────────────────────────────────────────────────── */
.site-footer {
  background: var(--header-bg);
  border-top: 1px solid var(--border);
  padding: 30px 0 20px;
  color: var(--muted);
  font-size: 13px;
  margin-top: 60px;
}
.site-footer a { color: #777; }
.site-footer a:hover { color: var(--accent); }
.footer-links {
  display: flex; flex-wrap: wrap; gap: 6px 14px;
  margin-bottom: 16px; padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.footer-links a { color: #777; font-size: 12px; text-decoration: none; }
.footer-links a:hover { color: var(--accent); }

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 576px) {
  .site-logo-text { font-size: 1.05rem; }
  .search-form { max-width: 100%; }

  .cat-nav {
    overflow-x: visible;
    scrollbar-width: auto;
  }
  .cat-nav ul {
    flex-wrap: wrap;
    white-space: normal;
  }
  .cat-nav li a {
    padding: 7px 10px;
    font-size: 13px;
  }
}
