/* =========================
  Base variables & reset
  ========================= */
:root {
  --bg-day: #f1f4f9;
  --bg-night: #1a2026;
  --post-day: #ffffff;
  --post-night: #212a33;
  --btn-day: linear-gradient(
    90deg,
    hsla(191, 75%, 60%, 1) 0%,
    hsla(248, 87%, 36%, 1) 100%
  );
  --btn-night: #2185d5;
  --muted: #6b7280;
  --blur: 10px;
  --green: #2ecc71;
  --green-hover: #27ae60;
  --red: #e74c3c;
  --red-hover: #c0392b;
  --primary-bg: #512bd4;
  --promo-accent-color: #dcd5f6;
  --gradient-purple-magenta: linear-gradient(
    128.87deg,
    #512bd4 14.05%,
    #d600aa 89.3%
  );
}
:root {
  --post-day: linear-gradient(135deg, #fff, #fafafa); /* سفید → خاکستری ملایم */
  --post-night: linear-gradient(
    180deg,
    #212a33,
    #37424f
  ); /* آبی تیره → خاکستری آبی روشن‌تر */

  --btn-day: linear-gradient(
    135deg,
    #004a7c,
    #0091d5
  ); /* آبی نفتی → آبی فیروزه‌ای */
  --btn-night: linear-gradient(
    135deg,
    #2185d5,
    #0d47a1
  ); /* آبی روشن → آبی سرمه‌ای */

  --green: linear-gradient(
    135deg,
    #2ecc716e,
    #1e84495c
  ); /* سبز روشن → سبز تیره */
  --green-hover: linear-gradient(135deg, #27ae6091, #145a3294);

  --red: linear-gradient(135deg, #e74c3c, #922b21); /* قرمز روشن → قرمز شرابی */
  --red-hover: linear-gradient(135deg, #c0392b, #641e16);

  --primary-bg: linear-gradient(
    135deg,
    #512bd4,
    #8e44ad
  ); /* بنفش تیره → بنفش روشن‌تر */
  --promo-accent-color: linear-gradient(135deg, #dcd5f6, #ddd5f6);

  --gradient-purple-magenta: linear-gradient(
    128.87deg,
    #512bd4 14.05%,
    #d600aa 89.3%
  );
}
@font-face {
  font-family: "IRANSans";
  src: url("IRANSansWeb(FaNum)_Light.woff") format("woff");
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF; /* محدوده‌ی یونیکد فارسی/عربی */
}
/* فونت انگلیسی */
@font-face {
  font-family: "ProductSans";
  src: url("Product Sans Regular.ttf") format("opentype");
  unicode-range: U+0020-007F;
}
@font-face {
  font-family: "ProductSans2";
  src: url("Product Sans Bold.ttf") format("ttf");
  unicode-range: U+0020-007F;
}
* {
  font-family: "IRANSans", "ProductSans", sans-serif;
  font-size: 14px;
  font-weight: 400;
  /* Letter-spacing: -0.2px;s */
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: all ease-out 0.4s;
  scrollbar-width: none !important;
}
*,
:before,
:after {
  box-sizing: border-box;
}
Html {
  scroll-behavior: smooth;
}
Body {
  margin: 0;
  background: var(--bg-day);
  color: #222;
  transition: background 0.25s, color 0.25s;
  margin-top: 170px;
}
body.admin-body {
  margin-top: 120px;
}
A {
  color: inherit;
  text-decoration: none;
}
Img {
  max-width: 100%;
  height: auto;
}

/* dark */
Body.dark {
  background: var(--bg-night);
  color: #e6eef6;
}
/* -------------------
/* =========================
  Header (sticky + blur)
  ========================= */
.main-header {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  backdrop-filter: blur(var(--blur));
  background: rgba(255, 255, 255, 0.55);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 12000;
  transition: transform 0.3s ease;
}
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  gap: 5px;
  width: 100%;
  height: 60px;
}
Body.dark .main-header {
  background: rgba(30, 36, 40, 0.6);
}
.search-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px;
  flex: 1;
  width: 50%;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.1);
  min-height: 54px;
  box-shadow: rgba(0, 0, 0, 0.2);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.09);
  backdrop-filter: blur(6px);
  height: 50px;
  position: relative;
}
.themetogglle {
  width: 44px;
  height: 44px;
}
.search-bar input {
  border: 0;
  width: inherit;
  flex: 1;
  background: transparent;
  padding: 10px;
  font-size: 1rem;
  outline: none;
  color: inherit;
  height: 40px;
}
.menu-btn,
.icon-btn,
.icon-inside {
  height: 44px;
  width: 44px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0);
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}
Body.dark .menu-btn,
body.dark .icon-btn,
body.dark .icon-inside {
  background: rgba(80, 80, 80, 0);
}

/* overlay + side menu */
.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s;
}
.menu-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 130000;
}
.side-menu {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: fixed;
  left: 0;
  top: 0;
  height: 100%;
  width: 300px;
  max-width: 86vw;
  padding: 10px;
  scrollbar-width: none;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.92),
    rgba(255, 255, 255, 0.85)
  );
  backdrop-filter: blur(10px);
  box-shadow: 2px 0 12px rgba(0, 0, 0, 0.22);
  transform: translateX(-100%);
  transition: transform 0.28s;
  overflow: auto;
  overflow-x: hidden;
  z-index: 1300000;
}
.side-menu.active {
  transform: translateX(0);
}
Body.dark .side-menu {
  background: rgba(48, 56, 65, 0.95);
  color: #fff;
}
.genre-grid {
  display: flex;
  flex-wrap: wrap;
  row-gap: 3px;
  column-gap: 3px;
}

/* telegram link */
.telegram-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  background: rgba(0, 0, 0, 0.03);
  border-radius: 6px;
  margin-top: 12px;
}

/* =========================
  Container, grid, cards
  ========================= */
.container {
  max-width: 1100px;
  margin: 0px auto 18px auto;
  padding: 8px;
}
.movie-count {
  display: inline-block;
  font-weight: bold;
  padding: 12px 16px;
  font-size: 1.2rem;
  border-radius: 10px;
  background: rgba(0, 74, 124, 0.06);
  color: #0d47a1;
  line-height: 1.5;
  -webkit-text-fill-color: rgba(0, 0, 0, 0);
  background: var(--gradient-purple-magenta);
  background-clip: text;
  -webkit-background-clip: text;
}

/* --- SEO intro block --- */
.seo-intro {
  max-width: 1100px;
  margin: 12px auto 24px auto;
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.02);
  backdrop-filter: blur(6px);
  line-height: 1.7;
  font-size: 0.95rem;
}

body.dark .seo-intro {
  background: rgba(255, 255, 255, 0.03);
}

.seo-intro h1 {
  direction: rtl;
  font-size: 1.25rem;
  margin: 0 0 8px 0;
  font-weight: 700;
  text-align: center;
}

.seo-intro p {
  margin: 4px 0;
  direction: rtl;
  text-align: justify;
}

.seo-features-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
  padding: 10px 18px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  /* font-size: 0.9rem; */
  /* font-weight: bold; */
  background: var(--gradient-purple-magenta);
  color: #ffffff;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}
.seo-features-btn span {
  font-size: 1.1rem;
  font-weight: bold;
}

.seo-features-btn:hover {
  opacity: 0.95;
}

.seo-features-icon {
  font-size: 0.9rem;
}

/* --- end SEO intro --- */

.movies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}

/* movie card */
.movie-card {
  border-radius: 16px;
  background: var(--post-day);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  position: relative;
}
Body.dark .movie-card {
  background: var(--post-night);
  color: #e6eef6;
}
.cover-container {
  display: flex;
  justify-content: center;
  position: relative;
  height: 400px;
}
.cover-blur {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(20px);
}
.cover-image {
  position: relative;
  z-index: 1;
  border-radius: 15px;
  height: 100%;
  object-fit: contain;
  padding: 8px;
}
.movie-info {
  padding: 12px;
}
.field-label {
  display: block;
  margin-top: 6px;
  font-weight: 700;
  color: var(--muted);
}
Body.dark .field-label {
  color: #ddd;
}

/* quote style */
.field-quote {
  background: rgba(0, 74, 124, 0.06);
  border-left: 4px solid rgba(33, 133, 213, 0.9);
  border-radius: 6px;
  margin-bottom: 6px;
  color: #263345;
  padding: 6px 3px;
}
Body.dark .field-quote {
  background: rgba(255, 255, 255, 0.08);
  border-left: 4px solid rgba(33, 133, 213, 0.7);
  color: #e6eef6;
}
.synopsis-quote {
  position: relative;
  overflow: hidden;
}

/* synopsis toggle */
.quote-toggle-btn {
  position: absolute;
  bottom: 6px;
  right: 8px;
  background: rgba(33, 133, 213, 0.3);
  color: #fff;
  padding: 4px 8px;
  font-size: 0.8rem;
}

/* go btn */
.go-btn {
  background: var(--btn-day);
  color: #fff;
  font-size: 17px;
  font-weight: bolder;
  width: 100%;
  cursor: pointer;
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
Body.dark .go-btn {
  background: var(--btn-night);
}
.go-btn span,
.comment-send span {
  width: 100%;
  text-align: center;
  color: #fff;
}
/* =========================
  Comment summary & panel
  ========================= */
.comment-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  box-shadow: 4px rgba(0, 0, 0, 0.2);
  margin-top: 10px;
  padding: 8px;
  border-radius: 10px;
  background: rgba(0, 74, 124, 0.06);
  /* background:transparent; */
  cursor: pointer;
}
Body.dark .comment-summary {
  background: rgba(255, 255, 255, 0.08);
  color: #e6eef6;
}
Body.dark .comments-count {
  color: #e6eef6;
}
.avatars {
  display: flex;
  gap: 6px;
  align-items: center;
}
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  background: linear-gradient(135deg, #004a7c, #2185d5);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  font-size: 0.85rem;
}
Body.dark .avatar {
  background: linear-gradient(135deg, #2185d5, #004a7c);
}
.comments-count {
  flex: 1;
  padding-left: 8px;
  color: var(--muted);
  font-size: 0.95rem;
}
.enter-comments {
  background: transparent;
  border: 0;
  font-size: 18px;
  cursor: pointer;
  color: inherit;
}

/* comments panel inside card */
.movie-card {
  position: relative;
}
.comments-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 0;
  overflow: hidden;
  opacity: 0;
  transition: height 0.26s ease, opacity 0.18s ease;
  z-index: 40;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}
.comments-panel.open {
  height: 100%;
  opacity: 1;
}
.comments-panel-inner {
  width: 100%;
  display: flex;
  flex-direction: column;
  max-height: 100%;
  backdrop-filter: blur(9px);
  border-radius: 12px 12px 0 0;
  overflow: hidden;
}
.comments-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  background: rgba(255, 255, 255, 0.6);
}
Body.dark .comments-panel-header {
  background: rgba(30, 36, 40, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.comments-list {
  padding: 10px;
  overflow: auto;
  max-height: calc(100% - 140px);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.comment-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.comment-avatar {
  min-width: 36px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #004a7c, #2185d5);
  color: #fff;
  font-weight: 700;
}
.comment-body {
  flex: 1;
}
.comment-meta {
  font-size: 0.85rem;
  margin-bottom: 4px;
}
.comment-text-content {
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(232, 241, 245, 0.9);
  color: #222;
}
Body.dark .comment-text-content {
  background: rgba(58, 71, 80, 0.9);
  color: #e6eef6;
}

/* comment input row */
.comment-input-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
  align-items: stretch;
  padding: 10px;
  border-top: 1px solid rgba(0, 0, 0, 0.04);
  background: rgba(255, 255, 255, 0.45);
}
Body.dark .comment-input-row {
  background: rgba(30, 36, 40, 0.45);
}
.comment-input-row .comment-name {
  width: 140px;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid #ccc;
  width: 80%;
}
.comment-input-row .comment-text {
  flex: 1;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid #ccc;
  resize: vertical;
}
.comment-input-row .comment-send {
  background: var(--btn-day);
  color: #fff;
  width: 100%;
}

.button-wrap span {
  text-align: center;
  width: 100%;
}
Body.dark .comment-input-row .comment-send {
  background: var(--btn-day);
  color: #fff;
}
/* =========================
  Messages (admin bubbles)
  ========================= */
.messages-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}
.message-bubble {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--promo-accent-color);
  color: #141414;
  line-height: 1.5;
}
Body.dark .message-bubble {
  background: rgba(255, 255, 255, 0.08);
  color: #e6eef6;
}
.message-bubble .msg-close {
  text-align: center;
  align-items: center;
  background: var(--primary-bg);
  font-size: 15px;
  font-weight: 500;
  color: #fff;
}

/* =========================
  Admin page elements (forms, lists)
  ========================= */
.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  backdrop-filter: blur(var(--blur));
  background: rgba(255, 255, 255, 0.6);
  position: sticky;
  top: 0;
  z-index: 140;
}
Body.dark .admin-header {
  background: rgba(30, 36, 40, 0.6);
}
#adminProfile {
  max-width: 800px;
  margin: 30px auto;
  padding: 10px;
  border-radius: 16px;
}
#adminProfile input,
#adminProfile textarea {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: 0;
  /* background: #f9f9f9; */
  background: var(--bg-day);
  color: var(--btn-day);
}
Body.dark #adminProfile input,
Body.dark #adminProfile textarea {
  background: rgba(255, 255, 255, 0.08);
  color: #e6eef6;
}

.movie-list,
.message-list {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.movie-item,
.message-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px;
  border-radius: 12px;
  background: var(--post-day);
}
Body.dark .movie-item,
body.dark .message-item {
  background: var(--post-night);
}
.movie-cover {
  width: 60px;
  border-radius: 6px;
  height: 80px;
  object-fit: cover;
}
.admin-search-wraper {
  margin: 3rem 0 1rem 0;
}
.movie-actions,
.message-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.movie-actions .btn-edit,
.message-actions .btn-edit {
  width: 100%;
}
.movie-actions .btn-edit span,
.message-actions .btn-edit span {
  color: #228302;
  font-weight: bold;
  width: 100%;
}
.movie-actions .btn-delete span,
.message-actions .btn-delete span {
  color: red;
  font-weight: bold;
  cursor: pointer;
  width: 100%;
}
.movie-actions .btn-delete span,
.movie-actions .btn-edit span,
.message-actions .btn-delete span,
.message-actions .btn-edit span,
.btn-edit span,
.btn-approve span {
  padding: 8px;
}
/* =========================
  Pagination (bubbles)
  ========================= */
.pagination-container {
  display: flex;
  gap: 5px;
  justify-content: center;
  align-items: center;
  padding: 18px 8px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.page-bubble {
  min-width: 30px;
  height: 30px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.06);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  font-weight: 600;
  padding: 2px;
}
.page-bubble:hover {
  transform: scale(1.1);
}
.page-bubble.active {
  background: var(--btn-day);
  color: #fff;
  box-shadow: 0 6px 20px rgba(0, 74, 124, 0.18);
}
Body.dark .page-bubble {
  background: rgba(48, 56, 65, 0.9);
  color: #e6eef6;
  border: 1px solid rgba(255, 255, 255, 0.04);
}
Body.dark .page-bubble.active {
  background: var(--btn-night);
}

/* =========================
  Responsive tweaks
  ========================= */
@media (max-width: 600px) {
  .search-bar {
    min-height: 44px;
    padding: 6px;
  }
  .search-bar input {
    padding: 8px;
    height: 36px;
    font-size: 0.95rem;
  }
  .menu-btn,
  .icon-btn,
  .icon-inside {
    height: 40px;
    width: 40px;
  }
}
.comment-input-row {
  flex-direction: column;
  align-items: stretch;
}
.name-comments-close {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.comments-close {
  margin-left: 5px;
  line-height: 0;
  padding: 2px 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* Ensure login modal is hidden by default (defensive) */
/* پس‌زمینه مدال با بلر */
#loginModal {
  display: none; /* پیش‌فرض مخفی */
  position: fixed;
  z-index: 1000;
  inset: 0;
  backdrop-filter: blur(6px);
  background: rgba(0, 0, 0, 0.3);
}

/* جعبه لاگین وسط صفحه */
#loginModal .login-box {
  background: #fff;
  margin: auto;
  padding: 25px 30px;
  border-radius: 12px;
  width: 320px;
  position: relative;
  top: 50%;
  transform: translateY(-50%);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  animation: fadeIn 0.3s ease;
}

/* حالت دارک مود */
Body.dark #loginModal .login-box {
  background: #2f3640;
  color: #f1f1f1;
}

/* دکمه بستن */
#loginModal .close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 22px;
  cursor: pointer;
  color: #888;
  transition: color 0.2s;
}
#loginModal .close-btn:hover {
  color: #000;
}
Body.dark #loginModal .close-btn:hover {
  color: #fff;
}

/* فرم داخل مدال */
#loginModal form {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#loginModal label {
  margin-top: 10px;
  font-weight: bold;
  font-size: 14px;
}

#loginModal input {
  padding: 10px;
  margin-top: 5px;
  border: 1px solid rgba(0, 74, 124, 0.06);
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
#loginModal input:focus {
  border-color: #007bff;
  box-shadow: 0 0 4px rgba(0, 123, 255, 0.4);
  outline: none;
}

/* دکمه ورود */
#loginModal .login-btn {
  margin-top: 15px;
  background: linear-gradient(135deg, #007bff, #0056b3);
  color: #fff;
  font-size: 15px;
  transition: background 0.3s ease;
}
#loginModal .login-btn:hover {
  background: linear-gradient(135deg, #0056b3, #003f7f);
}

/* انیمیشن ظاهر شدن */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-60%);
  }
  to {
    opacity: 1;
    transform: translateY(-50%);
  }
}

/* هدر ادمین */
.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  background: #f8f8f8;
  border-bottom: 1px solid #ddd;
}

/* دکمه بازگشت */
.back-link {
  background: #2185d5;
  color: #fff;
  padding: 6px 12px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: background 0.2s;
}
.back-link:hover {
  background: #1769a8;
}

/* دکمه خروج */
#logoutBtn.logout-btn {
  background: #e62727;
  color: #fff;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: background 0.2s;
}
#logoutBtn.logout-btn:hover {
  background: #c71f1f;
}

/* فرم‌های ادمین */
.admin-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}
.admin-form input,
.admin-form textarea {
  padding: 10px;
  border: 0;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.admin-form input:focus,
.admin-form textarea:focus {
  border-color: #2185d5;
  box-shadow: 0 0 4px rgba(33, 133, 213, 0.4);
  outline: none;
}

/* دکمه ثبت و ارسال */
.admin-submit {
  text-align: center;
  font-size: 14px;
  flex: 1;
  width: 100%;
  cursor: pointer;
  transition: background 0.2s;
}
.admin-submit > span,
#btn-add-item,
#btn-remove-last {
  color: #1769a8;
  padding: 10px;
}

/* لیست پیام‌ها */
.message-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* دکمه‌های اکشن (ادیت و حذف) کنار هم */
.action-buttons {
  display: flex;
  flex-direction: c;
  gap: 6px;
}
.action-buttons .btn-edit {
  background: #2185d5;
  color: #fff;
  border: none;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
}
.action-buttons .btn-edit:hover {
  background: #1769a8;
}
.action-buttons .btn-delete {
  color: red;
  border: none;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
}
.admin-actions {
  display: flex;
  justify-content: space-between;
  gap: 0.5 rem;
}
.comment-bubble {
  background: #f1f1f1;
  border-radius: 15px;
  padding: 10px 15px;
  margin: 5px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.comment-text {
  flex: 1;
  margin-right: 10px;
}

.comment-actions button {
  margin-left: 5px;
}
.btn-approve span {
  color: #228302;
}

.admin-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.admin-section-item {
  width: 100%;
}

/* وقتی سایز صفحه از 768px بیشتر شد */
@media (min-width: 768px) {
  .admin-section {
    flex-wrap: wrap;
    flex-direction: row;
    justify-content: space-between;
  }

  .admin-section-item-1,
  .admin-section-item-2,
  .admin-section-item-3,
  .admin-section-item-4 {
    width: 45%;
  }

  .admin-section-item-5 {
    width: 100%;
  }
}
.badge {
  position: absolute;
  top: 6px;
  right: 6px;
  background: red;
  color: #fff;
  font-size: 12px;
  font-weight: bold;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
}
#profileBtn {
  position: relative;
  width: 45px !important;
  height: 45px !important;
  padding: 0 !important;
}
.comment-text,
.comment-text-content,
.comment-name-display {
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}
.unapproved-bubble {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--post-day);
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

Body.dark .unapproved-bubble {
  background: var(--post-night);
  color: #e6eef6;
}

.bubble-left {
  flex-shrink: 0;
}

.bubble-cover {
  width: 70px;
  /* Height: 100px; */
  object-fit: cover;
  border-radius: 8px;
}

.bubble-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bubble-author {
  font-weight: bold;
  font-size: 0.95rem;
  color: var(--btn-day);
}

Body.dark .bubble-author {
  color: var(--btn-night);
}

.bubble-text {
  font-size: 0.9rem;
  line-height: 1.4;
  background: rgba(227, 242, 253, 0.6);
  padding: 6px 8px;
  border-radius: 6px;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

Body.dark .bubble-text {
  background: rgba(58, 71, 80, 0.85);
}

.bubble-time {
  font-size: 0.8rem;
  color: var(--muted);
}

.bubble-right {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bubble-right .btn-delete span {
  color: red;
}
.bubble-right .button-wrap {
  display: flex;
}
#saveVersionBtn {
  width: 100%;
}
.movie-info-admin {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.toggle-comments {
  cursor: pointer;
  font-size: 0.9rem;
  background: var(--bg-day);
  color: var(--btn-day);
  display: flex;
  align-items: center;
  text-align: center;
  justify-content: center;
  border-radius: 15px;
  padding: 5px;
  gap: 6px;
}

.admin-comments-panel {
  margin-top: 8px;
  padding: 8px;
  border-radius: 8px;
  background: rgba(227, 242, 253, 0.6);
  display: none;
  width: 100%;
  flex-direction: column;
  gap: 8px;
}
Body.dark .admin-comments-panel {
  background: rgba(58, 71, 80, 0.85);
}

.admin-comment-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  background: rgba(255, 255, 255, 0.6);
  padding: 6px;
  border-radius: 8px;
}
Body.dark .admin-comment-row {
  background: rgba(30, 36, 40, 0.6);
}

.admin-comment-body {
  flex: 1;
}
.admin-comment-meta {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 4px;
}

.admin-comment-text {
  background: rgba(232, 241, 245, 0.9);
  padding: 6px 8px;
  border-radius: 6px;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}
Body.dark .admin-comment-text {
  background: rgba(58, 71, 80, 0.9);
  color: #e6eef6;
}

.admin-comment-delete span {
  color: red;
}
.movie-item {
  display: flex;
  flex-direction: column; /* کل حباب ستونی باشه */
  gap: 8px;
  background: var(--post-day);
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}
Body.dark .movie-item {
  background: var(--post-night);
}

.movie-top {
  width: 100%;
  display: flex;
  align-items: center;
  text-align: left;
  justify-content: space-between;
  gap: 5px;
}

Body.dark .toggle-comments {
  background: rgba(255, 255, 255, 0.08);
  color: #e6eef6;
}

.admin-comment-text {
  background: rgba(232, 241, 245, 0.9);
  padding: 6px 8px;
  border-radius: 6px;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}
Body.dark .admin-comment-text {
  background: rgba(58, 71, 80, 0.9);
  color: #e6eef6;
}
.imdb-bell,
.genre-bell {
  display: inline-block;
  animation: ring 2s infinite;
  transform-origin: center;
}

@keyframes ring {
  0% {
    transform: rotate(0);
  }
  10% {
    transform: rotate(15deg);
  }
  20% {
    transform: rotate(-10deg);
  }
  30% {
    transform: rotate(5deg);
  }
  40% {
    transform: rotate(-5deg);
  }
  50% {
    transform: rotate(0);
  }
  100% {
    transform: rotate(0);
  }
}

.menu-toggle {
  cursor: pointer;
  background: rgba(0, 74, 124, 0.08);
  display: flex;
  width: 100%;
  flex-direction: row;
  align-items: center;
  font-weight: bold;
}
.menu-toggle span,
.links-toggle span {
  width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
}
.menu-toggle span i,
.links-toggle span i {
  font-size: 20px;
  padding-right: 5px;
}
Body.dark .menu-toggle {
  background: rgba(255, 255, 255, 0.08);
}
.submenu {
  padding: 10px;
  margin-top: 6px;
  border-radius: 12px;
  background: rgba(0, 74, 124, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.04);
}

Body.dark .submenu {
  border-left: 2px solid rgba(255, 255, 255, 0.1);
}
.social-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 10px;
}

.social-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: rgba(0, 74, 124, 0.06);
  border-radius: 10px;
  padding: 10px;
  cursor: pointer;
  transition: transform 0.2s;
}

.social-item:hover {
  transform: translateY(-3px);
}

.social-item img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  margin-bottom: 6px;
}

.social-item span {
  font-size: 0.9rem;
  font-weight: bold;
}
Body.dark .social-item {
  background: rgba(255, 255, 255, 0.08);
}
.movie-title {
  font-family: "IRANSans", "ProductSans2", sans-serif;
  /* box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1); */
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0, 74, 124, 0.06);
  /* background: rgba(0, 74, 124, 0.06); */
  flex: 1;
  width: 100%;
  font-weight: bold;
  text-align: left;
  border-radius: 15px;
  padding: 10px;
  border: 1px solid rgba(0, 74, 124, 0.1);
}
body.dark .movie-title {
  background: rgba(255, 255, 255, 0.08);
  color: #e6eef6;
  border: 1px solid rgba(0, 74, 124, 0.1);
}
/* تیترهای اصلی */
.admin-header h1 {
  font-size: 2rem;
  font-weight: 700;
  margin: 20px 0;
  color: #222;
}

/* تیترهای بخش‌ها */
.admin-section h2 {
  font-size: 1.4rem;
  font-weight: 600;
  margin: 20px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  color: #222;
}

/* کارت‌های بخش‌ها */
.admin-section-item,
.admin_messages_comments,
#unapproved-comments-section,
.released_movies,
#social-links-section,
.admin-search-wrapper {
  background: var(--post-day);
  border-radius: 10px;
  padding: 5px;
  margin-bottom: 15px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* آیتم‌های داخلی هم هماهنگ باشن */
.unapproved-bubble,
.message-item,
.movie-item,
.admin-comment-row {
  border-left: 4px solid rgba(33, 133, 213, 0.7);
  background: #fff; /* داخل سفید بمونه برای خوانایی */
  border-radius: 6px;
  padding: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  margin-bottom: 10px;
}
#topToastContainer {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.top-toast {
  width: 90vw; /* ۹۰٪ عرض موبایل */
  max-width: 720px; /* روی دسکتاپ محدود */
  color: #222;
  background: rgb(0, 74, 124); /* بدون alpha */
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  padding: 14px 16px;
  font-size: 15px;
  line-height: 1.6;
  text-align: center;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
/* بادی پنل ادمین در دارک مود */
Body.admin-body.dark {
  background: var(--bg-night);
  color: #e6eef6;
}

/* هدر */
Body.admin-body.dark .admin-header {
  background: #161616;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
Body.admin-body.dark .admin-header h1 {
  color: #fff;
}

/* بخش‌های اصلی (مثل کارت پست‌ها) */
Body.admin-body.dark .admin-section-item,
Body.admin-body.dark .admin_messages_comments,
Body.admin-body.dark #unapproved-comments-section,
Body.admin-body.dark .released_movies,
Body.admin-body.dark #social-links-section,
Body.admin-body.dark .admin-search-wrapper {
  background: var(--post-night);
  color: #e6eef6;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
  border-radius: 12px;
}

/* آیتم‌های داخلی (مثل کوت‌ها) */
Body.admin-body.dark .message-item,
Body.admin-body.dark .movie-item,
Body.admin-body.dark .admin-comment-row,
Body.admin-body.dark .unapproved-bubble {
  background: rgba(255, 255, 255, 0.08);
  border-left: 4px solid rgba(33, 133, 213, 0.7);
  color: #e6eef6;
  border-radius: 8px;
}

/* فرم‌ها */
Body.admin-body.dark .admin-form input,
Body.admin-body.dark .admin-form textarea {
  background: #202020;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #f1f1f1;
}
Body.admin-body.dark .admin-form input::placeholder,
Body.admin-body.dark .admin-form textarea::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

/* دکمه‌ها */
Body.admin-body.dark .admin-submit,
Body.admin-body.dark .logout-btn {
  color: #fff;
}
/* Pagination – هماهنگ با ایندکس */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.pagination button {
  background: #1e1e1e; /* مثل کارت‌های ایندکس در دارک مود */
  color: #e5e5e5;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pagination button:hover {
  background: #2a2a2a;
  border-color: rgba(255, 255, 255, 0.25);
}

.pagination button.active {
  background: #004a7c; /* رنگ accent ایندکس */
  border-color: #004a7c;
  color: #fff;
  font-weight: bold;
}
Body.dark h1,
Body.admin-body.dark h1 {
  color: #ffffff; /* سفید کامل برای وضوح بالا */
}

Body.dark h2,
Body.admin-body.dark h2 {
  color: #e0e0e0; /* خاکستری روشن‌تر برای تمایز از h1 */
}
/* دکمه‌های Collection / Serial */
#bundle-toggle {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  gap: 2%;

  margin: 12px 0;
}
#bundle-toggle .button-wrap {
  display: flex;
  flex: 1;
}
#bundle-toggle .admin-submit {
  font-size: 15px;
  text-align: center;
}

/* وقتی یکی فعال شد */
#bundle-toggle .admin-submit.active {
  width: 100% !important;
}

/* دکمه‌های افزودن/حذف */
#bundle-actions {
  display: none; /* کاملاً مخفی */
  margin: 12px 0;
  gap: 10px;
}
#bundle-actions.show {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}
#bundle-actions > .button-wrap {
  display: flex;
  flex: 1;
}
#bundle-actions .admin-submit {
  flex: 1;
  font-size: 15px;
}
#bundle-actions .danger {
  border-color: #e57373;
  color: #c62828;
}
/* کانتینر اپیزودها */
.episodes-container {
  display: flex;
  flex-direction: row;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  overflow-x: auto;
  white-space: nowrap;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* لیست اپیزودها */
.episodes-list {
  display: flex;
  padding-right: 10px;
  margin-top: 6px;
}

/* هر اپیزود */
.episode-card {
  cursor: pointer;
  border-radius: 6px;
  overflow: hidden;
  width: 80px;
  display: flex;
  margin: 10px 0 10px 10px;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: #fafafa;
  transition: transform 0.2s, box-shadow 0.2s;
  flex: 0 0 auto; /* جلوگیری از کشیده شدن */
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.58);
  padding: 0.2rem;
}
.episode-card .episode-title {
  margin-top: 4px;
  text-align: center;
}
body.dark .episode-card {
  background: rgba(255, 255, 255, 0.08);
  color: #e6eef6;
}
.episode-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* کاور اپیزود */
.episode-card img.episode-cover {
  width: 100%;
  aspect-ratio: 9/15;
  object-fit: cover;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
}
/* عنوان اپیزود */
.episode-card .episode-title {
  font-size: 0.7rem;
  padding: 4px;
  white-space: nowrap;
  overflow: hidden;
  position: relative;
  text-align: center;
}

.episode-card .episode-title span {
  font-size: 0.7rem;
  display: inline-block;
  white-space: nowrap;
}

/* وقتی کلاس scrollable اضافه بشه */
.episode-card .episode-title.scrollable span {
  padding-left: 100%;
  animation: scrollEpisodeTitle 9s linear infinite;
}

@keyframes scrollEpisodeTitle {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-100%);
  }
}
/* اپیزود فعال */
.episode-card.active {
  border: 1px solid;
  border-color: rgba(0, 123, 255, 0.6);
  box-shadow: 0 3px 10px rgba(0, 123, 255, 0.6);
}

/* برچسب کالکشن/سریال */
.collection-badge {
  background: #007bff;
  color: #fff;
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
  vertical-align: middle;
  white-space: nowrap;
}

.movie-title-row {
  display: flex;
  background: #e0e9fa;
  color: #003170;
  border-radius: 6px;
  padding: 5px;
  justify-content: space-between;
  align-items: center;
}

.movie-name {
  font-weight: bold;
  font-size: 1em;
  direction: ltr;
}

.badge-type {
  font-size: 0.75em;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 8px;
  white-space: nowrap;
  color: #fff;
}

.badge-serial {
  background: #ff9800; /* نارنجی برای سریال */
}

.movie-type-tabs {
  z-index: 900;
  display: flex;
  gap: 8px;
  padding: 4px;
  overflow-x: auto;
  white-space: nowrap;
  -ms-overflow-style: none;
  scrollbar-width: none;
  width: 100%;
  /* -webkit-mask-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 1) 80%,
    rgba(0, 0, 0, 0) 100%
  );
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 1) 80%,
    rgba(0, 0, 0, 0) 100%
  );
  mask-repeat: no-repeat;
  mask-size: 100% 100%; */
  top: 120px;
  left: 0;
  right: 0;
  transition: transform 0.3s ease;
}

.movie-type-tabs::-webkit-scrollbar {
  display: none; /* Chrome, Safari */
}

.movie-type-tabs::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}

.genre-chip-mini {
  display: inline-block;
  border-radius: 12px;
  background: rgba(0, 123, 255, 0.15);
  color: #1767bd;
  line-height: 1;
  cursor: pointer;
  user-select: none;
  transition: background 160ms ease, transform 120ms ease;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: bold;
}
body.dark .genre-chip-mini {
  background: rgba(0, 123, 255, 0.35);
  color: #ffffffe3;
}
.genre-chip-mini:active {
  transform: scale(0.96);
  background: var(--promo-accent-color);
}
.tab-genres-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.tab-genres-list {
  display: flex;
  flex-wrap: nowrap;
  padding: 0;
}

.tab-genres-list .genre-chip {
  flex: 0 0 auto;
  padding: 5px;
  background: #eef3f7;
  color: #0b3d5c;
  margin: 0 4px;
  gap: 3px;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}
.close-btn {
  font-size: 1.2rem;
  font-weight: bold;
  background: none;
  color: #444;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  line-height: 1;
}
.close-btn:hover {
  color: #000;
}
.genre-chip {
  display: inline-flex;
  align-items: center;
  transition: all 0.2s ease;
  border-radius: 16px;
  background: rgba(0, 123, 255, 0.15);
  color: #1767bd;

  line-height: 1;
  cursor: pointer;
  user-select: none;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: bold;
}
Body.dark .genre-chip {
  background: rgba(0, 123, 255, 0.35);
  color: #ffffffe3;
}
.genre-chip.active {
  background: #007bff;
  color: #fff;
  font-weight: bold;
}
body.dark .genre-chip.active {
  background: #017ada;
  color: #fff;
  font-weight: bold;
}
.chip {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 16px;
  font-size: 13px;
}

.imdb-chip {
  background: #f5c518; /* رنگ طلایی IMDb */
  color: #000;
  font-size: 13px;
  padding: 2px 6px;
  font-weight: 600;
}
.genre-chip .count {
  background: #0d6efd;
  color: #fff;
  width: 20px;
  height: 20px;
  font-size: 10px;
  padding-top: 2px;
  display: flex;
  text-align: center;
  border-radius: 10px;
  align-items: center;
  justify-content: center;
}

.genre-chip.active .count {
  background: #fff; /* پس‌زمینه سفید */
  color: #0d6efd !important; /* متن آبی (برعکس) */
}
#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  width: 300px;
}

/* ===== Year filter + spinner ===== */
.year-filter {
  padding: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  direction: ltr;
  background: rgba(0, 74, 124, 0.05);
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
body.dark .year-filter {
  background: rgba(255, 255, 255, 0.05);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.year-filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.year-filter-label {
  font-size: 14px;
  margin: 0 0 8px 0;
  font-weight: bold;
  color: #0d47a1;
}
body.dark .year-filter-label {
  color: #2c98ff;
}

.year-filter-sign {
  font-size: 1.2rem;
  opacity: 0.75;
}
#applyYearFilter {
  background: linear-gradient(135deg, #18b2f5, #003eff);
}
.year-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 8px;
  /* min-width: 65px; */
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(14px);
  touch-action: pan-y;
}

.year-spinner-item {
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  user-select: none;
}

.year-spinner-top,
.year-spinner-bottom {
  opacity: 0.45;
}

.year-spinner-center {
  font-size: 1.4rem;
  font-weight: 600;
  transition: all 0.5s;
  /* border: 1px solid black; */
  padding: 8px 4px;
  border-radius: 999vw;
  background: white;
}
body.dark .year-spinner-center {
  background: rgb(255 255 255 / 8%);
}
.year-filter-hint {
  margin-top: 4px;
  font-size: 0.75rem;
  opacity: 0.65;
}

.year-apply-wrap {
  margin-top: 10px;
}

.toast {
  background: #fafafa;
  color: #000;
  text-align: center;
  direction: rtl;
  padding: 12px 16px;
  margin-bottom: 10px;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  font-size: 14px;
}

.toast .message {
  margin-bottom: 8px;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: #fff;
  border-radius: 3px;
  overflow: hidden;
}
.message-text {
  width: 70%;
}
.progress-fill {
  height: 100%;
  width: 0%;
  background: #0d6efd;
  transition: width 0.2s linear;
}
.collection-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  color: #fff; /* متن اصلی badge سفید */
}

.badge-collection {
  background: linear-gradient(
    45deg,
    hsla(211, 100%, 65%, 1) 0%,
    hsla(211, 100%, 50%, 1) 100%
  );
}
.badge-serial {
  background: linear-gradient(
    90deg,
    hsla(36, 82%, 58%, 1) 0%,
    hsla(36, 100%, 50%, 1) 100%
  );
} /* آبی */

.collection-badge .badge-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 4px;
  border-radius: 6px;
  background: #fff; /* دایره سفید */
  font-size: 10px;
  font-weight: 600;
}

.badge-collection .badge-count {
  color: #0d6efd;
} /* عدد نارنجی */
.badge-serial .badge-count {
  color: #ff9800;
} /* عدد آبی */

/* حالت اولیه */
.anim-horizontal,
.anim-vertical {
  opacity: 0;
  transition: all 0.6s ease;
}

/* افقی: اسکرول به پایین → راست به چپ */
.anim-horizontal.active-down {
  opacity: 1;
  transform: translateX(0);
  animation: slideRightToLeft 0.8s ease;
}

/* افقی: اسکرول به بالا → چپ به راست */
.anim-horizontal.active-up {
  opacity: 1;
  transform: translateX(0);
  animation: slideLeftToRight 0.8s ease;
}

/* عمودی: اسکرول به پایین → پایین به بالا */
.anim-vertical.active-down {
  opacity: 1;
  transform: translateY(0);
  animation: slideBottomToTop 0.6s ease;
}

/* عمودی: اسکرول به بالا → بالا به پایین */
.anim-vertical.active-up {
  opacity: 1;
  transform: translateY(0);
  animation: slideTopToBottom 0.6s ease;
}

/* Keyframes */
@keyframes slideRightToLeft {
  from {
    transform: translateX(60px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideLeftToRight {
  from {
    transform: translateX(-60px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideBottomToTop {
  from {
    transform: translateY(60px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideTopToBottom {
  from {
    transform: translateY(-60px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.field-label {
  display: flex;
  align-items: center;
}

/* حالت آماده */
.anim-left-right {
  opacity: 0;
  transform: translateX(-60px); /* از چپ شروع کن */
  transition: all 0.6s ease;
}

/* وقتی اسکرول به پایین → از چپ به راست بیاد */
.anim-left-right.active-down {
  opacity: 1;
  transform: translateX(0);
  animation: slideLeftToRight 0.6s ease;
}

/* وقتی اسکرول به بالا → از راست به چپ برگرده */
.anim-left-right.active-up {
  opacity: 1;
  transform: translateX(0);
  animation: slideRightToLeft 0.6s ease;
}

@keyframes slideRightToLeft {
  from {
    transform: translateX(60px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
/* حالت اولیه کارت */
/* حالت اولیه کارت */
.movie-card.reveal {
  opacity: 0;
  transform: translateY(60px); /* از پایین شروع کن */
  transition: all 0.6s ease;
}

/* وقتی وارد ویوپورت میشه و اسکرول به پایین هست */
.movie-card.reveal.active-down {
  opacity: 1;
  transform: translateY(0);
  animation: slideBottomToTop 0.6s ease;
}

/* وقتی وارد ویوپورت میشه و اسکرول به بالا هست */
.movie-card.reveal.active-up {
  opacity: 1;
  transform: translateY(0);
  animation: slideTopToBottom 0.6s ease;
}

/* انیمیشن‌ها */
@keyframes slideBottomToTop {
  from {
    transform: translateY(60px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideTopToBottom {
  from {
    transform: translateY(-60px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* =========================
   Floating Stories Button & Panel
   ========================= */
.floating-btn-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
}
.floating-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
  z-index: 2000;
}
.floating-btn img#storyToggleIcon {
  width: 24px;
  height: 24px;
  transition: transform 0.25s ease;
}
.floating-btn.open img#storyToggleIcon {
  transform: rotate(180deg);
}

.story-panel {
  position: fixed;
  bottom: 100px;
  right: 20px;
  padding: 10px;
  width: 90%;
  max-width: 360px;
  border-radius: 20px;
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.25); /* این بک‌گراند پنل استوری‌هاست */
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  transform: translateX(120%);
  transition: transform 0.3s ease;
  z-index: 1900;
}
.story-panel.open {
  transform: translateX(0);
}

.stories {
  display: flex;
  scrollbar-width: none;
  overflow-x: auto;
  padding: 5px;
  gap: 5px;
}
.story {
  flex: 0 0 auto;
  border-radius: 6px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.05);
}

.go-pagination {
  width: 100%;
  cursor: pointer;
  text-align: center;
}
.go-pagination span {
  padding: 7px;
}
.story-title {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.2;
  width: 72px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  position: relative;
}

/* متن متحرک */
.story-title.scrolling span {
  display: inline-block;
  padding-left: 100%;
  animation: scroll-text 15s linear infinite;
  font-size: inherit; /* سایز فونت مثل والد */
  line-height: inherit; /* ارتفاع خط مثل والد */
  font-weight: inherit; /* وزن فونت مثل والد */
}

@keyframes scroll-text {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-100%);
  }
}
.story-circle {
  position: relative;
  width: 60px;
  aspect-ratio: 9 / 15;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: all 0.4s ease;
}

.story-circle::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 6px;
  padding: 2px;
  background: linear-gradient(135deg, #4ce964, #48cad8);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  transition: all 0.4s ease;
}

.story-circle img {
  position: relative;
  width: 85%;
  height: 85%;
  border-radius: 6px;
  object-fit: cover;
  transition: all 0.4s ease;
}

.message-bubble {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 18px;
  border-radius: 18px;
  .message-bubble button {
    display: flex;
    justify-content: end;
  }
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);

  /* خط دور شیشه */
  border: 1px solid rgba(255, 255, 255, 0.25);

  /* سایه برای شناوری */
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);

  color: #000;
  max-width: 360px;
  transition: all 0.3s ease;
}

body.dark .message-bubble {
  background: #2c2c2e;
  color: #f5f5f7;
}

.msg-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.msg-avatar-wrapper {
  position: relative;
  width: 32px;
  height: 32px;
}

.msg-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.msg-icon {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  padding: 2px;
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.2);
}

.msg-title {
  font-weight: 600;
  font-size: 14px;
}

.msg-time {
  font-size: 12px;
  color: #888;
}

.msg-body {
  font-size: 15px;
  margin-top: 4px;
  line-height: 1.4;
}

.msg-close {
  display: flex;
  align-self: flex-end;
  background: #007aff;
  font-size: 13px;
  color: #fff;
  cursor: pointer;
  transition: background 0.2s;
}

.msg-close:hover {
  background: #005bb5;
}

body.dark .message-bubble {
  background: rgba(40, 40, 40, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #f5f5f7;
}
#adminMessages {
  position: sticky;
  top: 15px; /* بچسبه به بالای صفحه */
  z-index: 99999; /* بالاتر از بقیه محتوا */
  display: flex;
  flex-direction: column;
  gap: 10px;
}
/* Admin tabs container with sticky positioning */
.admin-tabs {
  position: fixed;
  bottom: 0;
  z-index: 150;
  width: 100%;
  display: flex;
  justify-content: space-around;
  gap: 10px;
  padding: 8px 0;
  scrollbar-width: none;
  backdrop-filter: blur(var(--blur));
  width: 100%;
  -webkit-mask-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 1) 80%,
    rgba(0, 0, 0, 0) 100%
  );
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 1) 80%,
    rgba(0, 0, 0, 0) 100%
  );
  mask-repeat: no-repeat;
  mask-size: 100% 100%;
  overflow-x: scroll;
}

/* Liquid glass circular icon */
.admin-tabs .tab-btn {
  padding: 0;
}

.admin-tabs .tab-circle {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);

  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.admin-tabs .tab-circle img {
  width: 28px;
  height: 28px;
}

/* Active state */
.admin-tabs .tab-btn.active .tab-circle {
  transform: scale(1.05);
  background: rgba(81, 43, 212, 0.35);
}

/* Dark mode */
body.dark .admin-tabs {
  backdrop-filter: blur(8px) saturate(160%);
  -webkit-backdrop-filter: blur(8px) saturate(160%);
}
body.dark .admin-tabs .tab-circle {
  background: rgba(40, 40, 40, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.15);
}
body.dark .admin-tabs .tab-btn.active .tab-circle {
  background: rgba(33, 133, 213, 0.35);
  border-color: rgba(255, 255, 255, 0.3);
}
.social-grid.hidden {
  display: none;
}

.menu-section {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 10px;
  margin: 10px 0;
  margin-top: 65px;
  justify-content: space-between;
  align-items: center;
}
.menu-section > div {
  width: 100%;
}
body.dark .links-toggle {
  background: rgba(255, 255, 255, 0.08);
}
/* بنر بالای سایت */
.site-banner {
  color: #fff;
  font-family: sans-serif;
  font-weight: bold;
  font-size: 20px;
  letter-spacing: 1px;
  z-index: 9999;
  width: 100%;
  height: 60px;
  background: transparent; /* پس‌زمینه شفاف → رنگ body دیده میشه */
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.banner-content {
  display: flex;
  align-items: center;
}
.banner-logo img {
  width: 30px;
  padding-top: 5px;
}
.banner-logo {
  font-size: 26px;
}

.banner-text {
  font-size: 22px;
  font-weight: bold;
  text-transform: lowercase;

  background: linear-gradient(90deg, #ff7a18, #af002d 70%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text; /* برای مرورگرهای جدید */
}

/* ===== rating filter styles ===== */
.rating-filter {
  padding: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  direction: ltr;
  background: rgba(0, 74, 124, 0.05);
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
body.dark .rating-filter {
  background: rgba(255, 255, 255, 0.05);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.rating-filter-title {
  font-size: 14px;
  margin: 0 0 8px 0;
  font-weight: bold;
  color: #0d47a1;
}
body.dark .rating-filter-title {
  color: #ffd95e; /* طلایی روشن در دارک مود */
}
.rating-process-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}
.rating-min,
.rating-max {
  width: 22px;
  text-align: center;
  font-size: 13px;
  font-weight: bold;
  color: #555;
}
body.dark .rating-min,
body.dark .rating-max {
  color: #ccc;
}

.rating-track {
  position: relative;
  height: 12px;
  flex: 1;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  overflow: visible;
}
body.dark .rating-track {
  background: rgba(255, 255, 255, 0.12);
}
.rating-track-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #f5c518, #ff8c00); /* طلایی → نارنجی */
  border-radius: 12px;
  transition: width 0.08s linear;
}
.rating-knob {
  position: absolute;
  top: 50%;
  left: 0%;
  transform: translate(-50%, -50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #f5c518;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  cursor: grab;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rating-knob:active {
  cursor: grabbing;
}
body.dark .rating-knob {
  background: #222;
  border: 2px solid #ffd95e;
}

.rating-bubble {
  position: absolute;
  bottom: 140%;
  left: 50%;
  transform: translateX(-50%) scale(0.9);
  padding: 6px 9px;
  font-size: 13px;
  white-space: nowrap;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
  pointer-events: none;
  transition: transform 0.08s ease, opacity 0.08s ease;
  opacity: 0;
  font-weight: bold;
  background: #f5c518;
  color: #111;
  z-index: 9999;
}
body.dark .rating-bubble {
  background: #ffd95e;
  color: #222;
}
.rating-knob.dragging .rating-bubble,
.rating-knob:hover .rating-bubble {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

/* controls */
.rating-controls {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  justify-content: flex-start;
}
.btn.small {
  font-size: 13px;
  border-radius: 6px;
  cursor: pointer;
}

#applyRatingFilter {
  width: 100%;
  background: linear-gradient(135deg, #f5c518, #ff8c00);
  color: #111;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
#applyRatingFilter:hover {
  background: linear-gradient(135deg, #ffda4d, #ffa733);
}
body.dark #applyRatingFilter {
  background: linear-gradient(135deg, #ffd95e, #ff8c00);
  color: #222;
}

/* ===== floating toast (top fixed) ===== */
#imdbFilterToast .toast-label {
  font-size: 14px;
}
#imdbFilterToast .toast-close {
  margin-left: 6px;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  outline: none;
}
.active-filters-toast {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2147647; /* بالاتر از همه */
  display: flex;
  gap: 8px;
  pointer-events: none; /* تا روی بقیه کلیک‌ها تاثیر نذاره */
}

.active-filters-toast .filter-badge {
  background: linear-gradient(135deg, #f5c518, #ff8c00);
  color: #111;
  font-weight: bold;
  padding: 4px 10px;
  border-radius: 999vw;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  pointer-events: auto;
}
body.dark .active-filters-toast .filter-badge {
  background: linear-gradient(135deg, #ffd95e, #ff8c00);
  color: #222;
}
.active-filters-toast .filter-badge button {
  padding: 1px 6px 4px 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
/* 🔹 مودال ورود/ثبت‌نام - پیش‌فرض مخفی */
.login-modal {
  display: none; /* در شروع مخفی */
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5); /* پس‌زمینه تار */
  align-items: center;
  justify-content: center;
}

/* جعبه داخل مودال */
.login-box {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  animation: fadeIn 0.25s ease;
}

/* انیمیشن ساده برای باز شدن */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 🔹 تب‌های بالای فرم */
.auth-tabs {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.auth-tabs > div {
  display: flex;
  flex: 1;
}

.auth-tabs .tab-btn {
  flex: 1;
  background: rgba(0, 74, 124, 0.08);
  font-size: 14px;
  transition: background 0.2s ease;
}

.auth-tabs .tab-btn.active {
  background: var(--btn-day);
  color: #fff;
}

/* 🔹 محتوای تب‌ها */
.tab-content {
  display: none;
  flex-direction: column;
  gap: 10px;
}

.tab-content.active {
  display: flex;
}

/* 🔹 ورودی‌ها */
#authModal input[type="text"],
#authModal input[type="email"],
#authModal input[type="password"],
#authModal input[type="file"] {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
  width: 100%;
  box-sizing: border-box;
}

#authModal input[type="file"] {
  padding: 6px;
}

/* 🔹 دکمه‌ها */
#authModal .login-btn {
  width: 100%;
  background: var(--btn-day);
  color: #fff;
  font-size: 15px;
  transition: background 0.2s ease;
}

#authModal .login-btn:hover {
  background: #005a99;
}

/* 🔹 منوی پروفایل بعد از لاگین */
.profile-menu {
  position: absolute;
  top: 60px;
  right: 10px;
  background: var(--post-day);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  padding: 8px;
  z-index: 2100;
}

.profile-menu.hidden {
  display: none;
}

.profile-menu button {
  background: transparent;
  font-size: 14px;
  flex: 1;
  transition: background 0.2s ease;
}

.profile-menu button:hover {
  background: rgba(0, 0, 0, 0.05);
}

.fade-step {
  opacity: 0;
  transition: opacity 0.5s ease, transform 0.4s ease;
  transform: translateY(10px);
}
.fade-step.active-step {
  display: flex !important
;
  flex-direction: column;
  opacity: 1;
  gap: 10px;
  transform: translateY(0);
}
.signup-next-btn {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  transition: all 0.3s ease;
}
.signup-next-btn.btn-loading {
  opacity: 0.8;
}
#profileBtn img {
  width: 40px !important;
  height: 40px !important;
}

#profileMenu {
  position: absolute;
  top: 0;
  right: 0;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 6px 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
}

#profileMenu.hidden {
  display: none;
}
/* حباب پروفایل */
.profile-menu {
  position: absolute;
  top: 60px;
  right: 10px;
  z-index: 999999 !important;
}

.profile-bubble {
  color: var(--bubble-text, #111);
  border-radius: 10px;
  padding: 5px;
  min-width: 180px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.profile-bubble > div {
  display: flex;
}
.profile-bubble span {
  padding: 5px;
}

/* هماهنگی با حالت شب/روز */
body.dark .profile-bubble {
  --bubble-bg: #222;
  --bubble-text: #eee;
}

/* نام کاربر */
.profile-username {
  font-weight: bold;
  font-size: 14px;
  margin-bottom: 4px;
}

/* دکمه ویرایش */
.profile-edit {
  background: rgba(128, 128, 128, 0.1) !important;
  text-align: left;
}

/* خط جداکننده */
.profile-divider {
  border: none;
  border-top: 1px solid rgba(128, 128, 128, 0.3);
  margin: 6px 0;
}

/* دکمه خروج */
.profile-logout {
  background: rgba(255, 0, 0, 0.1) !important;
  color: #d00;
  font-weight: bold;
  width: 100%;
  text-align: center;
}
.profile-logout:hover {
  background: rgba(255, 0, 0, 0.2);
}
.user-row,
.admin-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  margin-bottom: 6px;
  border-radius: 6px;
  background: var(--card-bg, #f9f9f9);
  transition: background 0.3s;
}
.user-row:hover,
.admin-row:hover {
  background: var(--card-hover, #ececec);
}
.user-row img,
.admin-row img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}
.role-badge {
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: capitalize;
}
.role-badge.owner {
  background: linear-gradient(45deg, #ff9800, #ff5722);
  color: #fff;
}
.role-badge.admin {
  background: linear-gradient(45deg, #2196f3, #1976d2);
  color: #fff;
}
.role-badge.user {
  background: #9e9e9e;
  color: #fff;
}
/* Dark mode */
body.dark .user-row,
body.dark .admin-row {
  background: #2c2c2c;
}
body.dark .user-row:hover,
body.dark .admin-row:hover {
  background: #3a3a3a;
}
body.dark .role-badge.user {
  background: #616161;
}
/* ===== Rows and containers ===== */
#adminsContainer,
#usersContainer {
  scrollbar-width: none;
  display: block;
  width: 100%;
  overflow-x: auto; /* اسکرول افقی وقتی محتوا زیاد شد */
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.admin-row,
.user-row {
  display: grid;
  grid-template-columns:
    minmax(220px, 1.2fr) minmax(100px, 0.5fr) minmax(140px, 0.6fr)
    minmax(110px, 0.4fr);
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  margin-bottom: 8px;
  border-radius: 8px;
  background: var(--card-bg, #f9f9f9);
  transition: background 0.25s, box-shadow 0.25s;
  min-width: 680px; /* جلوگیری از شکستن چیدمان در کانتینر باریک و فعال شدن اسکرول */
}

.admin-row:hover,
.user-row:hover {
  background: var(--card-hover, #ececec);
}

.row-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 220px;
}

.row-left img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

/* ===== Role badge ===== */
.role-badge {
  justify-self: start;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: capitalize;
  white-space: nowrap;
}

.role-badge.owner {
  background: linear-gradient(45deg, #ff9800, #ff5722);
  color: #fff;
}
.role-badge.admin {
  background: linear-gradient(45deg, #2196f3, #1976d2);
  color: #fff;
}
.role-badge.user {
  background: #9e9e9e;
  color: #fff;
}

/* ===== Compact info badge (e.g., date) ===== */
.info-badge {
  justify-self: start;
  background: var(--chip-bg, #e0e0e0);
  color: var(--chip-text, #333);
  padding: 3px 8px;
  border-radius: 10px;
  font-size: 12px;
  white-space: nowrap;
}

/* ===== Action buttons ===== */
.row-actions {
  display: flex;
  justify-content: end;
  gap: 8px;
  flex-wrap: nowrap;
}

.btn {
  appearance: none;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.05s ease, opacity 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.98);
}

/* Subtle (optional secondary) */
.btn-subtle {
  background: #eceff1;
  color: #37474f;
  padding: 10px 15px;
}
.btn-subtle:hover {
  background: #e0e5e8;
}

/* Disabled state */
.btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ===== Dark mode ===== */
body.dark .admin-row,
body.dark .user-row {
  background: #2c2c2c;
}
body.dark .admin-row:hover,
body.dark .user-row:hover {
  background: #3a3a3a;
}
body.dark .info-badge {
  background: #424242;
  color: #e0e0e0;
}
body.dark .btn-subtle {
  background: #3a3a3a;
  color: #e0e0e0;
}
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.modal-card {
  width: 360px;
  max-width: 90vw;
  background: var(--card-bg, #fff);
  color: var(--text-color, #222);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}
.modal-title {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
}
.modal-message {
  margin: 0 0 12px;
  font-size: 14px;
}
.modal-input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  margin-bottom: 12px;
  background: var(--input-bg, #fff);
  color: var(--text-color, #222);
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
body.dark .modal-card {
  background: #2c2c2c;
  color: #e0e0e0;
}
body.dark .modal-input {
  background: #3a3a3a;
  border-color: #555;
  color: #e0e0e0;
}

.users-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  font-size: 14px;
}

.users-table th,
.users-table td {
  border: 1px solid #ddd;
  padding: 8px 10px;
  text-align: center;
  vertical-align: middle;
}

.users-table th {
  background-color: #f5f7fa;
  font-weight: bold;
}

.users-table tr:nth-child(even) {
  background-color: #fafafa;
}

.users-table tr:hover {
  background-color: #f0f8ff;
}

.avatar-img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.role-badge {
  padding: 3px 6px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: bold;
}

.role-badge.user {
  background: #e0f7fa;
  color: #00796b;
}
.role-badge.admin {
  background: #fff3cd;
  color: #856404;
}
.role-badge.owner {
  background: #d4edda;
  color: #155724;
}

.btn-danger,
.btn-primary {
  font-size: 12px;
  width: 100%;
}

.btn-danger span {
  color: #dc3545;
}
.btn-primary span {
  color: #007bff;
}
/* حالت روشن (پیش‌فرض) */
.users-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  font-size: 14px;
}

.users-table th,
.users-table td {
  border: 1px solid #ddd;
  padding: 8px 10px;
  text-align: center;
  vertical-align: middle;
}

.users-table th {
  background-color: #f5f7fa;
  font-weight: bold;
  color: #333;
}

.users-table tr:nth-child(even) {
  background-color: #fafafa;
}

.users-table tr:hover {
  background-color: #f0f8ff;
}

.avatar-img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.role-badge {
  padding: 3px 6px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: bold;
}

.role-badge.user {
  background: #e0f7fa;
  color: #00796b;
}
.role-badge.admin {
  background: #fff3cd;
  color: #856404;
}
.role-badge.owner {
  background: #d4edda;
  color: #155724;
}

/* حالت تاریک */
body.dark .users-table {
  background-color: #1e1e1e;
  color: #e0e0e0;
}

body.dark .users-table th {
  background-color: #2c2c2c;
  color: #f5f5f5;
}

body.dark .users-table td {
  border-color: #444;
}

body.dark .users-table tr:nth-child(even) {
  background-color: #2a2a2a;
}

body.dark .users-table tr:hover {
  background-color: #333;
}

body.dark .role-badge.user {
  background: #004d40;
  color: #80cbc4;
}
body.dark .role-badge.admin {
  background: #665c00;
  color: #ffeb3b;
}
body.dark .role-badge.owner {
  background: #1b5e20;
  color: #a5d6a7;
}

.admin-title {
  font-size: 18px;
  font-weight: bold;
  color: #333;
  flex: 1;
  text-align: center;
}

body.dark .admin-title {
  color: #f5f5f5;
}

/* 🔹 حالت تاریک */
body.dark .profile-menu {
  background: #1e1e1e;
  border-color: #333;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
}

body.dark .profile-username {
  color: #f5f5f5;
}

body.dark .profile-edit,
body.dark .profile-logout {
  color: #ddd;
}

body.dark .profile-edit:hover,
body.dark .profile-logout:hover {
  background: #2a2a2a;
}
#users .search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  background: #fff;
  border-radius: 12px;
}
#clearSearch {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
#clearSearch span {
  padding: 5px 10px;
}
#usersPagination {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  background: #fff;
  margin-top: 5px;
  border-radius: 9px;
  gap: 5px;
}
.pagination-users {
  display: flex;
  justify-content: center;
  margin: 10px 0;
  align-items: center;
  background: #fff;
  border-radius: 6px;
  padding: 8px;
}
body.dark .pagination-users {
  background: rgba(255, 255, 255, 0.08);
}
#users h3 {
  padding: 10px;
  text-align: center;
  font-size: 20px;
  font-weight: bold;
  letter-spacing: normal;
  margin: 10px 0;
  background: #e0e9fa;
  color: #005d79;
  border-radius: 10px;
}
.movie-top {
  position: relative;
}
.popular-toggle {
  position: absolute;
  top: 0px;
  left: 0px;
  background: rgba(255, 255, 255, 0.3);
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 10; /* 👈 این باعث میشه روی کاور بیاد */
}
.heart-icon {
  width: 24px;
  height: 24px;
  display: block;
}

.popular-section {
  position: relative;
  text-align: center;
  border-radius: 6px;
}
.popular-title {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
}
.carousel-container {
  display: flex;
  align-items: center;
  justify-content: center;
}
.carousel-item h3 {
  font-size: 14px; /* کوچیک‌تر */
  margin: 6px 0;
}

.carousel-item button.more-info span {
  font-size: 12px;
  font-weight: bold;
}
body.dark .carousel-item button.more-info {
  color: #fff;
}
.carousel-item .button-wrap {
  display: none;
}

.carousel-item.active .button-wrap {
  display: flex; /* یا block — هر کدام طرح تو اجازه می‌دهد */
}
.carousel-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-size: cover;
  background-position: center;
  filter: blur(20px) brightness(1.2);
  z-index: -1;
}
.carousel-window {
  overflow: hidden;
  width: 100%;
  max-width: 360px; /* برای موبایل */
  margin: 0 auto;
  padding-top: 15px;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease;
}

.carousel-item {
  flex: 0 0 33.33%; /* هر کارت یک‌سوم عرض ویندو */
  text-align: center;
  opacity: 0.6;
  transform: scale(0.9);
  transition: transform 0.3s, opacity 0.3s;
  padding: 0 5px; /* کمی فاصله بین کارت‌ها */
  box-sizing: border-box;
}

.carousel-item.active {
  opacity: 1;
  transform: scale(1.1); /* وسطی بزرگ‌تر */
}

.carousel-item img {
  width: 100%;
  border-radius: 6px;
}

.carousel-item button.more-info {
  display: none;
}

.carousel-item.active button.more-info {
  display: inline-block;
  margin-top: 10px;
}
.movie-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  justify-content: center;
  align-items: center;
  z-index: 10011134;
  scrollbar-width: none;
}

.movie-modal-content {
  width: 85%;
  max-width: 700px;
  max-height: 90vh;
  overflow-y: auto;
  scrollbar-width: none;
  border-radius: 16px;
  position: relative;
}

.carousel-window {
  height: 320px;
}
.movie-modal-content .close-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 10px;
  color: #e74c3c !important;
  text-align: center;
  font-size: 14px;
}
.carousel-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-size: cover;
  background-position: center;
  filter: blur(20px) brightness(1.2);
  z-index: -1;
  border-radius: 6px; /* 🔹 گوشه‌های گرد */
  overflow: hidden;
}

.carousel-bg::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0) 70%,
    /* بالایی شفاف */ rgba(255, 255, 255, 1) 100% /* پایینی محو کامل */
  );
}
Body.dark .carousel-bg::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 70%,
    /* بالایی شفاف */ #1a2026 100% /* پایینی محو کامل */
  );
}
/* حالت شب برای مودال */
body.dark .movie-modal-content {
  background: #1e1e1e;
  color: #f0f0f0;
}

body.dark .movie-modal-content .field-label {
  color: #ccc;
}

body.dark .movie-modal-content .go-btn {
  background: #3498db;
  color: #fff;
}

body.dark .movie-modal-content .close-btn {
  background: #e74c3c;
  color: #fff;
}

body.dark .movie-modal-content .close-btn:hover {
  background: #c0392b;
}

.carousel-btn {
  border: 0;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  /* height: 30px; */
  padding: 0 !important;
  border-radius: 50%;
}
body.dark .carousel-btn {
  border: 0;
  background: rgba(0, 0, 0, 0.2);
}
.carousel-btn img {
  margin: 0 !important;
  width: 100% !important;
  height: 100% !important;
}
.episode-title {
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.popular-section h2 {
  display: inline-block;
  padding: 3px 6px;
  border-radius: 10px;
  font-weight: bold;
  font-size: 1.5rem;
  background: rgba(255, 255, 255, 0.2);
}
body.dark .popular-section h2 {
  background: rgba(0, 0, 0, 0.2);
}
/* بخش اصلی */
.designer-credit {
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #333;
  justify-content: space-between;
  border-radius: 8px;
  background: rgba(0, 74, 124, 0.08);
  padding: 5px;
  box-shadow: 4px rgba(0, 0, 0, 0.2);
  width: 100%;
  font-weight: bold;
}
body.dark .designer-credit {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
/* حباب لینک */
.designer-credit .designer-bubble {
  background: rgba(0, 123, 255, 0.15);
  color: #007bff;
  padding: 4px 12px;
  border-radius: 20px;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.3s, transform 0.2s;
  cursor: pointer;
}

.designer-credit .designer-bubble:hover {
  background: rgba(0, 123, 255, 0.15);
  color: #007bff;
  transform: scale(+2px);
}

/* ------------------ دارک مود ------------------ */
body.dark .designer-credit {
  color: #ccc; /* متن خاکستری روشن */
}

body.dark .designer-credit .designer-bubble {
  background: rgba(0, 123, 255, 0.35);
  color: #ffffffe3;
}

body.dark .designer-credit .designer-bubble:hover {
  background: #ca6f1e; /* نارنجی تیره‌تر در هاور */
}
.version-chip {
  background: rgba(0, 74, 124, 0.06);
  border-radius: 10px;
  padding: 5px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  margin: 0;
  font-size: 10px;
}
body.dark .version-chip {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
.links-toggle {
  cursor: pointer;
  background: rgba(0, 74, 124, 0.08);
  display: flex;
  width: 100%;
  flex-direction: row;
  align-items: center;
  font-weight: bold;
}
.links-toggle span {
  width: 100%;
}
/* ===== Chat to admin bubble ===== */
.chat-bubble {
  width: 100%;
  background: rgba(0, 74, 124, 0.08);
  border-radius: 10px;
  padding: 8px;
  box-shadow: 4px rgba(0, 0, 0, 0.2);
  position: relative;
}
body.dark .chat-bubble {
  background: rgba(255, 255, 255, 0.08);
}

.chat-bubble-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.chat-bubble-title {
  font-weight: bold;
}

/* ردیف ورودی جمع‌شده */
.chat-input-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}

.chat-bubble.chat-open .chat-input-row {
  display: none !important;
}
.chat-input-row input {
  width: 70%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fff;
  color: #222;
}
body.dark .chat-input-row input {
  background: #202020;
  color: #f1f1f1;
  border-color: #444;
}
.chat-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.chat-icon-btn {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
}
.chat-icon-btn.disabled {
  opacity: 0.5;
  cursor: default;
  pointer-events: none;
}
.chat-icon-btn img {
  width: 22px;
  height: 22px;
}

/* اوورلی تمام‌صفحه داخل سایدمنو */

.chat-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147480000;
  backdrop-filter: blur(12px);
  background: rgba(0, 0, 0, 0.45);
  grid-template-rows: auto 1fr auto;
}
.chat-overlay {
  top: 65px;
}
#chatOverlay {
  display: none;
}
#chatOverlay[aria-hidden="false"] {
  display: grid !important; /* وقتی باز شد */
}
.chat-overlay-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.85);
}
body.dark .chat-overlay-header {
  background: rgba(30, 36, 40, 0.85);
  color: #fff;
}

.chat-admin-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
}
.chat-overlay-title {
  font-weight: bold;
  margin-left: auto;
}

/* لیست پیام‌ها */
.chat-messages-list {
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* حباب پیام‌ها (شبیه iPhone) */
.msg-row {
  display: flex;
  width: 100%;
}
.msg-row.user {
  justify-content: flex-end;
}
.msg-row.admin {
  justify-content: flex-start;
}

.msg-bubble {
  max-width: 76%;
  border-radius: 14px;
  padding: 8px 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  display: inline-flex;
  flex-direction: column;
  gap: 6px;
}
.msg-bubble.user {
  background: linear-gradient(135deg, #2ecc716e, #1e84495c);
  color: #0b3d5c;
}
.msg-bubble.admin {
  background: #fff;
  color: #222;
  border: 1px solid rgba(0, 0, 0, 0.08);
}
body.dark .msg-bubble.admin {
  background: rgba(255, 255, 255, 0.08);
  color: #e6eef6;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.msg-image {
  width: 220px;
  max-width: 76vw;
  border-radius: 10px;
  object-fit: cover;
}
.msg-text {
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

.msg-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #666;
  line-height: 1;
  justify-content: end;
}
.msg-meta span {
  font-size: 0.7rem;
}
body.dark .msg-meta {
  color: #bbb;
}
.msg-meta img {
  width: 14px;
  height: 14px;
}

/* وضعیت در حال ارسال پیام (دایره چرخان کوچک) */
.msg-status-pending {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, 0.15);
  border-top-color: #2ecc71;
  animation: msg-spin 0.8s linear infinite;
}

body.dark .msg-status-pending {
  border-color: rgba(255, 255, 255, 0.25);
  border-top-color: #2ecc71;
}

@keyframes msg-spin {
  to {
    transform: rotate(360deg);
  }
}

/* بدج روی دکمه منو */
#menuBtn .chat-menu-badge {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: red;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: bold;
}

/* گرید پروفایل‌های کاربران در پنل ادمین */
.user-threads-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.user-thread-name {
  width: 100%;
  white-space: normal;
  overflow-wrap: break-word;
  font-weight: bold;
}
.user-thread-card {
  background: var(--post-day);
  border-radius: 10px;
  padding: 10px;
  width: 30%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
body.dark .user-thread-card {
  background: var(--post-night);
  color: #e6eef6;
}
.user-thread-card img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
}
.user-thread-snippet {
  font-size: 12px;
  color: #666;
  max-width: 90%;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.dark .user-thread-snippet {
  color: #bbb;
}
.admin-tabs .tab-circle .badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: red;
  color: #fff;
  font-size: 11px;
  font-weight: bold;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
}
.side-menu-bottom {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
ack-btn {
  background: #333;
  color: #fff;
}

.chat-admin-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
}
.chat-overlay-title {
  font-weight: bold;
  margin-left: auto;
}

/* لیست پیام‌ها */
.chat-messages-list {
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* حباب پیام‌ها (شبیه iPhone) */
.msg-row {
  display: flex;
  width: 100%;
}
.msg-row.user {
  justify-content: flex-end;
}
.msg-row.admin {
  justify-content: flex-start;
}

.msg-bubble {
  max-width: 76%;
  border-radius: 14px;
  padding: 8px 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  display: inline-flex;
  flex-direction: column;
  gap: 6px;
}
.msg-bubble.user {
  background: linear-gradient(135deg, #2ecc716e, #1e84495c);
  color: #0b3d5c;
}
.msg-bubble.admin {
  background: #fff;
  color: #222;
  border: 1px solid rgba(0, 0, 0, 0.08);
}
body.dark .msg-bubble.admin {
  background: rgba(255, 255, 255, 0.08);
  color: #e6eef6;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.msg-image {
  width: 220px;
  max-width: 76vw;
  border-radius: 10px;
  object-fit: cover;
}
.msg-text {
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

.msg-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #666;
  line-height: 1;
  justify-content: end;
}
.msg-meta span {
  font-size: 0.7rem;
}
body.dark .msg-meta {
  color: #bbb;
}
.msg-meta img {
  width: 14px;
  height: 14px;
}

/* کامپوزر پایین اوورلی */
.chat-composer {
  display: flex;
  align-items: center;
  padding: 8px;
  gap: 5px;
  background: rgba(255, 255, 255, 0.85);
}
body.dark .chat-composer {
  background: rgba(30, 36, 40, 0.85);
}
.chat-composer input {
  flex: 1;
  width: 0px;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fff;
  color: #222;
}
body.dark .chat-composer input {
  background: #202020;
  color: #f1f1f1;
  border-color: #444;
}

/* بدج روی دکمه منو */
#menuBtn .chat-menu-badge {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: red;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: bold;
}

/* گرید پروفایل‌های کاربران در پنل ادمین */
.user-threads-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.user-thread-card {
  background: var(--post-day);
  border-radius: 10px;
  padding: 10px;
  width: 30%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
body.dark .user-thread-card {
  background: var(--post-night);
  color: #e6eef6;
}
.user-thread-card img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
}
.user-thread-snippet {
  font-size: 12px;
  color: #666;
  max-width: 90%;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.dark .user-thread-snippet {
  color: #bbb;
}
min-tabs .tab-circle .badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: red;
  color: #fff;
  font-size: 11px;
  font-weight: bold;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
}
.side-menu-bottom {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.main-header.hide {
  transform: translateY(-100%);
}

.movie-type-tabs.hide {
  transform: translateY(-220px);
}
.movie-card,
.movie-card .anim-horizontal,
.movie-card .anim-vertical,
.movie-card .anim-left-right {
  will-change: transform, opacity;
  transition: transform 300ms ease, opacity 300ms ease;
}

/* وقتی active-down */
.movie-card.active-down {
  opacity: 1;
  transform: translateY(0);
}
.movie-card.active-up {
  opacity: 1;
  transform: translateY(0);
}

/* حالت اولیه (مخفی) مثال از پایین */
.movie-card {
  opacity: 0;
  transform: translateY(40px);
}
.movie-card.active-down,
.movie-card.active-up {
  opacity: 1;
  transform: translateY(0);
}

.movie-card.no-reveal,
#movie-modal .movie-card {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
  will-change: auto;
}
.go-top-container {
  position: fixed;
  position: fixed;
  bottom: 80px;
  right: 20px;
}
.go-top-button {
  width: 50px;
  height: 50px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  transition-duration: 0.3s;
  overflow: hidden;
  color: #000;
}
.go-top-button span {
  text-align: center;
  padding-left: 19px;
}

.svgIcon {
  width: 12px;
  transition-duration: 0.3s;
}

.svgIcon path {
  fill: #512bd4;
}

.go-top-button.active {
  width: 140px;
  border-radius: 50px;
  transition-duration: 0.3s;
  align-items: center;
}

.go-top-button.active .svgIcon {
  transition-duration: 0.3s;
  transform: translateY(-200%);
}

.go-top-button::before {
  position: absolute;
  bottom: -20px;
  content: "Back to Top";
  color: #512bd4;
  font-size: 0px;
}

.go-top-button.active::before {
  font-size: 13px;
  opacity: 1;
  bottom: unset;
  transition-duration: 0.3s;
}
/* Defs */
@property --angle-1 {
  syntax: "<angle>";
  inherits: false;
  initial-value: -75deg;
}

@property --angle-2 {
  syntax: "<angle>";
  inherits: false;
  initial-value: -45deg;
}

:root {
  --global--size: clamp(2rem, 4vw, 5rem);
  --anim--hover-time: 400ms;
  --anim--hover-ease: cubic-bezier(0.25, 1, 0.5, 1);
}

/* ========== BUTTON ========== */

/* Button Wrap Container */
.button-wrap {
  position: relative;
  z-index: 2;
  border-radius: 999vw;
  background: transparent;
  pointer-events: none;
  transition: all var(--anim--hover-time) var(--anim--hover-ease);
}

/* Button Shadow Container */
.button-shadow {
  --shadow-cuttoff-fix: 2em;
  position: absolute;
  width: calc(100% + var(--shadow-cuttoff-fix));
  height: calc(100% + var(--shadow-cuttoff-fix));
  top: calc(0% - var(--shadow-cuttoff-fix) / 2);
  left: calc(0% - var(--shadow-cuttoff-fix) / 2);
  filter: blur(clamp(2px, 0.125em, 12px));
  -webkit-filter: blur(clamp(2px, 0.125em, 12px));
  -moz-filter: blur(clamp(2px, 0.125em, 12px));
  -ms-filter: blur(clamp(2px, 0.125em, 12px));
  overflow: visible;
  pointer-events: none;
}

/* Shadow */
.button-shadow::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  border-radius: 999vw;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.1));
  width: calc(100% - var(--shadow-cuttoff-fix) - 0.25em);
  height: calc(100% - var(--shadow-cuttoff-fix) - 0.25em);
  top: calc(var(--shadow-cuttoff-fix) - 0.5em);
  left: calc(var(--shadow-cuttoff-fix) - 0.875em);
  padding: 0.125em;
  box-sizing: border-box;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  transition: all var(--anim--hover-time) var(--anim--hover-ease);
  overflow: visible;
  opacity: 1;
}

/* ========== BUTTON BASE STYLES ========== */

button {
  /* Basic Styling */
  --border-width: clamp(1px, 0.0625em, 4px);
  all: unset;
  cursor: pointer;
  position: relative;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  pointer-events: auto;
  z-index: 3;
  background: linear-gradient(
    -75deg,
    rgba(255, 255, 255, 0.05),
    rgba(255, 255, 255, 0.2),
    rgba(255, 255, 255, 0.05)
  );
  border-radius: 999vw;
  box-shadow: inset 0 0.125em 0.125em rgba(0, 0, 0, 0.05),
    inset 0 -0.125em 0.125em rgba(255, 255, 255, 0.5),
    0 0.25em 0.125em -0.125em rgba(0, 0, 0, 0.2),
    0 0 0.1em 0.25em inset rgba(255, 255, 255, 0.2),
    0 0 0 0 rgba(255, 255, 255, 1);
  backdrop-filter: blur(clamp(1px, 0.125em, 4px));
  -webkit-backdrop-filter: blur(clamp(1px, 0.125em, 4px));
  -moz-backdrop-filter: blur(clamp(1px, 0.125em, 4px));
  -ms-backdrop-filter: blur(clamp(1px, 0.125em, 4px));
  transition: all var(--anim--hover-time) var(--anim--hover-ease);
}

button:hover {
  transform: scale(0.975);
  backdrop-filter: blur(0.01em);
  -webkit-backdrop-filter: blur(0.01em);
  -moz-backdrop-filter: blur(0.01em);
  -ms-backdrop-filter: blur(0.01em);
  box-shadow: inset 0 0.125em 0.125em rgba(0, 0, 0, 0.05),
    inset 0 -0.125em 0.125em rgba(255, 255, 255, 0.5),
    0 0.15em 0.05em -0.1em rgba(0, 0, 0, 0.25),
    0 0 0.05em 0.1em inset rgba(255, 255, 255, 0.5),
    0 0 0 0 rgba(255, 255, 255, 1);
}

/* Button Text */
button span {
  position: relative;
  display: block;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  font-family: "Inter", sans-serif;
  letter-spacing: -0.05em;
  font-weight: 500;
  font-size: 1em;
  color: rgba(50, 50, 50, 1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-shadow: 0em 0.25em 0.05em rgba(0, 0, 0, 0.1);
  transition: all var(--anim--hover-time) var(--anim--hover-ease);
  padding-inline: 1.5em;
  padding-block: 0.875em;
}
body.dark button span {
  color: #fff;
}
button:hover span {
  text-shadow: 0.025em 0.025em 0.025em rgba(0, 0, 0, 0.12);
}

/* Text */
button span::after {
  content: "";
  display: block;
  position: absolute;
  z-index: 1;
  width: calc(100% - var(--border-width)); /* Prevent overlapping border */
  height: calc(100% - var(--border-width));
  top: calc(0% + var(--border-width) / 2);
  left: calc(0% + var(--border-width) / 2);
  box-sizing: border-box;
  border-radius: 999vw;
  overflow: clip;
  background: linear-gradient(
    var(--angle-2),
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.5) 40% 50%,
    rgba(255, 255, 255, 0) 55%
  );
  z-index: 3;
  mix-blend-mode: screen;
  pointer-events: none;
  background-size: 200% 200%;
  background-position: 0% 50%;
  background-repeat: no-repeat;
  transition: background-position calc(var(--anim--hover-time) * 1.25)
      var(--anim--hover-ease),
    --angle-2 calc(var(--anim--hover-time) * 1.25) var(--anim--hover-ease);
}

button:hover span::after {
  background-position: 25% 50%;
}

button:active span::after {
  background-position: 50% 15%;
  --angle-2: -15deg;
}

/* Touch Devices */
@media (hover: none) and (pointer: coarse) {
  button span::after,
  button:active span::after {
    --angle-2: -45deg;
  }
}

/* ========== BUTTON OUTLINE ========== */

/* Outline */
button::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  border-radius: 999vw;
  width: calc(100% + var(--border-width));
  height: calc(100% + var(--border-width));
  top: calc(0% - var(--border-width) / 2);
  left: calc(0% - var(--border-width) / 2);
  padding: var(--border-width);
  box-sizing: border-box;
  background: conic-gradient(
      from var(--angle-1) at 50% 50%,
      rgba(0, 0, 0, 0.5),
      rgba(0, 0, 0, 0) 5% 40%,
      rgba(0, 0, 0, 0.5) 50%,
      rgba(0, 0, 0, 0) 60% 95%,
      rgba(0, 0, 0, 0.5)
    ),
    linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.5));
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  transition: all var(--anim--hover-time) var(--anim--hover-ease),
    --angle-1 500ms ease;
  box-shadow: inset 0 0 0 calc(var(--border-width) / 2) rgba(255, 255, 255, 0.5);
}

button:hover::after {
  --angle-1: -125deg;
}

button:active::after {
  --angle-1: -75deg;
}

@media (hover: none) and (pointer: coarse) {
  button::after,
  button:hover::after,
  button:active::after {
    --angle-1: -75deg;
  }
}

/* Shadow Hover */
.button-wrap:has(button:hover) .button-shadow {
  filter: blur(clamp(2px, 0.0625em, 6px));
  -webkit-filter: blur(clamp(2px, 0.0625em, 6px));
  -moz-filter: blur(clamp(2px, 0.0625em, 6px));
  -ms-filter: blur(clamp(2px, 0.0625em, 6px));
  transition: filter var(--anim--hover-time) var(--anim--hover-ease);
}

.button-wrap:has(button:hover) .button-shadow::after {
  top: calc(var(--shadow-cuttoff-fix) - 0.875em);
  opacity: 1;
}

/* Rotation */
.button-wrap:has(button:active) {
  transform: rotate3d(1, 0, 0, 25deg);
}

.button-wrap:has(button:active) button {
  box-shadow: inset 0 0.125em 0.125em rgba(0, 0, 0, 0.05),
    inset 0 -0.125em 0.125em rgba(255, 255, 255, 0.5),
    0 0.125em 0.125em -0.125em rgba(0, 0, 0, 0.2),
    0 0 0.1em 0.25em inset rgba(255, 255, 255, 0.2),
    0 0.225em 0.05em 0 rgba(0, 0, 0, 0.05),
    0 0.25em 0 0 rgba(255, 255, 255, 0.75),
    inset 0 0.25em 0.05em 0 rgba(0, 0, 0, 0.15);
}

.button-wrap:has(button:active) .button-shadow {
  filter: blur(clamp(2px, 0.125em, 12px));
  -webkit-filter: blur(clamp(2px, 0.125em, 12px));
  -moz-filter: blur(clamp(2px, 0.125em, 12px));
  -ms-filter: blur(clamp(2px, 0.125em, 12px));
}

.button-wrap:has(button:active) .button-shadow::after {
  top: calc(var(--shadow-cuttoff-fix) - 0.5em);
  opacity: 0.75;
}

.button-wrap:has(button:active) span {
  text-shadow: 0.025em 0.25em 0.05em rgba(0, 0, 0, 0.12);
}

.split-text-container {
  display: flex;
  font-size: 5rem;
  font-weight: bold;
  text-transform: uppercase;
  color: #fff;
  overflow: hidden;
}

.text-part {
  display: inline-block;
  position: relative;
  transform: translateX(0);
  animation-duration: 2s;
  animation-timing-function: ease-out;
  animation-fill-mode: forwards;
}

.text-part.left {
  transform: translateX(-200%);
  animation-name: slide-in-left;
}

.text-part.right {
  transform: translateX(200%);
  animation-name: slide-in-right;
}

@keyframes slide-in-left {
  0% {
    transform: translateX(-200%);
  }
  100% {
    transform: translateX(0);
  }
}

@keyframes slide-in-right {
  0% {
    transform: translateX(200%);
  }
  100% {
    transform: translateX(0);
  }
}
.apply-imdb span {
  padding: 4px;
  text-align: center;
}
.apply-imdb {
  width: 100%;
}
.chat-back-btn {
  background: #fff;
  color: #111;
}
.userChatBackBtnspan {
  padding: 5px 10px;
}

body.dark .chat-back-btn {
  background: #333;
  color: #fff;
}

.theme-switch {
  --toggle-size: 12px;
  --container-width: 5.625em;
  --container-height: 2.5em;
  --container-radius: 6.25em;
  --container-light-bg: #3d7eae;
  --container-night-bg: #1d1f2c;
  --circle-container-diameter: 3.375em;
  --sun-moon-diameter: 2.125em;
  --sun-bg: #ecca2f;
  --moon-bg: #c4c9d1;
  --spot-color: #959db1;
  --circle-container-offset: calc(
    (var(--circle-container-diameter) - var(--container-height)) / 2 * -1
  );
  --stars-color: #fff;
  --clouds-color: #f3fdff;
  --back-clouds-color: #aacadf;
  --transition: 0.5s cubic-bezier(0, -0.02, 0.4, 1.25);
  --circle-transition: 0.3s cubic-bezier(0, -0.02, 0.35, 1.17);
}

.theme-switch,
.theme-switch *,
.theme-switch *::before,
.theme-switch *::after {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-size: var(--toggle-size);
}

.theme-switch__container {
  width: var(--container-width);
  height: var(--container-height);
  background-color: var(--container-light-bg);
  border-radius: var(--container-radius);
  overflow: hidden;
  cursor: pointer;
  -webkit-box-shadow: 0em -0.062em 0.062em rgba(0, 0, 0, 0.25),
    0em 0.062em 0.125em rgba(255, 255, 255, 0.94);
  box-shadow: 0em -0.062em 0.062em rgba(0, 0, 0, 0.25),
    0em 0.062em 0.125em rgba(255, 255, 255, 0.94);
  -webkit-transition: var(--transition);
  -o-transition: var(--transition);
  transition: var(--transition);
  position: relative;
  background-image: linear-gradient(
    to bottom,
    var(--container-light-bg) 0%,
    #5490c0 100%
  );
  transition: all var(--transition);
}

.theme-switch__container::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  -webkit-box-shadow: 0em 0.05em 0.187em rgba(0, 0, 0, 0.25) inset,
    0em 0.05em 0.187em rgba(0, 0, 0, 0.25) inset;
  box-shadow: 0em 0.05em 0.187em rgba(0, 0, 0, 0.25) inset,
    0em 0.05em 0.187em rgba(0, 0, 0, 0.25) inset;
  border-radius: var(--container-radius);
}

.theme-switch__checkbox {
  display: none;
}

.theme-switch__circle-container {
  width: var(--circle-container-diameter);
  height: var(--circle-container-diameter);
  background-color: rgba(255, 255, 255, 0.1);
  position: absolute;
  left: var(--circle-container-offset);
  top: var(--circle-container-offset);
  border-radius: var(--container-radius);
  -webkit-box-shadow: inset 0 0 0 3.375em rgba(255, 255, 255, 0.1),
    inset 0 0 0 3.375em rgba(255, 255, 255, 0.1),
    0 0 0 0.625em rgba(255, 255, 255, 0.1),
    0 0 0 1.25em rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 0 3.375em rgba(255, 255, 255, 0.1),
    inset 0 0 0 3.375em rgba(255, 255, 255, 0.1),
    0 0 0 0.625em rgba(255, 255, 255, 0.1),
    0 0 0 1.25em rgba(255, 255, 255, 0.1);
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-transition: var(--circle-transition);
  -o-transition: var(--circle-transition);
  transition: var(--circle-transition);
  pointer-events: none;
}

.theme-switch__sun-moon-container {
  pointer-events: auto;
  position: relative;
  z-index: 2;
  width: var(--sun-moon-diameter);
  height: var(--sun-moon-diameter);
  margin: auto;
  border-radius: var(--container-radius);
  background-color: var(--sun-bg);
  -webkit-box-shadow: 0.062em 0.062em 0.062em 0em rgba(254, 255, 239, 0.61)
      inset,
    0em -0.062em 0.062em 0em #a1872a inset;
  box-shadow: 0.062em 0.062em 0.062em 0em rgba(254, 255, 239, 0.61) inset,
    0em -0.062em 0.062em 0em #a1872a inset;
  -webkit-filter: drop-shadow(0.062em 0.125em 0.125em rgba(0, 0, 0, 0.25))
    drop-shadow(0em 0.062em 0.125em rgba(0, 0, 0, 0.25));
  filter: drop-shadow(0.062em 0.125em 0.125em rgba(0, 0, 0, 0.25))
    drop-shadow(0em 0.062em 0.125em rgba(0, 0, 0, 0.25));
  overflow: hidden;
  -webkit-transition: var(--transition);
  -o-transition: var(--transition);
  transition: var(--transition);
  transform: scale(1);
  transition: transform 0.3s ease;
}

.theme-switch__sun-moon-container:hover {
  transform: scale(1.1) rotate(5deg);
}

.theme-switch__moon {
  -webkit-transform: translateX(100%);
  -ms-transform: translateX(100%);
  transform: translateX(100%);
  width: 100%;
  height: 100%;
  background-color: var(--moon-bg);
  border-radius: inherit;
  -webkit-box-shadow: 0.062em 0.062em 0.062em 0em rgba(254, 255, 239, 0.61)
      inset,
    0em -0.062em 0.062em 0em #969696 inset;
  box-shadow: 0.062em 0.062em 0.062em 0em rgba(254, 255, 239, 0.61) inset,
    0em -0.062em 0.062em 0em #969696 inset;
  -webkit-transition: var(--transition);
  -o-transition: var(--transition);
  transition: var(--transition);
  position: relative;
  transition: all var(--transition), transform 0.3s ease;
}

.theme-switch__moon:hover {
  transform: rotate(15deg);
}

.theme-switch__spot {
  position: absolute;
  top: 0.75em;
  left: 0.312em;
  width: 0.75em;
  height: 0.75em;
  border-radius: var(--container-radius);
  background-color: var(--spot-color);
  -webkit-box-shadow: 0em 0.0312em 0.062em rgba(0, 0, 0, 0.25) inset;
  box-shadow: 0em 0.0312em 0.062em rgba(0, 0, 0, 0.25) inset;
  transition: background-color 0.3s ease;
}

.theme-switch__spot:nth-of-type(2) {
  width: 0.375em;
  height: 0.375em;
  top: 0.937em;
  left: 1.375em;
}

.theme-switch__spot:nth-last-of-type(3) {
  width: 0.25em;
  height: 0.25em;
  top: 0.312em;
  left: 0.812em;
}

.theme-switch__moon:hover .theme-switch__spot {
  background-color: #7a7f8c;
}

.theme-switch__clouds {
  width: 1.25em;
  height: 1.25em;
  background-color: var(--clouds-color);
  border-radius: var(--container-radius);
  position: absolute;
  bottom: -0.625em;
  left: 0.312em;
  -webkit-box-shadow: 0.937em 0.312em var(--clouds-color),
    -0.312em -0.312em var(--back-clouds-color),
    1.437em 0.375em var(--clouds-color), 0.5em -0.125em var(--back-clouds-color),
    2.187em 0 var(--clouds-color), 1.25em -0.062em var(--back-clouds-color),
    2.937em 0.312em var(--clouds-color), 2em -0.312em var(--back-clouds-color),
    3.625em -0.062em var(--clouds-color), 2.625em 0em var(--back-clouds-color),
    4.5em -0.312em var(--clouds-color),
    3.375em -0.437em var(--back-clouds-color),
    4.625em -1.75em 0 0.437em var(--clouds-color),
    4em -0.625em var(--back-clouds-color),
    4.125em -2.125em 0 0.437em var(--back-clouds-color);
  box-shadow: 0.937em 0.312em var(--clouds-color),
    -0.312em -0.312em var(--back-clouds-color),
    1.437em 0.375em var(--clouds-color), 0.5em -0.125em var(--back-clouds-color),
    2.187em 0 var(--clouds-color), 1.25em -0.062em var(--back-clouds-color),
    2.937em 0.312em var(--clouds-color), 2em -0.312em var(--back-clouds-color),
    3.625em -0.062em var(--clouds-color), 2.625em 0em var(--back-clouds-color),
    4.5em -0.312em var(--clouds-color),
    3.375em -0.437em var(--back-clouds-color),
    4.625em -1.75em 0 0.437em var(--clouds-color),
    4em -0.625em var(--back-clouds-color),
    4.125em -2.125em 0 0.437em var(--back-clouds-color);
  -webkit-transition: 0.5s cubic-bezier(0, -0.02, 0.4, 1.25);
  -o-transition: 0.5s cubic-bezier(0, -0.02, 0.4, 1.25);
  transition: 0.5s cubic-bezier(0, -0.02, 0.4, 1.25);
}

.theme-switch__stars-container {
  position: absolute;
  color: var(--stars-color);
  top: -100%;
  left: 0.312em;
  width: 2.75em;
  height: auto;
  -webkit-transition: var(--transition);
  -o-transition: var(--transition);
  transition: var(--transition);
}

/* actions */

.theme-switch__checkbox:checked + .theme-switch__container {
  background-color: var(--container-night-bg);
  background-image: linear-gradient(
    to bottom,
    var(--container-night-bg) 0%,
    #2d3142 100%
  );
}

.theme-switch__checkbox:checked
  + .theme-switch__container
  .theme-switch__circle-container {
  left: calc(
    100% - var(--circle-container-offset) - var(--circle-container-diameter)
  );
}

.theme-switch__checkbox:checked
  + .theme-switch__container
  .theme-switch__circle-container:hover {
  left: calc(
    100% - var(--circle-container-offset) - var(--circle-container-diameter) -
      0.187em
  );
}

.theme-switch__circle-container:hover {
  left: calc(var(--circle-container-offset) + 0.187em);
}

.theme-switch__checkbox:checked + .theme-switch__container .theme-switch__moon {
  -webkit-transform: translate(0);
  -ms-transform: translate(0);
  transform: translate(0);
}

.theme-switch__checkbox:checked
  + .theme-switch__container
  .theme-switch__clouds {
  bottom: -4.062em;
}

.theme-switch__checkbox:checked
  + .theme-switch__container
  .theme-switch__stars-container {
  top: 50%;
  -webkit-transform: translateY(-50%);
  -ms-transform: translateY(-50%);
  transform: translateY(-50%);
}

.theme-switch__container:hover .theme-switch__clouds {
  transform: translateX(15px) scale(1.02);
}

.theme-switch__sun-moon-container::after {
  content: "";
  position: absolute;
  inset: -5px;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.2) 0%,
    transparent 70%
  );
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.theme-switch__sun-moon-container:hover::after {
  opacity: 1;
}

.theme-switch__shooting-star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: white;
  top: 20%;
  left: -10%;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.theme-switch__shooting-star-2 {
  position: absolute;
  width: 1px;
  height: 1px;
  background: white;
  top: 35%;
  left: -10%;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.theme-switch__meteor {
  position: absolute;
  width: 3px;
  height: 3px;
  background: #ffd700;
  border-radius: 50%;
  top: -10%;
  left: 50%;
  opacity: 0;
  filter: blur(1px);
  transition: opacity 0.3s ease;
}

.theme-switch__checkbox:checked
  + .theme-switch__container
  .theme-switch__shooting-star {
  animation: shootingStar 2s linear infinite;
  opacity: 1;
}

.theme-switch__checkbox:checked
  + .theme-switch__container
  .theme-switch__shooting-star-2 {
  animation: shootingStar 3s linear infinite 1s;
  opacity: 1;
}

.theme-switch__checkbox:checked
  + .theme-switch__container
  .theme-switch__meteor {
  animation: meteor 4s linear infinite 2s;
  opacity: 1;
}

@keyframes shootingStar {
  0% {
    transform: translateX(0) translateY(0) rotate(45deg);
    opacity: 1;
  }
  100% {
    transform: translateX(150px) translateY(150px) rotate(45deg);
    opacity: 0;
  }
}

@keyframes meteor {
  0% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translateY(150px) scale(0.3);
    opacity: 0;
  }
}

.theme-switch__stars-cluster {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.theme-switch__stars-cluster .star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 0 4px 1px white;
}

.theme-switch__stars-cluster .star:nth-child(1) {
  top: 20%;
  left: 20%;
  animation: twinkle 1s infinite ease-in-out;
}
.theme-switch__stars-cluster .star:nth-child(2) {
  top: 30%;
  left: 55%;
  animation: twinkle 1s infinite ease-in-out 0.3s;
}
.theme-switch__stars-cluster .star:nth-child(3) {
  top: 40%;
  left: 80%;
  animation: twinkle 1s infinite ease-in-out 0.6s;
}
.theme-switch__stars-cluster .star:nth-child(4) {
  top: 60%;
  left: 30%;
  animation: twinkle 1s infinite ease-in-out 0.9s;
}
.theme-switch__stars-cluster .star:nth-child(5) {
  top: 70%;
  left: 65%;
  animation: twinkle 1s infinite ease-in-out 1.2s;
}

.theme-switch__aurora {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 20px;
  background: linear-gradient(
    90deg,
    rgba(0, 255, 255, 0) 0%,
    rgba(0, 255, 255, 0.2) 25%,
    rgba(128, 0, 255, 0.2) 50%,
    rgba(0, 255, 255, 0.2) 75%,
    rgba(0, 255, 255, 0) 100%
  );
  opacity: 0;
  filter: blur(4px);
  transform: translateY(-100%);
  transition: opacity 0.3s ease;
}

.theme-switch__comets {
  position: absolute;
  inset: 0;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.theme-switch__comets .comet {
  position: absolute;
  width: 2px;
  height: 2px;
  background: linear-gradient(90deg, white 0%, transparent 90%);
  border-radius: 50%;
  filter: blur(1px);
}

.theme-switch__comets .comet:nth-child(1) {
  top: 30%;
  left: -10%;
  animation: cometMove 4s linear infinite;
}

.theme-switch__comets .comet:nth-child(2) {
  top: 50%;
  left: -10%;
  animation: cometMove 6s linear infinite 2s;
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 0.3;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.2);
  }
}

@keyframes cometMove {
  0% {
    transform: translateX(0) translateY(0) rotate(-45deg) scale(1);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateX(200px) translateY(200px) rotate(-45deg) scale(0.2);
    opacity: 0;
  }
}

.theme-switch__checkbox:checked
  + .theme-switch__container
  .theme-switch__stars-cluster {
  opacity: 1;
}

.theme-switch__checkbox:checked
  + .theme-switch__container
  .theme-switch__aurora {
  opacity: 1;
  animation: auroraWave 8s linear infinite;
}

.theme-switch__checkbox:checked
  + .theme-switch__container
  .theme-switch__comets {
  opacity: 1;
}

@keyframes auroraWave {
  0% {
    transform: translateY(-100%) translateX(-50%);
  }
  100% {
    transform: translateY(-100%) translateX(50%);
  }
}
/* =========================
   HOMEPAGE MANAGER STYLES
========================= */

.homepage-manager-submenu {
  padding: 10px 8px;
  border-radius: 12px;
  margin: 10px 0;
  background: rgba(0, 74, 124, 0.05); /* شبیه rating-filter، بدون گلس */
  border: 1px solid rgba(0, 0, 0, 0.04);
}

body.dark .homepage-manager-submenu {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(148, 163, 184, 0.35);
}

.toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 4px;
  font-size: 14px;
  color: #111827;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.toggle-row:last-child {
  border-bottom: none;
}

body.dark .toggle-row {
  color: #e5e7eb;
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

/* TOGGLE SWITCH */
.switch {
  position: relative;
  width: 46px;
  height: 24px;
  display: inline-block;
}

.switch input {
  display: none;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  border-radius: 34px;
  background: #9ca3af;
  transition: 0.25s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: #f9fafb;
  border-radius: 50%;
  transition: 0.25s;
}

/* active */
input:checked + .slider {
  background: #0ea5e9;
}

input:checked + .slider:before {
  transform: translateX(22px);
}

/* dark mode tweaks */
body.dark .slider {
  background: #4b5563;
}

body.dark input:checked + .slider {
  background: #38bdf8;
}

body.dark .slider:before {
  background: #e5e7eb;
}
body.dark .toggle-row span {
  color: #fff;
}
/* =========================================
   REDUCE ANIMATIONS — ONLY MAIN MOVIE CARDS
   ========================================= */

/* فقط کارت‌های اصلی فیلم‌ها (نه کاروسل) */
body.reduce-animations .movie-card:not(.carousel-item) {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
  animation: none !important;
}

/* فقط wrapper کارت — نه عناصر داخلی کارت */
body.reduce-animations .movie-card:not(.carousel-item) > * {
  transition: none !important;
  animation: none !important;
}

/* فقط انیمیشن‌های اسکرول ورودی کارت‌ها */
body.reduce-animations .movie-card:not(.carousel-item) .anim-horizontal,
body.reduce-animations .movie-card:not(.carousel-item) .anim-vertical,
body.reduce-animations .movie-card:not(.carousel-item) .anim-left-right {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
  animation: none !important;
}

/* =========================================
   DO NOT TOUCH episode-title scrolling
   ========================================= */

/* اپیزودها مثل قبل حرکت کنند */
body.reduce-animations .episode-title,
body.reduce-animations .episode-title.scrolling {
  animation: inherit !important;
  transition: inherit !important;
  transform: inherit !important;
  opacity: inherit !important;
}
/* ================================
   TELEGRAM PROMO BOX
================================ */

.telegram-box {
  width: 75%;
  background: linear-gradient(135deg, #4cc7ff, #0090e6);
  border-radius: 18px;
  padding: 16px;
  margin: 20px 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-decoration: none;
  color: #fff;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s;
}

.telegram-box:hover {
  transform: scale(1.02);
}

.telegram-box-left {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.telegram-title {
  font-size: 18px;
  font-weight: 600;
}

.telegram-icon img {
  width: 48px;
  height: 48px;
}
/* ==========================================
   TABS WITH SLIDING BUBBLE INDICATOR
   ========================================== */

.tabs-container {
  position: relative;
  display: flex;
  padding: 2px;
  width: 100%;
  background: #eef3f7;
  justify-content: space-around;
  border-radius: 18px;
  gap: 4px;
}
body.dark .tabs-container {
  background: rgba(255, 255, 255, 0.03);
}
.tabs-container .tab-link {
  position: relative;
  z-index: 5;
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  flex: 0 0 auto;
  color: #0b3d5c;
  border: 1px solid #6e6e6e26;
  border-radius: 20px;
  padding: 3px 5px;
  font-size: 14px;
  font-weight: 700;
}

body.dark .tabs-container .tab-link {
  background: rgba(255, 255, 255, 0.03);
  color: #ffffff;
  border: 1px solid #ffffff;
}
.tabs-container .tab-link.active {
  background: #017ada;
  transition: all .5s;
  color: #fff;
}
body.dark .tabs-container .tab-link.active {
  background: #017ada;
  transition: all .5s;
  color: #fff;
}

.tabs-container .tab-link .count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #017ada;
  color: #fff;
  font-size: 10px;
  font-weight: bold;
  line-height: 1;
  box-sizing: border-box;
}
.tabs-container .tab-link.active .count {
  background: white;
  color: #017ada;
}

/* حباب شناور */
.tab-indicator {
  position: absolute;
  top: 6px;
  bottom: 6px;
  width: 0;
  border-radius: 20px;
  background: #017ada;
  transition: all 0.3s cubic-bezier(0.25, 1, 0.3, 1);
  z-index: 1;
  opacity: 1;
}

.tabs-container .tab-link.active.count {
  background: var(--primary-bg);
  color: #017ada;
}

/* ===================== Favorite Movies Overlay ===================== */

.favorites-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147480001;
  display: none;
  backdrop-filter: blur(12px);
  background: rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

#favoritesOverlay[aria-hidden="false"] {
  display: grid !important;
  grid-template-rows: auto 1fr;
}

.favorites-overlay-inner {
  margin-top: 65px; /* مثل chat overlay */
  display: grid;
  grid-template-rows: auto 1fr;
}

.favorites-overlay-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
}

body.dark .favorites-overlay-header {
  background: rgba(30, 36, 40, 0.9);
  color: #f5f5f5;
}

.favorites-title {
  font-weight: 700;
  font-size: 18px;
}

.favorites-overlay-body {
  padding: 12px 16px 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Grid 3×3 برای کاورها */

.favorites-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  overflow-y: auto;
  padding-right: 4px;
}

.favorite-item {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

body.dark .favorite-item {
  background: #1f252a;
  color: #f5f5f5;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.favorite-cover {
  width: 100%;
  border-radius: 8px;
  object-fit: cover;
  max-height: 180px;
}

.favorite-meta {
  font-size: 12px;
  opacity: 0.7;
}

.favorite-actions {
  margin-top: auto;
}

.favorite-actions .button-wrap {
  width: 100%;
}

.favorite-actions .favorite-goto-btn {
  width: 100%;
}

/* Pagination */

.favorites-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
}

.favorites-page-btn {
  border: none;
  background: #f0f0f0;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
}

.favorites-page-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

body.dark .favorites-page-btn {
  background: #2c3338;
  color: #f5f5f5;
}

.favorites-page-info {
  font-size: 13px;
  opacity: 0.8;
}

/* Empty state */

.favorites-empty {
  text-align: center;
  font-size: 14px;
  opacity: 0.8;
  padding: 24px 0;
}

/* هایلایت کارت وقتی از Favorite به پست اسکرول می‌کنیم */

.movie-card.highlight-favorite {
  outline: 2px solid #32b768;
  box-shadow: 0 0 0 3px rgba(50, 183, 104, 0.4);
  transition: box-shadow 0.2s ease, outline 0.2s ease;
}
/* ===================== Post Options Overlay ===================== */

.post-options-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147480002;
  display: none;
  align-items: center;
  justify-content: center;
}

.post-options-overlay.open {
  display: flex;
}

.post-options-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
}

.post-options-modal {
  position: relative;
  z-index: 1;
  background: #ffffff7d;
  border-radius: 16px;
  padding: 14px 16px 10px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
}

body.dark .post-options-modal {
  background: #1f252a;
  color: #f5f5f5;
}

.post-options-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.post-options-title {
  font-weight: 600;
  font-size: 16px;
}

.post-options-close-btn {
  border: none;
  background: transparent;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 3px 12px;
}
.favorite-goto-btn span {
  padding: 3px 5px;
}
.post-options-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.post-option-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  background: #f5f5f5;
}

body.dark .post-option-item {
  background: #2c3338;
}

.post-option-item:hover {
  background: #e8f7ed;
}

body.dark .post-option-item:hover {
  background: #253238;
}

.post-option-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 5px;
}

.post-option-title {
  font-size: 14px;
  font-weight: 600;
  padding: 0;
  margin-left: 15px;
}

.post-option-subtitle {
  font-size: 12px;
  opacity: 0.7;
  padding: 0;
  margin-left: 15px;
}

/* حالت favorite فعال → سبز ملایم */

.post-option-favorite.favorite-active {
  background: #e2f6ea;
  border: 1px solid #32b768;
}

body.dark .post-option-favorite.favorite-active {
  background: rgba(50, 183, 104, 0.15);
  border-color: #32b768;
}

.post-option-status {
  font-size: 12px;
  font-weight: 600;
  color: #32b768;
}
.favorites-overlay-content {
  height: calc(100vh - 80px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.favorites-grid {
  flex: 1;
  overflow: hidden;
}
.favorite-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  overflow: hidden;
  border-radius: 14px;
  padding: 5px;
}
.favorite-title {
  font-size: 12px;
  font-weight: 600;
  margin-top: 3px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  text-overflow: ellipsis;
}
.favorite-cover {
  width: 100%;
  aspect-ratio: 9/15;
  object-fit: cover;
  border-radius: 14px;
}
.search-highlight {
  background-color: rgba(255, 230, 0, 0.6);
  border-radius: 6px;
  display: inline;
  line-height: 1;
}

/* Dark mode */
body.dark .search-highlight {
  background-color: rgba(255, 255, 0, 0.35);
}
/* ---- Site features footer ---- */

.site-features {
  max-width: 1100px;
  margin: 40px auto 32px;
  padding: 20px 18px 24px;
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.03);
  backdrop-filter: blur(6px);
}

.site-features h2 {
  font-size: 1.15rem;
  margin: 0 0 12px 0;
  font-weight: 700;
  text-align: center;
  direction: rtl;
}

/* آکاردئون امکانات */
.feature-accordion {
  border-radius: 14px;
  display: flex;
  justify-content: center;
  padding: 9px;
  align-items: center;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.9);
  margin-bottom: 8px;
  overflow: hidden;
  /* border: 1px solid rgba(0, 0, 0, 0.04); */
}

body.dark .feature-accordion {
  background: rgba(255, 255, 255, 0.08);
}

.feature-accordion-header {
  width: 90%;
  display: flex;
  justify-content: end;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
}
/* برای دسترسی‌پذیری */
.feature-accordion-header:focus-visible {
  outline: 2px solid rgba(88, 86, 214, 0.85);
}

.feature-title {
  text-align: right;
  direction: rtl;
  font-size: 15px;
  font-weight: bold;
}

.feature-icon {
  width: 15px;
  transform: rotate(-90deg);
  transition: transform 0.2s ease;
  font-size: 0.9rem;
}

.feature-accordion.open .feature-icon {
  transform: rotate(90deg);
}

.feature-accordion-body {
  font-size: 0.88rem;
  line-height: 1.7;
  padding: 0 12px 0;
  text-align: justify;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease, padding-bottom 0.25s ease;
  direction: rtl;
}

.feature-accordion.open .feature-accordion-body {
  max-height: 260px; /* کافی برای متن هر گزینه؛ در صورت نیاز عدد را بیشتر کن */
  padding-bottom: 10px;
}

/* ---- end site features ---- */
.active-filters-toast {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2147647;
  display: flex;
  flex-direction: column; /* مهم */
  align-items: center;
  gap: 8px;
  pointer-events: none;
}
#btnClearRatingFilter span {
  padding: 1px 6px 4px 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
#btnClearRatingFilter {
  background: none;
  padding: 0;
  border-radius: 999vw;
}
