/* --------------------------------
   CSS Tokens
-------------------------------- */
:root {
  --ui-bg: #000000;
  --ui-surface: #0a0a0a;
  --ui-surface2: #141414;
  --ui-border: #222;
  --ui-accent: #b60707;
  --ui-accent-hover: #a00000;
  --ui-text: #fff;
  --ui-text-muted: #888;
  --ui-text-soft: #aaa;
  --ui-radius: 0px;
  --ui-radius-sm: 0px;
  --ui-header-height: 56px;
  --ui-bottom-nav-height: 60px;
  --ui-font: "Plus Jakarta Sans", "Manrope", "Segoe UI", "Helvetica Neue", sans-serif;
}

/* --------------------------------
   Base
-------------------------------- */
body {
  font-family: var(--ui-font) !important;
  background: var(--ui-bg) !important;
  color: var(--ui-text) !important;
}

.wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

* {
  box-sizing: border-box;
}

/* --------------------------------
   HEADER
-------------------------------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #111 !important;
  border-bottom: 1px solid var(--ui-border) !important;
  margin-bottom: 0 !important;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

.header-links {
  display: none !important;
}

.header-holder {
  padding: 0 !important;
  background: transparent !important;
  border-bottom: none !important;
}

.header-holder .container {
  padding: 0 12px;
}

.header-inner {
  height: var(--ui-header-height);
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Logo */
.header .logo {
  flex-shrink: 0;
  order: 1;
}

/* Search – always visible inline on mobile */
.search {
  flex: 1 1 auto !important;
  position: relative !important;
  transform: none !important;
  padding: 0 !important;
  order: 2;
}

.search form {
  max-width: 100% !important;
  width: 100% !important;
}

.search .search-inner {
  display: flex;
  align-items: center;
  background: var(--ui-surface2);
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius);
  overflow: hidden;
  height: 38px;
}

.search input {
  flex: 1;
  background: transparent !important;
  border: none !important;
  height: 38px !important;
  padding: 0 12px !important;
  font-size: 14px;
  color: var(--ui-text) !important;
  border-radius: 0 !important;
}

.search input::placeholder {
  color: var(--ui-text-muted);
}

.search .btn-search {
  width: 38px;
  height: 38px;
  background: var(--ui-accent) !important;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  border-radius: 0;
}

.search .btn-search svg {
  fill: #fff;
  color: #fff !important;
}

/* Hide mobile search toggle btn (we show search inline) */
.btn-mobile.search-js {
  display: none !important;
}

/* Header actions */
.header-actions {
  order: 3;
  flex-shrink: 0;
}

.header-actions .header-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--ui-radius-sm);
  background: var(--ui-surface2);
  color: var(--ui-text-soft);
  transition: background 0.2s;
}

.header-actions .header-btn:hover {
  background: var(--ui-surface);
}

.header-actions .svg-icon {
  font-size: 18px;
  fill: var(--ui-text-soft);
}

/* Hamburger */
.menu-icon {
  order: 4;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  border-radius: var(--ui-radius-sm);
  background: var(--ui-surface2);
  padding: 4px;
}

.menu-icon span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ui-text-soft);
  border-radius: 0px;
}

/* Hide top nav bar (we replace with bottom nav on mobile) */
.header-nav {
  display: none !important;
}

/* --------------------------------
   MOBILE BOTTOM NAV
-------------------------------- */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: #111;
  border-top: 1px solid var(--ui-border);
  height: var(--ui-bottom-nav-height);
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.mobile-bottom-nav__inner {
  display: flex;
  align-items: stretch;
  height: 100%;
}

.mobile-bottom-nav__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--ui-text-muted);
  font-size: 10px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
  padding: 6px 0;
}

.mobile-bottom-nav__item svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
  display: block;
}

.mobile-bottom-nav__item.active,
.mobile-bottom-nav__item:hover {
  color: var(--ui-accent);
}

@media (max-width: 1024px) {
  .mobile-bottom-nav {
    display: block;
  }

  body {
    padding-bottom: var(--ui-bottom-nav-height);
  }
}

/* --------------------------------
   SIDE NAV (Mobile Drawer)
-------------------------------- */
#primaryNav {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(3px);
}

#primaryNav.active {
  display: block;
}

.primary-nav__drawer {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 280px;
  background: #111;
  border-right: 1px solid var(--ui-border);
  padding: 20px 0;
  overflow-y: auto;
  animation: slideIn 0.25s ease;
}

@keyframes slideIn {
  from {
    transform: translateX(-100%);
  }

  to {
    transform: translateX(0);
  }
}

.primary-nav__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px 16px;
  border-bottom: 1px solid var(--ui-border);
  margin-bottom: 12px;
}

.primary-nav__close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ui-surface2);
  border: none;
  border-radius: var(--ui-radius-sm);
  cursor: pointer;
  font-size: 18px;
  color: var(--ui-text-soft);
  line-height: 1;
}

.primary-nav__link {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  color: var(--ui-text-soft);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  border-radius: 0;
  gap: 10px;
  text-transform: uppercase;
}

.primary-nav__link:hover,
.primary-nav__link.active {
  background: var(--ui-surface2);
  color: var(--ui-accent);
}

/* --------------------------------
   CONTAINER
-------------------------------- */
.container {
  max-width: 1460px;
  width: 100%;
  padding: 0 12px;
  margin: 0 auto;
}

/* --------------------------------
   PAGE SECTION
-------------------------------- */
.page-section {
  padding: 16px 0 24px;
}

/* --------------------------------
   SECTION HEADER / PAGE HERO
-------------------------------- */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding: 0 0 10px;
  border-bottom: 1px solid var(--ui-border);
}

.section-header__left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-header__icon {
  width: 32px;
  height: 32px;
  background: var(--ui-accent);
  border-radius: var(--ui-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.section-header__icon svg {
  width: 18px;
  height: 18px;
  fill: #fff;
}

.section-header__title {
  font-size: 17px;
  font-weight: 700;
  color: var(--ui-text);
  margin: 0;
  line-height: 1.2;
}

.section-header__badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--ui-text-muted);
  background: var(--ui-surface2);
  padding: 2px 8px;
  border-radius: 20px;
  white-space: nowrap;
}

/* --------------------------------
   SORT PILLS (Horizontal scroll)
-------------------------------- */
.sort-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 12px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  flex-wrap: nowrap;
}

.sort-pills::-webkit-scrollbar {
  display: none;
}

.sort-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  border-radius: var(--ui-radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--ui-text-muted);
  background: var(--ui-surface);
  border: 1px solid var(--ui-border);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s;
  text-decoration: none;
  -webkit-user-select: none;
  user-select: none;
}

.sort-pill:hover {
  background: var(--ui-surface2);
  color: var(--ui-text);
  border-color: #444;
}

.sort-pill.active {
  background: var(--ui-accent);
  color: #000;
  border-color: var(--ui-accent);
  font-weight: 600;
}

/* --------------------------------
   VIDEO GRID
-------------------------------- */
.video-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

@media (min-width: 480px) {
  .video-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }
}

@media (min-width: 768px) {
  .video-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
  }
}

@media (min-width: 1200px) {
  .video-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
  }
}

@media (min-width: 1600px) {
  .video-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

/* --------------------------------
   VIDEO CARD
-------------------------------- */
.video-card {
  position: relative;
  background: var(--ui-surface);
  border-radius: var(--ui-radius);
  overflow: hidden;
  border: 1px solid var(--ui-border);
  transition: transform 0.18s, box-shadow 0.18s;
  display: block;
  text-decoration: none;
  color: inherit;
}

.video-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
  border-color: #3a3a3a;
}

.video-card__thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  overflow: hidden;
}

.video-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}

.video-card:hover .video-card__thumb img {
  transform: scale(1.04);
}

.video-card__badges {
  position: absolute;
  bottom: 5px;
  left: 5px;
  right: 5px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  pointer-events: none;
}

.video-card__quality {
  font-size: 10px;
  font-weight: 700;
  color: #000;
  background: var(--ui-accent);
  padding: 2px 6px;
  border-radius: 0px;
  line-height: 1.4;
  letter-spacing: 0.3px;
}

.video-card__duration {
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  background: rgba(0, 0, 0, 0.72);
  padding: 2px 7px;
  border-radius: 0px;
  backdrop-filter: blur(2px);
}

.video-card__info {
  padding: 8px 9px 9px;
}

.video-card__title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ui-text);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 6px;
}

.video-card__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: var(--ui-text-muted);
  flex-wrap: wrap;
}

.video-card__meta-item {
  display: flex;
  align-items: center;
  gap: 3px;
}

.video-card__meta-item svg {
  width: 11px;
  height: 11px;
  fill: currentColor;
  flex-shrink: 0;
}

/* --------------------------------
   PAGINATION
-------------------------------- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 20px 0;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border-radius: var(--ui-radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--ui-text-soft);
  background: var(--ui-surface);
  border: 1px solid var(--ui-border);
  text-decoration: none;
  transition: all 0.15s;
  cursor: pointer;
}

.pagination a:hover {
  background: var(--ui-surface2);
  color: var(--ui-text);
  border-color: #444;
}

.pagination a.active,
.pagination a.active:hover {
  background: var(--ui-accent);
  color: #000;
  border-color: var(--ui-accent);
  font-weight: 700;
  cursor: default;
}

.pagination a.prev,
.pagination a.next {
  gap: 5px;
  padding: 0 14px;
  font-size: 13px;
}

.pagination a.prev svg,
.pagination a.next svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.pagination-ellipsis {
  background: transparent !important;
  border-color: transparent !important;
  color: var(--ui-text-muted) !important;
  cursor: default !important;
}

/* --------------------------------
   HOME SLIDER
-------------------------------- */
.home-hero-slider {
  margin: 0 0 16px !important;
  border-radius: var(--ui-radius) !important;
  overflow: hidden;
}

/* Show slider on all screens */
@media (min-width: 1025px) {
  .home-hero-slider {
    display: block !important;
    margin-bottom: 20px !important;
  }
}

.home-hero-slide__title {
  font-family: var(--ui-font) !important;
  font-size: 14px !important;
  font-weight: 600 !important;
}

@media (min-width: 768px) {
  .home-hero-slide__title {
    font-size: 20px !important;
  }
}

/* --------------------------------
   EMPTY STATE
-------------------------------- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  gap: 14px;
}

.empty-state__icon svg {
  width: 56px;
  height: 56px;
  opacity: 0.3;
}

.empty-state__text {
  font-size: 15px;
  color: var(--ui-text-muted);
}

.empty-state__btn {
  display: inline-flex;
  align-items: center;
  padding: 10px 24px;
  background: var(--ui-accent);
  color: #fff;
  border-radius: var(--ui-radius-sm);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s;
}

.empty-state__btn:hover {
  background: var(--ui-accent-hover);
}

/* --------------------------------
   SEO SECTION
-------------------------------- */
.seo {
  padding: 20px 12px;
  border-top: 1px solid var(--ui-border);
  margin-top: 8px;
}

.seo h2 {
  font-size: 14px;
  font-weight: 600;
  color: var(--ui-text-soft);
  margin-bottom: 8px;
}

.seo p {
  font-size: 13px;
  color: var(--ui-text-muted);
  line-height: 1.6;
  margin-bottom: 6px;
}

/* --------------------------------
   PAGE HERO (category/tag/search)
-------------------------------- */
.page-hero {
  background: linear-gradient(135deg, #1a1a1a 0%, #111 100%);
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius);
  padding: 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.page-hero__icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--ui-accent) 0%, #c97600 100%);
  border-radius: 0px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.page-hero__icon svg {
  width: 26px;
  height: 26px;
  fill: #fff;
}

.page-hero__content {
  min-width: 0;
}

.page-hero__title {
  font-size: 18px;
  font-weight: 700;
  color: var(--ui-text);
  margin: 0 0 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (min-width: 768px) {
  .page-hero__title {
    font-size: 22px;
  }
}

.page-hero__sub {
  font-size: 12px;
  color: var(--ui-text-muted);
}

/* --------------------------------
   VIEW PAGE (Video player page)
-------------------------------- */
.view-layout {
  display: block;
}

@media (min-width: 1025px) {
  .view-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 24px;
    align-items: start;
    padding-top: 20px;
  }
}

@media (min-width: 1400px) {
  .view-layout {
    grid-template-columns: 1fr 420px;
  }
}

.view-player-col {
  min-width: 0;
}

/* Player wrapper */
.view-player-wrap {
  /* Mobile: 16px gap from header, edge-to-edge sides for cinematic look */
  margin: 16px -12px 0;
}

@media (min-width: 1024px) {
  .view-player-wrap {
    margin: 0;
    border-radius: var(--ui-radius);
    overflow: hidden;
  }
}

.view-player-box {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  background: #000;
}

.view-player-box iframe,
.view-player-box>div {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Video title + meta */
.view-title-row {
  padding: 12px 0 8px;
}

.view-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--ui-text);
  line-height: 1.35;
  margin: 0 0 8px;
}

@media (min-width: 768px) {
  .view-title {
    font-size: 20px;
  }
}

.view-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--ui-text-muted);
}

.view-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.view-meta-item svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

/* Category badges */
.view-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 0;
}

.view-cat-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  background: var(--ui-surface);
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius);
  font-size: 12px;
  font-weight: 500;
  color: var(--ui-text-soft);
  text-decoration: none;
  transition: all 0.15s;
}

.view-cat-badge:hover {
  background: var(--ui-accent);
  border-color: var(--ui-accent);
  color: #000;
}

/* Reaction row */
.view-reactions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  border-top: 1px solid var(--ui-border);
  border-bottom: 1px solid var(--ui-border);
  margin-bottom: 12px;
}

.view-reaction-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--ui-radius);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid var(--ui-border);
  background: var(--ui-surface);
  color: var(--ui-text-soft);
  transition: all 0.15s;
}

.view-reaction-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.view-reaction-btn.like:hover,
.view-reaction-btn.like.voted {
  background: rgba(34, 197, 94, 0.15);
  border-color: #22c55e;
  color: #22c55e;
}

.view-reaction-btn.dislike:hover,
.view-reaction-btn.dislike.voted {
  background: rgba(239, 68, 68, 0.15);
  border-color: #ef4444;
  color: #ef4444;
}

.view-reactions-spacer {
  flex: 1;
}

/* Server selector */
.view-servers {
  margin-bottom: 14px;
}

.view-servers__label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ui-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.view-servers__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.view-server-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  background: var(--ui-surface);
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--ui-text-soft);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
}

.view-server-btn .play-icon {
  width: 16px;
  height: 16px;
  background: var(--ui-accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s;
}

.view-server-btn .play-icon::after {
  content: '';
  display: block;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 4px 0 4px 7px;
  border-color: transparent transparent transparent #000;
  margin-left: 1px;
}

.view-server-btn:hover,
.view-server-btn.active {
  background: var(--ui-accent);
  border-color: var(--ui-accent);
  color: #000;
  font-weight: 600;
}

.view-server-btn.active .play-icon,
.view-server-btn:hover .play-icon {
  background: rgba(0, 0, 0, 0.2);
}

.view-server-btn.active .play-icon::after,
.view-server-btn:hover .play-icon::after {
  border-color: transparent transparent transparent #000;
}

/* Video tabs */
.view-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--ui-border);
  margin-bottom: 14px;
  overflow-x: auto;
  scrollbar-width: none;
}

.view-tabs::-webkit-scrollbar {
  display: none;
}

.view-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ui-text-muted);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: color 0.15s;
  margin-bottom: -1px;
}

.view-tab-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.view-tab-btn:hover {
  color: var(--ui-text);
}

.view-tab-btn.active {
  color: var(--ui-accent);
  border-bottom-color: var(--ui-accent);
  font-weight: 600;
}

/* Tab content */
.view-tab-content {
  display: none;
}

.view-tab-content.active {
  display: block;
}

/* Description */
.view-description {
  font-size: 14px;
  color: var(--ui-text-soft);
  line-height: 1.65;
  padding: 4px 0 12px;
}

/* Tags */
.view-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 0;
}

.view-tag {
  display: inline-block;
  padding: 4px 11px;
  background: var(--ui-surface);
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius-sm);
  font-size: 12px;
  color: var(--ui-text-muted);
  text-decoration: none;
  transition: all 0.15s;
}

.view-tag:hover {
  background: var(--ui-surface2);
  border-color: var(--ui-accent);
  color: var(--ui-accent);
}

/* Related videos section title */
.view-related-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ui-text);
  margin: 16px 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.view-related-title::before {
  content: '';
  display: block;
  width: 3px;
  height: 18px;
  background: var(--ui-accent);
  border-radius: 0px;
}

/* Load more btn */
.related-load-more-wrap {
  display: flex;
  justify-content: center;
  padding: 16px 0;
}

.related-load-more-btn {
  padding: 10px 28px !important;
  border-radius: var(--ui-radius) !important;
  background: var(--ui-surface) !important;
  color: var(--ui-text-soft) !important;
  border: 1px solid var(--ui-border) !important;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s !important;
}

.related-load-more-btn:hover {
  background: var(--ui-surface2) !important;
  color: var(--ui-text) !important;
}

/* Sidebar (desktop) */
.view-sidebar {
  position: sticky;
  top: calc(var(--ui-header-height) + 12px);
}

@media (max-width: 1023px) {
  .view-sidebar {
    position: static;
  }

  .col-asside {
    display: none;
  }
}

/* Comment form */
.view-comment-form {
  padding: 12px 0;
}

.view-comment-form input,
.view-comment-form textarea {
  width: 100%;
  background: var(--ui-surface);
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius-sm);
  color: var(--ui-text);
  padding: 10px 14px;
  font-size: 14px;
  font-family: var(--ui-font);
  margin-bottom: 10px;
  resize: vertical;
}

.view-comment-form textarea {
  min-height: 90px;
}

.view-comment-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  background: var(--ui-accent);
  color: #fff;
  border: none;
  border-radius: var(--ui-radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.view-comment-submit:hover {
  background: var(--ui-accent-hover);
}

/* --------------------------------
   FOOTER
-------------------------------- */
.footer {
  background: #0a0a0a !important;
  border-top: 1px solid var(--ui-border);
  padding: 24px 0 20px;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Footer top row: logo + quick nav */
.footer-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-logo {
  font-size: 20px !important;
  text-decoration: none;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.footer-nav a {
  font-size: 13px;
  color: var(--ui-text-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.footer-nav a:hover {
  color: var(--ui-accent);
}

/* Backlink toggle section */
.footer-backlink {
  border-top: 1px solid var(--ui-border);
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

@media (max-width: 767px) {
  .footer-backlink {
    align-items: center;
  }

  .footer-backlink__list {
    justify-content: center;
  }
}

.footer-backlink__toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  background: var(--ui-surface);
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius);
  font-size: 12px;
  font-weight: 600;
  color: var(--ui-text-muted);
  cursor: pointer;
  transition: all 0.18s;
  letter-spacing: 0.2px;
}

.footer-backlink__toggle:hover {
  background: var(--ui-surface2);
  border-color: #444;
  color: var(--ui-text);
}

.footer-backlink__arrow {
  transition: transform 0.25s ease;
  flex-shrink: 0;
}

/* The hidden link list */
.footer-backlink__list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.35s ease, opacity 0.25s ease, margin-top 0.25s ease;
  margin-top: 0;
}

.footer-backlink__list.open {
  max-height: 600px;
  opacity: 1;
  margin-top: 10px;
}

.footer-backlink__list a {
  font-size: 12px;
  color: var(--ui-text-muted);
  text-decoration: none;
  transition: color 0.15s;
  white-space: nowrap;
  line-height: 1.8;
}

.footer-backlink__list a:hover {
  color: var(--ui-accent);
  text-decoration: underline;
}

/* FooterDesc + copyright */
.footer-desc {
  border-top: 1px solid var(--ui-border);
  padding-top: 14px;
}

.desc-text {
  font-size: 12px;
  color: var(--ui-text-muted);
  line-height: 1.7;
  margin-bottom: 8px;
}

.copi {
  font-size: 12px;
  color: #555;
}

.copi a {
  color: var(--ui-text-muted);
  text-decoration: none;
}

.copi a:hover {
  color: var(--ui-accent);
}

/* --------------------------------
   SEARCH RESULT PAGE — search bar
-------------------------------- */
.search-page-bar {
  margin-bottom: 16px;
}

.search-page-bar form {
  display: flex;
  gap: 0;
  background: var(--ui-surface);
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius);
  overflow: hidden;
}

.search-page-bar input {
  flex: 1;
  background: transparent;
  border: none;
  height: 46px;
  padding: 0 16px;
  font-size: 15px;
  color: var(--ui-text);
  font-family: var(--ui-font);
}

.search-page-bar input::placeholder {
  color: var(--ui-text-muted);
}

.search-page-bar button {
  width: 48px;
  height: 46px;
  background: var(--ui-accent);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s;
}

.search-page-bar button svg {
  width: 18px;
  height: 18px;
  fill: #fff;
}

.search-page-bar button:hover {
  background: var(--ui-accent-hover);
}

/* --------------------------------
   HEADER ICON IMPROVEMENTS
-------------------------------- */

/* Hamburger: cleaner 3-line icon */
.menu-icon {
  width: 38px !important;
  height: 38px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  border-radius: var(--ui-radius-sm) !important;
  transition: background 0.18s;
  position: relative !important;
}

.menu-icon:hover {
  background: var(--ui-surface2) !important;
}

.menu-icon span {
  width: 20px !important;
  height: 2px !important;
  background: var(--ui-text-soft) !important;
  border-radius: 0px !important;
  transition: background 0.18s;
  position: static !important;
  top: unset !important;
  left: unset !important;
}

.menu-icon:hover span {
  background: var(--ui-text) !important;
}

/* Search button: fix alignment + focus ring */
.search .btn-search {
  position: absolute !important;
  right: 0 !important;
  top: 0 !important;
  bottom: 0 !important;
  width: 44px !important;
  height: 100% !important;
  transform: none !important;
  border-radius: 0 var(--ui-radius) var(--ui-radius) 0 !important;
  background: var(--ui-accent) !important;
  border: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer;
  transition: background 0.18s !important;
}

.search .btn-search svg {
  fill: #fff !important;
}

.search .btn-search:hover {
  background: var(--ui-accent-hover) !important;
}

.search .btn-search:focus-visible {
  outline: 2px solid var(--ui-accent);
  outline-offset: 2px;
}

/* Ensure search-inner is positioned so btn-search can be absolute */
.search .search-inner {
  position: relative !important;
}

/* Add right padding to input so text doesn't go under button */
.search input[name="q"] {
  padding-right: 48px !important;
}

/* History icon button: cleaner round */
.header-btn.header-btn-icon {
  width: 38px !important;
  height: 38px !important;
  border-radius: var(--ui-radius-sm) !important;
  background: var(--ui-surface2) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: background 0.18s !important;
}

.header-btn.header-btn-icon:hover {
  background: #333 !important;
}

.header-btn.header-btn-icon .svg-icon {
  font-size: 17px !important;
  fill: var(--ui-text-soft);
}

/* Bottom nav active accent dot */
.mobile-bottom-nav__item.active::after {
  content: '';
  display: block;
  width: 4px;
  height: 4px;
  background: var(--ui-accent);
  border-radius: 50%;
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
}

.mobile-bottom-nav__item {
  position: relative;
}

/* --------------------------------
   MISC UTILITIES
-------------------------------- */
/* Remove old homepage heading/sort box */
.heading {
  display: none !important;
}

.sort {
  display: none !important;
}

/* Hide old sidebar advertisement label */
.asside-link .title {
  font-size: 11px;
  color: #555;
}

/* --------------------------------
   DESKTOP SUBNAV BAR (below header, >= 1025px)
-------------------------------- */
.desktop-subnav {
  display: none;
  /* hidden on mobile */
}

@media (min-width: 1025px) {
  .desktop-subnav {
    display: block;
    background: #0d0d0d;
    border-bottom: 1px solid var(--ui-border);
    position: sticky;
    top: 62px;
    /* sits just below the header */
    z-index: 99;
  }

  .desktop-subnav__nav {
    display: flex;
    align-items: center;
    gap: 0;
    height: 40px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .desktop-subnav__nav::-webkit-scrollbar {
    display: none;
  }

  .desktop-subnav__link {
    display: inline-flex;
    align-items: center;
    height: 40px;
    padding: 0 14px;
    font-size: 13px;
    font-weight: 500;
    color: var(--ui-text-muted);
    text-decoration: none;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: color 0.15s, border-color 0.15s;
    margin-bottom: -1px;
  }

  .desktop-subnav__link:hover {
    color: var(--ui-text);
    border-bottom-color: #444;
  }

  .desktop-subnav__link.active {
    color: var(--ui-accent);
    border-bottom-color: var(--ui-accent);
    font-weight: 600;
  }

  /* Remove hamburger from header on desktop */
  .menu-icon--mobile {
    display: none !important;
  }

  /* Hide mobile bottom nav on desktop */
  .mobile-bottom-nav {
    display: none !important;
  }

  /* Desktop: no bottom padding needed */
  body {
    padding-bottom: 0 !important;
  }

  /* Header height on desktop */
  .header-inner {
    height: 62px;
  }

  /* Search max-width on desktop */
  .search {
    max-width: 360px;
  }
}


/* --------------------------------
   VIEW PAGE — DESKTOP OVERRIDES
-------------------------------- */

/* Player: no edge bleed on desktop, has radius */
@media (min-width: 1025px) {
  .view-player-wrap {
    margin: 0 !important;
    border-radius: var(--ui-radius);
    overflow: hidden;
  }

  .view-player-box {
    border-radius: var(--ui-radius);
    overflow: hidden;
  }

  /* Sidebar visible on desktop */
  .col-asside,
  .view-sidebar {
    display: block !important;
  }

  /* Sticky sidebar */
  .view-sidebar {
    position: sticky;
    top: calc(62px + 16px);
    /* header height + gap */
    max-height: calc(100vh - 90px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--ui-border) transparent;
    padding-right: 4px;
  }

  /* Sidebar: recommended video list as 1-col list */
  .view-sidebar .video-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .view-sidebar .video-card {
    display: flex;
    flex-direction: row;
    height: 82px;
    border-radius: 0px;
  }

  .view-sidebar .video-card__thumb {
    width: 140px;
    min-width: 140px;
    height: 82px;
    aspect-ratio: unset;
    border-radius: 0px 0 0 8px;
    overflow: hidden;
  }

  .view-sidebar .video-card__info {
    flex: 1;
    min-width: 0;
    padding: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .view-sidebar .video-card__title {
    font-size: 12px;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    margin-bottom: 4px;
  }

  .view-sidebar .video-card__meta {
    font-size: 10px;
    gap: 6px;
  }
}

/* Mobile: hide sidebar */
@media (max-width: 1024px) {
  .col-asside {
    display: none !important;
  }

  /* Also hide the "Advertisement" label */
  .view-sidebar .asside-link {
    display: none;
  }
}