/* ─── Reset & Base ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --black:    #0d0d0d;
  --near-black: #141414;
  --surface:  #f7f6f4;
  --white:    #ffffff;
  --red:      #e63946;
  --red-dark: #c1121f;
  --muted:    #6b6b6b;
  --border:   #e0ddd8;
  --card-bg:  #ffffff;
  --font:     'Figtree', sans-serif;
  --radius:   6px;
  --shadow:   0 2px 12px rgba(0,0,0,0.08);
}

body {
  font-family: var(--font);
  font-size: 15px;
  background: var(--surface);
  color: var(--black);
  line-height: 1.5;
}

a { text-decoration: none; color: inherit; }

/* ─── Site wrapper ────────────────────────────────────── */
.wrap {
  max-width: 1100px;
  margin: 0 auto;
  background: var(--white);
  box-shadow: 0 0 40px rgba(0,0,0,0.12);
}

/* ─── Header ──────────────────────────────────────────── */
.site-header {
  background: var(--black);
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 58px;
  position: sticky;
  top: 0;
  z-index: 200;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.logo .logo-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--red);
  border-radius: 50%;
  margin-left: 2px;
  animation: pulse 2s ease infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

/* Desktop nav */
.site-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.site-nav a {
  color: #bbb;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 8px 12px;
  border-radius: var(--radius);
  transition: color 0.15s, background 0.15s;
}

.site-nav a:hover {
  color: var(--white);
  background: rgba(255,255,255,0.08);
}

.site-nav a.active {
  color: var(--red);
}

/* Genres dropdown */
.nav-dropdown { position: relative; }

.nav-dropdown > a { cursor: pointer; }

.dropdown-panel {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: var(--near-black);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  padding: 8px;
  min-width: 260px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 0.15s, transform 0.15s;
}

.nav-dropdown:hover .dropdown-panel {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

.dropdown-panel a {
  color: #bbb;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 6px 8px;
  border-radius: 4px;
}

.dropdown-panel a:hover {
  color: var(--white);
  background: rgba(255,255,255,0.08);
}

/* Header actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-search {
  background: none;
  border: 1px solid rgba(255,255,255,0.2);
  color: #bbb;
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, border-color 0.15s;
}

.btn-search:hover { color: var(--white); border-color: rgba(255,255,255,0.5); }

.btn-adult {
  background: rgba(230, 57, 70, 0.15);
  border: 1px solid rgba(230, 57, 70, 0.4);
  color: var(--red);
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font);
  padding: 6px 12px;
  border-radius: var(--radius);
  cursor: pointer;
  letter-spacing: 0.3px;
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.btn-adult:hover { background: rgba(230,57,70,0.25); border-color: var(--red); }
.btn-adult.on { background: var(--red); color: #fff; border-color: var(--red); }

/* Mobile menu toggle */
.btn-menu {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 22px;
  cursor: pointer;
  padding: 4px;
}

/* ─── Genre scroll strip (mobile) ───────────────────── */
.genre-strip {
  background: #1a1a1a;
  display: flex;
  overflow-x: auto;
  gap: 0;
  scrollbar-width: none;
}

.genre-strip::-webkit-scrollbar { display: none; }

.genre-strip a {
  color: #aaa;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 9px 14px;
  white-space: nowrap;
  border-right: 1px solid rgba(255,255,255,0.06);
  transition: color 0.15s, background 0.15s;
}

.genre-strip a:hover {
  color: var(--white);
  background: rgba(255,255,255,0.06);
}

/* ─── Announcement bar ──────────────────────────────── */
.announce-bar {
  background: #fff8e1;
  border-bottom: 1px solid #ffe082;
  text-align: center;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #7a5c00;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.announce-bar i { color: #f59e0b; }

/* ─── Banner ────────────────────────────────────────── */
.site-banner {
  background: #111;
  text-align: center;
  padding: 12px;
  border-bottom: 1px solid #222;
}

.site-banner img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 4px;
  border: 2px solid #24A1DE;
}

/* ─── Main layout ────────────────────────────────────── */
.site-body {
  display: flex;
  gap: 0;
  align-items: flex-start;
}

.main-col {
  flex: 1;
  min-width: 0;
  padding: 20px 16px;
  border-right: 1px solid var(--border);
}

.sidebar-col {
  width: 300px;
  flex-shrink: 0;
  padding: 16px;
  position: sticky;
  top: 58px;
  max-height: calc(100vh - 58px);
  overflow-y: auto;
  scrollbar-width: thin;
}

/* ─── Section header ────────────────────────────────── */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.section-title {
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--black);
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 16px;
  background: var(--red);
  border-radius: 2px;
  flex-shrink: 0;
}

.section-title i {
  color: var(--red);
  font-size: 14px;
}

.section-link {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  transition: color 0.15s;
}

.section-link:hover { color: var(--red); }

/* ─── Filter tabs ────────────────────────────────────── */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}

.filter-tab {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
  background: transparent;
  font-family: var(--font);
}

.filter-tab:hover {
  border-color: var(--black);
  color: var(--black);
}

.filter-tab.active {
  background: var(--black);
  border-color: var(--black);
  color: var(--white);
}

/* ─── Content grid ───────────────────────────────────── */
.content-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

/* Card */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  border-color: #ccc;
}

.card-thumb {
  position: relative;
  aspect-ratio: 2/3;
  overflow: hidden;
  background: #1a1a1a;
}

.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.card:hover .card-thumb img { transform: scale(1.06); }

.card-rating {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0,0,0,0.82);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
  backdrop-filter: blur(4px);
}

.card-rating i { color: #f59e0b; font-size: 9px; }

.card-type {
  position: absolute;
  bottom: 8px;
  left: 8px;
  display: flex;
  gap: 4px;
}

.badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding: 2px 6px;
  border-radius: 3px;
}

.badge-type {
  background: var(--red);
  color: #fff;
}

.badge-ep {
  background: rgba(0,0,0,0.75);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
}

.badge-adult {
  background: #ff4444;
  color: #fff;
}

.card-body {
  padding: 10px 10px 12px;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 5px;
}

.card-title {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--black);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-genres {
  margin-top: 7px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.genre-pill {
  font-size: 10px;
  background: var(--surface);
  color: var(--muted);
  padding: 2px 7px;
  border-radius: 10px;
  border: 1px solid var(--border);
}

/* Loading skeleton */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius);
}

@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.skeleton-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.skeleton-thumb { aspect-ratio: 2/3; }
.skeleton-body { padding: 10px; }
.skeleton-line { height: 12px; margin-bottom: 6px; border-radius: 4px; }
.skeleton-line.short { width: 60%; }

/* ─── Pagination ─────────────────────────────────────── */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.page-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}

.page-btn:hover { border-color: var(--black); color: var(--black); }
.page-btn.active { background: var(--black); border-color: var(--black); color: var(--white); }

/* ─── Sidebar ────────────────────────────────────────── */
.sidebar-section { margin-bottom: 24px; }

.sidebar-list { list-style: none; }

.sidebar-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
}

.sidebar-item:last-child { border-bottom: none; }
.sidebar-item:hover .sidebar-item-title { color: var(--red); }

.sidebar-thumb {
  width: 64px;
  height: 72px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
  background: #f0f0f0;
}

.sidebar-info { flex: 1; min-width: 0; }

.sidebar-badges { display: flex; gap: 4px; margin-bottom: 4px; flex-wrap: wrap; }

.sidebar-item-title {
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--black);
  transition: color 0.15s;
}

.sidebar-meta {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
  display: flex;
  gap: 8px;
}

.view-all-btn {
  display: block;
  text-align: center;
  margin-top: 8px;
  padding: 7px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  transition: all 0.15s;
}

.view-all-btn:hover {
  background: var(--black);
  border-color: var(--black);
  color: var(--white);
}

/* ─── Footer ─────────────────────────────────────────── */
.site-footer {
  background: var(--near-black);
  padding: 40px 24px 24px;
  color: #888;
}

.footer-top {
  display: flex;
  gap: 40px;
  margin-bottom: 32px;
  align-items: flex-start;
}

.footer-brand { flex-shrink: 0; }

.footer-logo-text {
  font-size: 22px;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.5px;
}

.footer-logo-text span { color: var(--red); }

.footer-tagline {
  font-size: 12px;
  color: #666;
  margin-top: 6px;
  max-width: 200px;
  line-height: 1.5;
}

.footer-links-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.footer-col-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #aaa;
  margin-bottom: 12px;
}

.footer-col ul { list-style: none; }

.footer-col li { margin-bottom: 8px; }

.footer-col a {
  font-size: 13px;
  color: #666;
  transition: color 0.15s;
}

.footer-col a:hover { color: var(--white); }

.footer-bottom {
  border-top: 1px solid #222;
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-copy { font-size: 13px; color: #555; }
.footer-copy a { color: #666; }
.footer-copy a:hover { color: var(--white); }

.footer-socials { display: flex; gap: 10px; }

.footer-social-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  border: 1px solid #2a2a2a;
  background: #1a1a1a;
  color: #666;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.footer-social-btn:hover { color: var(--white); border-color: #444; background: #222; }

/* ─── Adult modal ─────────────────────────────────────── */
.adult-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.adult-modal-overlay.open { display: flex; }

.adult-modal {
  background: #1c1c1c;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  padding: 48px 40px;
  max-width: 460px;
  width: 90%;
  text-align: center;
}

.adult-modal-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.adult-modal h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 12px;
}

.adult-modal p {
  font-size: 14px;
  color: #888;
  line-height: 1.6;
  margin-bottom: 32px;
}

.modal-actions { display: flex; gap: 12px; justify-content: center; }

.btn-confirm {
  background: var(--red);
  color: #fff;
  border: none;
  padding: 12px 32px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font);
  cursor: pointer;
  transition: background 0.15s;
}

.btn-confirm:hover { background: var(--red-dark); }

.btn-cancel {
  background: #2a2a2a;
  color: #aaa;
  border: none;
  padding: 12px 32px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font);
  cursor: pointer;
  transition: background 0.15s;
}

.btn-cancel:hover { background: #333; color: #fff; }

/* ─── Empty / error states ───────────────────────────── */
.state-box {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}

.state-box i { font-size: 40px; margin-bottom: 16px; display: block; opacity: 0.4; }
.state-box p { font-size: 14px; }

/* ─── Responsive ─────────────────────────────────────── */
@media (max-width: 900px) {
  .site-nav { display: none; }
  .btn-menu { display: block; }
  .site-body { flex-direction: column; }
  .main-col { border-right: none; border-bottom: 1px solid var(--border); padding: 16px; }
  .sidebar-col { width: 100%; position: static; max-height: none; padding: 16px; }
  .content-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-top { flex-direction: column; gap: 24px; }
  .footer-links-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}

@media (max-width: 600px) {
  .content-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .filter-bar { gap: 4px; }
  .filter-tab { padding: 5px 10px; font-size: 11px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}
