@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700;800;900&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

/* ═══════════════════════════════════════════════════
   MADAAR MEDIA — Design System v3
   تلویزیون اینترنتی مدار مدیا
═══════════════════════════════════════════════════ */

:root {
  /* Brand */
  --gold:        #FFC300;
  --gold-dark:   #D9A800;
  --gold-dim:    rgba(255,195,0,0.12);
  --gold-glow:   rgba(255,195,0,0.25);

  /* Dark theme (default) */
  --bg:          #080808;
  --bg-2:        #0f0f0f;
  --bg-3:        #161616;
  --bg-4:        #1e1e1e;
  --bg-5:        #262626;
  --border:      rgba(255,255,255,0.07);
  --border-2:    rgba(255,255,255,0.12);
  --text:        #f0f0f0;
  --text-2:      #a0a0a0;
  --text-3:      #606060;
  --text-inv:    #080808;

  /* Category colors */
  --c-talk:      #FFC300;
  --c-doc:       #00C9A7;
  --c-news:      #FF6B6B;
  --c-sport:     #4ECDC4;
  --c-art:       #C77DFF;
  --c-comedy:    #FFD166;
  --c-live:      #FF4444;

  /* Type */
  --font:        'Vazirmatn', system-ui, sans-serif;
  --mono:        'IBM Plex Mono', monospace;

  /* Spacing */
  --r:           12px;
  --r-lg:        20px;
  --r-xl:        28px;

  /* Transitions */
  --t:           0.2s ease;
  --t-slow:      0.4s ease;

  /* Header */
  --header-h:    64px;
}

/* Light theme */
[data-theme="light"] {
  --bg:          #f5f5f5;
  --bg-2:        #ffffff;
  --bg-3:        #efefef;
  --bg-4:        #e5e5e5;
  --bg-5:        #d8d8d8;
  --border:      rgba(0,0,0,0.08);
  --border-2:    rgba(0,0,0,0.14);
  --text:        #111111;
  --text-2:      #555555;
  --text-3:      #999999;
  --text-inv:    #ffffff;
  --gold-dim:    rgba(255,195,0,0.15);
}

/* ─── Reset ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  direction: rtl;
  text-align: right;
  line-height: 1.6;
  overflow-x: hidden;
  transition: background var(--t-slow), color var(--t-slow);
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: var(--font); border: none; background: none; }
ul, ol { list-style: none; }

/* ─── Scrollbar ──────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg-2); }
::-webkit-scrollbar-thumb { background: var(--bg-5); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

/* ─── Typography ─────────────────────────────────── */
.display { font-size: clamp(2.5rem, 6vw, 5rem); font-weight: 900; line-height: 1.1; letter-spacing: -0.02em; }
.headline { font-size: clamp(1.5rem, 3vw, 2.5rem); font-weight: 800; line-height: 1.2; }
.title    { font-size: 1.125rem; font-weight: 700; line-height: 1.3; }
.body     { font-size: 0.9375rem; font-weight: 400; line-height: 1.7; }
.caption  { font-size: 0.8125rem; font-weight: 400; color: var(--text-2); }
.label    { font-family: var(--mono); font-size: 0.6875rem; font-weight: 500; letter-spacing: 0.15em; text-transform: uppercase; color: var(--text-3); }
.gold     { color: var(--gold); }

/* ─── Layout ─────────────────────────────────────── */
.container { max-width: 1360px; margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 900px; margin: 0 auto; padding: 0 24px; }
.section { padding: 60px 0; }
.section-sm { padding: 40px 0; }

/* ─── Header ─────────────────────────────────────── */
#header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  z-index: 1000;
  transition: background var(--t), border-color var(--t), backdrop-filter var(--t);
}
#header.scrolled {
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.logo img {
  height: 36px;
  width: 36px;
  object-fit: contain;
  mix-blend-mode: screen;
  filter: brightness(1.2);
}
.logo-text { display: flex; flex-direction: column; gap: 1px; }
.logo-fa { font-size: 0.875rem; font-weight: 800; color: var(--text); line-height: 1; }
.logo-en { font-family: var(--mono); font-size: 0.55rem; letter-spacing: 0.2em; color: var(--gold); line-height: 1; }

/* Nav */
.nav { display: flex; align-items: center; gap: 2px; }
.nav-link {
  position: relative;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-2);
  transition: color var(--t), background var(--t);
}
.nav-link:hover { color: var(--text); background: var(--bg-3); }
.nav-link.active { color: var(--gold); }
.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 14px; right: 14px;
  height: 2px;
  background: var(--gold);
  border-radius: 99px;
}
.nav-live { color: var(--c-live) !important; }
.nav-live-dot {
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--c-live);
  border-radius: 50%;
  margin-left: 5px;
  animation: pulse 2s infinite;
  vertical-align: middle;
  margin-bottom: 2px;
}

/* Header actions */
.header-actions { display: flex; align-items: center; gap: 8px; }

/* Search */
.search-wrap { position: relative; }
.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 7px 14px;
  transition: all var(--t);
  width: 160px;
}
.search-box:focus-within {
  border-color: rgba(255,195,0,0.4);
  background: var(--bg-2);
  width: 240px;
}
.search-box svg { color: var(--text-3); flex-shrink: 0; }
.search-input {
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.875rem;
  width: 100%;
  direction: rtl;
}
.search-input::placeholder { color: var(--text-3); }
.search-results {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 340px;
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: var(--r-lg);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  overflow: hidden;
  display: none;
  z-index: 100;
}
.search-results.open { display: block; animation: fadeDown 0.15s ease; }
.search-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  transition: background var(--t);
}
.search-item:last-child { border-bottom: none; }
.search-item:hover { background: var(--bg-3); }
.search-thumb {
  width: 72px; height: 44px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-4);
}
.search-thumb img { width: 100%; height: 100%; object-fit: cover; }
.search-title { font-size: 0.8125rem; font-weight: 600; line-height: 1.3; }
.search-meta { font-family: var(--mono); font-size: 0.6875rem; color: var(--text-3); margin-top: 2px; }

/* Theme & icon buttons */
.icon-btn {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: grid; place-items: center;
  color: var(--text-2);
  background: var(--bg-3);
  border: 1px solid var(--border);
  transition: all var(--t);
}
.icon-btn:hover { color: var(--text); border-color: var(--border-2); background: var(--bg-4); }
.icon-btn.active { color: var(--gold); border-color: var(--gold-dim); }

/* Hamburger */
.hamburger { display: none; }

/* Mobile menu */
.mobile-menu {
  position: fixed;
  top: var(--header-h);
  left: 0; right: 0;
  background: color-mix(in srgb, var(--bg) 98%, transparent);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 16px;
  display: none;
  flex-direction: column;
  gap: 4px;
  z-index: 999;
  animation: slideDown 0.2s ease;
}
.mobile-menu.open { display: flex; }
.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--r);
  font-weight: 600;
  color: var(--text-2);
  transition: all var(--t);
}
.mobile-nav-link:hover, .mobile-nav-link.active { background: var(--bg-3); color: var(--text); }
.mobile-nav-link.active { color: var(--gold); }

/* Bottom nav (mobile) */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: color-mix(in srgb, var(--bg) 95%, transparent);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  padding: 8px 0 max(8px, env(safe-area-inset-bottom));
  z-index: 999;
}
.bottom-nav-inner { display: flex; }
.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 4px;
  color: var(--text-3);
  transition: color var(--t);
  font-size: 0.625rem;
  font-weight: 600;
}
.bottom-nav-item.active { color: var(--gold); }
.bottom-nav-item svg { width: 22px; height: 22px; }

/* ─── Hero ───────────────────────────────────────── */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  max-height: 900px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  padding-top: var(--header-h);
}
.hero-bg {
  position: absolute;
  inset: 0;
  background: var(--bg);
}
.hero-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.8s ease;
}
.hero-bg img.loaded { opacity: 1; }
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    var(--bg) 0%,
    color-mix(in srgb, var(--bg) 80%, transparent) 40%,
    color-mix(in srgb, var(--bg) 30%, transparent) 70%,
    transparent 100%
  );
}
.hero-overlay-bottom {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 40%;
  background: linear-gradient(to top, var(--bg), transparent);
}
.hero-content {
  position: relative;
  z-index: 2;
  padding: 48px 0;
  max-width: 600px;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--gold-dim);
  border: 1px solid var(--gold-glow);
  border-radius: 99px;
  padding: 5px 14px;
  margin-bottom: 20px;
}
.hero-eyebrow-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
.hero-eyebrow span { font-family: var(--mono); font-size: 0.625rem; letter-spacing: 0.15em; color: var(--gold); }
.hero-title { margin-bottom: 16px; }
.hero-desc {
  font-size: 1rem;
  color: var(--text-2);
  max-width: 480px;
  margin-bottom: 28px;
  line-height: 1.8;
}
.hero-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.hero-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.hero-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  color: var(--text-2);
}
.hero-meta-item svg { color: var(--text-3); }

/* Hero dots */
.hero-dots {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 8px;
}
.hero-dot {
  width: 6px; height: 6px;
  border-radius: 99px;
  background: var(--border-2);
  border: none;
  transition: all 0.3s ease;
  padding: 0;
}
.hero-dot.active { width: 24px; background: var(--gold); }

/* Hero thumbnails sidebar */
.hero-thumbs {
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 20px;
}
.hero-thumb-item {
  width: 80px; height: 52px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--t);
  background: var(--bg-4);
  opacity: 0.5;
}
.hero-thumb-item.active { border-color: var(--gold); opacity: 1; }
.hero-thumb-item img { width: 100%; height: 100%; object-fit: cover; }

/* ─── Buttons ────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 10px;
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 700;
  transition: all var(--t);
  border: none;
  cursor: pointer;
}
.btn-gold {
  background: var(--gold);
  color: #080808;
}
.btn-gold:hover { background: var(--gold-dark); transform: translateY(-1px); box-shadow: 0 8px 24px var(--gold-glow); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-2);
}
.btn-ghost:hover { border-color: var(--gold-glow); background: var(--gold-dim); color: var(--gold); }
.btn-sm { padding: 7px 14px; font-size: 0.8125rem; border-radius: 8px; }
.btn-lg { padding: 13px 28px; font-size: 1rem; border-radius: 12px; }
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ─── Section header ─────────────────────────────── */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 24px;
}
.section-head-left {}
.section-label { font-family: var(--mono); font-size: 0.625rem; letter-spacing: 0.2em; color: var(--gold); margin-bottom: 4px; }
.section-title { font-size: 1.25rem; font-weight: 800; }
.section-link {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-3);
  transition: color var(--t);
  display: flex;
  align-items: center;
  gap: 4px;
}
.section-link:hover { color: var(--gold); }

/* ─── Video Row ──────────────────────────────────── */
.video-row { position: relative; }
.video-row-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.video-row-track::-webkit-scrollbar { display: none; }
.row-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  display: grid; place-items: center;
  color: var(--text-2);
  z-index: 2;
  transition: all var(--t);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.row-arrow:hover { border-color: var(--gold); color: var(--gold); background: var(--bg-3); }
.row-arrow-prev { right: -18px; }
.row-arrow-next { left: -18px; }

/* ─── Video Card ─────────────────────────────────── */
.video-card {
  flex-shrink: 0;
  width: 240px;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--bg-2);
  border: 1px solid var(--border);
  transition: all 0.3s ease;
  scroll-snap-align: start;
  cursor: pointer;
}
.video-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-2);
  box-shadow: 0 16px 40px rgba(0,0,0,0.35);
}
.video-card-thumb {
  position: relative;
  height: 140px;
  overflow: hidden;
}
.video-card-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.video-card:hover .video-card-thumb img { transform: scale(1.05); }
.video-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.6), transparent 50%);
  opacity: 0;
  transition: opacity var(--t);
  display: grid;
  place-items: center;
}
.video-card:hover .video-card-overlay { opacity: 1; }
.play-btn {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--gold);
  display: grid; place-items: center;
  color: #080808;
  transform: scale(0.8);
  transition: transform 0.2s ease;
}
.video-card:hover .play-btn { transform: scale(1); }
.video-card-cat {
  position: absolute;
  top: 10px; right: 10px;
  padding: 3px 8px;
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  backdrop-filter: blur(8px);
}
.video-card-duration {
  position: absolute;
  bottom: 8px; left: 8px;
  padding: 2px 7px;
  border-radius: 5px;
  background: rgba(0,0,0,0.75);
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: #fff;
  backdrop-filter: blur(4px);
}
.video-card-featured {
  position: absolute;
  top: 10px; left: 10px;
  padding: 2px 7px;
  border-radius: 5px;
  background: var(--gold);
  color: #080808;
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 700;
}
.video-card-body { padding: 14px; }
.video-card-title {
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.4em;
}
.video-card-playlist {
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--gold);
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.video-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--text-3);
}
.video-card-views { display: flex; align-items: center; gap: 3px; }

/* Cat colors */
.cat-TALK { background: rgba(255,195,0,0.15); color: var(--c-talk); border: 1px solid rgba(255,195,0,0.2); }
.cat-DOC  { background: rgba(0,201,167,0.15); color: var(--c-doc);  border: 1px solid rgba(0,201,167,0.2); }
.cat-NEWS { background: rgba(255,107,107,0.15); color: var(--c-news); border: 1px solid rgba(255,107,107,0.2); }
.cat-LIVE { background: rgba(255,68,68,0.15);  color: var(--c-live); border: 1px solid rgba(255,68,68,0.2); }
.cat-SPORT { background: rgba(78,205,196,0.15); color: var(--c-sport); border: 1px solid rgba(78,205,196,0.2); }
.cat-ART  { background: rgba(199,125,255,0.15); color: var(--c-art); border: 1px solid rgba(199,125,255,0.2); }

/* ─── Live Banner ────────────────────────────────── */
.live-banner {
  border-radius: var(--r-xl);
  overflow: hidden;
  position: relative;
  background: linear-gradient(135deg, rgba(255,68,68,0.08), var(--bg-2));
  border: 1px solid rgba(255,68,68,0.2);
  padding: 28px 32px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.live-banner-pulse {
  flex-shrink: 0;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: rgba(255,68,68,0.15);
  border: 1px solid rgba(255,68,68,0.3);
  display: grid; place-items: center;
  color: var(--c-live);
  position: relative;
}
.live-banner-pulse::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1px solid rgba(255,68,68,0.2);
  animation: ping 2s infinite;
}
.live-banner-info { flex: 1; }
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--c-live);
  color: #fff;
  padding: 2px 10px;
  border-radius: 99px;
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}
.live-badge-dot { width: 5px; height: 5px; border-radius: 50%; background: #fff; animation: pulse 1s infinite; }
.live-title { font-size: 1.1rem; font-weight: 800; }
.live-desc { font-size: 0.875rem; color: var(--text-2); margin-top: 4px; }

/* ─── Video Grid (full page) ─────────────────────── */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}
.video-card-full { width: 100%; }

/* ─── Watch Page ─────────────────────────────────── */
.watch-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 32px;
  align-items: start;
}
.player-wrap {
  aspect-ratio: 16/9;
  border-radius: var(--r-xl);
  overflow: hidden;
  background: #000;
  border: 1px solid var(--border);
  box-shadow: 0 24px 60px rgba(0,0,0,0.4);
}
.player-wrap iframe { width: 100%; height: 100%; border: none; display: block; }
.player-info { margin-top: 20px; }
.player-title { font-size: 1.375rem; font-weight: 800; line-height: 1.3; margin-bottom: 12px; }
.player-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.player-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  color: var(--text-2);
}
.player-meta-item svg { color: var(--text-3); width: 15px; height: 15px; }
.player-desc {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  font-size: 0.9rem;
  color: var(--text-2);
  line-height: 1.8;
}
.share-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 8px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-2);
  transition: all var(--t);
}
.share-btn:hover { border-color: var(--gold-glow); color: var(--gold); }

/* Chapters */
.chapters-box {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-top: 16px;
}
.chapters-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  cursor: pointer;
  transition: background var(--t);
}
.chapters-head:hover { background: var(--bg-3); }
.chapters-head-left { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 0.9rem; }
.chapters-body { border-top: 1px solid var(--border); }
.chapter-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 18px;
  border-bottom: 1px solid var(--border);
  transition: background var(--t);
  cursor: pointer;
}
.chapter-item:last-child { border-bottom: none; }
.chapter-item:hover { background: var(--bg-3); }
.chapter-time { font-family: var(--mono); font-size: 0.6875rem; color: var(--gold); width: 44px; flex-shrink: 0; }
.chapter-title { font-size: 0.8125rem; color: var(--text-2); flex: 1; }
.chapter-num { font-family: var(--mono); font-size: 0.625rem; color: var(--text-3); }

/* Sidebar related */
.related-box { position: sticky; top: calc(var(--header-h) + 20px); }
.related-title { font-weight: 800; font-size: 1rem; margin-bottom: 4px; }
.related-list { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.related-item {
  display: flex;
  gap: 12px;
  border-radius: var(--r);
  padding: 8px;
  transition: background var(--t);
  cursor: pointer;
}
.related-item:hover { background: var(--bg-2); }
.related-thumb { width: 100px; height: 62px; border-radius: 8px; overflow: hidden; flex-shrink: 0; background: var(--bg-4); }
.related-thumb img { width: 100%; height: 100%; object-fit: cover; }
.related-info { flex: 1; min-width: 0; }
.related-t { font-size: 0.8125rem; font-weight: 700; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.related-m { font-family: var(--mono); font-size: 0.625rem; color: var(--text-3); margin-top: 4px; }

/* ─── Live Page ──────────────────────────────────── */
.live-page-player {
  aspect-ratio: 16/9;
  border-radius: var(--r-xl);
  overflow: hidden;
  background: #000;
  border: 1px solid var(--border);
  box-shadow: 0 24px 60px rgba(0,0,0,0.4);
}
.live-offline {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 80px 20px;
  text-align: center;
}
.live-offline-icon {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--bg-2);
  border: 1px solid var(--border);
  display: grid; place-items: center;
  color: var(--text-3);
}

/* ─── Page header ────────────────────────────────── */
.page-hero {
  padding: calc(var(--header-h) + 48px) 0 48px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 48px;
}
.page-hero-label { font-family: var(--mono); font-size: 0.625rem; letter-spacing: 0.2em; color: var(--gold); margin-bottom: 10px; }
.page-hero-title { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 900; margin-bottom: 12px; }
.page-hero-desc { font-size: 1rem; color: var(--text-2); max-width: 600px; }

/* Filter bar */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
.filter-input-wrap {
  flex: 1;
  min-width: 200px;
  max-width: 380px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 14px;
  transition: border-color var(--t);
}
.filter-input-wrap:focus-within { border-color: rgba(255,195,0,0.4); }
.filter-input { background: none; border: none; outline: none; color: var(--text); font-family: var(--font); font-size: 0.875rem; width: 100%; direction: rtl; }
.filter-input::placeholder { color: var(--text-3); }
.filter-count { font-family: var(--mono); font-size: 0.75rem; color: var(--text-3); margin-right: auto; }

/* ─── Footer ─────────────────────────────────────── */
#footer {
  border-top: 1px solid var(--border);
  margin-top: 80px;
  padding-bottom: 80px;
}
.footer-top {
  padding: 48px 0 40px;
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 48px;
}
.footer-brand {}
.footer-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.footer-logo img { height: 40px; width: 40px; object-fit: contain; mix-blend-mode: screen; filter: brightness(1.2); }
.footer-desc { font-size: 0.875rem; color: var(--text-2); line-height: 1.7; max-width: 280px; }
.footer-col-title { font-family: var(--mono); font-size: 0.625rem; letter-spacing: 0.2em; color: var(--gold); margin-bottom: 16px; }
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: 0.875rem; color: var(--text-2); transition: color var(--t); }
.footer-col a:hover { color: var(--text); }
.footer-social { padding: 24px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 10px; }
.social-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 99px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--text-2);
  transition: all var(--t);
}
.social-chip:hover { border-color: var(--gold-glow); color: var(--gold); background: var(--gold-dim); }
.social-chip svg { width: 15px; height: 15px; }
.footer-bottom { padding: 20px 0 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.footer-copy { font-family: var(--mono); font-size: 0.6875rem; color: var(--text-3); }

/* ─── Toast ──────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: 10px;
  padding: 10px 20px;
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
  z-index: 9999;
  transition: transform 0.3s ease;
  white-space: nowrap;
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ─── Skeleton ───────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--bg-3) 25%, var(--bg-4) 50%, var(--bg-3) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}

/* ─── Empty state ────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 20px;
  text-align: center;
  gap: 12px;
}
.empty-icon { color: var(--text-3); margin-bottom: 8px; }
.empty-title { font-size: 1.125rem; font-weight: 700; }
.empty-desc { font-size: 0.875rem; color: var(--text-2); }

/* ─── 404 ────────────────────────────────────────── */
.notfound {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
}
.notfound-num {
  font-size: clamp(6rem, 20vw, 14rem);
  font-weight: 900;
  line-height: 1;
  color: var(--bg-4);
  font-family: var(--mono);
}
.notfound-title { font-size: 1.5rem; font-weight: 800; margin: 16px 0 8px; }
.notfound-desc { color: var(--text-2); margin-bottom: 28px; }

/* ─── Animations ─────────────────────────────────── */
@keyframes fadeDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
@keyframes ping { 0% { transform: scale(1); opacity: 0.7; } 100% { transform: scale(1.6); opacity: 0; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.fade-in { animation: fadeIn 0.5s ease; }
.slide-up { animation: slideUp 0.4s ease; }

/* ─── Load more ──────────────────────────────────── */
.load-more-wrap { text-align: center; margin-top: 40px; }

/* ─── Responsive ─────────────────────────────────── */
@media (max-width: 1024px) {
  .watch-layout { grid-template-columns: 1fr; }
  .related-box { position: static; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .hero-thumbs { display: none; }
}
@media (max-width: 768px) {
  .nav { display: none; }
  .hamburger { display: flex; }
  .search-wrap { display: none; }
  .bottom-nav { display: block; }
  #footer { padding-bottom: 100px; }
  .footer-top { grid-template-columns: 1fr; gap: 32px; }
  .hero { max-height: 70vh; }
  .hero-overlay { background: linear-gradient(to top, var(--bg) 0%, color-mix(in srgb, var(--bg) 60%, transparent) 60%, transparent 100%); }
  .hero-content { max-width: 100%; }
  .section { padding: 40px 0; }
  .live-banner { flex-direction: column; text-align: center; gap: 16px; }
}
@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .video-card { width: 200px; }
  .video-card-thumb { height: 118px; }
}
