/*
Theme Name: Aylimovie
Theme URI: https://aylimovie.ir
Author: Aylimovie
Description: قالب فیلم و سریال Aylimovie — تم مشکی + سبز نئونی، RTL فارسی، واکنش‌گرا، با صفحه عضویت، پنل مدیریت و سازگاری کامل با افزونه اسکرپر.
Version: 4.5.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: aylimovie
Tags: dark, rtl-language-support, custom-menu, custom-logo
*/

/* ============================================================
   Aylimovie design tokens (ported 1:1 from the Next.js template)
   ============================================================ */
:root {
  --neon: #2ee56d;
  --neon-strong: #21d95e;
  --neon-deep: #0e8f3e;
  --neon-ice: #a4ffc9;
  --ink: #050705;
  --ink-2: #090d09;
  --panel: #0c120d;
  --panel-2: #111a12;
  --line: rgba(255, 255, 255, 0.06);
  --line-strong: rgba(255, 255, 255, 0.12);
  --gold: #ffc53d;
  /* v2.9.4 — red is BANNED from this UI («دانلود قرمز نشه»): error states
     use a warm amber tone, everything else stays neon-green/neutral. */
  --warn: #ffb020;
  --fg: #e7f2e9;
  --fg-soft: rgba(231, 242, 233, 0.65);
  --fg-faint: rgba(231, 242, 233, 0.45);
  --radius: 1rem;
  --radius-lg: 1.5rem;
  --font: var(--font-vazir, "Vazirmatn"), "Vazirmatn", "Segoe UI", Tahoma, sans-serif;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
/* v2.9 — the phone-zoom fix: Samsung Internet & Chrome Android silently
   inflate text (font boosting) which made the page «کوچیک بزرگ» while
   scrolling. text-size-adjust pins the scale; overflow-x: clip kills the
   tiny horizontal overflow that made browsers zoom out; touch-action:
   manipulation removes the double-tap-zoom delay on buttons. */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: rgba(46, 229, 109, 0.15);
  /* v2.9.1 — belt & braces for the phone zoom-out: even if a stray element
     still overflows, the document itself never gets a horizontal scroll
     area, so Safari has nothing to "shrink to fit" and the page stops
     کوچیک/بزرگ شدن while scrolling. */
  overflow-x: hidden;
}
html.am-adminbar-off { margin-top: 0 !important; }
body {
  margin: 0;
  background-color: var(--ink);
  background-image:
    radial-gradient(60rem 30rem at 85% -10%, rgba(46, 229, 109, 0.07), transparent 60%),
    radial-gradient(50rem 26rem at 5% 30%, rgba(14, 143, 62, 0.05), transparent 55%);
  background-attachment: fixed;
  color: var(--fg);
  font-family: var(--font);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  touch-action: manipulation;
  overflow-x: clip;
  max-width: 100%;
}
@supports not (overflow-x: clip) { body { overflow-x: hidden; } }
img, svg, video, iframe { max-width: 100%; }
/* iOS Safari auto-zooms into any input smaller than 16px — that was
   another «the page suddenly grew» moment. 16px everywhere, always. */
input, select, textarea { font-family: inherit; font-size: 16px; }
h1, h2, h3, h4, p, ul, ol { margin: 0; }
/* long Latin titles / filenames must wrap instead of pushing the page
   wider than the screen (another auto-zoom-out trigger) */
h1, h2, h3, h4 { overflow-wrap: anywhere; }
ul, ol { padding: 0; list-style: none; }
::selection { background: rgba(46, 229, 109, 0.35); color: #eafff2; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: #070a07; }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, #1d7a44, #103d22); border-radius: 999px; border: 2px solid #070a07; }
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #2ee56d, #156a35); }

/* ---------- utilities ---------- */
.am-container { width: 100%; max-width: 72rem; margin-inline: auto; padding-inline: 1rem; }
@media (min-width: 640px) { .am-container { padding-inline: 1.5rem; } }
.am-glass { background: rgba(8, 12, 9, 0.72); backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3); }
.am-text-glow { text-shadow: 0 0 18px rgba(46, 229, 109, 0.55), 0 0 60px rgba(46, 229, 109, 0.25); }
.am-num-fa { font-feature-settings: "ss01"; }
.am-scrollbar-hide { -ms-overflow-style: none; scrollbar-width: none; }
.am-scrollbar-hide::-webkit-scrollbar { display: none; }
.am-edge-fade-x {
  -webkit-mask-image: linear-gradient(to left, transparent 0, black 2.5rem, black calc(100% - 2.5rem), transparent 100%);
  mask-image: linear-gradient(to left, transparent 0, black 2.5rem, black calc(100% - 2.5rem), transparent 100%);
}
.am-noise { position: relative; }
.am-noise::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.16'/%3E%3C/svg%3E");
}
.am-dotted-grid { background-image: radial-gradient(rgba(255,255,255,.08) 1px, transparent 1px); background-size: 18px 18px; }

/* ---------- animations ---------- */
@keyframes am-aurora { 0% { transform: translate3d(-6%, -4%, 0) scale(1) rotate(0); opacity: .75; } 50% { transform: translate3d(5%, 6%, 0) scale(1.15) rotate(8deg); opacity: 1; } 100% { transform: translate3d(-3%, 2%, 0) scale(1.05) rotate(-6deg); opacity: .8; } }
@keyframes am-aurora-slow { 0% { transform: translate3d(4%, 6%, 0) scale(1.1); opacity: .8; } 100% { transform: translate3d(-6%, -4%, 0) scale(1); opacity: .7; } }
@keyframes am-shimmer { 0% { transform: translateX(-130%) skewX(-18deg); } 100% { transform: translateX(130%) skewX(-18deg); } }
@keyframes am-ticker { 0% { transform: translateX(0); } 100% { transform: translateX(50%); } }
@keyframes am-progress { 0% { width: 0%; } 100% { width: 100%; } }
@keyframes am-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes am-glow-pulse { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
@keyframes am-rise { 0% { opacity: 0; transform: translateY(18px); } 100% { opacity: 1; transform: translateY(0); } }
@keyframes am-spin { to { transform: rotate(360deg); } }
.am-anim-aurora { animation: am-aurora 14s ease-in-out infinite alternate; }
.am-anim-aurora-slow { animation: am-aurora-slow 20s ease-in-out infinite alternate-reverse; }
.am-anim-ticker { animation: am-ticker 28s linear infinite; }
.am-anim-float { animation: am-float 7s ease-in-out infinite; }
.am-anim-rise { animation: am-rise .7s cubic-bezier(.22, 1, .36, 1) both; }
.am-anim-spin { animation: am-spin 1s linear infinite; }

/* ---------- header ---------- */
.am-header { position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--line); }
.am-header-inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .5rem; height: 4rem; }
@media (min-width: 640px) { .am-header-inner { height: 4.5rem; } }
.am-header-side { display: flex; align-items: center; }
.am-header-side--start { justify-content: flex-start; }
.am-header-side--end { justify-content: flex-end; }
.am-icon-btn {
  display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(255,255,255,.03); color: rgba(255,255,255,.8);
  transition: all .25s; padding: 0;
}
.am-icon-btn:hover { background: rgba(46,229,109,.1); border-color: rgba(46,229,109,.5); color: var(--neon); }
.am-icon-btn svg { width: 1.25rem; height: 1.25rem; }
.am-logo { display: flex; flex-direction: column; align-items: center; gap: .125rem; }
.am-logo-row { display: flex; align-items: center; gap: .375rem; }
.am-logo-text { font-size: 1.25rem; font-weight: 800; letter-spacing: -.02em; color: #fff; }
@media (min-width: 640px) { .am-logo-text { font-size: 1.5rem; } }
.am-logo-text b { color: var(--neon); font-weight: 800; }
.am-logo-mark {
  position: relative; display: grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: .55rem;
  background: rgba(46,229,109,.15); border: 1px solid rgba(46,229,109,.4);
  box-shadow: 0 0 18px rgba(46,229,109,.35); transition: transform .25s;
}
@media (min-width: 640px) { .am-logo-mark { width: 1.75rem; height: 1.75rem; } }
.am-logo:hover .am-logo-mark { transform: scale(1.1); }
.am-logo-mark svg { width: .8rem; height: .8rem; fill: var(--neon); color: var(--neon); }
.am-logo-tag { font-size: 9px; letter-spacing: .35em; color: rgba(255,255,255,.4); font-weight: 500; user-select: none; }
@media (min-width: 640px) { .am-logo-tag { font-size: 10px; } }
.am-logo--compact .am-logo-tag { display: none; }
.am-search-row { overflow: hidden; max-height: 0; opacity: 0; transition: all .3s; }
.am-search-row.is-open { max-height: 5rem; opacity: 1; padding-bottom: 1rem; }
.am-search-form {
  display: flex; align-items: center; gap: .75rem; border-radius: 1rem; border: 1px solid rgba(46,229,109,.3);
  background: rgba(0,0,0,.4); padding: .75rem 1rem; box-shadow: 0 0 30px rgba(46,229,109,.08);
  transition: border-color .25s;
}
.am-search-form:focus-within { border-color: rgba(46,229,109,.6); }
.am-search-form svg { width: 1.25rem; height: 1.25rem; color: var(--neon); flex-shrink: 0; }
.am-search-form input { flex: 1; background: transparent; border: 0; outline: 0; color: #fff; font-size: .9rem; }
.am-search-form input::placeholder { color: rgba(255,255,255,.35); }
/* v4.0.0 — the search form has a REAL submit button (mobile keyboards and
   one-tap searching); Enter still works everywhere */
.am-search-go {
  display: inline-flex; align-items: center; gap: .375rem; flex-shrink: 0;
  border: 0; border-radius: .625rem; cursor: pointer; padding: .45rem .8rem;
  background: var(--neon); color: var(--ink); font-size: .75rem; font-weight: 800;
  font-family: inherit; transition: all .25s;
}
.am-search-go:hover { box-shadow: 0 0 22px rgba(46,229,109,.5); }
.am-search-go svg { width: .875rem; height: .875rem; color: var(--ink); }
@media (max-width: 480px) { .am-search-go span { display: none; } .am-search-go { padding: .45rem .6rem; } }

/* v4.0.0 — the دسته‌بندی tab bar (همه / فیلم / سریال / انیمیشن) on the
   archive and the search results */
.am-kind-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: 1.25rem; }
.am-kind-tab {
  display: inline-flex; align-items: center; gap: .4rem;
  border-radius: 999px; border: 1px solid var(--line);
  background: rgba(255,255,255,.03); color: rgba(255,255,255,.72);
  padding: .475rem 1.05rem; font-size: .8rem; font-weight: 600;
  transition: all .25s;
}
.am-kind-tab svg { width: .95rem; height: .95rem; }
.am-kind-tab:hover { border-color: rgba(46,229,109,.45); color: var(--neon); }
.am-kind-tab.is-active {
  background: rgba(46,229,109,.14); border-color: rgba(46,229,109,.55);
  color: var(--neon); box-shadow: 0 0 18px rgba(46,229,109,.18);
}

/* ---------- drawer ---------- */
.am-overlay { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.7); backdrop-filter: blur(4px); opacity: 0; pointer-events: none; transition: opacity .3s; }
.am-overlay.is-open { opacity: 1; pointer-events: auto; }
.am-drawer {
  position: fixed; top: 0; left: 0; z-index: 70; height: 100dvh; width: 19rem; max-width: 85vw;
  background: var(--ink-2); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; transform: translateX(-100%); transition: transform .3s ease-out;
}
.am-drawer.is-open { transform: translateX(0); }
.am-drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 1.25rem; border-bottom: 1px solid var(--line); }
.am-drawer-close { width: 2.25rem; height: 2.25rem; border-radius: 999px; border: 1px solid var(--line); background: transparent; display: grid; place-items: center; color: rgba(255,255,255,.8); transition: all .25s; }
.am-drawer-close:hover { background: rgba(46,229,109,.1); border-color: rgba(46,229,109,.5); }
.am-drawer-nav { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: .375rem; }
.am-drawer-link {
  display: flex; align-items: center; gap: .75rem; border-radius: .75rem; padding: .75rem 1rem;
  font-size: .875rem; font-weight: 500; color: rgba(255,255,255,.7); border: 1px solid transparent; transition: all .25s;
}
.am-drawer-link:hover { color: #fff; background: rgba(255,255,255,.05); }
.am-drawer-link.is-active {
  background: rgba(46,229,109,.12); color: var(--neon); border-color: rgba(46,229,109,.3);
  box-shadow: 0 0 20px rgba(46,229,109,.12);
}
.am-drawer-link svg { width: 1.125rem; height: 1.125rem; }
.am-drawer-cta {
  margin-top: 1rem; display: flex; align-items: center; justify-content: center; gap: .5rem;
  border-radius: .75rem; padding: .875rem 1rem; font-size: .875rem; font-weight: 700;
  color: var(--ink); background: var(--neon); box-shadow: 0 8px 30px rgba(46,229,109,.35); transition: all .25s;
}
.am-drawer-cta:hover { background: var(--neon-strong); transform: scale(1.02); }
.am-drawer-cta svg { width: 1.125rem; height: 1.125rem; }
.am-drawer-foot { padding: 1.25rem; border-top: 1px solid var(--line); text-align: center; font-size: 11px; color: rgba(255,255,255,.35); }

/* ---------- hero ---------- */
/* v4.1.0 — «پوسترشو تمام صفحه کن»: the hero IS the poster. One sharp,
   full-bleed image covers the whole block and the title sits on it over a
   cinematic gradient — no blur, no side frame, no ghost letters. The tiny
   framed poster from v4.0.0 is gone; the art itself fills the screen. */
.am-hero { position: relative; height: 32rem; height: min(94svh, 32rem); }
@media (min-width: 640px) { .am-hero { height: 34rem; height: min(90svh, 34rem); } }
@media (min-width: 1024px) { .am-hero { height: 40rem; } }
.am-hero-layer { position: absolute; inset: 0; opacity: 0; transition: opacity 1s; }
.am-hero-layer.is-active { opacity: 1; }
.am-hero-art { position: absolute; inset: 0; overflow: hidden; }
.am-hero-art-bg { position: absolute; inset: 0; }
.am-hero-blob-1 { position: absolute; top: -8rem; left: 25%; width: 34rem; height: 34rem; border-radius: 999px; filter: blur(110px); }
.am-hero-blob-2 { position: absolute; bottom: -10rem; right: -6rem; width: 38rem; height: 38rem; border-radius: 999px; filter: blur(130px); }
/* the slide's artwork — SHARP, full-bleed, the whole hero */
.am-hero-shot {
  position: absolute; inset: 0; z-index: 1;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center 20%;
  filter: brightness(.78) saturate(1.06);
}
/* cinematic grade: keeps the art bright, melts the bottom into the page so
   the overlaid title stays readable; the start-side veil protects the text
   column on wide screens (RTL: start = right). */
.am-hero-shade {
  position: absolute; inset: 0; z-index: 2;
  background:
    linear-gradient(to left, rgba(5,7,5,.5) 0%, rgba(5,7,5,0) 46%),
    linear-gradient(180deg, rgba(4,8,5,.5) 0%, rgba(4,8,5,.06) 26%, rgba(4,8,5,.12) 46%, rgba(5,7,5,.84) 76%, #050705 100%);
}
.am-hero-content { position: relative; z-index: 10; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; padding-bottom: 5.25rem; }
.am-hero-box { max-width: 38rem; min-width: 0; }
@media (min-width: 640px) { .am-hero-content { padding-bottom: 5.75rem; } .am-hero-box { max-width: 34rem; } }
.am-hero-kicker { color: var(--neon); font-size: .875rem; font-weight: 500; margin-bottom: .75rem; text-shadow: 0 2px 18px rgba(0,0,0,.9); }
@media (min-width: 640px) { .am-hero-kicker { font-size: 1rem; } }
.am-hero-title { font-size: clamp(1.5rem, 6vw, 2.25rem); font-weight: 900; color: #fff; line-height: 1.3; margin-bottom: .75rem; text-shadow: 0 4px 34px rgba(0,0,0,.95), 0 1px 3px rgba(0,0,0,.8); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
@media (min-width: 640px) { .am-hero-title { font-size: 2.75rem; line-height: 1.18; } }
.am-hero-tagline { font-size: .8rem; color: rgba(255,255,255,.78); font-weight: 300; line-height: 1.8; margin-bottom: 1rem; text-shadow: 0 2px 16px rgba(0,0,0,.9); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (min-width: 640px) { .am-hero-tagline { font-size: 1.125rem; margin-bottom: 1.5rem; } }
.am-hero-chips { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: 1.75rem; }
.am-chip { border-radius: 999px; padding: .375rem .75rem; font-size: .75rem; backdrop-filter: blur(8px); background: rgba(0,0,0,.55); border: 1px solid var(--line-strong); color: rgba(255,255,255,.7); }
.am-chip--rating { display: inline-flex; align-items: center; gap: .375rem; border-color: rgba(255,197,61,.3); color: var(--gold); font-weight: 700; }
.am-chip--genre { background: rgba(255,255,255,.04); }
.am-chip svg { width: .875rem; height: .875rem; }
.am-hero-actions { display: flex; align-items: center; gap: .75rem; }
.am-btn-play {
  display: inline-flex; align-items: center; gap: .625rem; border-radius: 999px; border: 2px solid var(--neon);
  background: rgba(46,229,109,.1); padding: .75rem 1.5rem; font-size: .875rem; font-weight: 700; color: var(--neon);
  backdrop-filter: blur(8px); transition: all .3s; box-shadow: 0 0 28px rgba(46,229,109,.3);
}
@media (min-width: 640px) { .am-btn-play { padding: .875rem 2rem; font-size: 1rem; } }
.am-btn-play:hover { background: var(--neon); color: var(--ink); box-shadow: 0 0 45px rgba(46,229,109,.55); }
.am-btn-play svg { width: 1.125rem; height: 1.125rem; fill: currentColor; }
.am-btn-info {
  display: inline-flex; align-items: center; gap: .5rem; border-radius: 999px; border: 1px solid rgba(255,255,255,.15);
  background: rgba(0,0,0,.4); padding: .75rem 1.25rem; font-size: .875rem; color: rgba(255,255,255,.8);
  backdrop-filter: blur(8px); transition: all .25s;
}
@media (min-width: 640px) { .am-btn-info { padding: .875rem 1.5rem; } }
.am-btn-info:hover { border-color: rgba(46,229,109,.5); color: var(--neon); }
.am-btn-info svg { width: 1rem; height: 1rem; }
.am-hero-controls { position: absolute; bottom: 1.25rem; inset-inline: 0; z-index: 20; }
.am-hero-controls-inner { display: flex; align-items: center; gap: .75rem; }
@media (min-width: 640px) { .am-hero-controls-inner { gap: 1rem; } }
.am-hero-nav-btn { flex-shrink: 0; display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 999px; background: rgba(0,0,0,.55); border: 1px solid rgba(255,255,255,.15); color: rgba(255,255,255,.8); backdrop-filter: blur(8px); transition: all .25s; padding: 0; }
.am-hero-nav-btn:hover { border-color: var(--neon); color: var(--neon); }
.am-hero-nav-btn svg { width: 1.125rem; height: 1.125rem; }
.am-hero-count { flex-shrink: 0; border-radius: 999px; background: rgba(0,0,0,.55); border: 1px solid rgba(255,255,255,.15); padding: .375rem .75rem; font-size: .75rem; font-weight: 700; color: rgba(255,255,255,.8); backdrop-filter: blur(8px); }
.am-hero-tabs { display: flex; flex: 1; align-items: center; gap: .5rem; }
.am-hero-tab { height: .625rem; flex: 1; border-radius: 999px; background: rgba(255,255,255,.12); overflow: hidden; transition: background .25s; padding: 0; border: 0; }
.am-hero-tab:hover { background: rgba(255,255,255,.2); }
.am-hero-tab-fill { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--neon); box-shadow: 0 0 10px rgba(46,229,109,.8); }

/* ---------- genre ticker ---------- */
.am-ticker { position: relative; overflow: hidden; border-block: 1px solid var(--line); background: rgba(9,13,9,.7); padding: .75rem 0; }
.am-ticker-track { display: flex; width: max-content; gap: 2rem; }
.am-ticker-item { display: flex; align-items: center; gap: 2rem; font-size: .875rem; color: rgba(255,255,255,.4); white-space: nowrap; }
.am-ticker-item span:first-child { cursor: default; }
.am-ticker-item:hover span:first-child { color: var(--neon); }
.am-ticker-dot { width: .375rem; height: .375rem; border-radius: 999px; background: rgba(46,229,109,.5); box-shadow: 0 0 8px rgba(46,229,109,.6); }
.am-ticker-fade { position: absolute; top: 0; bottom: 0; width: 4rem; pointer-events: none; }
.am-ticker-fade--start { left: 0; background: linear-gradient(to right, rgba(5,7,5,0), var(--ink)); }
.am-ticker-fade--end { right: 0; background: linear-gradient(to left, rgba(5,7,5,0), var(--ink)); }

/* ---------- sections ---------- */
.am-section { margin-top: 2.5rem; scroll-margin-top: 6rem; }
@media (min-width: 640px) { .am-section { margin-top: 3.5rem; } }
.am-section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; }
@media (min-width: 640px) { .am-section-head { margin-bottom: 1.5rem; } }
.am-section-title { display: flex; align-items: center; gap: .625rem; font-size: 1.125rem; font-weight: 800; color: #fff; }
@media (min-width: 640px) { .am-section-title { font-size: 1.5rem; } }
.am-section-bar { height: 1.5rem; width: .25rem; border-radius: 999px; background: var(--neon); box-shadow: 0 0 12px rgba(46,229,109,.7); }
@media (min-width: 640px) { .am-section-bar { height: 1.75rem; } }
.am-section-more {
  display: inline-flex; align-items: center; gap: .375rem; border-radius: 999px; border: 1px solid rgba(46,229,109,.35);
  background: rgba(46,229,109,.07); padding: .375rem .875rem; font-size: .75rem; font-weight: 500; color: var(--neon); transition: all .25s;
}
@media (min-width: 640px) { .am-section-more { padding: .5rem 1rem; font-size: .875rem; } }
.am-section-more:hover { background: var(--neon); color: var(--ink); box-shadow: 0 0 24px rgba(46,229,109,.4); }
.am-section-more svg { width: .875rem; height: .875rem; }

/* ---------- movie card ---------- */
.am-row-scroll { display: flex; gap: .875rem; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: .5rem; margin-inline: -1rem; padding-inline: 1rem; }
@media (min-width: 640px) { .am-row-scroll { gap: 1rem; margin-inline: 0; padding-inline: 0; } }
.am-card { flex-shrink: 0; scroll-snap-align: start; width: 9.5rem; }
@media (min-width: 640px) { .am-card { width: 11rem; } }
@media (min-width: 1024px) { .am-card { width: 12rem; } }
.am-card-poster {
  position: relative; aspect-ratio: 2 / 3; border-radius: 1rem; overflow: hidden; border: 1px solid var(--line);
  background: var(--panel); transition: all .5s;
}
.am-card:hover .am-card-poster { border-color: rgba(46,229,109,.5); box-shadow: 0 10px 40px rgba(46,229,109,.18); transform: translateY(-6px); }
/* v2.9.3 — «پوسترو کامل بزار روش» on EVERY poster tile (cards, single
   page, top-week, archive): the WHOLE artwork is shown (object-fit:
   contain) — never a cover-crop that cuts the title art off. Letterbox
   gaps get a quiet dark backdrop so the full poster still reads like a
   poster card. */
.am-card-poster-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: center; background: radial-gradient(120% 90% at 50% 0%, #111a12 0%, #070a07 70%); }
.am-card-badge-rating {
  position: absolute; top: .5rem; inset-inline-start: .5rem; z-index: 10; display: inline-flex; align-items: center; gap: .25rem;
  border-radius: 999px; background: rgba(0,0,0,.65); border: 1px solid rgba(255,255,255,.1); padding: .25rem .5rem;
  font-size: 11px; font-weight: 700; color: #fff; backdrop-filter: blur(6px);
}
.am-card-badge-rating svg { width: .75rem; height: .75rem; fill: var(--gold); color: var(--gold); }
.am-card-badge-quality {
  position: absolute; top: .5rem; inset-inline-end: .5rem; z-index: 10; border-radius: .375rem;
  background: rgba(46,229,109,.9); padding: .125rem .375rem; font-size: 10px; font-weight: 800; color: var(--ink);
  box-shadow: 0 0 14px rgba(46,229,109,.5);
  max-width: calc(100% - 1rem); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; direction: ltr;
}
.am-card-hover { position: absolute; inset: 0; z-index: 10; display: grid; place-items: center; background: linear-gradient(to top, rgba(0,0,0,.7), rgba(0,0,0,.2), transparent); opacity: 0; transition: opacity .3s; }
.am-card:hover .am-card-hover { opacity: 1; }
.am-card-hover span { display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 999px; background: var(--neon); color: var(--ink); box-shadow: 0 0 30px rgba(46,229,109,.7); transform: scale(.75); transition: transform .3s; }
.am-card:hover .am-card-hover span { transform: scale(1); }
.am-card-hover svg { width: 1.25rem; height: 1.25rem; fill: currentColor; }
.am-card-info { padding: .75rem .25rem 0; }
.am-card-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .875rem; font-weight: 700; color: rgba(255,255,255,.9); transition: color .25s; }
.am-card:hover .am-card-title { color: var(--neon); }
.am-card-meta { margin-top: .25rem; display: flex; align-items: center; gap: .375rem; font-size: 11px; color: rgba(255,255,255,.45); }
.am-card-meta-dot { width: .25rem; height: .25rem; border-radius: 999px; background: rgba(255,255,255,.2); }

/* poster placeholder (no real image available) */
.am-poster-ph { position: relative; overflow: hidden; width: 100%; height: 100%; background: var(--ink-2); }
.am-poster-ph-letter { position: absolute; bottom: -1rem; inset-inline-start: -.25rem; font-size: 5.5rem; font-weight: 900; line-height: 1; color: transparent; user-select: none; }
.am-poster-ph-icon { position: absolute; inset: 0; display: grid; place-items: center; }
.am-poster-ph-icon span { display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 1rem; border: 1px dashed; transition: all .5s; }
.am-card:hover .am-poster-ph-icon span, .am-card:hover .am-poster-ph-icon span { transform: scale(1.1); }
.am-poster-ph-label { position: absolute; top: 50%; left: 50%; transform: translate(-50%, 1.5rem); font-size: 9px; letter-spacing: .1em; color: rgba(255,255,255,.35); white-space: nowrap; user-select: none; }
.am-poster-ph svg { width: 1.25rem; height: 1.25rem; }

/* ---------- categories ---------- */
.am-cats { display: grid; grid-template-columns: repeat(5, 1fr); gap: .625rem; }
@media (min-width: 640px) { .am-cats { gap: 1rem; } }
.am-cat { position: relative; display: flex; flex-direction: column; align-items: center; gap: .5rem; border-radius: 1rem; border: 1px solid var(--line); background: var(--panel); padding: .875rem .375rem; transition: all .3s; }
@media (min-width: 640px) { .am-cat { gap: .75rem; padding: 1.25rem .375rem; } }
.am-cat:hover { border-color: rgba(46,229,109,.45); background: var(--panel-2); box-shadow: 0 0 28px rgba(46,229,109,.14); transform: translateY(-4px); }
.am-cat-icon { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: .75rem; background: linear-gradient(135deg, rgba(46,229,109,.18), rgba(46,229,109,.05)); border: 1px solid rgba(46,229,109,.25); transition: all .3s; }
@media (min-width: 640px) { .am-cat-icon { width: 3rem; height: 3rem; } }
.am-cat:hover .am-cat-icon { box-shadow: 0 0 22px rgba(46,229,109,.35); transform: scale(1.1); }
.am-cat-icon svg { width: 1.25rem; height: 1.25rem; color: var(--neon); }
@media (min-width: 640px) { .am-cat-icon svg { width: 1.5rem; height: 1.5rem; } }
.am-cat-label { font-size: 11px; font-weight: 600; color: rgba(255,255,255,.8); transition: color .25s; }
@media (min-width: 640px) { .am-cat-label { font-size: .875rem; } }
.am-cat:hover .am-cat-label { color: var(--neon); }

/* ---------- promo banner ---------- */
/* v4.1.0 — full-bleed poster tile (see .am-promo--has-shot below).
   History: v2.9.2 framed contain card → v4.0.0 side card → v4.1.0 the
   poster covers the WHOLE tile with the title on a cinematic gradient. */
.am-promo { position: relative; overflow: hidden; border-radius: 1.5rem; border: 1px solid var(--line); background: var(--panel); display: flex; align-items: stretch; }
/* v4.1.0 — «اینم مثل اسلایدر، پوسترشو تمام صفحه کن»: when the tile has a
   real poster it COVERS the whole tile edge-to-edge — sharp, un-blurred —
   and the title sits on the cinematic gradient at the bottom. No framed
   side card anymore; the fallback art gradients remain for tiles without
   a poster. */
.am-promo--has-shot { min-height: 21rem; }
.am-promo-media { position: absolute; inset: 0; z-index: 1; }
.am-promo-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 22%; filter: brightness(.7) saturate(1.06); }
.am-promo-shade { position: absolute; inset: 0; background: linear-gradient(to left, rgba(5,7,5,.42), rgba(5,7,5,0) 48%), linear-gradient(180deg, rgba(4,8,5,.3) 0%, rgba(4,8,5,.06) 32%, rgba(5,7,5,.78) 70%, #050705 100%); }
.am-promo--has-shot .am-promo-body { justify-content: flex-end; min-height: 21rem; }
/* fallback art (no poster URL) — unchanged layout */
.am-promo-body { position: relative; z-index: 10; flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: .6rem; padding: 1.25rem; min-height: 11rem; max-width: 36rem; }
.am-promo--has-shot .am-promo-kicker { text-shadow: 0 2px 16px rgba(0,0,0,.9); }
.am-promo--has-shot .am-promo-tagline { color: rgba(255,255,255,.8); text-shadow: 0 2px 14px rgba(0,0,0,.9); }
.am-promo-art { position: absolute; inset: 0; }
.am-promo-dots { position: absolute; inset: 0; opacity: .25; }
.am-promo-blob { position: absolute; bottom: -4rem; inset-inline-end: -2.5rem; width: 16rem; height: 16rem; border-radius: 999px; filter: blur(90px); }
.am-promo-ghost { position: absolute; bottom: -2rem; inset-inline-end: 1rem; font-size: 7rem; font-weight: 900; line-height: 1; color: transparent; user-select: none; }
@media (min-width: 640px) { .am-promo-ghost { font-size: 10rem; } }
@media (min-width: 640px) { .am-promo-body { padding: 2rem; min-height: 13rem; } }
@media (min-width: 1024px) { .am-promo-body { padding: 2.5rem; min-height: 15rem; } }
.am-promo-kicker { color: var(--neon); font-size: .7rem; font-weight: 600; }
@media (min-width: 640px) { .am-promo-kicker { font-size: .875rem; } }
/* v4.0.0 — a compact, clamped title: 3 lines max, no more giant 5-line
   headline crowding the poster out of the tile */
.am-promo-title { font-size: clamp(1.05rem, 4.4vw, 1.6rem); font-weight: 800; color: #fff; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
@media (min-width: 640px) { .am-promo-title { font-size: 1.75rem; } }
@media (min-width: 1024px) { .am-promo-title { font-size: 2rem; } }
.am-promo-tagline { font-size: .8rem; color: rgba(255,255,255,.7); font-weight: 300; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (min-width: 640px) { .am-promo-tagline { font-size: 1rem; } }
.am-promo-btn { display: inline-flex; align-items: center; gap: .5rem; border-radius: 999px; background: var(--neon); padding: .625rem 1.5rem; font-size: .875rem; font-weight: 700; color: var(--ink); border: 0; box-shadow: 0 8px 30px rgba(46,229,109,.4); transition: all .25s; }
.am-promo-btn:hover { background: var(--neon-strong); transform: scale(1.03); box-shadow: 0 8px 40px rgba(46,229,109,.55); }
.am-promo-btn svg { width: 1rem; height: 1rem; fill: currentColor; }

/* ---------- top week ---------- */
.am-topweek { display: flex; flex-direction: column; gap: .75rem; counter-reset: amtw; }
/* v2.9.1 — the REAL phone-zoom culprit lived here: .am-topweek-title is a
   <span> (inline), and overflow/ellipsis silently DO NOTHING on inline
   boxes. A long scraped title («استاردوزن نامحدود/مرعنگتون نامحدود …»)
   ran off the right edge, widened the page, and iOS Safari shrank the
   WHOLE site to fit it — the «هی کوچیک بزرگ میشه» bug. display:block
   clips the title INSIDE the row, so the page can never grow wider. */
.am-topweek-item { display: flex; align-items: center; gap: .75rem; border-radius: 1rem; border: 1px solid var(--line); background: var(--panel); padding: .75rem; transition: all .3s; overflow: hidden; }
@media (min-width: 640px) { .am-topweek-item { gap: 1rem; } }
.am-topweek-item:hover { border-color: rgba(46,229,109,.4); background: var(--panel-2); box-shadow: 0 6px 26px rgba(46,229,109,.12); }
.am-topweek-rank { flex-shrink: 0; width: 2.5rem; text-align: center; font-size: 1.875rem; font-weight: 900; color: transparent; line-height: 1; }
@media (min-width: 640px) { .am-topweek-rank { width: 3.5rem; font-size: 2.25rem; } }
.am-topweek-thumb { position: relative; flex-shrink: 0; width: 2.75rem; aspect-ratio: 2/3; border-radius: .5rem; overflow: hidden; border: 1px solid var(--line); }
@media (min-width: 640px) { .am-topweek-thumb { width: 3rem; } }
.am-topweek-thumb .am-poster-ph-label { display: none; }
.am-topweek-body { flex: 1; min-width: 0; }
.am-topweek-title { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .875rem; font-weight: 700; color: rgba(255,255,255,.9); transition: color .25s; }
.am-topweek-item:hover .am-topweek-title { color: var(--neon); }
@media (min-width: 640px) { .am-topweek-title { font-size: 1rem; } }
.am-topweek-meta { display: block; max-width: 100%; margin-top: .125rem; font-size: 11px; color: rgba(255,255,255,.45); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (min-width: 640px) { .am-topweek-meta { font-size: .75rem; } }
.am-topweek-score { flex-shrink: 0; display: inline-flex; align-items: center; gap: .25rem; border-radius: 999px; background: rgba(0,0,0,.5); border: 1px solid rgba(255,197,61,.25); padding: .25rem .625rem; font-size: .75rem; font-weight: 700; color: var(--gold); }
.am-topweek-score svg { width: .75rem; height: .75rem; fill: var(--gold); color: var(--gold); }

/* ---------- vip aside ---------- */
.am-vip-grid { display: grid; gap: 1.5rem; align-items: start; }
@media (min-width: 1024px) { .am-vip-grid { grid-template-columns: 1.4fr 1fr; gap: 2rem; } }
.am-vip-aside { position: relative; overflow: hidden; border-radius: 1.5rem; border: 1px solid rgba(46,229,109,.25); background: linear-gradient(to bottom, var(--panel-2), var(--ink)); padding: 1.5rem; min-height: 19rem; height: 100%; display: flex; flex-direction: column; justify-content: center; }
@media (min-width: 640px) { .am-vip-aside { padding: 2rem; } }
.am-vip-blob { position: absolute; top: -3.5rem; inset-inline-start: -2.5rem; width: 13rem; height: 13rem; border-radius: 999px; filter: blur(80px); background: rgba(46,229,109,.22); }
.am-vip-dots { position: absolute; inset: 0; opacity: .25; }
.am-vip-inner { position: relative; z-index: 10; }
.am-vip-kicker { color: var(--neon); font-size: .75rem; font-weight: 700; letter-spacing: .15em; margin-bottom: .75rem; }
.am-vip-title { font-size: 1.5rem; font-weight: 900; color: #fff; line-height: 1.8; margin-bottom: .75rem; }
@media (min-width: 640px) { .am-vip-title { font-size: 1.875rem; } }
.am-vip-title b { color: var(--neon); }
.am-vip-text { font-size: .875rem; line-height: 1.75; color: rgba(255,255,255,.6); margin-bottom: 1.5rem; }
.am-vip-btn { width: 100%; border-radius: 1rem; background: var(--neon); border: 0; padding: .875rem 1.5rem; font-size: .875rem; font-weight: 700; color: var(--ink); box-shadow: 0 10px 36px rgba(46,229,109,.4); transition: all .25s; }
.am-vip-btn:hover { background: var(--neon-strong); box-shadow: 0 10px 46px rgba(46,229,109,.6); }

/* ---------- footer ---------- */
.am-footer { margin-top: auto; border-top: 1px solid var(--line); background: rgba(9,13,9,.8); }
.am-footer-inner { padding: 3rem 1.5rem; }
/* v2.9.1 — minmax(0,1fr) so a long word can never blow a column past the
   screen, and extra bottom padding so the copyright clears the fixed
   mobile bottom nav (it used to sit right behind آن). */
.am-footer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.5rem; }
@media (max-width: 767px) { .am-footer-inner { padding-bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px)); } }
@media (min-width: 1024px) { .am-footer-grid { grid-template-columns: repeat(4, 1fr); } }
.am-footer-brand { grid-column: span 2; }
@media (min-width: 1024px) { .am-footer-brand { grid-column: span 1; } }
.am-footer-logo { display: flex; align-items: center; gap: .375rem; margin-bottom: .75rem; }
.am-footer-logo .am-logo-text { font-size: 1.5rem; }
.am-footer-logo .am-logo-mark { width: 1.75rem; height: 1.75rem; }
.am-footer-tag { font-size: 10px; letter-spacing: .35em; color: rgba(255,255,255,.35); margin-bottom: 1rem; user-select: none; }
.am-footer-desc { font-size: .875rem; line-height: 1.75; color: rgba(255,255,255,.55); }
.am-footer-social { display: flex; align-items: center; gap: .625rem; margin-top: 1.25rem; }
.am-footer-social a { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 999px; border: 1px solid var(--line); color: rgba(255,255,255,.6); transition: all .25s; }
.am-footer-social a:hover { border-color: rgba(46,229,109,.6); color: var(--neon); box-shadow: 0 0 18px rgba(46,229,109,.25); }
.am-footer-social svg { width: 1rem; height: 1rem; }
.am-footer-col-title { display: flex; align-items: center; gap: .5rem; font-size: .875rem; font-weight: 700; color: rgba(255,255,255,.85); margin-bottom: 1rem; }
.am-footer-col-bar { height: 1rem; width: .125rem; border-radius: 999px; background: var(--neon); }
.am-footer-col ul { display: flex; flex-direction: column; gap: .625rem; }
.am-footer-col a { font-size: .875rem; color: rgba(255,255,255,.5); transition: color .25s; }
.am-footer-col a:hover { color: var(--neon); }
.am-footer-bottom { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: .75rem; font-size: .75rem; color: rgba(255,255,255,.35); }
@media (min-width: 640px) { .am-footer-bottom { flex-direction: row; } }
.am-footer-live { display: flex; align-items: center; gap: .375rem; }
.am-footer-live span { width: .375rem; height: .375rem; border-radius: 999px; background: var(--neon); box-shadow: 0 0 8px rgba(46,229,109,.8); }

/* ---------- bottom nav (mobile) ---------- */
.am-bottomnav { position: fixed; bottom: 0; inset-inline: 0; z-index: 50; display: none; }
@media (max-width: 767px) { .am-bottomnav { display: block; } }
.am-bottomnav-inner { display: grid; grid-template-columns: repeat(5, 1fr); }
.am-bottomnav-item { position: relative; display: flex; flex-direction: column; align-items: center; gap: .25rem; padding: .75rem 0 .625rem; font-size: 10px; font-weight: 500; color: rgba(255,255,255,.5); background: transparent; border: 0; transition: color .3s; }
.am-bottomnav-item:hover { color: rgba(255,255,255,.8); }
.am-bottomnav-item.is-active { color: var(--neon); }
.am-bottomnav-item.is-active::before { content: ""; position: absolute; top: 0; height: .125rem; width: 2.25rem; border-radius: 999px; background: var(--neon); box-shadow: 0 0 12px rgba(46,229,109,.9); }
.am-bottomnav-item svg { width: 1.25rem; height: 1.25rem; }
.am-bottomnav-item.is-active svg { transform: scale(1.1); filter: drop-shadow(0 0 8px rgba(46,229,109,.8)); }

/* ---------- membership page ---------- */
.am-membership { padding: 2.5rem 0 5rem; }
.am-membership-hero { text-align: center; margin-bottom: 2rem; }
.am-membership-kicker { display: inline-flex; align-items: center; gap: .5rem; color: var(--neon); font-size: .875rem; font-weight: 700; }
.am-membership-kicker svg { width: 1rem; height: 1rem; }
.am-membership-title { font-size: 1.75rem; font-weight: 900; color: #fff; margin-top: .75rem; }
@media (min-width: 640px) { .am-membership-title { font-size: 2.5rem; } }
.am-membership-desc { color: rgba(255,255,255,.6); font-size: .95rem; line-height: 1.9; max-width: 34rem; margin: 1rem auto 0; }
.am-membership-panel { position: relative; max-width: 28rem; margin-inline: auto; border-radius: 1.5rem; border: 1px solid rgba(46,229,109,.22); background: rgba(12,18,13,.85); backdrop-filter: blur(14px); padding: 1.5rem; box-shadow: 0 20px 60px rgba(0,0,0,.5), 0 0 40px rgba(46,229,109,.06); }
@media (min-width: 640px) { .am-membership-panel { padding: 2rem; } }
.am-membership-blob { position: absolute; top: -4rem; inset-inline-end: -3rem; width: 12rem; height: 12rem; border-radius: 999px; filter: blur(70px); background: rgba(46,229,109,.16); }
.am-tabs { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: .25rem; border-radius: 999px; border: 1px solid var(--line-strong); background: rgba(0,0,0,.35); padding: .25rem; margin-bottom: 1.5rem; }
.am-tab { border-radius: 999px; padding: .625rem 1rem; font-size: .875rem; font-weight: 700; color: rgba(255,255,255,.55); background: transparent; border: 1px solid transparent; transition: all .3s; }
.am-tab.is-active { background: rgba(46,229,109,.12); border-color: rgba(46,229,109,.5); color: var(--neon); box-shadow: 0 0 20px rgba(46,229,109,.15); }
.am-form { display: flex; flex-direction: column; gap: 1rem; }
.am-form-pane { display: none; flex-direction: column; gap: 1rem; }
.am-form-pane.is-active { display: flex; }
.am-field label { display: block; font-size: .8rem; font-weight: 600; color: rgba(255,255,255,.75); margin-bottom: .5rem; }
.am-input-wrap { position: relative; }
.am-input {
  width: 100%; border-radius: .875rem; border: 1px solid var(--line-strong); background: rgba(0,0,0,.4);
  padding: .8rem 1rem; font-size: .9rem; color: #fff; outline: 0; transition: all .25s;
}
.am-input::placeholder { color: rgba(255,255,255,.3); }
.am-input:focus { border-color: rgba(46,229,109,.6); box-shadow: 0 0 0 3px rgba(46,229,109,.12); }
.am-input--ltr { direction: ltr; text-align: left; }
.am-eye-btn { position: absolute; top: 50%; inset-inline-end: .75rem; transform: translateY(-50%); background: transparent; border: 0; color: rgba(255,255,255,.45); display: grid; place-items: center; padding: .25rem; }
.am-eye-btn:hover { color: var(--neon); }
.am-eye-btn svg { width: 1.125rem; height: 1.125rem; }
.am-hint { font-size: .72rem; color: rgba(255,255,255,.4); line-height: 1.8; }
.am-submit { width: 100%; border-radius: .875rem; background: var(--neon); border: 0; padding: .9rem 1.25rem; font-size: .95rem; font-weight: 800; color: var(--ink); box-shadow: 0 10px 30px rgba(46,229,109,.35); transition: all .25s; }
.am-submit:hover { background: var(--neon-strong); box-shadow: 0 10px 40px rgba(46,229,109,.55); transform: translateY(-1px); }
.am-submit:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.am-msg { display: none; align-items: flex-start; gap: .625rem; border-radius: .875rem; padding: .8rem 1rem; font-size: .82rem; line-height: 1.8; border: 1px solid; }
.am-msg.is-visible { display: flex; }
.am-msg svg { width: 1.1rem; height: 1.1rem; flex-shrink: 0; margin-top: .2rem; }
.am-msg--error { background: rgba(255,176,32,.1); border-color: rgba(255,176,32,.4); color: #ffd27a; }
.am-msg--success { background: rgba(46,229,109,.1); border-color: rgba(46,229,109,.4); color: var(--neon-ice); }
.am-form-foot { text-align: center; font-size: .75rem; color: rgba(255,255,255,.4); }

/* ---------- admin panel ---------- */
.am-admin { padding: 2.5rem 0 5rem; }
.am-admin-gate { max-width: 26rem; margin-inline: auto; border-radius: 1.5rem; border: 1px solid rgba(46,229,109,.22); background: rgba(12,18,13,.85); padding: 2rem; }
.am-admin-title { font-size: 1.4rem; font-weight: 900; color: #fff; text-align: center; margin-bottom: .5rem; overflow-wrap: anywhere; }
.am-admin-sub { text-align: center; font-size: .82rem; color: rgba(255,255,255,.5); margin-bottom: 1.5rem; overflow-wrap: anywhere; }
/* v2.9.1 — the welcome head wraps on narrow phones; long display names
   must shrink inside their box, never push the خروج button off-screen */
.am-admin-head > div { min-width: 0; }
.am-admin-head .am-admin-title, .am-admin-head .am-admin-sub { text-align: right; }
.am-admin-panel { display: grid; gap: 1.5rem; }
/* v3.1.0 — ANTI-OVERFLOW GUARDS (the admin's panel screenshot): a grid
   item cannot shrink below its content's min-content width by default
   (min-width:auto), so ONE wide element (the source <select> with a long
   option, a long log line…) used to stretch the WHOLE admin card wider
   than the phone screen and everything clipped at the left edge.
   min-width:0 + max-width:100% make every card shrinkable again. */
.am-admin-panel > .am-admin-card { min-width: 0; max-width: 100%; }
.am-admin-card { border-radius: 1.5rem; border: 1px solid var(--line); background: rgba(12,18,13,.85); padding: 1.5rem; min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
@media (min-width: 640px) { .am-admin-card { padding: 1.75rem; } }
.am-admin-card-title { display: flex; align-items: center; gap: .625rem; font-size: 1.05rem; font-weight: 800; color: #fff; margin-bottom: 1.25rem; }
.am-admin-card-title svg { width: 1.25rem; height: 1.25rem; color: var(--neon); }
.am-admin-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; }
@media (min-width: 640px) { .am-admin-stats { grid-template-columns: repeat(4, 1fr); } }
.am-stat { border-radius: 1rem; border: 1px solid var(--line); background: var(--panel); padding: 1rem; text-align: center; }
.am-stat-value { font-size: 1.5rem; font-weight: 900; color: var(--neon); }
.am-stat-label { font-size: .72rem; color: rgba(255,255,255,.5); margin-top: .25rem; }
.am-scan-row { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin-bottom: 1rem; min-width: 0; }
.am-scan-select { border-radius: .875rem; border: 1px solid var(--line-strong); background: rgba(0,0,0,.4); color: #fff; padding: .7rem 1rem; font-size: .85rem; outline: 0; max-width: 100%; min-width: 0; text-overflow: ellipsis; }
/* the source select must be able to shrink below its longest option —
   the root cause of the panel overflow on phones (v3.1.0) */
select.am-scan-select { flex: 1 1 12rem; }
.am-scan-hint { margin: -.4rem 0 1rem; font-size: .72rem; line-height: 1.9; color: rgba(255,255,255,.45); overflow-wrap: anywhere; }
/* phone layout — every scan control gets a full row, nothing clips */
@media (max-width: 640px) {
  .am-scan-row { gap: .6rem; }
  .am-scan-row > .am-scan-select { flex: 1 1 100%; width: 100%; }
  .am-scan-row > input[type="number"] { flex: 1 1 7rem; width: 100%; min-width: 0; }
  .am-scan-row > .am-scan-check { flex: 1 1 100%; flex-wrap: wrap; }
  .am-scan-row > .am-btn-scan, .am-scan-row > .am-btn-ghost { flex: 1 1 100%; justify-content: center; }
}
.am-scan-select:focus { border-color: rgba(46,229,109,.6); }
.am-btn-scan { display: inline-flex; align-items: center; gap: .5rem; border-radius: .875rem; background: var(--neon); border: 0; padding: .7rem 1.5rem; font-size: .9rem; font-weight: 800; color: var(--ink); box-shadow: 0 8px 30px rgba(46,229,109,.35); transition: all .25s; }
.am-btn-scan:hover { background: var(--neon-strong); }
.am-btn-scan:disabled { opacity: .55; cursor: not-allowed; }
.am-btn-scan svg { width: 1.1rem; height: 1.1rem; }
.am-btn-ghost { display: inline-flex; align-items: center; gap: .5rem; border-radius: .875rem; border: 1px solid var(--line-strong); background: rgba(255,255,255,.03); padding: .7rem 1.25rem; font-size: .85rem; font-weight: 600; color: rgba(255,255,255,.75); transition: all .25s; }
.am-btn-ghost:hover { border-color: rgba(255,255,255,.32); color: #fff; background: rgba(255,255,255,.06); }
.am-progress-wrap { display: none; margin-top: 1.25rem; }
.am-progress-wrap.is-visible { display: block; }
.am-progress-head { display: flex; align-items: center; justify-content: space-between; font-size: .8rem; color: rgba(255,255,255,.65); margin-bottom: .5rem; }
.am-progress-bar { height: .75rem; border-radius: 999px; background: rgba(255,255,255,.08); overflow: hidden; border: 1px solid var(--line-strong); }
.am-progress-fill { height: 100%; width: 0%; border-radius: 999px; background: linear-gradient(90deg, var(--neon-deep), var(--neon)); box-shadow: 0 0 14px rgba(46,229,109,.6); transition: width .4s ease; }
.am-progress-meta { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin-top: .6rem; font-size: .72rem; color: rgba(255,255,255,.5); }
.am-progress-meta b { color: var(--neon); }
.am-scan-log { margin-top: 1rem; max-height: 14rem; overflow-y: auto; border-radius: 1rem; border: 1px solid var(--line); background: rgba(0,0,0,.45); padding: .75rem 1rem; font-size: .74rem; line-height: 1.9; color: rgba(255,255,255,.55); direction: rtl; min-width: 0; }
.am-scan-log div { overflow-wrap: anywhere; }
.am-scan-log div.is-err { color: #ffd27a; }
.am-scan-log div.is-ok { color: var(--neon-ice); }
.am-sources-list { display: flex; flex-direction: column; gap: .6rem; margin-top: 1rem; }
.am-source-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; border-radius: .875rem; border: 1px solid var(--line); background: var(--panel); padding: .7rem 1rem; font-size: .8rem; }
.am-source-name { direction: ltr; text-align: left; color: rgba(255,255,255,.85); font-weight: 600; }
.am-source-status { font-size: .72rem; }
.am-source-status.is-ok { color: var(--neon); }
.am-source-status.is-fail { color: #ffd27a; }
.am-source-status.is-idle { color: rgba(255,255,255,.4); }
.am-movies-table { width: 100%; border-collapse: collapse; font-size: .8rem; }
.am-movies-table th { text-align: right; color: rgba(255,255,255,.5); font-weight: 600; padding: .5rem .75rem; border-bottom: 1px solid var(--line-strong); }
.am-movies-table td { padding: .6rem .75rem; border-bottom: 1px solid var(--line); color: rgba(255,255,255,.8); }
.am-movies-table tr:hover td { background: rgba(46,229,109,.04); }

/* ---------- single movie ---------- */
/* grid children never push past their column (min-width: auto was the
   reason long titles blew up the layout on narrow phones) */
.am-single-grid > *, .am-vip-grid > *, .am-footer-grid > *, .am-archive-grid > * { min-width: 0; }
.am-archive { padding: 2rem 0 5rem; }
.am-archive-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: 1rem; }
@media (min-width: 640px) { .am-archive-grid { grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); } }
.am-archive-grid .am-card { width: auto; }
.am-single { padding: 1.5rem 0 5rem; }
.am-single-grid { display: grid; gap: 1.5rem; }
@media (min-width: 768px) { .am-single-grid { grid-template-columns: 16rem 1fr; gap: 2rem; } }
/* v2.9.6 — min-height safety net: even if a browser ignores aspect-ratio
   (or a stale cached CSS drops it), the poster box keeps a real height so
   the image/placeholder is never a collapsed 0px line. */
.am-single-poster { position: relative; aspect-ratio: 2/3; min-height: 17rem; border-radius: 1.25rem; overflow: hidden; border: 1px solid rgba(46,229,109,.3); box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.am-single-body h1 { font-size: 1.75rem; font-weight: 900; color: #fff; margin-bottom: .75rem; overflow-wrap: anywhere; }
.am-single-meta { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.25rem; }
.am-single-desc { color: rgba(255,255,255,.65); line-height: 2; margin-bottom: 1.5rem; font-size: .92rem; }
.am-dl-list { display: flex; flex-direction: column; gap: .6rem; }
.am-dl-item { display: flex; align-items: center; justify-content: space-between; gap: .75rem; border-radius: .875rem; border: 1px solid var(--line); background: var(--panel); padding: .8rem 1rem; transition: all .25s; }
.am-dl-item:hover { border-color: rgba(46,229,109,.4); background: var(--panel-2); }
.am-dl-quality { display: inline-flex; align-items: center; gap: .5rem; font-size: .85rem; font-weight: 700; color: #fff; }
.am-dl-quality svg { width: 1.1rem; height: 1.1rem; color: var(--neon); }
.am-dl-size { font-size: .72rem; color: rgba(255,255,255,.45); }
.am-dl-btn { display: inline-flex; align-items: center; gap: .4rem; border-radius: .75rem; background: rgba(46,229,109,.12); border: 1px solid rgba(46,229,109,.4); padding: .45rem 1rem; font-size: .8rem; font-weight: 700; color: var(--neon); transition: all .25s; }
.am-dl-btn:hover { background: var(--neon); color: var(--ink); }
.am-dl-btn svg { width: .9rem; height: .9rem; }

/* ---------- misc ---------- */
.am-skip { position: absolute; right: -9999px; }
.am-screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
body.am-no-scroll { overflow: hidden; }
/* Aylimovie main.css — small runtime additions (loaded after style.css) */

/* hide mobile-only span on desktop */
@media (min-width: 640px) {
        .am-hide-mobile { display: inline; }
}
@media (max-width: 639px) {
        .am-hide-mobile { display: none; }
}

/* search results / archive pagination list */
nav.pagination ul, .page-numbers {
        list-style: none;
        margin: 0;
}
nav.pagination { display: flex; justify-content: center; }
nav.pagination ul { display: flex; gap: .4rem; flex-wrap: wrap; }

/* single movie poster placeholder fill */
.am-single-poster .am-poster-ph { width: 100%; height: 100%; }

/* wp-admin-bar is removed theme-side; extra safety when logged in */
body.admin-bar #wpadminbar { display: none !important; }
body.admin-bar { padding-top: 0 !important; }

/* card link resets */
.am-card-link { display: block; }

/* membership panel on very small screens */
@media (max-width: 400px) {
        .am-membership-panel { padding: 1.25rem; }
        .am-hero-title { font-size: 2.5rem; }
}

/* admin gate icon centering */
.am-admin-gate { overflow: hidden; }

/* scan log scrollbar */
.am-scan-log::-webkit-scrollbar { width: 6px; }

/* =========================================================
   Branded download modal — AYLIMOVIE watermark on downloads
   ========================================================= */
.am-dl-modal { position: fixed; inset: 0; z-index: 9999; display: none; }
.am-dl-modal.is-open { display: block; }
.am-dl-modal-bg { position: absolute; inset: 0; background: rgba(3, 8, 5, .82); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.am-dl-modal-card {
        position: relative; overflow: hidden;
        width: min(92vw, 420px); margin: 12vh auto 0;
        background: linear-gradient(160deg, #0b120d 0%, #060a08 100%);
        border: 1px solid rgba(46, 229, 109, .45);
        border-radius: 1.4rem;
        padding: 2rem 1.6rem 1.5rem;
        text-align: center;
        box-shadow: 0 0 0 1px rgba(0,0,0,.6), 0 24px 70px rgba(0,0,0,.65), 0 0 42px rgba(46,229,109,.16);
        animation: am-dl-pop .28s cubic-bezier(.2, .9, .3, 1.3);
}
@keyframes am-dl-pop { from { transform: translateY(14px) scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }

/* the watermark itself — our brand, big and diagonal behind the content */
.am-dl-wm {
        position: absolute; inset: 0;
        display: flex; align-items: center; justify-content: center;
        font-size: clamp(2.6rem, 11vw, 4.2rem);
        font-weight: 900; letter-spacing: .12em; white-space: nowrap;
        color: rgba(46, 229, 109, .07);
        transform: rotate(-18deg);
        pointer-events: none; user-select: none;
}

.am-dl-brand { position: relative; margin-bottom: 1.4rem; }
.am-dl-brand-name {
        display: block; font-size: 1.7rem; font-weight: 900; letter-spacing: .06em;
        color: #fff; direction: ltr;
}
.am-dl-brand-name i { font-style: normal; color: var(--neon, #2ee56d); }
.am-dl-brand-tag { display: block; margin-top: .25rem; font-size: .62rem; font-weight: 700; letter-spacing: .38em; color: rgba(46,229,109,.75); direction: ltr; }

.am-dl-modal-title { position: relative; font-size: 1.02rem; font-weight: 700; color: rgba(255,255,255,.92); margin: 0 0 .5rem; }
.am-dl-modal-title b { color: var(--neon, #2ee56d); }
.am-dl-modal-size { position: relative; font-size: .8rem; color: rgba(255,255,255,.55); min-height: 1.1rem; margin: 0 0 1.3rem; }

.am-dl-go {
        position: relative; display: inline-flex; align-items: center; gap: .5rem;
        padding: .8rem 2.2rem; border-radius: .9rem;
        background: var(--neon, #2ee56d); color: #04140a;
        font-weight: 800; font-size: .95rem;
        box-shadow: 0 8px 30px rgba(46,229,109,.35);
        transition: transform .2s, box-shadow .2s, opacity .2s;
}
.am-dl-go:hover { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(46,229,109,.5); }
.am-dl-go svg { width: 1.05rem; height: 1.05rem; }
.am-dl-go.is-busy { opacity: .55; pointer-events: none; }

/* v2.7: the old secondary «ذخیره با نام AYLIMOVIE» button is gone —
   the primary button IS the branded save-as now (one link only).
   v2.8: the red probe-error status box is gone too — the
   button reads just «Download» and fires instantly, the browser's
   own native UI is the only failure indicator left. */

.am-dl-close {
        position: relative; display: block; margin: .9rem auto 0;
        background: none; border: none; cursor: pointer;
        color: rgba(255,255,255,.45); font-size: .8rem; font-family: inherit;
}
.am-dl-close:hover { color: #fff; }

.am-dl-note { position: relative; margin: 1.1rem 0 0; font-size: .68rem; color: rgba(255,255,255,.38); }

/* =========================================================
   Download accordion — دوبله/زیرنویس → کیفیت → فصل → قسمت
   AvaMovie-style collapsible box, neon edition
   ========================================================= */
.am-dl-acc { display: flex; flex-direction: column; gap: .9rem; }
.am-dl-grp {
        border: 1px solid var(--line, rgba(255,255,255,.1));
        border-radius: 1.1rem;
        background: linear-gradient(165deg, rgba(255,255,255,.055) 0%, rgba(255,255,255,.025) 100%);
        overflow: hidden;
        transition: border-color .25s, box-shadow .25s;
}
.am-dl-grp.is-open, details.am-dl-grp[open] { border-color: rgba(46,229,109,.45); box-shadow: 0 10px 34px rgba(46,229,109,.09); }
.am-dl-grp--q { background: rgba(255,255,255,.02); border-radius: .95rem; }
.am-dl-grp--s { background: rgba(46,229,109,.05); border-radius: .85rem; }
/* v2.6: the head is a native <summary> — kill the disclosure triangle and
   make it behave exactly like the old button, flex row full-width */
summary.am-dl-grp-head {
        display: flex; align-items: center; gap: .75rem; width: 100%;
        padding: .9rem 1rem; background: none; border: 0; color: #fff;
        text-align: right; cursor: pointer; font-family: inherit;
        -webkit-tap-highlight-color: transparent;
        list-style: none; user-select: none; -webkit-user-select: none;
}
summary.am-dl-grp-head::-webkit-details-marker { display: none; }
summary.am-dl-grp-head::marker { content: ''; }
.am-dl-grp-head {
        display: flex; align-items: center; gap: .75rem; width: 100%;
        padding: .9rem 1rem; background: none; border: 0; color: #fff;
        text-align: right; cursor: pointer; font-family: inherit;
        -webkit-tap-highlight-color: transparent;
}
.am-dl-grp-head:hover { background: rgba(46,229,109,.06); }
.am-dl-grp-ico {
        display: inline-flex; width: 2.4rem; height: 2.4rem; flex-shrink: 0;
        align-items: center; justify-content: center; border-radius: .8rem;
        background: linear-gradient(150deg, rgba(46,229,109,.22), rgba(46,229,109,.08));
        border: 1px solid rgba(46,229,109,.4); color: var(--neon, #2ee56d);
        box-shadow: inset 0 0 18px rgba(46,229,109,.16);
}
.am-dl-grp-ico svg { width: 1.15rem; height: 1.15rem; }
.am-dl-grp-txt { flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: .15rem; min-width: 0; }
.am-dl-grp-txt b { font-size: .95rem; font-weight: 800; color: #fff; letter-spacing: -.01em; }
.am-dl-grp-txt small { font-size: .66rem; color: rgba(255,255,255,.45); }
.am-dl-grp-badge {
        font-size: .64rem; font-weight: 700; color: var(--neon, #2ee56d); white-space: nowrap;
        background: rgba(46,229,109,.1); border: 1px solid rgba(46,229,109,.28);
        padding: .26rem .65rem; border-radius: 999px;
}
/* quality headers read like spec chips: LTR mono, neon */
.am-dl-grp--q > .am-dl-grp-head .am-dl-grp-txt b {
        direction: ltr; font-size: .85rem; color: var(--neon, #2ee56d);
        font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
        letter-spacing: .02em;
}
/* season headers get a subtle neon tick */
.am-dl-grp--s > .am-dl-grp-head { padding: .7rem .85rem; }
.am-dl-grp--s > .am-dl-grp-head .am-dl-grp-txt b { font-size: .84rem; }
.am-dl-grp-chev { color: rgba(255,255,255,.4); display: inline-flex; transition: transform .28s, color .28s; }
.am-dl-grp-chev svg { width: 1.05rem; height: 1.05rem; }
details.am-dl-grp[open] > .am-dl-grp-head .am-dl-grp-chev { transform: rotate(-90deg); color: var(--neon, #2ee56d); }
/* open groups carry a glowing neon bar on the RTL edge — AvaMovie-style */
.am-dl-grp-head { position: relative; }
.am-dl-grp-head:active { background: rgba(46,229,109,.1); }
details.am-dl-grp[open] > .am-dl-grp-head::before {
        content: ''; position: absolute; inset-inline-start: 0; top: 14%; bottom: 14%;
        width: 3px; border-radius: 3px;
        background: var(--neon, #2ee56d);
        box-shadow: 0 0 12px rgba(46,229,109,.85);
}
/* v2.6: <details> hides its body natively when closed — no grid animation
   wrapper needed. The inner container just spaces the file rows. */
.am-dl-grp-inner { display: flex; flex-direction: column; gap: .5rem; padding: .15rem .8rem .85rem; }

/* one clickable file row (episode or whole movie) */
.am-dl-leaf {
        display: flex; align-items: center; justify-content: space-between; gap: .7rem;
        border-radius: .8rem; border: 1px solid var(--line, rgba(255,255,255,.1));
        background: var(--panel-2, rgba(255,255,255,.03)); padding: .6rem .85rem; transition: all .2s;
}
.am-dl-leaf:hover { border-color: rgba(46,229,109,.5); background: rgba(46,229,109,.06); box-shadow: 0 4px 18px rgba(46,229,109,.08); }
.am-dl-leaf-info { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; min-width: 0; }
.am-dl-leaf-name {
        display: inline-flex; align-items: center; gap: .4rem;
        font-size: .78rem; font-weight: 700; color: #fff; direction: ltr;
        overflow-wrap: anywhere; white-space: normal; word-break: break-all;
}
.am-dl-leaf-name svg { width: .85rem; height: .85rem; color: var(--neon, #2ee56d); flex-shrink: 0; }
.am-dl-leaf-ep {
        font-size: .66rem; font-weight: 700; color: var(--neon, #2ee56d);
        background: rgba(46,229,109,.12); border-radius: 999px; padding: .14rem .55rem;
}
.am-dl-leaf-size { font-size: .66rem; color: rgba(255,255,255,.42); }
@media (max-width: 480px) {
        .am-dl-leaf { flex-direction: column; align-items: stretch; }
        .am-dl-leaf .am-dl-btn { justify-content: center; }
}

/* =========================================================
   AYLIMOVIE download center — brand progress + history
   (our own «Downloads» screen instead of the browser's)
   ========================================================= */
.am-dl-center-tag {
        position: relative; display: inline-flex; align-items: center; gap: .45rem;
        margin: 0 auto .9rem; padding: .32rem 1rem; border-radius: 999px;
        font-size: .74rem; font-weight: 800; color: var(--neon, #2ee56d);
        background: rgba(46,229,109,.1); border: 1px solid rgba(46,229,109,.32);
}
.am-dl-prog { position: relative; margin: 0 0 1rem; }
.am-dl-prog[hidden], .am-dl-hist-wrap[hidden] { display: none !important; }
.am-dl-prog-bar { height: .5rem; border-radius: 999px; background: rgba(255,255,255,.08); overflow: hidden; }
.am-dl-prog-bar i {
        display: block; height: 100%; width: 0; border-radius: 999px;
        background: linear-gradient(90deg, #0e8f3e, #2ee56d, #a4ffc9);
        box-shadow: 0 0 14px rgba(46,229,109,.65); transition: width .25s;
}
.am-dl-prog-pct { display: block; margin-top: .45rem; font-size: .74rem; font-weight: 700; color: var(--neon, #2ee56d); }
/* v3.2.0 — live download progress states
   wait  = indeterminate stripe («در حال آماده‌سازی لینک…» — the server is
           self-healing; the visitor SEES it working, not frozen)
   done  = full neon bar
   err   = neutral amber bar + amber status — still NO red anywhere */
.am-dl-status { position: relative; font-size: .76rem; line-height: 1.9; color: rgba(255,255,255,.68); margin-bottom: .5rem; min-height: 1.15rem; overflow-wrap: anywhere; }
.am-dl-prog-foot { position: relative; display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-top: .45rem; }
.am-dl-prog-foot .am-dl-prog-pct { margin-top: 0; }
.am-dl-prog.is-wait .am-dl-prog-bar i { width: 38%; animation: am-dl-indet 1.15s ease-in-out infinite; }
.am-dl-prog.is-done .am-dl-prog-bar i { background: linear-gradient(90deg, #0e8f3e, #2ee56d, #a4ffc9); }
.am-dl-prog.is-done .am-dl-status { color: #a4ffc9; }
.am-dl-prog.is-err .am-dl-prog-bar i { width: 100%; background: rgba(255,176,32,.5); box-shadow: none; animation: none; }
.am-dl-prog.is-err .am-dl-status { color: #ffb020; }
@keyframes am-dl-indet { 0% { margin-inline-start: -38%; } 100% { margin-inline-start: 100%; } }
.am-dl-fb { font-size: .72rem; color: rgba(255,255,255,.55); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.am-dl-fb:hover { color: var(--neon, #2ee56d); }
/* v3.6.0 — rescue chain buttons: branded direct fetch + labeled emergency */
.am-dl-prog-foot { flex-wrap: wrap; }
.am-dl-fb.am-dl-em { color: #ffb020; }
.am-dl-hist-wrap {
        position: relative; margin-top: 1.1rem; text-align: right;
        border-top: 1px dashed rgba(255,255,255,.12); padding-top: .8rem;
}
.am-dl-hist-head {
        display: flex; align-items: center; justify-content: space-between;
        margin-bottom: .5rem; font-size: .72rem; color: rgba(255,255,255,.55);
}
.am-dl-hist-head button {
        background: none; border: none; cursor: pointer;
        /* v2.9: the RED «پاک کردن» is gone — every control in the download
           center is neon/neutral now, no red anywhere */
        color: rgba(255,255,255,.55); font-size: .68rem; font-family: inherit;
}
.am-dl-hist-head button:hover { color: var(--neon, #2ee56d); }
.am-dl-hist {
        list-style: none; margin: 0; padding: 0; max-height: 8.5rem; overflow-y: auto;
        display: flex; flex-direction: column; gap: .35rem;
}
.am-dl-hist li {
        display: flex; align-items: center; justify-content: space-between; gap: .5rem;
        font-size: .68rem; border-radius: .55rem; padding: .35rem .6rem;
        background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.07);
}
.am-dl-hist-name { color: rgba(255,255,255,.8); direction: ltr; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 62%; }
.am-dl-hist-meta { color: rgba(255,255,255,.4); white-space: nowrap; }

/* =========================================================
   v2.9.3 — small-window / small-screen safety net
   «سایتو کوچیک میکنم اینطوری میشه»: nothing — a long Latin filename,
   a wide admin table, a monospace quality chip — may ever push the
   page wider than the window. Everything below clamps INSIDE the
   viewport so the browser never has to shrink the whole site.
   ========================================================= */
.am-site-main, .am-single-body, .am-section, .am-admin-panel, .am-hero-box { min-width: 0; max-width: 100%; }
.am-single-body h1, .am-card-title, .am-topweek-title, .am-dl-leaf-name, .am-dl-grp-txt b { max-width: 100%; }
/* quality chips are LTR mono inside an RTL flex row — they must shrink
   with ellipsis instead of stretching the row */
.am-dl-grp--q > .am-dl-grp-head .am-dl-grp-txt b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* admin panel movies table: scroll inside its wrapper, never widen the page */
.am-movies-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
@media (max-width: 767px) {
  .am-movies-table { min-width: 34rem; }
}
/* generic media clamp: no poster/iframe can exceed its container */
img, iframe, video { max-width: 100%; }
pre, code, kbd { overflow-wrap: anywhere; max-width: 100%; }


/* =========================================================
   v2.9.4 — SMALL-SCREEN / ZOOMED-OUT HARDENING, ROUND 2
   «سایتو کوچیک میکنم اینطوری میشه اینم درسته» — the v2.9.3 net
   stopped content from widening the page; this round pins the
   big blocks themselves at phone widths so every screen from
   320px up renders the same composed layout, never a broken one.
   ========================================================= */
@media (max-width: 480px) {
  /* v4.1.0 — the poster fills the phone screen; only the text sizes shrink */
  .am-hero { height: 30rem; height: min(92svh, 30rem); }
  .am-hero-title { font-size: 1.7rem; }
  .am-hero-tagline { font-size: .85rem; }
  .am-hero-kicker { font-size: .85rem; }
  .am-btn-play, .am-btn-info { padding: .7rem 1.1rem; font-size: .85rem; }
  .am-hero-controls-inner { gap: .6rem; }
  .am-single-grid { gap: 1.1rem; }
  .am-single-poster { max-width: 20rem; margin-inline: auto; }
  .am-single-body h1 { font-size: 1.35rem; }
  .am-single-desc { font-size: .85rem; }
  .am-section-title { font-size: 1.02rem; }
  .am-section-bar { height: 1.4rem; }
  .am-dl-modal-card { width: min(94vw, 24rem); padding: 1.5rem 1.1rem 1.2rem; margin-top: 9vh; }
  .am-dl-brand-name { font-size: 1.3rem; }
  summary.am-dl-grp-head { padding: .75rem .7rem; gap: .55rem; }
  .am-dl-grp-ico { width: 2rem; height: 2rem; }
  .am-dl-leaf { flex-wrap: wrap; }
  .am-archive-grid { grid-template-columns: repeat(auto-fill, minmax(8.2rem, 1fr)); gap: .75rem; }
  .am-row-scroll { gap: .7rem; }
  .am-card { width: 8.6rem; }
}
@media (max-width: 360px) {
  .am-hero-title { font-size: 1.45rem; }
  .am-archive-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .am-card { width: auto; }
  .am-card-badge-quality { font-size: 9px; }
}

/* ============================================================
   v4.4.0 — membership CTA in the header + quick access in the
   admin panel («پنل عضویت توی سه نقطه بود» — direct buttons now)
   ============================================================ */
.am-member-cta {
  display: inline-flex; align-items: center; gap: .4rem; height: 2.5rem; padding: 0 .9rem;
  border-radius: 999px; border: 1px solid rgba(46, 229, 109, .45);
  background: rgba(46, 229, 109, .12); color: var(--neon);
  font-size: .8rem; font-weight: 700; text-decoration: none;
  box-shadow: 0 0 14px rgba(46, 229, 109, .18); transition: all .25s;
}
.am-member-cta:hover { background: rgba(46, 229, 109, .22); box-shadow: 0 0 22px rgba(46, 229, 109, .35); color: var(--neon-ice); }
.am-member-cta svg { width: 1rem; height: 1rem; }
@media (max-width: 480px) { .am-member-cta { padding: 0 .65rem; font-size: .74rem; gap: .3rem; } }

.am-admin-quick { margin-bottom: 1.25rem; }
.am-admin-quick-row { display: flex; flex-wrap: wrap; gap: .6rem; }
.am-admin-quick-btn {
  display: inline-flex; align-items: center; gap: .5rem; padding: .7rem 1.1rem;
  border-radius: .9rem; border: 1px solid var(--line-strong); background: rgba(0, 0, 0, .35);
  color: rgba(255, 255, 255, .88); font-size: .82rem; font-weight: 600; text-decoration: none;
  transition: all .25s; min-width: 0;
}
.am-admin-quick-btn svg { width: 1rem; height: 1rem; color: var(--neon); flex: none; }
.am-admin-quick-btn:hover { border-color: rgba(46, 229, 109, .55); background: rgba(46, 229, 109, .1); color: #fff; }
.am-admin-quick-btn span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
