﻿  * { box-sizing: border-box; margin: 0; padding: 0; }
  html { scroll-behavior: smooth; }
  body {
    font-family: 'Vazirmatn', sans-serif;
    background: var(--canvas);
    color: var(--ink);
    line-height: 1.8;
    overflow-x: hidden;
  }
  h1, h2, h3, h4, .brand, .btn, .chip, .stat-num { font-family: 'Baloo Bhaijaan 2', 'Vazirmatn', sans-serif; }
  img, svg { display: block; max-width: 100%; }
  a { color: inherit; text-decoration: none; }
  ul { list-style: none; }
  button { font: inherit; cursor: pointer; border: none; background: none; }
  section { position: relative; }
  .wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

  /* ===================== Buttons + chip ===================== */
  .btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 14px 28px; border-radius: 100px; font-weight: 700; font-size: 16px;
    transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease);
    white-space: nowrap;
  }
  .btn-primary { background: var(--sun); color: #fff; box-shadow: 0 4px 0 var(--sun-deep); }
  .btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--sun-deep), var(--shadow-sm); }
  .btn-primary:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--sun-deep); }
  .btn-outline { background: #fff; color: var(--ink); border: 2px solid var(--line); }
  .btn-outline:hover { border-color: var(--sky); color: var(--sky); transform: translateY(-2px); }
  .btn-ghost { background: rgba(255,255,255,.14); color: #fff; border: 2px solid rgba(255,255,255,.3); }
  .btn-ghost:hover { background: rgba(255,255,255,.22); }
  .btn-sm { padding: 10px 20px; font-size: 14px; }
  .chip {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--white); border: 1px solid var(--line); border-radius: 100px;
    padding: 8px 16px; font-weight: 600; font-size: 13px; color: var(--ink-soft); box-shadow: var(--shadow-sm);
  }
  .reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
  .reveal.in { opacity: 1; transform: translateY(0); }
  @media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

  /* ===================== Header ===================== */
  .blog-nav { position: sticky; top: 0; z-index: 100; background: var(--ink); border-bottom: 1px solid rgba(255,255,255,.08); }
  .blog-nav .nav-inner { max-width: 1180px; margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
  .blog-nav .brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 22px; color: #fff; }
  .blog-nav .brand img { width: 36px; height: 36px; object-fit: contain; border-radius: 50%; }
  .blog-nav .brand .divider { width: 1px; height: 20px; background: rgba(255,255,255,.2); margin-inline: 4px; }
  .blog-nav .brand .tag-blog { font-size: 14px; font-weight: 700; color: rgba(255,255,255,.6); }
  .blog-nav-links { display: flex; align-items: center; gap: 4px; }
  .blog-nav-links a { padding: 9px 15px; border-radius: 100px; font-weight: 600; font-size: 14.5px; color: rgba(255,255,255,.65); transition: background .2s var(--ease), color .2s var(--ease); }
  .blog-nav-links a:hover { background: rgba(255,255,255,.08); color: #fff; }
  .blog-nav-links a.active { color: var(--sun); background: rgba(255,159,28,.12); }
  .blog-nav-cta { display: flex; align-items: center; gap: 12px; }
  .blog-nav-ghost { font-weight: 600; font-size: 14.5px; color: rgba(255,255,255,.75); padding: 9px 12px; }
  .blog-nav-ghost:hover { color: #fff; }
  .blog-burger { display: none; flex-direction: column; gap: 6px; width: 28px; height: 22px; justify-content: center; z-index: 101; }
  .blog-burger span { width: 100%; height: 3px; background: #fff; border-radius: 4px; transition: transform .3s var(--ease), opacity .3s var(--ease); }
  .blog-burger.open span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
  .blog-burger.open span:nth-child(2) { opacity: 0; }
  .blog-burger.open span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }
  .blog-mobile-drawer { position: fixed; inset: 0; background: var(--ink); z-index: 99; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 18px; transform: translateX(100%); transition: transform .4s var(--ease); }
  .blog-mobile-drawer.open { transform: translateX(0); }
  .blog-mobile-drawer a { font-size: 20px; font-weight: 700; color: #fff; padding: 10px 20px; border-radius: 100px; }
  .blog-mobile-drawer a:hover { background: rgba(255,255,255,.08); }

  .breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: rgba(255,255,255,.7); margin-bottom: 20px; flex-wrap: wrap; }
  .breadcrumb a { color: rgba(255,255,255,.7); font-weight: 600; }
  .breadcrumb a:hover { color: #fff; }
  .breadcrumb span.sep { opacity: .5; }
  .breadcrumb span.current { color: #fff; font-weight: 700; }

  /* ===================== Series masthead ===================== */
  .series-hero {
    padding: 40px 0 100px; overflow: hidden; color: #fff;
    background:
      radial-gradient(ellipse 55% 65% at 90% 0%, rgba(255,159,28,.30), transparent 55%),
      radial-gradient(ellipse 45% 55% at 5% 100%, rgba(47,163,107,.28), transparent 55%),
      linear-gradient(135deg, var(--grape), var(--sky));
  }
  .series-hero-grid { display: grid; grid-template-columns: 300px 1fr; gap: 44px; align-items: center; }
  .series-poster { position: relative; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); aspect-ratio: 4/3; background: var(--sky-100); }
  .series-poster img { width: 100%; height: 100%; object-fit: cover; }
  .series-poster .badge-total { position: absolute; bottom: 12px; inset-inline-start: 12px; background: rgba(46,42,61,.78); color: #fff; font-size: 12px; font-weight: 800; padding: 6px 14px; border-radius: 100px; backdrop-filter: blur(3px); }
  .series-info .eyebrow { display: inline-block; font-weight: 700; font-size: 13px; color: #fff; background: rgba(255,255,255,.16); padding: 6px 16px; border-radius: 100px; margin-bottom: 16px; }
  .series-info h1 { font-size: clamp(26px, 3.6vw, 40px); font-weight: 800; margin-bottom: 12px; line-height: 1.35; }
  .series-info h1 small { display: block; font-size: 15px; font-weight: 600; color: rgba(255,255,255,.78); margin-top: 6px; }
  .series-info p.lead { font-size: 15.5px; color: rgba(255,255,255,.86); max-width: 640px; margin-bottom: 22px; }
  .series-meta-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 26px; }
  .series-meta-row .m-chip { display: inline-flex; align-items: center; gap: 7px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22); padding: 8px 15px; border-radius: 100px; font-size: 13px; font-weight: 700; }
  .series-meta-row .m-chip svg { width: 14px; height: 14px; }
  .series-cta-row { display: flex; gap: 12px; flex-wrap: wrap; }

  /* ===================== Filter / sort bar ===================== */
  .filter-wrap { margin-top: -56px; margin-bottom: 40px; }
  .filter-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 20px 26px; display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
  .ep-search { display: flex; align-items: center; gap: 10px; background: var(--canvas); border-radius: 100px; padding: 8px 8px 8px 18px; flex: 1; min-width: 220px; max-width: 380px; }
  .ep-search svg { width: 18px; height: 18px; color: var(--ink-soft); flex-shrink: 0; }
  .ep-search input { border: none; outline: none; flex: 1; font: inherit; font-size: 14px; background: transparent; color: var(--ink); min-width: 0; }
  .sort-row { display: flex; gap: 8px; flex-wrap: wrap; }
  .sort-btn { padding: 9px 16px; border-radius: 100px; font-weight: 700; font-size: 13px; background: var(--canvas-2); color: var(--ink-soft); border: 2px solid transparent; transition: all .2s var(--ease); }
  .sort-btn:hover { border-color: var(--sky); color: var(--sky); }
  .sort-btn.is-active { background: var(--grape); color: #fff; }

  /* ===================== Episodes list + sidebar ===================== */
  .series-list { padding: 8px 0 80px; }
  .series-list-grid { display: grid; grid-template-columns: 1fr 320px; gap: 36px; align-items: start; }
  .list-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
  .list-toolbar h2 { font-size: 20px; font-weight: 800; display: flex; align-items: center; gap: 10px; }
  .list-toolbar h2 .dot-ico { width: 9px; height: 9px; border-radius: 50%; background: var(--sun); flex-shrink: 0; }
  .list-count { font-size: 13.5px; color: var(--ink-soft); }

  .episode-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .episode-card {
    display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line);
    border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-sm);
    transition: transform .22s var(--ease), box-shadow .22s var(--ease); position: relative;
  }
  .episode-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
  .episode-card.is-current { outline: 3px solid var(--sun); outline-offset: -3px; }
  .episode-card .thumb { position: relative; aspect-ratio: 16/9; overflow: hidden; background: var(--grape-100); }
  .episode-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s var(--ease); }
  .episode-card:hover .thumb img { transform: scale(1.05); }
  .episode-card .ep-num { position: absolute; top: 12px; inset-inline-start: 12px; background: rgba(46,42,61,.78); color: #fff; font-size: 11.5px; font-weight: 800; padding: 5px 12px; border-radius: 100px; backdrop-filter: blur(3px); }
  .episode-card .level-badge { position: absolute; top: 12px; inset-inline-end: 12px; background: var(--sun); color: #fff; font-size: 11.5px; font-weight: 800; padding: 5px 12px; border-radius: 100px; }
  .episode-card .play-ico { position: absolute; inset: 0; margin: auto; width: 46px; height: 46px; border-radius: 50%; background: rgba(255,255,255,.92); display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-md); transition: transform .2s var(--ease); }
  .episode-card:hover .play-ico { transform: scale(1.08); }
  .episode-card .play-ico svg { width: 18px; height: 18px; color: var(--grape); margin-inline-start: 2px; }
  .episode-card .dur-badge { position: absolute; bottom: 10px; inset-inline-end: 10px; background: rgba(0,0,0,.72); color: #fff; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 6px; }
  .episode-card .info { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; }
  .episode-card h3 { font-size: 14.5px; font-weight: 800; line-height: 1.5; margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .episode-card .foot { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--ink-soft); }
  .episode-card .watched-tag { display: inline-flex; align-items: center; gap: 4px; color: var(--leaf); font-weight: 700; }
  .episode-card .watched-tag svg { width: 12px; height: 12px; }

  .list-more { text-align: center; margin-top: 36px; }
  .no-results { display: none; text-align: center; padding: 50px 0; color: var(--ink-soft); }
  .no-results strong { display: block; font-size: 16px; color: var(--ink); margin-bottom: 6px; }

  /* ===================== Sidebar ===================== */
  .cat-sidebar { position: sticky; top: 88px; display: flex; flex-direction: column; }
  .widget { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); padding: 20px; margin-bottom: 22px; }
  .widget-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
  .widget-head h3 { font-size: 15px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
  .widget-head h3 .dot-ico { width: 8px; height: 8px; border-radius: 50%; background: var(--sun); flex-shrink: 0; }
  .widget-head .see-all { font-size: 12px; font-weight: 700; color: var(--sky); white-space: nowrap; }
  .widget-head .see-all:hover { color: var(--sun-deep); }
  .widget p.desc { font-size: 13.5px; color: var(--ink-soft); }

  .about-cast { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
  .about-cast .cast-chip { font-size: 12px; font-weight: 700; background: var(--canvas-2); color: var(--ink-soft); padding: 6px 12px; border-radius: 100px; }

  .level-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .level-btn { padding: 10px 6px; border-radius: 12px; text-align: center; font-weight: 800; font-size: 13px; background: var(--canvas-2); color: var(--ink-soft); border: 2px solid transparent; transition: all .2s var(--ease); }
  .level-btn:hover { border-color: var(--sky); color: var(--sky); }
  .level-btn.is-active { background: var(--grape); color: #fff; }

  .ad-widget { padding: 0; overflow: hidden; }
  .ad-widget .ad-eyebrow { font-size: 11px; font-weight: 700; color: var(--ink-soft); text-align: center; padding: 10px 10px 0; }
  .ad-slider { position: relative; width: 100%; aspect-ratio: 300 / 250; margin-top: 8px; }
  .ad-slide { position: absolute; inset: 0; opacity: 0; pointer-events: none; transition: opacity .5s var(--ease); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 20px; color: #fff; }
  .ad-slide.is-active { opacity: 1; pointer-events: auto; }
  .ad-slide.s1 { background: linear-gradient(135deg, var(--sun), var(--berry)); }
  .ad-slide.s2 { background: linear-gradient(135deg, var(--grape), var(--sky)); }
  .ad-slide.s3 { background: linear-gradient(135deg, var(--leaf), var(--sky)); }
  .ad-slide strong { font-size: 16px; font-weight: 800; }
  .ad-slide p { font-size: 12.5px; opacity: .9; max-width: 220px; }
  .ad-slide span.cta { font-size: 12px; font-weight: 700; text-decoration: underline; }
  .ad-dots { display: flex; gap: 6px; justify-content: center; padding: 10px 0; }
  .ad-dots button { width: 6px; height: 6px; border-radius: 50%; background: var(--line); transition: all .25s var(--ease); }
  .ad-dots button.is-active { background: var(--sun); width: 16px; border-radius: 100px; }
  .ad-foot { font-size: 11px; color: var(--ink-soft); text-align: center; padding: 0 10px 14px; }
  .ad-foot a { color: var(--sky); font-weight: 700; }

  .widget-cta { text-align: center; padding: 26px 18px; background: linear-gradient(135deg, var(--grape), var(--sky)); color: #fff; }
  .widget-cta img { width: 56px; margin: 0 auto 10px; }
  .widget-cta h4 { font-size: 15px; font-weight: 800; margin-bottom: 6px; }
  .widget-cta p { font-size: 12.5px; opacity: .92; margin-bottom: 14px; }

  /* ===================== Full-page loader (unique, minimal) ===================== */
  .page-loader {
    position: fixed; inset: 0; z-index: 9999; background: var(--canvas);
    display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 22px;
    transition: opacity .55s var(--ease), visibility .55s var(--ease);
  }
  .page-loader.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
  .pl-orbit { position: relative; width: 76px; height: 76px; }
  .pl-orbit .core { position: absolute; inset: 0; margin: auto; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); animation: pl-pulse 1.6s var(--ease) infinite; }
  .pl-orbit .dot { position: absolute; width: 11px; height: 11px; border-radius: 50%; top: 50%; left: 50%; margin: -5.5px; animation: pl-spin 1.8s linear infinite; }
  .pl-orbit .dot span { position: absolute; width: 11px; height: 11px; border-radius: 50%; top: -32px; }
  .pl-orbit .dot:nth-child(2) { animation-delay: 0s; }
  .pl-orbit .dot:nth-child(2) span { background: var(--sun); }
  .pl-orbit .dot:nth-child(3) { animation-delay: -.6s; }
  .pl-orbit .dot:nth-child(3) span { background: var(--berry); }
  .pl-orbit .dot:nth-child(4) { animation-delay: -1.2s; }
  .pl-orbit .dot:nth-child(4) span { background: var(--sky); }
  @keyframes pl-spin { to { transform: rotate(360deg); } }
  @keyframes pl-pulse { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(.82); opacity: .7; } }
  .pl-word { font-family: 'Baloo Bhaijaan 2'; font-weight: 800; font-size: 15px; color: var(--ink-soft); letter-spacing: .5px; }
  .pl-word b { color: var(--ink); }
  @media (prefers-reduced-motion: reduce) { .pl-orbit .dot, .pl-orbit .core { animation: none; } }

  @media (max-width: 1024px) {
    .blog-burger { display: flex; }
    .blog-nav-links, .blog-nav-cta { display: none; }
    .series-hero-grid { grid-template-columns: 220px 1fr; }
    .series-list-grid { grid-template-columns: 1fr; }
    .cat-sidebar { position: static; }
    .episode-grid { grid-template-columns: repeat(2, 1fr); }
  }
  @media (max-width: 720px) {
    .series-hero-grid { grid-template-columns: 1fr; text-align: center; }
    .series-poster { max-width: 260px; margin: 0 auto; }
    .series-meta-row, .series-cta-row { justify-content: center; }
  }
  @media (max-width: 640px) {
    .series-hero { padding: 32px 0 108px; }
    .episode-grid { grid-template-columns: 1fr; }
    .filter-card { padding: 18px; }
    .list-toolbar { flex-direction: column; align-items: flex-start; }
  }

  /* ===================== Footer ===================== */
  footer { padding: 56px 0 28px; border-top: 1px solid var(--line); background: var(--white); }
  .footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 36px; }
  .footer-brand p { color: var(--ink-soft); font-size: 14px; margin-top: 12px; max-width: 280px; }
  .footer-brand .brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 24px; color: var(--ink); }
  .footer-brand .brand img { width: 42px; height: 42px; object-fit: contain; border-radius: 50%; }
  .footer-col b { font-family: 'Baloo Bhaijaan 2'; font-size: 15px; display: block; margin-bottom: 14px; }
  .footer-col ul { display: flex; flex-direction: column; gap: 10px; }
  .footer-col a { font-size: 14px; color: var(--ink-soft); transition: color .2s; }
  .footer-col a:hover { color: var(--sky); }
  .footer-bottom { display: flex; align-items: center; justify-content: space-between; padding-top: 22px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-soft); flex-wrap: wrap; gap: 12px; }
  @media (max-width: 1024px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
  @media (max-width: 640px) { .footer-grid { grid-template-columns: 1fr; } }

  .series-poster-fallback {
    width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
    font-size: 4rem; background: var(--sky-100);
  }
  .series-empty {
    text-align: center; padding: 50px 0; color: var(--ink-soft); grid-column: 1 / -1;
  }
  .series-empty strong { display: block; font-size: 16px; color: var(--ink); margin-bottom: 8px; }
  .btn-light { background: #fff; color: var(--ink); box-shadow: 0 4px 0 rgba(46,42,61,.12); }
  body.page-series-detail-html { background: var(--canvas); }
