/* ==========================================================================
   Hentai Iran - show.css (Anime Show Page) — SAFE SCOPED
   فقط روی .anime-show-page اثر می‌گذارد تا سایت به‌هم نریزد
   ========================================================================== */

.anime-show-page{ padding:12px 0 20px; direction:rtl; }

/* Container (scoped) */
.anime-show-page .container{ max-width:1160px; margin:0 auto; padding:0 12px; }
@media (max-width:680px){
  /* محافظت از اسکرول افقی فقط در موبایل */
  .anime-show-page,
  .anime-show-page .container{ overflow-x:hidden }
}

/* Vars (scoped via :where to avoid specificity wars) */
.anime-show-page:where(:root, *) {
  --bg:#f7f8fb; --surface:#fff; --surface-1:#fff; --surface-2:#f1f5f9;
  --border:#e2e8f0; --text:#0f172a; --muted:#64748b;
  --accent:#ff8a00; --accent-2:#ffc368; --primary:#6366f1;
  --ok:#22c55e; --end:#ef4444; --new:#f59e0b; --sub:#8B5CF6; --star:#fbbf24;
  --chip:#eef3fa; --rad-sm:10px; --rad:16px;
  --shadow:0 10px 26px rgba(15,23,42,.09);
  --shadow-2:0 16px 34px rgba(15,23,42,.12);
  --shadow-sm:0 2px 10px rgba(0,0,0,.06);
}

:root[data-theme="dark"] .anime-show-page{
  --bg:#0b0d10; --surface:#10141a; --surface-1:#10141a; --surface-2:#121826;
  --border:#263142; --text:#e8edf3; --muted:#9aa6b5; --chip:#121826;
  --shadow:0 12px 30px rgba(0,0,0,.45); --shadow-2:0 18px 38px rgba(0,0,0,.55);
}

/* Base elements (scoped) */
.anime-show-page *{ box-sizing:border-box; min-width:0 } /* ← جلوگیری از ترکیدن فلکس/گرید */
.anime-show-page img{ max-width:100%; height:auto }
.anime-show-page a{ color:inherit }
.anime-show-page .link{ text-decoration:none; color:inherit }
.anime-show-page .sr-only{ position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0 }
.anime-show-page ::selection{ background:rgba(255,138,0,.18) }
.anime-show-page .muted{ color:var(--muted) }

/* ---------- Crumbs ---------- */
.anime-show-page .crumbs{
  display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin:6px 0 14px;
  font-size:.92rem; color:var(--muted);
}
.anime-show-page .crumbs a{
  padding:6px 10px; border-radius:999px; background:var(--surface-2);
  border:1px solid var(--border); color:inherit; text-decoration:none;
}
.anime-show-page .crumbs .current{ font-weight:800; color:var(--text) }
.anime-show-page .crumbs .sep{ opacity:.6 }
.anime-show-page .crumbs .quick-actions{ margin-inline-start:auto; display:flex; gap:8px; align-items:center }

/* ---------- Buttons (scoped) ---------- */
.anime-show-page .btn{
  border:1px solid var(--border); background:var(--surface);
  padding:8px 12px; border-radius:12px; font-weight:900;
  display:inline-flex; align-items:center; gap:8px; cursor:pointer; transition:.2s;
  color:inherit; text-decoration:none;
}
.anime-show-page .btn:hover{ transform:translateY(-1px) }
.anime-show-page .btn.ghost{ background:rgba(0,0,0,.05); border:1px solid var(--border); border-radius:999px; }
.anime-show-page .icon-btn{
  border:1px solid var(--border); background:var(--surface); padding:8px; border-radius:12px;
  width:40px; height:40px; display:inline-flex; align-items:center; justify-content:center;
  color:inherit;
}

/* Focus states */
:root[data-theme="dark"] .anime-show-page .crumbs .btn.ghost{ background:rgba(255,255,255,.09); border-color:#334155; color:var(--text)!important; }
:root[data-theme="dark"] .anime-show-page .crumbs .icon-btn{ background:rgba(255,255,255,.06); border-color:#334155; color:var(--text); }
.anime-show-page .crumbs .btn.ghost:focus-visible,
.anime-show-page .crumbs .icon-btn:focus-visible{
  outline:none; box-shadow:0 0 0 3px rgba(99,102,241,.35); border-color:var(--primary);
}

/* ---------- Grid ---------- */
.anime-show-page .page-grid{ display:grid; grid-template-columns:1fr; gap:16px; }
@media (min-width:992px){
  .anime-show-page .page-grid{ grid-template-columns:minmax(0,1fr) 340px; gap:22px }
  .anime-show-page .cover-art{ order:2 } .anime-show-page .content-col{ order:1 }
}

/* ---------- Cover ---------- */
.anime-show-page .cover-card{
  position:sticky; top:84px; border-radius:18px; overflow:hidden;
  background:var(--surface-1); border:1px solid var(--border); box-shadow:var(--shadow);
}
.anime-show-page .cover-card img{ display:block; width:100%; aspect-ratio:2/3; object-fit:cover; filter:brightness(.98) }
.anime-show-page .cover-card .score-badge{
  position:absolute; top:10px; right:10px; background:rgba(0,0,0,.75); color:#fff;
  font-weight:900; font-size:.9rem; padding:6px 10px; border-radius:10px; border:1px solid rgba(255,255,255,.18);
}
.anime-show-page .cover-card .score-badge i{ color:var(--star) }
.anime-show-page .cover-card .age-badge{
  position:absolute; top:10px; left:10px; background:rgba(17,17,17,.85); color:#fff;
  padding:6px 10px; border-radius:10px; font-weight:800; border:1px solid rgba(255,255,255,.22);
}

/* ---------- Info Card ---------- */
.anime-show-page .info-card{
  background:var(--surface-1); border:1px solid var(--border); border-radius:18px;
  box-shadow:var(--shadow); padding:14px;
}
.anime-show-page .info-card .title{ margin:0 0 6px; font-size:1.4rem; font-weight:900; letter-spacing:-.25px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.anime-show-page .info-card .genres{ display:flex; gap:8px; flex-wrap:wrap; margin:10px 0 }
.anime-show-page .info-card .genres .chip{
  padding:6px 10px; border-radius:999px; background:var(--surface-2);
  border:1px solid var(--border); font-size:.85rem; color:var(--text); text-decoration:none;
}
.anime-show-page .meta-chips{ display:flex; gap:8px; flex-wrap:wrap; margin-top:8px }
.anime-show-page .meta-chips .chip{
  padding:6px 10px; border-radius:999px; background:var(--surface-2);
  border:1px solid var(--border); font-size:.85rem; color:var(--muted); font-weight:800;
}
.anime-show-page .meta-chips .status{ color:#fff; border-color:transparent }
.anime-show-page .meta-chips .status.green{ background:#16a34a }
.anime-show-page .meta-chips .status.red{ background:#ef4444 }

/* ---------- Progress (optional) ---------- */
.anime-show-page .progress-wrap{ margin:12px 0 4px }
.anime-show-page .progress-bar{
  height:8px; background:var(--surface-2); border-radius:999px; overflow:hidden; position:relative; border:1px solid var(--border)
}
.anime-show-page .progress-bar>span{ display:block; height:100%; background:linear-gradient(90deg,var(--accent),var(--accent-2)); width:0; transition:width .4s ease }
.anime-show-page .progress-meta{ display:flex; align-items:center; justify-content:space-between; gap:8px; color:var(--muted); font-size:.85rem; margin-top:6px }

/* ---------- Synopsis preview ---------- */
.anime-show-page .synopsis-preview{
  margin-top:12px; background:var(--surface-2); border:1px solid var(--border);
  border-radius:14px; padding:12px;
}
.anime-show-page .synopsis-preview h3{ margin:0 0 6px; font-size:1.05rem; font-weight:900; display:flex; align-items:center; gap:8px }
.anime-show-page .synopsis-preview p{ margin:0 0 8px; line-height:1.9; color:var(--text) }
.anime-show-page .more-link{ display:inline-flex; align-items:center; gap:6px; font-weight:800; font-size:.9rem; color:var(--primary); text-decoration:none }

/* ---------- CTA (Telegram + Site) ---------- */
.anime-show-page .hi-cta{
  margin-top:12px; position:relative; overflow:hidden;
  background:var(--surface-1); border:1px solid var(--border);
  border-radius:16px; box-shadow:var(--shadow-sm); padding:12px 14px;
  max-width:100%;
  isolation:isolate; /* جلوگیری از ادغام سایه‌ها */
}
.anime-show-page .hi-cta::before{
  content:""; position:absolute; inset-inline:0; top:0; height:3px;
  background:linear-gradient(90deg,var(--accent),var(--accent-2)); opacity:.95;
}
.anime-show-page .hi-cta__body{
  position:relative; z-index:2;
  display:grid; grid-template-columns:minmax(0,1fr) auto; /* ← ستون متن کوچک می‌شود، Overflow ندارد */
  align-items:center; column-gap:12px; row-gap:10px;
}
.anime-show-page .hi-cta__text{
  margin:0; font-size:.95rem; line-height:1.9; color:var(--text);
  text-wrap:pretty; word-break:break-word;
}
.anime-show-page .hi-cta__actions{
  display:grid; grid-auto-flow:column; grid-auto-columns:max-content; gap:8px;
}

/* CTA buttons */
.anime-show-page .hi-cta__btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:10px 14px; border-radius:12px; font-weight:800; text-decoration:none;
  border:1px solid var(--border); background:var(--surface-2); color:var(--text);
  box-shadow:var(--shadow-sm);
  transition:transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease;
  min-width:0; max-width:100%;
}
.anime-show-page .hi-cta__btn i{ font-size:16px; line-height:1 }
.anime-show-page .hi-cta__btn:hover{ transform:translateY(-1px); box-shadow:var(--shadow) }
.anime-show-page .hi-cta__btn:focus-visible{
  outline:none; box-shadow:0 0 0 3px rgba(99,102,241,.28);
  border-color:var(--primary);
}
.anime-show-page .hi-cta__btn--primary{
  background:linear-gradient(45deg,var(--primary),#9ca3ff);
  color:#fff; border-color:transparent;
}
.anime-show-page .hi-cta__btn--ghost{
  background:var(--surface-1); color:var(--text);
}

:root[data-theme="dark"] .anime-show-page .hi-cta__btn--ghost{
  background:rgba(255,255,255,.06); border-color:#334155; color:var(--text);
}

/* CTA — Mobile Tight Layout */
@media (max-width:680px){
  .anime-show-page .hi-cta{ padding:12px; border-radius:14px }
  .anime-show-page .hi-cta__body{
    grid-template-columns:1fr; /* یک ستون */
    row-gap:12px;
  }
  .anime-show-page .hi-cta__text{ text-align:center; font-size:.93rem }
  .anime-show-page .hi-cta__actions{
    grid-auto-flow:row; grid-template-columns:1fr; width:100%;
  }
  .anime-show-page .hi-cta__btn{ width:100% } /* دکمه‌ها تمام‌عرض و بدون بیرون‌زدن */
}

/* ---------- Tabs ---------- */
.anime-show-page .tabs{ margin-top:14px }
.anime-show-page .tablist{
  display:flex; gap:8px; flex-wrap:wrap; background:var(--surface-2); border:1px solid var(--border);
  padding:8px; border-radius:14px;
}
.anime-show-page .tab-btn{
  background:var(--surface-1); border:1px solid var(--border); border-radius:10px;
  padding:8px 12px; font-weight:900; color:var(--muted); cursor:pointer; font-family:inherit;
}
.anime-show-page .tab-btn.is-active{
  color:#111; background:linear-gradient(90deg,var(--accent),var(--accent-2));
  box-shadow:0 6px 16px rgba(255,138,0,.25)
}
:root[data-theme="dark"] .anime-show-page .tab-btn.is-active{ color:#000 }
.anime-show-page .tabpanels{ margin-top:10px }
.anime-show-page .tabpanel{ display:none }
.anime-show-page .tabpanel.is-active{ display:block }

/* ---------- Episodes ---------- */
.anime-show-page .episodes-list{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:10px }
.anime-show-page .episode-item{
  display:flex; flex-direction:column; gap:10px; background:var(--surface-1); border:1px solid var(--border);
  border-radius:14px; padding:12px; box-shadow:var(--shadow-sm);
}
@media (min-width:660px){ .anime-show-page .episode-item{ flex-direction:row; align-items:center; justify-content:space-between } }
.anime-show-page .ep-meta{ display:flex; align-items:center; gap:10px; flex-wrap:wrap }
.anime-show-page .ep-number{ font-weight:900; background:var(--surface-2); border:1px solid var(--border); border-radius:10px; padding:4px 10px }
.anime-show-page .ep-title{ color:var(--muted); font-weight:700 }
.anime-show-page .chip.sub{ background:var(--sub); color:#fff; border:1px solid var(--sub) }
.anime-show-page .ep-actions{ display:flex; flex-wrap:wrap; gap:8px }
.anime-show-page .btn.stream{ background:linear-gradient(45deg,var(--primary),#9ca3ff); color:#fff; border-color:transparent; box-shadow:0 6px 16px rgba(99,102,241,.25) }
.anime-show-page .btn.download{ background:linear-gradient(45deg,var(--accent),var(--accent-2)); color:#111; border-color:transparent; box-shadow:0 6px 16px rgba(255,138,0,.25) }
.anime-show-page .badge{
  display:inline-flex; align-items:center; gap:6px; padding:5px 10px; border-radius:999px;
  background:var(--chip); border:1px solid var(--border); font-size:.85rem; font-weight:800; color:var(--muted)
}
.anime-show-page .empty{
  background:var(--surface-2); border:1px solid var(--border); border-radius:14px; padding:18px;
  color:var(--muted); text-align:center; display:flex; flex-direction:column; gap:8px; align-items:center; justify-content:center;
}

/* ---------- Synopsis (full) ---------- */
.anime-show-page .synopsis-card{
  background:var(--surface-1); border:1px solid var(--border); border-radius:18px; box-shadow:var(--shadow); overflow:hidden;
}
.anime-show-page .synopsis-head{
  display:flex; align-items:center; gap:10px; padding:12px 14px;
  background:linear-gradient(90deg, var(--accent), var(--accent-2)); border-bottom:1px solid var(--border);
}
.anime-show-page .synopsis-title{ margin:0; font-size:1.05rem; font-weight:900; color:#111; display:flex; align-items:center; gap:10px }
.anime-show-page .synopsis-ctrl{ margin-inline-start:auto; display:flex; align-items:center; gap:8px }
.anime-show-page .synopsis-ctrl .icon-btn{
  width:38px; height:38px; display:inline-flex; align-items:center; justify-content:center;
  border-radius:12px; border:1px solid rgba(0,0,0,.12); background:rgba(255,255,255,.8);
}
:root[data-theme="dark"] .anime-show-page .synopsis-ctrl .icon-btn{
  border-color:rgba(255,255,255,.15); background:rgba(0,0,0,.2); color:#e8edf3;
}
.anime-show-page .synopsis-meta{
  display:flex; gap:10px; align-items:center; justify-content:space-between;
  padding:10px 14px; border-bottom:1px solid var(--border); flex-wrap:wrap; background:var(--surface-2);
}
.anime-show-page .genres-row{ display:flex; gap:8px; flex-wrap:wrap }
.anime-show-page .meta-right{ display:flex; gap:8px; align-items:center; flex-wrap:wrap; margin-inline-start:auto }
.anime-show-page .chip.small{
  padding:4px 10px; border-radius:999px; font-size:.8rem;
  background:var(--surface-1); border:1px solid var(--border); color:var(--text); font-weight:800;
}
.anime-show-page .chip.small.soft{ background:var(--surface-2); color:var(--muted) }
.anime-show-page .synopsis-body{ padding:14px; line-height:1.95; color:var(--text); font-size:1rem; white-space:pre-wrap }
.anime-show-page .synopsis-body p{ margin:0 0 12px }

/* ---------- Info Tab ---------- */
.anime-show-page .info-grid{
  display:grid; grid-template-columns:180px 1fr; gap:10px; align-items:flex-start;
  background:var(--surface-1); border:1px solid var(--border); border-radius:16px; padding:12px; box-shadow:var(--shadow-sm);
}
.anime-show-page .info-grid .k{ font-weight:800; color:var(--muted) }
.anime-show-page .info-grid .stats-row{ display:flex; flex-wrap:wrap; gap:8px }
.anime-show-page .info-grid .alt-titles{ display:flex; gap:6px; flex-wrap:wrap }
.anime-show-page .info-grid .chip, 
.anime-show-page .info-grid .badge{ background:var(--surface-2); border:1px solid var(--border) }
.anime-show-page .info-grid .chip.soft{ color:var(--muted) }

/* ---------- Gallery (4 columns + lightbox) ---------- */
.anime-show-page .gallery-grid{ display:grid; gap:12px; grid-template-columns:repeat(2,1fr); }
@media (min-width:600px){ .anime-show-page .gallery-grid{ grid-template-columns:repeat(3,1fr); } }
@media (min-width:992px){ .anime-show-page .gallery-grid{ grid-template-columns:repeat(4,1fr); } }

.anime-show-page .gallery-grid .card{ border:1px solid var(--border); border-radius:16px; overflow:hidden; background:var(--surface-1); box-shadow:var(--shadow-sm); }
.anime-show-page .gallery-grid .card.thumb img{ aspect-ratio:16/9; object-fit:cover; width:100%; height:auto; display:block; cursor:zoom-in; }
.anime-show-page .gallery-grid .cap{ padding:8px 10px; font-size:.9rem; color:var(--muted); background:var(--surface-2); border-top:1px solid var(--border); }

/* Lightbox */
.anime-show-page .hi-lightbox{ position:fixed; inset:0; z-index:9999; background:rgba(0,0,0,.85); display:none; align-items:center; justify-content:center; }
.anime-show-page .hi-lightbox.open{ display:flex; }
.anime-show-page .hi-lightbox__img{ max-width:92vw; max-height:92vh; border-radius:12px; box-shadow:0 18px 44px rgba(0,0,0,.55); }
.anime-show-page .hi-lightbox__cap{ position:absolute; bottom:18px; inset-inline:18px; color:#eee; text-align:center; font-weight:800; text-shadow:0 1px 10px rgba(0,0,0,.6); }
.anime-show-page .hi-lightbox__btn{ position:absolute; top:16px; background:rgba(255,255,255,.12); border:1px solid rgba(255,255,255,.25); color:#fff; width:42px; height:42px; border-radius:12px; display:grid; place-items:center; cursor:pointer; }
.anime-show-page .hi-lightbox__close{ inset-inline-end:16px; }
.anime-show-page .hi-lightbox__prev,.anime-show-page .hi-lightbox__next{ top:50%; transform:translateY(-50%); font-size:20px; }
.anime-show-page .hi-lightbox__prev{ inset-inline-start:16px } .anime-show-page .hi-lightbox__next{ inset-inline-end:16px }
.anime-show-page .hi-lightbox__btn:hover{ background:rgba(255,255,255,.2); }

/* ---------- Player (optional) ---------- */
.anime-show-page .player-page { max-width: 1100px; margin: 16px auto; }
.anime-show-page .player-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 10px; box-shadow: var(--shadow); }
.anime-show-page .player-meta { display: flex; align-items: center; justify-content:space-between; gap: 8px; margin-top: 8px; color: var(--muted); }
.anime-show-page .next-up { display: none; margin-top: 10px; padding: 10px; border: 1px dashed var(--border); border-radius: 12px; }
.anime-show-page .next-up.show { display: block; }

/* ---------- Scrollbar (scoped) ---------- */
.anime-show-page *::-webkit-scrollbar{ width:10px; height:10px }
.anime-show-page *::-webkit-scrollbar-thumb{ background:linear-gradient(180deg,var(--surface-2),#dbe3ee); border-radius:999px; border:2px solid var(--surface) }
:root[data-theme="dark"] .anime-show-page *::-webkit-scrollbar-thumb{ background:linear-gradient(180deg,#2a3342,#202735); border-color:var(--surface) }

/* ========================================================================== */
/* ========================== Comments Archive (RTL) ======================== */
/* ========================================================================== */

.comments-archive{ direction:rtl; }
.comments-archive .page-title{
  font-weight:800; font-size:1.25rem; margin:0 0 1rem; color:#0f172a;
}

/* گرید کارت‌ها */
.comments-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(280px,1fr));
  gap:1rem;
}

/* کارت نظر */
.comment-card{
  background:#fff;
  border-radius:1rem; /* 16px */
  box-shadow:0 4px 16px rgba(2,6,23,.06);
  padding:1rem;
  transition:transform .15s ease, box-shadow .15s ease;
  min-height:160px;
}
.comment-card:hover{
  transform:translateY(-2px);
  box-shadow:0 8px 24px rgba(2,6,23,.10);
}

/* هدر: آواتار + نام + تاریخ */
.comment-card .cc-header{
  display:flex; align-items:center; gap:.75rem; margin-bottom:.75rem;
}
.comment-card .cc-avatar{
  width:44px; height:44px; border-radius:9999px; overflow:hidden; flex:0 0 44px;
  box-shadow:0 0 0 2px #fff, 0 0 0 3px rgba(2,6,23,.06);
}
.comment-card .cc-avatar img{width:100%; height:100%; object-fit:cover}
.comment-card .cc-name{
  font-weight:700; color:#0f172a; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.comment-card .cc-date{
  margin-inline-start:auto; color:#64748b; font-size:.85rem; display:flex; align-items:center; gap:.35rem;
}
.comment-card .cc-date i{line-height:1; font-size:.95em}

/* متن نظر (سه‌خطی با ellipsis) */
.comment-card .cc-body{
  color:#334155; line-height:1.7;
  display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden;
}

/* اطلاعات پست مرتبط (اختیاری) */
.comment-card .cc-post{
  margin-top:.75rem; display:flex; align-items:center; gap:.5rem; color:#475569; font-size:.9rem;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.comment-card .cc-post .cc-thumb{
  width:40px; height:56px; border-radius:.5rem; overflow:hidden; flex:0 0 auto;
  box-shadow:0 2px 8px rgba(15,23,42,.08);
}
.comment-card .cc-post .cc-thumb img{width:100%; height:100%; object-fit:cover}

/* فوتر */
.comment-card .cc-footer{
  margin-top:.75rem; display:flex; align-items:center; justify-content:space-between; gap:.5rem;
}
.comment-card .cc-link{
  display:inline-flex; align-items:center; gap:.4rem;
  padding:.4rem .7rem; border-radius:.75rem;
  background:#f1f5f9; color:#0f172a; font-weight:600; text-decoration:none;
}
.comment-card .cc-link:hover{background:#e2e8f0}

/* صفحه‌بندی به سبک پیل */
.pagination{margin-top:1.25rem; display:flex; justify-content:center; gap:.35rem; flex-wrap:wrap}
.pagination .page-numbers{
  display:inline-flex; align-items:center; justify-content:center;
  min-width:2.25rem; height:2.25rem; padding:0 .75rem;
  border-radius:9999px; background:#f1f5f9; color:#334155; text-decoration:none; font-weight:700;
  transition:background .15s ease, color .15s ease, transform .1s ease;
}
.pagination .page-numbers:hover{background:#e2e8f0; transform:translateY(-1px)}
.pagination .page-numbers.current{background:#f59e0b; color:#fff; box-shadow:0 2px 8px rgba(245,158,11,.35)}
.pagination .page-numbers.prev,.pagination .page-numbers.next{padding:0 .9rem}

/* Responsive tweaks */
@media (max-width:480px){
  .comments-grid{grid-template-columns:1fr}
  .comment-card{padding:.875rem}
  .comment-card .cc-date{font-size:.8rem}
}

/* کاهش حرکت برای دسترس‌پذیری */
@media (prefers-reduced-motion:reduce){
  .anime-show-page *{ transition:none !important }
}


:root[data-theme="dark"] .ai-seo__more-wrap,
:root[data-theme="dark"] .ai-seo__more-wrap *:not(svg):not(path){
  color:#fff !important;
}
