  :root{
    /* Tokens (اگر از قبل در base تعریف شده، همان‌ها استفاده می‌شوند) */
    --bg: linear-gradient(135deg,#0a0e1a 0%,#1a1f2e 50%,#0f1419 100%);
    --card-bg: linear-gradient(145deg,#121826 0%,#171d2b 50%,#0d1117 100%);
    --ink:#e6edf3; --ink-strong:#f8fbff; --muted:#95a1b3;
    --accent-primary: linear-gradient(135deg,#58a6ff 0%,#1f6feb 100%);
    --accent-secondary: linear-gradient(135deg,#39d353 0%,#238636 100%);
    --accent-tertiary: linear-gradient(135deg,#ffa657 0%,#e85d04 100%);
    --accent-primary-solid:#58a6ff; --accent-tertiary-solid:#ffa657;
    --hover-bg: rgba(240,246,252,.08);
    --active-bg: rgba(240,246,252,.12);
    --border: rgba(240,246,252,.14);
    --border-hover: rgba(88,166,255,.38);
    --glass: rgba(240,246,252,.05);
    --glass-border: rgba(240,246,252,.1);
    --shadow-md: 0 8px 32px rgba(0,0,0,.5);
    --shadow-lg: 0 16px 64px rgba(0,0,0,.6);
    --shadow-glow: 0 0 40px rgba(88,166,255,.15);
    --radius-lg:16px; --radius-xl:24px; --radius-pill:999px;
    --space-md:1rem; --space-lg:1.5rem; --space-xl:2rem; --space-2xl:3rem;
    --container-max:1200px; --container-padding:clamp(1rem,3vw,2rem);
    --text-base:clamp(1rem,1.4vw,1.125rem); --text-xl:clamp(1.25rem,2.2vw,1.5rem); --text-3xl:clamp(2rem,4vw,2.5rem); --text-5xl:clamp(3.5rem,6vw,4.5rem);
  }
  #adv-yts{ position:relative; }
  #adv-yts .page-bg{ position:fixed; inset:0; z-index:-1; background:var(--bg); }
  #adv-yts .container{ max-width:var(--container-max); margin:0 auto; padding:0 var(--container-padding); }
  #adv-yts .section{ padding:clamp(3rem,6vw,5rem) 0; }

  /* Headings / helpers */
  #adv-yts .h1{ font-size:var(--text-5xl); font-weight:900; color:var(--ink-strong); letter-spacing:-.02em; line-height:1.1; }
  #adv-yts .lead{ font-size:var(--text-xl); color:var(--muted); line-height:1.6; }
  #adv-yts .tag{ display:inline-flex; align-items:center; gap:.5rem; padding:.5rem 1rem; background:var(--accent-primary); color:#000; font-weight:800; border-radius:var(--radius-pill); }

  /* Buttons */
  #adv-yts .btn{ display:inline-flex; align-items:center; gap:.5rem; font-weight:800; border-radius:16px; border:1px solid transparent; padding:0.9rem 1.1rem; cursor:pointer; transition:.25s; text-decoration:none; }
  #adv-yts .btn-primary{ background:var(--accent-primary); color:#000; box-shadow:var(--shadow-md); border-color:rgba(88,166,255,.25); }
  #adv-yts .btn-ghost{ background:var(--hover-bg); border:1px solid var(--border); color:#fff; }
  #adv-yts .btn-primary:hover{ transform:translateY(-2px) scale(1.02); box-shadow:var(--shadow-lg); }
  #adv-yts .btn-ghost:hover{ background:var(--active-bg); border-color:var(--border-hover); }

  /* Cards */
  #adv-yts .card{ background:var(--card-bg); border:1px solid var(--border); border-radius:var(--radius-lg); box-shadow:var(--shadow-md); overflow:hidden; }

  /* Breadcrumb */
  #adv-yts .breadcrumb{ font-size:.95rem; color:var(--muted); margin:1rem 0 0.75rem; }
  #adv-yts .breadcrumb a{ color:var(--ink); text-decoration:underline; text-underline-offset:2px; }

  /* === Ad (exactly like Home) === */
  #adv-yts .ad-wrap{ border:1px solid var(--border); border-radius:var(--radius-xl); overflow:hidden; background:var(--card-bg); box-shadow:var(--shadow-lg); transition:.35s; }
  #adv-yts .ad-wrap:hover{ transform:scale(1.02); border-color:var(--border-hover); box-shadow:var(--shadow-lg); }
  #adv-yts .ad-grid{ display:grid; grid-template-columns:1fr; }
  @media (min-width:1024px){ #adv-yts .ad-grid{ grid-template-columns:.9fr 1.1fr; } }
  #adv-yts .ad-media{ min-height:300px; background:linear-gradient(135deg,#0a0e1a,#1a1f2e); position:relative; }
  #adv-yts .ad-media img{ width:100%; height:100%; object-fit:cover; display:block; }
  #adv-yts .ad-badge{ position:absolute; top:1rem; left:1rem; background:var(--accent-tertiary); color:#000; font-weight:800; padding:.6rem 1rem; border-radius:16px; }
  #adv-yts .ad-body{ padding:var(--space-xl); backdrop-filter:blur(16px); background:var(--glass); border-left:1px solid var(--glass-border); }
  #adv-yts .ad-title{ color:var(--ink-strong); font-size:1.6rem; font-weight:800; margin:0 0 .5rem; }
  #adv-yts .ad-desc{ color:var(--muted); line-height:1.65; margin:.25rem 0 1rem; }
  #adv-yts .ad-cta{ width:100%; text-align:center; }

  /* Hero */
  #adv-yts .hero{ position:relative; border-top:1px solid var(--border); border-bottom:1px solid var(--border); background:linear-gradient(135deg, rgba(88,166,255,.05), transparent); }
  #adv-yts .hero-grid{ display:grid; gap:clamp(1.5rem,3vw,2rem); grid-template-columns:1fr; align-items:center; }
  @media (min-width:1024px){ #adv-yts .hero-grid{ grid-template-columns:1.2fr .8fr; } }

  /* Search form */
  #adv-yts .search{ padding:var(--space-xl); }
  #adv-yts .search-row{ display:flex; gap:.75rem; flex-wrap:wrap; align-items:center; }
  /* #adv-yts .search-input{ flex:1; min-width:240px; height:56px; border-radius:16px; border:1px solid var(--border); background:#0f172a; color:#fff; padding:0 1rem; font-size:1.05rem; } */
  /* XL title (query) field — بلندتر و درشت‌تر */
  #adv-form .search-input--xl{
    width: 100%;
    height: 72px;           /* بلندتر */
    font-size: 1.25rem;     /* درشت‌تر */
    padding: 0 1.25rem;     /* تنفس بیشتر */
    border-radius: 20px;    /* گوشه‌های نرم‌تر */
  }
  /* روی دسکتاپ حتی کمی بلندتر/درشت‌تر */
  @media (min-width: 992px){
    #adv-form .search-input--xl{
      height: 80px;
      font-size: 1.35rem;
    }
  }
  #adv-yts .filters{ display:grid; gap:.75rem; grid-template-columns:1fr; margin-top:1rem; }
  @media (min-width:680px){ #adv-yts .filters{ grid-template-columns:repeat(2,1fr); } }
  @media (min-width:1024px){ #adv-yts .filters{ grid-template-columns:repeat(4,1fr); } }
  #adv-yts .select{ width:100%; height:56px; border-radius:16px; border:1px solid var(--border); background:#0f172a; color:#fff; padding:0 1rem; font-size:1.02rem; }

  /* Autocomplete dropdown (با پس‌زمینهٔ مستقل تا با بگراند قاطی نشه) */
  #adv-yts .ac-list{ position:absolute; z-index:50; background:#0b1220; border:1px solid #23355e; border-radius:12px; box-shadow:var(--shadow-lg); display:none; max-height:320px; overflow:auto; width:100%; }
  #adv-yts .ac-item{ padding:.65rem .9rem; cursor:pointer; color:#e6edf3; }
  #adv-yts .ac-item:hover{ background:#122042; }

  /* Results */
  #adv-yts .results-h{ display:flex; align-items:flex-end; justify-content:space-between; gap:.75rem; flex-wrap:wrap; margin-bottom:.75rem; }
  #adv-yts .grid{ display:grid; gap:1rem; }
  #adv-yts .results-grid{ grid-template-columns:1fr; }
  @media (min-width:680px){ #adv-yts .results-grid{ grid-template-columns:repeat(2,1fr); } }
  @media (min-width:1024px){ #adv-yts .results-grid{ grid-template-columns:repeat(3,1fr); } }
  #adv-yts .res-thumb{ position:relative; aspect-ratio:16/9; background:#0b1328; overflow:hidden; }
  #adv-yts .res-thumb img{ width:100%; height:100%; object-fit:cover; display:block; }
  #adv-yts .res-body{ padding:1rem 1rem 1.15rem; }
  #adv-yts .res-title{ color:#fff; font-weight:900; margin:.6rem 0 .35rem; line-height:1.35; }
  #adv-yts .badge{ display:inline-flex; align-items:center; gap:.35rem; padding:.35rem .6rem; border-radius:999px; border:1px solid rgba(125,184,255,.35); background:#0e172a; color:#dbe7ff; font-weight:700; font-size:.94rem; }
  #adv-yts .muted{ color:var(--muted); font-size:.95rem; }

  /* Reveal */
  #adv-yts .reveal{ opacity:0; transform:translateY(24px); transition:.5s cubic-bezier(.4,0,.2,1); }
  #adv-yts .reveal.in{ opacity:1; transform:none; }

  /* ——— Paragraph readability fix (high contrast on dark bg) ——— */
.section p,
.card p,
.modal-content p,
.seo-block p,
.related-keywords p,
p.m,
.m,
.seo-text {
  color: var(--ink-strong) !important;   /* bright readable text */
  line-height: 1.75;
}

/* Keep subtle/meta bits muted without hurting contrast elsewhere */
.thumb-meta, .muted, .badge, .small {
  color: var(--muted) !important;
}

/* Make links readable in paragraphs */
.section p a, .card p a, .seo-text a {
  color: var(--accent-primary-solid);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.section p a:hover, .card p a:hover, .seo-text a:hover {
  text-decoration-thickness: 2px;
}
  /* فقط کارت‌های وضعیتِ مستقیمِ داخل container در بخش نتایج */
  #results-section .container > .card.reveal{
    color:#fff !important;                    /* متن سفید */
    background: rgba(9,15,27,.86);            /* پس‌زمینه کمی تیره‌تر برای کنتراست */
    border-color: rgba(88,166,255,.35) !important;
  }
  #results-section .container > .card.reveal strong{
    color:#fff !important;                    /* کلمه "Error:" هم سفید بماند */
  }
  #results-section .container > .card.reveal a{
    color:#dbe7ff !important;                 /* لینک‌های داخل پیام */
    text-decoration: underline;
  }
@media (max-width: 768px){
  .ad-wrap, .card { transform: translateZ(0); backface-visibility: hidden; }
}

/* ==== black scrollbar track (no bg change) ==== */
/* Firefox */
html { scrollbar-color: rgba(255,255,255,.35) #000; }  /* thumb, track */

/* WebKit (Chrome/Edge/Safari) */
:root::-webkit-scrollbar { width: 10px; height: 10px; }
:root::-webkit-scrollbar-track { background: #000; }   /* ترک مشکی */
:root::-webkit-scrollbar-thumb {
  background-color: rgba(255,255,255,.35);
  border-radius: 999px;
  border: 2px solid #000;  /* حاشیه مشکی تا زیر شست هم سیاه بماند */
}
:root::-webkit-scrollbar-thumb:hover { background-color: rgba(255,255,255,.5); }

/* ==== fix: keep anti-jiggle on mobile, no white strip on desktop ==== */

/* دسکتاپ/ماوس‌دار: گاتر اضافه نکن (خط سفید از بین می‌رود) */
@media (hover: hover) and (pointer: fine){
  html { scrollbar-gutter: auto; }  /* override هر مقدار قبلی مثل both-edges */
}

/* موبایل/لمسی: برای حذف لِق، گاتر دوطرفه نگه دار */
@media (hover: none) and (pointer: coarse){
  html { scrollbar-gutter: stable both-edges; }
}

/* بقیه‌ی ضدّ لِق‌ها همان قبلی‌ها بمانند: */
html, body { overflow-x: hidden; }
#adv-yts .ad-wrap, #adv-yts .card { will-change: transform; contain: paint; }
@media (max-width: 768px){
  #adv-yts .ad-wrap:hover,
  #adv-yts .card:hover { transform: none !important; }
  #adv-yts .ad-grid, #adv-yts .hero, #adv-yts .section { overflow: hidden; }
}

