@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;900&display=swap');

*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }

:root {
  --accent:  #ff5500;
  --accent2: #ff8800;
  --glow:    rgba(255,85,0,0.22);
  --bg:      #0c0c0c;
  --bg2:     #141414;
  --bg3:     #1c1c1c;
  --bg4:     #242424;
  --border:  #1e1e1e;
  --border2: #2a2a2a;
  --text:    #f0f0f0;
  --text2:   #999;
  --text3:   #444;
  --r:       8px;
}

html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ==============================
   HEADER
============================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,10,10,0.97);
  border-bottom: 1px solid var(--border2);
  backdrop-filter: blur(14px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 20px;
  max-width: 1400px;
  margin: 0 auto;
}

.logo {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -1.5px;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  text-transform: uppercase;
}

.logo span {
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-search {
  display: flex;
  align-items: center;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--r);
  overflow: hidden;
  flex-shrink: 0;
}

.header-search input {
  padding: 8px 14px;
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  background: transparent;
  color: var(--text);
  border: none;
  outline: none;
  width: 220px;
}

.header-search input::placeholder { color: var(--text3); }

.header-search button {
  padding: 8px 14px;
  background: var(--accent);
  border: none;
  cursor: pointer;
  font-size: 13px;
  transition: background 0.2s;
  color: #fff;
}

.header-search button:hover { background: var(--accent2); }

.header-ad {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  overflow: hidden;
}

/* ==============================
   NAVBAR
============================== */
.navbar {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  padding: 6px 20px;
  background: var(--bg2);
  border-top: 1px solid var(--border);
  scrollbar-width: none;
  max-width: 100%;
}
.navbar::-webkit-scrollbar { display: none; }

.navbar a {
  text-decoration: none;
  color: var(--text2);
  padding: 6px 14px;
  border-radius: 4px;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.navbar a:hover { background: var(--bg3); color: var(--text); }

.navbar a.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 10px var(--glow);
}

.nav-count {
  background: rgba(255,255,255,0.2);
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 99px;
}

/* ==============================
   SITE LAYOUT (main + sidebar)
============================== */
.site-wrap {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 16px;
  max-width: 1400px;
  margin: 16px auto;
  padding: 0 16px;
  align-items: start;
}

/* ==============================
   SECTION HEADER
============================== */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border2);
}

.section-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title::before {
  content: '';
  width: 3px;
  height: 16px;
  background: linear-gradient(180deg, var(--accent), var(--accent2));
  border-radius: 99px;
  flex-shrink: 0;
}

.section-more {
  font-size: 12px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.15s;
}
.section-more:hover { color: var(--accent2); }

/* ==============================
   VIDEO GRID & CARDS
============================== */
.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.card {
  background: var(--bg2);
  border-radius: var(--r);
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--border);
  transition: transform 0.2s cubic-bezier(.34,1.4,.64,1), box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 12px 32px rgba(0,0,0,0.55);
  border-color: var(--border2);
  z-index: 2;
}

.thumb {
  position: relative;
  overflow: hidden;
  background: var(--bg3);
}

.thumb img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  transition: transform 0.32s ease;
}

.card:hover .thumb img { transform: scale(1.06); }

.thumb::after {
  content: '▶';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #fff;
  background: rgba(0,0,0,0.28);
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}
.card:hover .thumb::after { opacity: 1; }

.views, .duration, .rating-bar {
  position: absolute;
  background: rgba(0,0,0,0.82);
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 700;
  border-radius: 3px;
  z-index: 1;
}

.views    { top: 5px; left: 5px; }
.duration { bottom: 5px; right: 5px; }
.rating-bar {
  bottom: 5px;
  left: 5px;
  color: #4cff72;
}
.rating-bar.low { color: #ff6b6b; }

.card-info { padding: 7px 8px 9px; }

.card-info h3 {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 35px;
  margin-bottom: 4px;
}

.meta {
  font-size: 10px;
  color: var(--text2);
}

/* ==============================
   SKELETON
============================== */
@keyframes shimmer {
  0%   { background-position: -800px 0; }
  100% { background-position:  800px 0; }
}

.skeleton-card { pointer-events: none; }

.skeleton-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(90deg, var(--bg3) 25%, #222 50%, var(--bg3) 75%);
  background-size: 800px 100%;
  animation: shimmer 1.5s infinite linear;
}

.skeleton-line {
  height: 10px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--bg3) 25%, #222 50%, var(--bg3) 75%);
  background-size: 800px 100%;
  animation: shimmer 1.5s infinite linear;
}

/* ==============================
   EMPTY
============================== */
.empty-msg {
  color: var(--text3);
  font-size: 14px;
  padding: 48px 20px;
  text-align: center;
  grid-column: 1 / -1;
}

/* ==============================
   PAGINATION
============================== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  margin: 8px 0 20px;
  flex-wrap: wrap;
}

.pagination button {
  background: var(--bg2);
  color: var(--text2);
  border: 1px solid var(--border2);
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  transition: all 0.15s;
  min-width: 32px;
}

.pagination button:hover { background: var(--bg3); color: var(--text); }

.active-page {
  background: var(--accent) !important;
  color: #fff !important;
  border-color: var(--accent) !important;
}

.page-ellipsis { color: var(--text3); padding: 0 4px; font-size: 13px; }

/* ==============================
   SIDEBAR
============================== */
.sidebar {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sidebar-box {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--r);
  overflow: hidden;
}

.sidebar-title {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 10px 12px;
  background: var(--bg3);
  border-bottom: 1px solid var(--border2);
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
}

.sidebar-title::before {
  content: '';
  width: 3px;
  height: 14px;
  background: linear-gradient(180deg, var(--accent), var(--accent2));
  border-radius: 99px;
}

.sidebar-list {
  display: flex;
  flex-direction: column;
}

.sidebar-card {
  display: flex;
  gap: 9px;
  padding: 8px 10px;
  text-decoration: none;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
  align-items: flex-start;
}

.sidebar-card:last-child { border-bottom: none; }
.sidebar-card:hover { background: var(--bg3); }

.sidebar-card img {
  width: 80px;
  height: 48px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
  background: var(--bg3);
}

.sidebar-card-info { flex: 1; min-width: 0; }

.sidebar-card-title {
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
}

.sidebar-card-meta {
  font-size: 10px;
  color: var(--text2);
}

/* ==============================
   ADS
============================== */
.ad728 { width:100%; text-align:center; overflow:hidden; }
.ad300 { width:300px; text-align:center; margin:0 auto; overflow:hidden; }
.ad-native { width:100%; overflow:hidden; margin: 8px 0; }


/* ==============================
   BANNER GRID 4 SLOT
============================== */
.banner-grid {
  display: grid;
  grid-template-columns: repeat(2, 468px);
  gap: 6px;
  padding: 8px 16px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border2);
  justify-content: center;
  overflow: hidden;
}

.banner-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg3);
  border-radius: 4px;
  overflow: hidden;
  height: 60px;
  border: 1px solid var(--border);
}

@media (max-width: 980px) {
  .banner-grid { grid-template-columns: repeat(2, 1fr); }
  .banner-slot { height: 60px; }
}

@media (max-width: 500px) {
  .banner-grid { grid-template-columns: 1fr; gap: 5px; padding: 6px 10px; }
}


/* ==============================
   VIDEO PLAYER PAGE
============================== */
.player-container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 16px 20px 48px;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  background: var(--bg3);
  color: var(--text2);
  text-decoration: none;
  padding: 7px 14px;
  border-radius: var(--r);
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--border2);
  transition: all 0.15s;
}

.back-btn:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

#player {
  display: block;
  width: 100%;
  max-height: 72vh;
  background: #000;
  border-radius: 10px;
}

video { width: 100%; height: auto; }

#title {
  margin-top: 14px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: -0.3px;
}

.video-meta {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text2);
}

.error-msg {
  background: #150808;
  border: 1px solid #3a1010;
  color: #ff7070;
  padding: 18px;
  border-radius: var(--r);
  text-align: center;
  font-size: 13px;
  margin-bottom: 14px;
}

.error-msg a { color: var(--accent); margin-left: 8px; }

.related-title {
  margin: 28px 0 12px;
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.related-title::before {
  content: '';
  width: 3px;
  height: 16px;
  background: linear-gradient(180deg, var(--accent), var(--accent2));
  border-radius: 99px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}

.related-card {
  background: var(--bg2);
  border-radius: var(--r);
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--border);
  transition: transform 0.18s, box-shadow 0.18s;
}

.related-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  border-color: var(--border2);
}

.related-card img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
}

.related-info { padding: 8px 9px 10px; }

.related-info h4 {
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-info div {
  font-size: 10px;
  color: var(--text2);
  margin-top: 2px;
}

/* ==============================
   SCROLL TO TOP
============================== */
.scroll-top-btn {
  position: fixed;
  bottom: 24px;
  right: 16px;
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 4px 16px var(--glow);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.22s, transform 0.22s;
  pointer-events: none;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scroll-top-btn.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* ==============================
   FOOTER
============================== */
.footer {
  margin-top: 56px;
  padding: 40px 20px 28px;
  background: var(--bg2);
  text-align: center;
  border-top: 1px solid var(--border2);
}

.footer-logo {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -1.5px;
  color: #fff;
  margin-bottom: 5px;
}

.footer-logo span {
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-tagline { font-size: 11px; color: var(--text3); margin-bottom: 20px; }

.footer-divider {
  width: 32px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  margin: 0 auto 20px;
  border-radius: 99px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.footer-links a {
  color: var(--text2);
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  transition: color 0.15s;
}

.footer-links a:hover { color: var(--accent); }
.footer-copy { color: var(--text3); font-size: 11px; }

/* ==============================
   RESPONSIVE
============================== */
@media (max-width: 1100px) {
  .site-wrap { grid-template-columns: 1fr 240px; }
  .grid { grid-template-columns: repeat(3, 1fr); }
  .header-ad { display: none; }
}

@media (max-width: 800px) {
  .site-wrap { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .header-search input { width: 160px; }
}

@media (max-width: 600px) {
  .header-inner { padding: 9px 12px; gap: 10px; }
  .logo { font-size: 18px; }
  .header-search input { width: 120px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .site-wrap { padding: 0 10px; }
  .card-info h3 { font-size: 11px; min-height: 32px; }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
  .navbar { padding: 5px 10px; }
  .navbar a { padding: 5px 10px; font-size: 11px; }
}

@media (max-width: 400px) {
  .header-search input { width: 90px; }
  .logo { font-size: 16px; }
}