:root {
  --bg: #07070a;
  --bg-2: #0e0e15;
  --surface: #16161f;
  --surface-2: #1d1d29;
  --line: #262633;
  --text: #f2f2f7;
  --muted: #8b8b9e;
  --accent: #ff2e63;
  --accent-2: #7b2ff7;
  --glow: 0 0 40px rgba(123, 47, 247, .35);
  --radius: 16px;
  --font: "Vazirmatn", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }

/* ===== نَو ===== */
.nav {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 20px;
  padding: 14px 24px;
  background: rgba(7, 7, 10, .72);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}
.nav__brand { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 19px; }
.nav__logo { color: var(--accent); font-size: 22px; filter: drop-shadow(var(--glow)); }
.nav__name {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.nav__search {
  flex: 1; max-width: 480px; display: flex; align-items: center; gap: 9px;
  background: var(--surface); border: 1px solid var(--line);
  padding: 10px 16px; border-radius: 999px; color: var(--muted);
  transition: .2s;
}
.nav__search:focus-within { border-color: var(--accent-2); box-shadow: var(--glow); }
.nav__search input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--text); font-family: var(--font); font-size: 14px;
}
.nav__links { display: flex; gap: 6px; }
.nav__link {
  padding: 8px 14px; border-radius: 10px; font-size: 13.5px; font-weight: 500;
  color: var(--muted); transition: .18s; cursor: pointer;
}
.nav__link:hover { color: var(--text); background: var(--surface); }
.nav__link.active {
  color: #fff; background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

/* ===== هیرو ===== */
.hero { position: relative; height: 62vh; min-height: 420px; overflow: hidden; display: flex; align-items: flex-end; }
.hero__bg { position: absolute; inset: 0; background-size: cover; background-position: center; filter: blur(2px); transform: scale(1.08); transition: .6s; }
.hero__bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7,7,10,.2), rgba(7,7,10,.85)); }
.hero__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(7,7,10,.9) 0%, rgba(7,7,10,.3) 60%, transparent 100%);
}
.hero__content { position: relative; z-index: 2; padding: 0 32px 48px; max-width: 720px; }
.hero__tag {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .5px;
  color: var(--accent); background: rgba(255,46,99,.12); padding: 5px 12px; border-radius: 999px; margin-bottom: 14px;
}
.hero__title { font-size: clamp(24px, 4vw, 44px); font-weight: 800; line-height: 1.15; margin-bottom: 12px; }
.hero__meta { display: flex; gap: 16px; color: var(--muted); font-size: 14px; margin-bottom: 22px; }
.hero__meta span { display: flex; align-items: center; gap: 5px; }
.hero__play {
  display: inline-flex; align-items: center; gap: 9px; cursor: pointer; border: none;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #fff; font-family: var(--font); font-weight: 700; font-size: 15px;
  padding: 13px 28px; border-radius: 999px; transition: .2s;
}
.hero__play:hover { transform: translateY(-2px); box-shadow: var(--glow); }

/* ===== بخش‌ها ===== */
.section__title { font-size: 18px; font-weight: 700; margin-bottom: 16px; }
.cats { padding: 36px 24px 8px; }
.cats__row { display: flex; flex-wrap: wrap; gap: 10px; }
.cat {
  padding: 9px 16px; border-radius: 999px; background: var(--surface);
  border: 1px solid var(--line); font-size: 13px; color: var(--muted); cursor: pointer; transition: .18s;
}
.cat:hover { color: var(--text); border-color: var(--accent-2); background: var(--surface-2); transform: translateY(-2px); }

/* ===== فید ===== */
.feed { padding: 28px 24px 50px; }
.feed__head { display: flex; align-items: baseline; justify-content: space-between; }
.feed__count { font-size: 13px; color: var(--muted); }
.grid {
  display: grid; gap: 18px; margin-top: 8px;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
.card { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--surface); cursor: pointer; transition: .22s; }
.card:hover { transform: translateY(-6px); box-shadow: 0 16px 40px rgba(0,0,0,.5); }
.card__media { position: relative; aspect-ratio: 2/3; background: #000; overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: .35s; }
.card:hover .card__media img { transform: scale(1.07); }
.card__hd {
  position: absolute; top: 10px; right: 10px; background: var(--accent);
  color: #fff; font-size: 10px; font-weight: 800; padding: 3px 7px; border-radius: 6px;
}
.card__play {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(7,7,10,.35); opacity: 0; transition: .25s;
}
.card:hover .card__play { opacity: 1; }
.card__play span {
  width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,255,255,.92); color: #111; font-size: 20px; padding-left: 4px;
}
.card__body { padding: 12px 14px 14px; }
.card__title {
  font-size: 13.5px; font-weight: 500; line-height: 1.45; height: 2.9em; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.card__stats { display: flex; gap: 14px; margin-top: 9px; font-size: 12px; color: var(--muted); }

/* ===== اسکلتون ===== */
.skeleton { aspect-ratio: 2/3; border-radius: var(--radius); background: linear-gradient(100deg, var(--surface) 30%, var(--surface-2) 50%, var(--surface) 70%); background-size: 200% 100%; animation: shimmer 1.3s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ===== صفحه‌بندی ===== */
.pager { display: flex; justify-content: center; gap: 14px; margin-top: 34px; }
.pager button {
  padding: 11px 26px; border-radius: 12px; border: 1px solid var(--line); cursor: pointer;
  background: var(--surface); color: var(--text); font-family: var(--font); font-size: 14px; font-weight: 500; transition: .18s;
}
.pager button:hover:not(:disabled) { border-color: var(--accent-2); background: var(--surface-2); }
.pager button:disabled { opacity: .35; cursor: default; }

/* ===== فوتر ===== */
.foot { text-align: center; padding: 30px 20px 40px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); }

/* ===== مودال ===== */
.modal { position: fixed; inset: 0; z-index: 60; display: none; }
.modal.open { display: block; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.88); backdrop-filter: blur(6px); }
.modal__box { position: relative; z-index: 2; width: min(94vw, 1000px); margin: 4vh auto; }
.modal__close {
  position: absolute; top: -42px; left: 0; width: 38px; height: 38px; border-radius: 50%;
  border: none; background: var(--surface); color: #fff; font-size: 18px; cursor: pointer;
}
.modal__box video { width: 100%; border-radius: 14px; background: #000; max-height: 82vh; }
.modal__info { margin-top: 14px; font-size: 14px; color: var(--muted); }

/* ===== موبایل ===== */
@media (max-width: 720px) {
  .nav { flex-wrap: wrap; gap: 12px; padding: 12px 16px; }
  .nav__search { order: 3; max-width: none; flex-basis: 100%; }
  .nav__links { order: 2; margin-left: auto; }
  .hero { height: 52vh; }
  .hero__content { padding: 0 18px 34px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(145px, 1fr)); gap: 12px; }
  .cats, .feed { padding-left: 16px; padding-right: 16px; }
}
