 
/* ---------- شبیه‌سازی کارت ویدیو (مطابق نمونه ارسالی) ---------- */
.grid-item {
  display: flex;
  flex-direction: column;
  width: 100%;
  position: relative;
  cursor: pointer;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
  transition: transform .2s ease, box-shadow .2s ease;
}

.grid-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, .1);
}

/* پوستر ویدیو */
.grid-item .poster {
  position: relative;
  line-height: 0;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
  background: #f2f2f2;
}
.grid-item .poster img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px 16px 0 0;
}

/* مدت زمان */
.grid-item .meta-data {
  position: absolute;
  left: 6px;
  bottom: 6px;
  background: rgba(0, 0, 0, .75);
  color: #fff;
  font-size: 12px;
  padding: 3px 6px;
  border-radius: 4px;
  pointer-events: none;
}

/* --- بخش متنی --- */
.grid-item .thumb-content {
  padding: 10px 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.grid-item .title {
  font-size: 14px;
  font-weight: 500;
  color: #111;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}
.grid-item .channel-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
}
.grid-item .channel-wrapper img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

.grid-item .meta-data-bottom {
  font-size: 12px;
  color: #606060;
  display: flex;
  align-items: center;
  gap: 4px;
}

.channel-wrapper {
  display: flex;
  align-items: center;
  gap: .5rem;
}
.channel-wrapper img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;      /* جلوی کوچک شدن تصویر را می‌گیرد */
}
.channel-wrapper .label-text {
  font-size: 13px;
  color: #606060;
}

    body {transition: opacity ease-in 0.2s;}
    body[unresolved] {opacity: 0; display: block; overflow: hidden; position: relative;}

    /* تم دارک */
    html.dark { filter: invert(1) hue-rotate(180deg); }
    html.dark img { filter: invert(1) hue-rotate(180deg); }

    /* منوی موبایل */
    aside.sc-bar { transform: translateX(100%); transition:.3s; }
    aside.sc-bar.open { transform: translateX(0); }

    /* کشویی دسته‌بندی‌ها */
    .cat-wrapper {max-height:0;overflow:hidden;transition:max-height .3s ease;}
    .cat-wrapper.show {max-height:500px}

    /* شکل دکمه‌ها */
    .tm, .tt {cursor:pointer;font-size:1.4rem;padding:.4rem;border-radius:4px}

    /* اسکرول افقی تب‌ها */
    .tab-list-container { position:relative; overflow-x:auto; white-space:nowrap; scroll-behavior:smooth; }
    .jc-left, .jc-right { position:absolute; top:50%; transform:translateY(-50%); z-index:2; cursor:pointer; background:#fff; border-radius:50%; box-shadow:0 0 4px rgba(0,0,0,.2); padding:.2rem; width:30px; height:30px; display:flex; align-items:center; justify-content:center; font-size:20px; user-select:none; }
    .jc-left  { left:.2rem; }
    .jc-right { right:.2rem; }

    /* ---------- افزایش خودکار ارتفاع منوی کناری ---------- */
    aside.sc-bar {
      min-height: 100vh;          /* اگر صفحه کوتاه بود scroll نیاید */
      height: auto !important;    /* اجازه بده JS اندازه را محاسبه کند */
      transition: height .35s ease;
      overflow: hidden;
    }
    
    /* آیکون دسته‌بندی‌ها (در صورت تمایل SVG جایگزین کنید) */
    aside.sc-bar .sub-menu li a {
      display: flex;
      align-items: center;
      gap: .6rem;                 /* فاصله آیکون تا متن */
      padding: .5rem .8rem;
      color: #333;
      text-decoration: none;
    }
    aside.sc-bar .sub-menu li a:hover {
      background: #f2f2f2;
    }
    
    /* اگر بخواهید آیکون SVG کنار نام باشد (SVG را داخل span.icon بگذارید) */
    aside.sc-bar .sub-menu li a .icon {
      width: 20px;
      height: 20px;
      flex-shrink: 0;
    }

    #trend-cat-list li.active-item{
        border-color:#f4aa10 !important;
        color:#f4aa10 !important;
        font-weight:700;
    }
    
    /* زیرمنوی کشویی */
    .sub-menu {
      max-height: 0;
      overflow: hidden;
      transition: max-height .3s ease;
      list-style: none;
      padding-right: 1rem;
      margin: 0;
    }
    .sub-menu.show { max-height: 500px; }
    .sub-menu li a {
      display: block;
      padding: .4rem .8rem;
      color: #333;
      text-decoration: none;
    }
    .sub-menu li a:hover { background: #f2f2f2; }

    /* استایل‌های تب ترند */
    .tablist li[data-v-7892b040]{border:1px solid #d9d4d4;color:#7a7777;cursor:pointer;display:inline-block;font-size:14px;margin-right:10px;padding:6px 12px}
    .tablist li[data-v-7892b040]:first-child{margin-right:0}
    li.active-item[data-v-7892b040]{border-color:#f4aa10 !important;color:#f4aa10 !important;font-weight:700}
    
    .grid-item {
      display: flex;
      flex-direction: column;
      background: #fff;
      border-radius: 8px;
      overflow: hidden;
      box-shadow: 0 1px 3px rgba(0,0,0,.08);
      transition: transform .2s;
    }
    .grid-item:hover { transform: translateY(-2px); }
    
    .thumb img { width: 100%; height: auto; display: block; }
    
    .meta-data {
      position: absolute;
      left: 4px;
      bottom: 4px;
      background: rgba(0,0,0,.7);
      color: #fff;
      font-size: 12px;
      padding: 2px 6px;
      border-radius: 4px;
    }
    
    .thumb { position: relative; line-height: 0; }
    
    .thumb-content { padding: .7rem; }
    
    .title {
      font-size: 14px;
      font-weight: 500;
      color: #111;
      margin: 0 0 .4rem;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }
    
    .channel-wrapper {
      display: flex;
      align-items: center;
      gap: .5rem;
      margin-bottom: .4rem;
    }
    .channel-wrapper img { width: 24px; height: 24px; border-radius: 50%; }
    
    .meta-data-bottom {
      font-size: 12px;
      color: #606060;
    }
    
    /* گرید اصلی */
    .vs-list {
      display: grid;
      gap: 1rem;
      grid-template-columns: repeat(1, 1fr);
    }
    @media (min-width: 576px) { .vs-list { grid-template-columns: repeat(2, 1fr); } }
    @media (min-width: 768px) { .vs-list { grid-template-columns: repeat(3, 1fr); } }
    @media (min-width: 992px) { .vs-list { grid-template-columns: repeat(4, 1fr); } }
    @media (min-width: 1200px) { .vs-list { grid-template-columns: repeat(5, 1fr); } }

.parent {
  display: flex;          /* فعال‌سازی Flexbox */
  justify-content: center; /* وسط‌چین افقی */
  align-items: center;     /* وسط‌چین عمودی */
  height: 100vh;           /* ارتفاع دلخواه (صفحه‌کامل) */
}
.parent img {
  max-width: 100%;         /* در صورت نیاز تصویر از والد بزرگ‌تر نشه */
  height: auto;
}



/* ---------- layout شبکه‌ای ---------- */
.grid-container {              /* والد باکس اصلی که JS داخلش چاپ می‌کند */
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  padding: 24px;
}

.grid-item {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  transition: transform .25s, box-shadow .25s;
}
.grid-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(0,0,0,.12);
}

/* ---------- پوستر / تصویر ---------- */
.poster {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;       /* 16:9 */
  background: #000;
  border-radius: 12px 12px 0 0;
  overflow: hidden;
}
.poster img {
  position: absolute;
  inset: 0;
  width: 100%;  height: 100%;
  object-fit: cover;
}

/* ---------- badge مدت زمان ---------- */
.meta-data {
  position: absolute;
  right: 8px;
  bottom: 8px;
}
.badge.duration {
  display: inline-flex;
  align-items: center;
  background: rgba(0,0,0,.75);
  color: #fff;
  font-size: 12px;
  padding: 4px 6px;
  border-radius: 4px;
}

/* ---------- بخش محتوا (عنوان + کانال + بازدید) ---------- */
.thumb-content {
  flex: 1;
  padding: 12px 16px 16px;
}
.details .title {
  font-size: 15px;
  font-weight: 500;
  color: #111;
  line-height: 1.4;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.details a {
  text-decoration: none;
  color: inherit;
}

/* ---------- کانال ---------- */
.channel-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
}
.channel img {
  width: 24px;  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}
.channel .label-text {
  font-size: 13px;
  color: #606060;
}

/* ---------- متای پایین (بازدید + زمان) ---------- */
.meta-data-bottom {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #909090;
}
.meta-item {
  white-space: nowrap;
}

/* ---------- واکنش‌گرایی ساده ---------- */
@media (max-width: 600px) {
  .grid-container {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
    padding: 16px;
  }
}