* { margin: 0; padding: 0; box-sizing: border-box; }

/* ============================================================ */
/* ========== متغیرهای رنگ ========== */
/* ============================================================ */

:root {
  --primary: #3B82F6;
  --primary-hover: #2563EB;
  --primary-active: #1D4ED8;
  --primary-light: #eff6ff;
  --primary-dark: #1e3a8a;
  --primary-rgb: 59, 130, 246;
  --bg-color: #f5f5f5;
  --text-color: #202124;
  --card-bg: #ffffff;
  --border-color: #e8eaed;
  --shadow-color: rgba(0,0,0,0.05);
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-color);
  font-family: 'Vazirmatn', 'Segoe UI', Roboto, sans-serif;
  color: var(--text-color);
  min-height: 100vh;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* container - اسکرول داخلی */
.container {
  max-width: 480px;
  margin: 0 auto;
  background-color: var(--card-bg);
  box-shadow: 0 0 20px var(--shadow-color);
  height: 100vh;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-y: auto;  /* ← اسکرول روی container */
  overflow-x: hidden;
  transition: background-color 0.3s ease;
}

.header { 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  padding: 12px 16px; 
  background: var(--card-bg); 
  border-bottom: 1px solid var(--border-color); 
  z-index: 10; 
  flex-shrink: 0; 
  transition: background-color 0.3s ease, border-color 0.3s ease; 
}
.search-section { 
  padding: 0; 
  width: 100%; 
}
.search-box { 
  background: #f1f3f4; 
  border-radius: 10px; 
  display: flex; 
  align-items: center; 
  padding: 10px 16px; 
  gap: 8px; 
  color: #5f6368; 
  font-size: 14px; 
  border: 1px solid transparent; 
  transition: 0.2s; 
  width: 100%; 
}
.search-box input { 
  border: none; 
  background: transparent; 
  outline: none; 
  font-size: 14px; 
  color: var(--text-color); 
  flex: 1; 
  text-align: right; 
  font-family: 'Vazirmatn', sans-serif; 
  transition: color 0.3s ease; 
}
.search-box input::placeholder { 
  color: #5f6368; 
}
.search-box .search-icon { 
  width: 18px; 
  height: 18px; 
  flex-shrink: 0; 
  color: #5f6368; 
}
.header-title-section { 
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  width: 100%; 
}
.header-title { 
  font-size: 18px; 
  font-weight: 600; 
  color: var(--text-color); 
  transition: color 0.3s ease; 
}
.header-back-only { 
  display: flex; 
  align-items: center; 
  gap: 8px; 
  width: 100%; 
}
.back-btn { 
  width: 36px; 
  height: 36px; 
  border-radius: 50%; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  cursor: pointer; 
  transition: 0.2s; 
  color: #5f6368; 
  border: none; 
  background: none; 
  flex-shrink: 0; 
  box-shadow: none !important; 
}
.back-btn:hover { 
  background: rgba(var(--primary-rgb), 0.1); 
}
.back-btn svg { 
  width: 22px; 
  height: 22px; 
  transform: scaleX(-1); 
}
.back-title { 
  font-size: 17px; 
  font-weight: 600; 
  color: var(--text-color); 
  transition: color 0.3s ease; 
}

#page-content { 
  flex: 1; 
  overflow-x: hidden; 
  -webkit-overflow-scrolling: touch; 
  transition: opacity 0.2s ease; 
    overflow-y: visible; /* ← دیگه اسکرول نداره */
  padding-bottom: 0; /* ← چون فوتر داخلش نیست */
}

#page-content.loading { 
  opacity: 0.5; 
}

/* ========== مخفی کردن هدر جستجو ========== */
#searchHeader.hidden { 
  display: none !important; 
}
#searchSection.hidden { 
  display: none !important; 
}

/* ========== اسلایدر ========== */
.slider-section { 
  margin: 10px 16px 14px; 
  position: relative; 
  overflow: hidden; 
  border-radius: 16px; 
}
.slides-container { 
  display: flex; 
  overflow-x: auto; 
  scroll-snap-type: x mandatory; 
  scroll-behavior: smooth; 
  scrollbar-width: none; 
  -ms-overflow-style: none; 
  border-radius: 16px; 
  direction: ltr; 
}
.slides-container::-webkit-scrollbar { 
  display: none; 
}
.slide { 
  flex: 0 0 100%; 
  scroll-snap-align: start; 
  min-height: 180px; 
  border-radius: 16px; 
  background-size: cover; 
  background-position: center; 
  background-repeat: no-repeat; 
}

.slide-bg-1 { 
  background: linear-gradient(135deg, #3B82F6, #2563EB); 
}
.slide-bg-2 { 
  background: linear-gradient(135deg, #e65100, #f57c00); 
}
.slide-bg-3 { 
  background: linear-gradient(135deg, #2e7d32, #43a047); 
}
.slide-bg-4 { 
  background: linear-gradient(135deg, #6a1b9a, #8e24aa); 
}

/* ========== دات‌های اسلایدر ========== */
.slider-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
  position: absolute;
  bottom: 8px;
  left: 0;
  right: 0;
  z-index: 5;
}

.slider-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: 0.3s;
}

.slider-dot.active {
  background: var(--primary);
  transform: scale(1.2);
}

/* ========== بخش‌های اصلی ========== */
.section-header { 
  display: flex; 
  justify-content: space-between; 
  align-items: baseline; 
  padding: 10px 16px 6px; 
}
.section-header h2 { 
  font-size: 17px; 
  font-weight: 600; 
  color: var(--text-color); 
  transition: color 0.3s ease; 
}
.section-header span { 
  color: var(--primary); 
  font-size: 13px; 
  font-weight: 500; 
  cursor: pointer; 
}

.app-row { 
  display: flex; 
  gap: 12px; 
  padding: 6px 16px 14px; 
  overflow-x: auto; 
  scrollbar-width: none; 
  -ms-overflow-style: none; 
}
.app-row::-webkit-scrollbar { 
  display: none; 
}
.app-card { 
  min-width: 110px; 
  max-width: 110px; 
  text-align: center; 
  cursor: pointer; 
  flex-shrink: 0; 
  transition: transform 0.2s ease;
}
.app-card:hover { 
  transform: scale(1.05); 
}
.app-card:active { 
  transform: scale(0.95); 
}

.app-icon { 
  width: 80px; 
  height: 80px; 
  background: #f1f3f4; 
  border-radius: 20px; 
  margin: 0 auto 10px; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  box-shadow: 0 4px 8px rgba(0,0,0,0.08); 
  overflow: hidden; 
  transition: background-color 0.3s ease;
}
.app-icon svg { 
  width: 40px; 
  height: 40px; 
}
.app-icon img { 
  width: 100%; 
  height: 100%; 
  object-fit: cover; 
}

.app-name { 
  font-size: 13px; 
  font-weight: 500; 
  color: var(--text-color); 
  white-space: normal;
  overflow: hidden; 
  text-overflow: ellipsis;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-word;
  max-height: 36px;
  transition: color 0.3s ease;
}

.category-slider-section { 
  margin-bottom: 16px; 
}
.category-slider-section .section-header { 
  display: flex; 
  justify-content: space-between; 
  align-items: baseline; 
  padding: 10px 16px 6px; 
}
.category-slider-section .section-header h2 { 
  font-size: 17px; 
  font-weight: 600; 
  color: var(--text-color); 
  transition: color 0.3s ease; 
}
.category-slider-section .section-header span { 
  color: var(--primary); 
  font-size: 13px; 
  font-weight: 500; 
  cursor: pointer; 
}

.category-app-row { 
  display: flex; 
  gap: 12px; 
  padding: 6px 16px 14px; 
  overflow-x: auto; 
  scrollbar-width: none; 
  -ms-overflow-style: none; 
}
.category-app-row::-webkit-scrollbar { 
  display: none; 
}

.topcharts-slider { 
  display: none; 
}

/* ========== منوی شناور پایین ========== */
.bottom-nav { 
  position: fixed; 
  bottom: 0; 
  left: 0; 
  right: 0; 
  width: 100%; 
  max-width: 480px; 
  margin: 0 auto; 
  display: flex; 
  justify-content: space-around; 
  align-items: center; 
  padding: 8px 6px; 
  background: rgba(255,255,255,0.95); 
  backdrop-filter: blur(20px); 
  -webkit-backdrop-filter: blur(20px); 
  border-radius: 20px 20px 0 0; 
  box-shadow: 0 -2px 16px rgba(0,0,0,0.08); 
  z-index: 50; 
  transition: transform 0.3s ease, opacity 0.3s ease, background 0.3s ease; 
}
.bottom-nav.hidden { 
  transform: translateY(120px); 
  opacity: 0; 
  pointer-events: none; 
}

/* ========== آیتم‌های منو ========== */

.nav-item { 
  display: flex; 
  flex-direction: column; 
  align-items: center; 
  color: #5f6368; 
  font-size: 10px; 
  gap: 3px; 
  cursor: pointer; 
  padding: 6px 10px; 
  border-radius: 14px; 
  transition: 0.2s; 
  box-shadow: none !important; 
  position: relative; 
  text-decoration: none !important;
  -webkit-tap-highlight-color: transparent;
}

.nav-item:hover {
  text-decoration: none !important;
  color: #3B82F6;
}

.nav-item:visited {
  text-decoration: none !important;
  color: #5f6368;
}

.nav-item.active:visited {
  color: var(--primary);
}
.nav-item svg { 
  width: 22px; 
  height: 22px; 
}

/* ========== استایل Active منو ========== */
.nav-item.active { 
  color: var(--primary); 
  background: rgba(var(--primary-rgb), 0.08);
}

.nav-item.active svg {
  stroke: var(--primary);
}

/* ========== نقطه اعلان (Notification Dot) ========== */
.nav-item.has-notification::after {
  content: '';
  position: absolute;
  top: 2px;
  right: 8px;
  width: 8px;
  height: 8px;
  background-color: var(--primary);
  border-radius: 50%;
  border: 1.5px solid white;
  animation: pulse-notification 1.5s infinite;
}

@keyframes pulse-notification {
  0% { transform: scale(0.8); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.7; }
  100% { transform: scale(0.8); opacity: 1; }
}

/* ========== صفحه جزئیات اپلیکیشن ========== */
.detail-page-wrapper { 
  padding-bottom: 30px; 
  position: relative; 
}
.detail-hero-new { 
  display: flex; 
  align-items: center; 
  gap: 14px; 
  padding: 16px; 
  background: #f8f9fa; 
  margin: 0; 
  transition: background-color 0.3s ease; 
}
.detail-icon-new { 
  width: 64px; 
  height: 64px; 
  border-radius: 16px; 
  background: white; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  flex-shrink: 0; 
  box-shadow: 0 2px 10px rgba(0,0,0,0.08); 
  overflow: hidden; 
  transition: background-color 0.3s ease; 
}
.detail-icon-new svg { 
  width: 36px; 
  height: 36px; 
}
.detail-icon-new img { 
  width: 100%; 
  height: 100%; 
  object-fit: cover; 
}
.detail-info-new { 
  flex: 1; 
}
.detail-name { 
  font-size: 18px; 
  font-weight: 700; 
  color: var(--text-color); 
  margin-bottom: 2px; 
  transition: color 0.3s ease; 
}
.detail-dev { 
  font-size: 13px; 
  color: #5f6368; 
  margin-bottom: 6px; 
  transition: color 0.3s ease; 
}

.detail-stats-row-wrapper {
  display: flex;
  align-items: stretch;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.detail-stats-row {
  display: flex;
  gap: 10px;
  flex: 1;
  min-width: 0;
  margin-bottom: 0 !important;
}

.detail-stats-row .detail-stat-card {
  flex: 1;
  text-align: center;
  padding: 12px 6px;
  background: #f8f9fa;
  border-radius: 12px;
  transition: background-color 0.3s ease;
  min-width: 0;
}

.detail-stat-value {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-color);
  transition: color 0.3s ease;
}

.detail-stat-label {
  font-size: 11px;
  color: #5f6368;
  margin-top: 3px;
  transition: color 0.3s ease;
}

/* ========== باکس ثبت نام (موبایل - شناور) ========== */
.detail-floating-install {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px 20px;
  background: var(--card-bg);
  border-top: 1px solid var(--border-color);
  z-index: 30;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.detail-bottom-info { 
  flex: 1; 
}
.detail-bottom-price { 
  font-size: 18px; 
  font-weight: 700; 
  color: var(--text-color); 
  transition: color 0.3s ease; 
}
.detail-bottom-note { 
  font-size: 11px; 
  color: #34a853; 
  margin-top: 2px; 
}
.detail-install-btn { 
  background: var(--primary); 
  color: white; 
  border: none; 
  padding: 16px 64px; 
  border-radius: 14px; 
  font-size: 17px; 
  font-weight: 600; 
  cursor: pointer; 
  font-family: 'Vazirmatn', sans-serif; 
  transition: 0.2s; 
  white-space: nowrap; 
  flex-shrink: 0; 
  box-shadow: none !important; 
}
.detail-install-btn:hover { 
  background: var(--primary-hover); 
}
.detail-install-btn:active { 
  background: var(--primary-active); 
}

.detail-description-content { 
  position: relative; 
}

.description-text {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: all 0.3s ease;
  font-size: 13px;
  color: #5f6368;
  line-height: 1.7;
}

.description-text.expanded {
  display: block;
  -webkit-line-clamp: unset;
  -webkit-box-orient: unset;
}

.description-toggle-btn {
  background: none;
  border: none;
  color: var(--primary);
  font-weight: 500;
  cursor: pointer;
  font-family: 'Vazirmatn', sans-serif;
  padding: 8px 0;
  font-size: 13px;
  display: none;
  transition: color 0.3s ease;
}

.description-toggle-btn:hover { 
  text-decoration: underline; 
}

.detail-description { 
  margin-bottom: 20px; 
}
.detail-description h3 { 
  font-size: 16px; 
  font-weight: 600; 
  margin-bottom: 7px; 
  color: var(--text-color); 
  transition: color 0.3s ease; 
}
.detail-description p { 
  font-size: 13px; 
  color: #5f6368; 
  line-height: 1.7; 
  transition: color 0.3s ease; 
}
.detail-info-section { 
  padding: 16px; 
}

/* ========== صفحه دسته‌بندی ========== */
.category-container { 
  padding: 0; 
}
.category-list { 
  padding: 0; 
}
.category-list .list-card { 
  display: flex; 
  align-items: center; 
  gap: 14px; 
  padding: 14px 16px; 
  border-bottom: 1px solid #f1f3f4; 
  cursor: pointer; 
  transition: 0.2s; 
}
.category-list .list-card:hover { 
  background: #f8f9fa; 
}
.category-list .list-icon { 
  width: 50px; 
  height: 50px; 
  background: #f1f3f4; 
  border-radius: 12px; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  flex-shrink: 0; 
  overflow: hidden; 
  transition: background-color 0.3s ease; 
}
.category-list .list-icon svg { 
  width: 26px; 
  height: 26px; 
}
.category-list .list-info { 
  flex: 1; 
}
.category-list .list-title { 
  font-weight: 500; 
  font-size: 15px; 
  color: var(--text-color); 
  transition: color 0.3s ease; 
}
.category-list .list-dev { 
  font-size: 12px; 
  color: #5f6368; 
  margin-top: 2px; 
  transition: color 0.3s ease; 
}
.category-list .list-stars { 
  color: #f9ab00; 
  font-size: 13px; 
}

/* ========== صفحه چت‌ها ========== */
.chats-container { 
  padding: 0; 
}
.chat-list { 
  padding: 0; 
}
.chat-item { 
  display: flex; 
  align-items: center; 
  gap: 12px; 
  padding: 12px 16px; 
  cursor: pointer; 
  transition: 0.2s; 
  border-bottom: 1px solid #f1f3f4; 
}
.chat-item:hover { 
  background: #f8f9fa; 
}
.chat-item.active { 
  background: var(--primary-light);
  border-right: 3px solid var(--primary);
}
.chat-avatar { 
  width: 48px; 
  height: 48px; 
  border-radius: 50%; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  color: white; 
  flex-shrink: 0; 
}
.chat-avatar svg { 
  width: 22px; 
  height: 22px; 
}
.chat-avatar.blue { 
  background: var(--primary); 
} 
.chat-avatar.green { 
  background: #34a853; 
} 
.chat-avatar.orange { 
  background: #f9ab00; 
} 
.chat-avatar.purple { 
  background: #7b1fa2; 
} 
.chat-avatar.red { 
  background: #ea4335; 
}
.chat-info { 
  flex: 1; 
  min-width: 0; 
}
.chat-name { 
  font-weight: 500; 
  font-size: 14px; 
  color: var(--text-color); 
  transition: color 0.3s ease; 
}
.chat-message { 
  font-size: 12px; 
  color: #5f6368; 
  margin-top: 2px; 
  white-space: nowrap; 
  overflow: hidden; 
  text-overflow: ellipsis; 
  transition: color 0.3s ease; 
}
.chat-meta { 
  text-align: left; 
  flex-shrink: 0; 
  display: flex; 
  flex-direction: column; 
  align-items: flex-end; 
  gap: 4px; 
}
.chat-time { 
  font-size: 11px; 
  color: #5f6368; 
  transition: color 0.3s ease; 
}
.chat-badge { 
  display: inline-block; 
  background: var(--primary); 
  color: white; 
  font-size: 10px; 
  font-weight: 600; 
  padding: 2px 6px; 
  border-radius: 10px; 
  margin-top: 3px; 
}

.chat-sender-name-in-list {
  font-weight: 500;
  color: var(--primary);
  font-size: 11px;
  margin-left: 4px;
}

.chat-unread-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--primary);
  color: white;
  font-size: 11px;
  font-weight: 600;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 20px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
.chat-unread-badge.max { 
  font-size: 10px; 
  min-width: 24px; 
  padding: 0 5px; 
}

/* ========== صفحه جزئیات چت ========== */
.chat-detail-container { 
  display: flex; 
  flex-direction: column; 
  height: 100%; 
  background: var(--card-bg); 
  transition: background-color 0.3s ease; 
}
.chat-detail-messages { 
  flex: 1; 
  overflow-y: auto; 
  padding: 14px 14px 90px; 
  display: flex; 
  flex-direction: column; 
  gap: 5px; 
  background: var(--card-bg); 
  transition: background-color 0.3s ease; 
}
.chat-msg { 
  max-width: 80%; 
  padding: 9px 12px; 
  border-radius: 14px; 
  font-size: 13px; 
  line-height: 1.6; 
  position: relative; 
  word-wrap: break-word; 
}
.chat-msg.sent { 
  align-self: flex-end; 
  background: var(--primary); 
  color: white; 
  border-bottom-right-radius: 4px; 
}
.chat-msg.received { 
  align-self: flex-start; 
  background: #f1f3f4; 
  color: var(--text-color); 
  border-bottom-left-radius: 4px; 
  transition: background-color 0.3s ease, color 0.3s ease; 
}
.chat-msg-time { 
  font-size: 10px; 
  opacity: 0.7; 
  margin-top: 3px; 
  text-align: left; 
  font-family: 'Vazirmatn', monospace; 
  direction: ltr; 
}

.chat-image-wrapper {
  position: relative;
  display: inline-block;
  margin: 0;
  line-height: 0;
  background: transparent !important;
}

.chat-image-time {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: transparent;
  color: white;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Vazirmatn', monospace;
  z-index: 5;
  direction: ltr;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.chat-msg:has(.chat-image-wrapper) {
  background: transparent !important;
  padding: 0 !important;
  margin: 0 0 8px 0 !important;
  box-shadow: none !important;
}
.chat-msg:has(.chat-image-wrapper) .chat-msg-time { 
  display: none; 
}

.chat-image-thumb {
  max-width: 200px;
  max-height: 200px;
  border-radius: 12px;
  cursor: pointer;
  object-fit: cover;
  transition: 0.2s;
  display: block;
}

.chat-msg audio {
  width: 280px;
  height: 56px;
  border-radius: 30px;
  background: transparent;
  outline: none;
}
.chat-msg audio::-webkit-media-controls-panel {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  border-radius: 30px;
}
.chat-msg audio::-webkit-media-controls-current-time-display,
.chat-msg audio::-webkit-media-controls-time-remaining-display {
  color: white;
  font-weight: 500;
  font-size: 13px;
}
.chat-msg audio::-webkit-media-controls-timeline {
  background-color: rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  height: 4px;
}
.chat-msg audio::-webkit-media-controls-volume-slider {
  background-color: rgba(255, 255, 255, 0.3);
  border-radius: 10px;
}
.chat-msg:has(audio) {
  background: transparent !important;
  padding: 4px 0 !important;
}
.chat-msg:has(audio) .chat-msg-time { 
  color: #5f6368; 
}

.chat-file-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  background: rgba(var(--primary-rgb), 0.15);
  border-radius: 16px;
  text-decoration: none;
  color: white !important;
  font-size: 14px;
  font-weight: 500;
  direction: rtl;
}
.chat-file-link .file-name { 
  flex: 1; 
  text-align: right; 
  color: white; 
}
.chat-file-link .file-icon { 
  font-size: 24px; 
  order: 2; 
}

.chat-detail-input-bar {
  position: fixed; 
  bottom: 0; 
  left: 50%; 
  transform: translateX(-50%); 
  width: 100%; 
  max-width: 480px; 
  display: flex; 
  align-items: center; 
  gap: 8px; 
  padding: 8px 12px 16px; 
  background: var(--card-bg); 
  border-top: 1px solid var(--border-color); 
  z-index: 25; 
  transition: background-color 0.3s ease, border-color 0.3s ease; 
}
.chat-input-wrapper { 
  flex: 1; 
  display: flex; 
  align-items: center; 
  background: #f1f3f4; 
  border-radius: 24px; 
  padding: 4px 6px; 
  gap: 4px; 
  transition: background-color 0.3s ease; 
}
.chat-detail-input { 
  flex: 1; 
  padding: 10px 8px; 
  background: transparent; 
  border: none; 
  font-size: 14px; 
  outline: none; 
  font-family: 'Vazirmatn', sans-serif; 
  min-width: 0; 
  color: var(--text-color); 
  transition: color 0.3s ease; 
}
.chat-detail-input::placeholder { 
  color: #5f6368; 
  transition: color 0.3s ease; 
}

.chat-send-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #c8e6e9;
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: 0.2s;
  box-shadow: none !important;
  opacity: 0.6;
  transition: all 0.2s ease;
}
.chat-send-btn svg { 
  width: 18px; 
  height: 18px; 
}
.chat-send-btn.visible {
  display: flex;
  background: var(--primary);
  opacity: 1;
  cursor: pointer;
}
.chat-send-btn.visible:hover { 
  background: var(--primary-hover); 
  transform: scale(1.02); 
}

.chat-mic-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: transparent;
  color: #5f6368;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: 0.2s;
  box-shadow: none !important;
}
.chat-mic-btn.hidden { 
  display: none; 
}
.chat-mic-btn:hover { 
  background: rgba(var(--primary-rgb), 0.1); 
}
.chat-mic-btn svg { 
  width: 20px; 
  height: 20px; 
}

.chat-attach-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}
.chat-attach-main {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #5f6368;
  transition: 0.2s;
  box-shadow: none !important;
}
.chat-attach-main:hover { 
  background: rgba(var(--primary-rgb), 0.1); 
}
.chat-attach-main svg { 
  width: 20px; 
  height: 20px; 
}

.chat-attach-dropdown {
  position: absolute;
  bottom: 50px;
  left: -120px;
  background: var(--card-bg);
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  min-width: 160px;
  z-index: 100;
  display: none;
  overflow: hidden;
  animation: fadeInUp 0.2s ease;
  transition: background-color 0.3s ease;
}
.chat-attach-dropdown.show { 
  display: block; 
}
.chat-attach-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  transition: 0.2s;
  font-size: 14px;
  color: var(--text-color);
}
.chat-attach-item:hover { 
  background: #f1f3f4; 
}
.chat-attach-item svg { 
  width: 20px; 
  height: 20px; 
}

/* ========== دکمه‌های دستیار ========== */
.assistant-send-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #c8e6e9;
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: 0.2s;
  box-shadow: none !important;
  opacity: 0.6;
  transition: all 0.2s ease;
}
.assistant-send-btn svg { 
  width: 18px; 
  height: 18px; 
}
.assistant-send-btn.visible {
  display: flex;
  background: var(--primary);
  opacity: 1;
  cursor: pointer;
}
.assistant-send-btn.visible:hover { 
  background: var(--primary-hover); 
  transform: scale(1.02); 
}

.assistant-mic-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: transparent;
  color: #5f6368;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: 0.2s;
  box-shadow: none !important;
}
.assistant-mic-btn.hidden { 
  display: none; 
}
.assistant-mic-btn:hover { 
  background: rgba(var(--primary-rgb), 0.1); 
}
.assistant-mic-btn svg { 
  width: 18px; 
  height: 18px; 
}

.assistant-attach-dropdown {
  position: absolute;
  bottom: 50px;
  left: 0;
  background: var(--card-bg);
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  min-width: 150px;
  z-index: 100;
  display: none;
  overflow: hidden;
  animation: fadeInUp 0.2s ease;
  transition: background-color 0.3s ease;
}
.assistant-attach-dropdown.show { 
  display: block; 
}

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

/* ========== مودال بزرگنمایی عکس ========== */
.image-modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.95);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}
.image-modal.active { 
  opacity: 1; 
  visibility: visible; 
}
.image-modal-content {
  max-width: 90vw;
  max-height: 90vh;
  position: relative;
}
.image-modal-content img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 12px;
}
.image-modal-download {
  position: absolute;
  top: -50px;
  left: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s;
  color: white;
  z-index: 10;
}
.image-modal-download:hover { 
  background: rgba(var(--primary-rgb), 0.7); 
  transform: scale(1.05); 
}
.image-modal-download svg { 
  width: 20px; 
  height: 20px; 
  stroke: white; 
  stroke-width: 2; 
}
.image-modal-close {
  position: absolute;
  top: -50px;
  right: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s;
  z-index: 10;
}
.image-modal-close:hover { 
  background: rgba(255,255,255,0.3); 
}

@media (max-width: 600px) {
  .image-modal-download { top: 20px; left: 20px; }
  .image-modal-close { top: 20px; right: 20px; }
}

/* ========== جستجو Overlay ========== */
.search-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--card-bg);
  z-index: 200;
  display: flex;
  flex-direction: column;
  animation: slideDown 0.3s ease;
  transition: background-color 0.3s ease;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}
.search-overlay-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}
.search-back-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: #f1f3f4;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #5f6368;
  transition: 0.2s;
  flex-shrink: 0;
  box-shadow: none !important;
}
.search-back-btn:hover { 
  background: rgba(var(--primary-rgb), 0.1); 
}
.search-back-btn svg { 
  width: 22px; 
  height: 22px; 
  transform: scaleX(-1); 
}
.search-overlay-input-wrapper { 
  flex: 1; 
}
.search-overlay-input { 
  width: 100%; 
  padding: 12px 16px; 
  border: none; 
  background: #f1f3f4; 
  border-radius: 28px; 
  font-size: 16px; 
  font-family: 'Vazirmatn', sans-serif; 
  outline: none; 
  text-align: right; 
  transition: background-color 0.3s ease, color 0.3s ease; 
}
.search-overlay-input:focus { 
  background: #e8eaed; 
}
.search-results { 
  flex: 1; 
  overflow-y: auto; 
  padding: 16px; 
}
.search-results-title { 
  font-size: 14px; 
  font-weight: 600; 
  color: #5f6368; 
  margin-bottom: 12px; 
  padding-bottom: 8px; 
  border-bottom: 1px solid var(--border-color); 
  transition: color 0.3s ease, border-color 0.3s ease; 
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  cursor: pointer;
  transition: 0.2s;
  border-radius: 12px;
}
.search-result-item:hover { 
  background: #f8f9fa; 
}
.search-result-icon { 
  width: 48px; 
  height: 48px; 
  border-radius: 12px; 
  background: #f1f3f4; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  flex-shrink: 0; 
  overflow: hidden; 
  transition: background-color 0.3s ease; 
}
.search-result-icon img { 
  width: 100%; 
  height: 100%; 
  object-fit: cover; 
}
.search-result-info { 
  flex: 1; 
}
.search-result-name { 
  font-size: 15px; 
  font-weight: 600; 
  color: var(--text-color); 
  transition: color 0.3s ease; 
}
.search-result-dev { 
  font-size: 12px; 
  color: #5f6368; 
  margin-top: 2px; 
  transition: color 0.3s ease; 
}
.search-empty { 
  text-align: center; 
  padding: 40px; 
  color: #9aa0a6; 
}
.search-empty svg { 
  margin-bottom: 12px; 
  opacity: 0.5; 
}
.search-loading { 
  text-align: center; 
  padding: 40px; 
}
.search-loading .chat-loading-spinner { 
  width: 32px; 
  height: 32px; 
  margin: 0 auto; 
}

/* ========== جستجوی مجله ========== */
.magazine-search-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--card-bg);
  z-index: 200;
  display: flex;
  flex-direction: column;
  animation: slideDown 0.3s ease;
  transition: background-color 0.3s ease;
}
.magazine-search-overlay-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}
.magazine-search-back-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: #f1f3f4;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #5f6368;
  transition: 0.2s;
  flex-shrink: 0;
  box-shadow: none !important;
}
.magazine-search-back-btn:hover { 
  background: rgba(var(--primary-rgb), 0.1); 
}
.magazine-search-back-btn svg { 
  width: 22px; 
  height: 22px; 
  transform: scaleX(-1); 
}
.magazine-search-overlay-input-wrapper { 
  flex: 1; 
}
.magazine-search-overlay-input { 
  width: 100%; 
  padding: 12px 16px; 
  border: none; 
  background: #f1f3f4; 
  border-radius: 28px; 
  font-size: 16px; 
  font-family: 'Vazirmatn', sans-serif; 
  outline: none; 
  text-align: right; 
  transition: background-color 0.3s ease, color 0.3s ease; 
}
.magazine-search-overlay-input:focus { 
  background: #e8eaed; 
}
.magazine-search-results { 
  flex: 1; 
  overflow-y: auto; 
  padding: 16px; 
}
.magazine-search-results-title { 
  font-size: 14px; 
  font-weight: 600; 
  color: #5f6368; 
  margin-bottom: 12px; 
  padding-bottom: 8px; 
  border-bottom: 1px solid var(--border-color); 
  transition: color 0.3s ease, border-color 0.3s ease; 
}
.magazine-search-result-item {
  display: flex;
  flex-direction: column;
  padding: 14px 12px;
  cursor: pointer;
  transition: 0.2s;
  border-radius: 12px;
  margin-bottom: 4px;
  border-bottom: 1px solid #f1f3f4;
}
.magazine-search-result-item:hover { 
  background: #f8f9fa; 
}
.magazine-search-result-title { 
  font-size: 15px; 
  font-weight: 600; 
  color: var(--text-color); 
  margin-bottom: 4px; 
  transition: color 0.3s ease; 
}
.magazine-search-result-desc { 
  font-size: 12px; 
  color: #5f6368; 
  line-height: 1.5; 
  margin-bottom: 6px; 
  display: -webkit-box; 
  -webkit-line-clamp: 2; 
  -webkit-box-orient: vertical; 
  overflow: hidden; 
  transition: color 0.3s ease; 
}
.magazine-search-result-meta { 
  display: flex; 
  align-items: center; 
  gap: 8px; 
  font-size: 11px; 
  color: #9aa0a6; 
}
.magazine-search-result-meta .category { 
  color: var(--primary); 
  font-weight: 500; 
}
.magazine-search-empty { 
  text-align: center; 
  padding: 40px; 
  color: #9aa0a6; 
}
.magazine-search-empty svg { 
  margin-bottom: 12px; 
  opacity: 0.5; 
}
.magazine-search-loading { 
  text-align: center; 
  padding: 40px; 
}

/* ========== جستجوی گفتگوها ========== */
.chats-search-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--card-bg);
  z-index: 200;
  display: flex;
  flex-direction: column;
  animation: slideDown 0.3s ease;
  transition: background-color 0.3s ease;
}
.chats-search-overlay-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}
.chats-search-back-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: #f1f3f4;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #5f6368;
  transition: 0.2s;
  flex-shrink: 0;
  box-shadow: none !important;
}
.chats-search-back-btn:hover { 
  background: rgba(var(--primary-rgb), 0.1); 
}
.chats-search-back-btn svg { 
  width: 22px; 
  height: 22px; 
  transform: scaleX(-1); 
}
.chats-search-overlay-input-wrapper { 
  flex: 1; 
}
.chats-search-overlay-input { 
  width: 100%; 
  padding: 12px 16px; 
  border: none; 
  background: #f1f3f4; 
  border-radius: 28px; 
  font-size: 16px; 
  font-family: 'Vazirmatn', sans-serif; 
  outline: none; 
  text-align: right; 
  transition: background-color 0.3s ease, color 0.3s ease; 
}
.chats-search-overlay-input:focus { 
  background: #e8eaed; 
}
.chats-search-results { 
  flex: 1; 
  overflow-y: auto; 
  padding: 16px; 
}
.chats-search-results-title { 
  font-size: 14px; 
  font-weight: 600; 
  color: #5f6368; 
  margin-bottom: 12px; 
  padding-bottom: 8px; 
  border-bottom: 1px solid var(--border-color); 
  transition: color 0.3s ease, border-color 0.3s ease; 
}
.chats-search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  cursor: pointer;
  transition: 0.2s;
  border-radius: 12px;
  margin-bottom: 4px;
  border-bottom: 1px solid #f1f3f4;
}
.chats-search-result-item:hover { 
  background: #f8f9fa; 
}
.chats-search-result-avatar { 
  width: 48px; 
  height: 48px; 
  border-radius: 50%; 
  background: var(--primary); 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  flex-shrink: 0; 
  overflow: hidden; 
  color: white; 
}
.chats-search-result-avatar svg { 
  width: 24px; 
  height: 24px; 
}
.chats-search-result-avatar img { 
  width: 100%; 
  height: 100%; 
  object-fit: cover; 
}
.chats-search-result-info { 
  flex: 1; 
  min-width: 0; 
}
.chats-search-result-name { 
  font-size: 15px; 
  font-weight: 600; 
  color: var(--text-color); 
  transition: color 0.3s ease; 
}
.chats-search-result-message { 
  font-size: 12px; 
  color: #5f6368; 
  margin-top: 2px; 
  white-space: nowrap; 
  overflow: hidden; 
  text-overflow: ellipsis; 
  transition: color 0.3s ease; 
}
.chats-search-result-time { 
  font-size: 11px; 
  color: #9aa0a6; 
  flex-shrink: 0; 
}
.chats-search-empty { 
  text-align: center; 
  padding: 40px; 
  color: #9aa0a6; 
}
.chats-search-empty svg { 
  margin-bottom: 12px; 
  opacity: 0.5; 
}
.chats-search-loading { 
  text-align: center; 
  padding: 40px; 
}

.chat-loading-spinner { 
  width: 32px; 
  height: 32px; 
  border: 3px solid #e8eaed; 
  border-top-color: var(--primary); 
  border-radius: 50%; 
  animation: spin 0.8s linear infinite; 
  margin: 0 auto; 
}
@keyframes spin { 
  to { transform: rotate(360deg); } 
}

/* ========== صفحه اخبار ========== */
.magazine-container { 
  padding: 14px; 
}
.magazine-tabs { 
  display: flex; 
  gap: 0; 
  margin-bottom: 14px; 
  background: #f1f3f4; 
  border-radius: 22px; 
  padding: 3px; 
  transition: background-color 0.3s ease; 
}
.magazine-tab { 
  flex: 1; 
  text-align: center; 
  padding: 7px 14px; 
  border-radius: 18px; 
  font-size: 13px; 
  font-weight: 500; 
  cursor: pointer; 
  color: #5f6368; 
  transition: 0.2s; 
}
.magazine-tab.active { 
  background: var(--card-bg); 
  color: var(--primary); 
  box-shadow: 0 1px 2px rgba(0,0,0,0.08); 
  transition: background-color 0.3s ease, color 0.3s ease; 
}
.magazine-list { 
  display: flex; 
  flex-direction: column; 
  gap: 1px; 
}
.magazine-list-item {
  display: flex !important;
  align-items: flex-start;
  padding: 13px 10px;
  background: var(--card-bg);
  border-radius: 12px;
  cursor: pointer;
  transition: 0.2s;
  text-decoration: none;
  color: inherit;
}
.magazine-list-item:hover { 
  background: #f8f9fa; 
}
.magazine-list-content { 
  flex: 1; 
  min-width: 0; 
}
.magazine-list-title { 
  font-size: 14px; 
  font-weight: 600; 
  color: var(--text-color); 
  margin-bottom: 3px; 
  transition: color 0.3s ease; 
}
.magazine-list-desc { 
  font-size: 12px; 
  color: #5f6368; 
  line-height: 1.5; 
  margin-bottom: 5px; 
  transition: color 0.3s ease; 
}
.magazine-list-meta { 
  display: flex; 
  align-items: center; 
  gap: 5px; 
  font-size: 11px; 
  color: #9aa0a6; 
}
.magazine-list-meta span:first-child { 
  color: var(--primary); 
  font-weight: 500; 
}

/* ========== جزئیات خبر ========== */
.news-detail-container { 
  padding: 20px 16px; 
}
.news-detail-category { 
  margin-bottom: 10px; 
}
.news-detail-category span { 
  display: inline-block; 
  background: var(--primary-light); 
  color: var(--primary); 
  padding: 4px 12px; 
  border-radius: 16px; 
  font-size: 12px; 
  font-weight: 500; 
  transition: background-color 0.3s ease, color 0.3s ease; 
}
.news-detail-title { 
  font-size: 20px; 
  font-weight: 700; 
  color: var(--text-color); 
  line-height: 1.4; 
  margin-bottom: 10px; 
  transition: color 0.3s ease; 
}
.news-detail-meta { 
  display: flex; 
  align-items: center; 
  gap: 6px; 
  font-size: 12px; 
  color: #9aa0a6; 
  margin-bottom: 20px; 
  transition: color 0.3s ease; 
}
.news-detail-image { 
  width: 100%; 
  height: 180px; 
  background: linear-gradient(135deg, var(--primary-light), #d2e3fc); 
  border-radius: 16px; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  color: var(--primary); 
  margin-bottom: 20px; 
  overflow: hidden; 
}
.news-detail-image img { 
  width: 100%; 
  height: 100%; 
  object-fit: cover; 
}
.news-detail-image:empty,
.news-detail-image img[src=""],
.news-detail-image img:not([src]) { 
  display: none !important; 
}
.news-detail-body { 
  font-size: 14px; 
  color: var(--text-color); 
  line-height: 1.9; 
  transition: color 0.3s ease; 
}
.news-detail-body p { 
  margin-bottom: 14px; 
}

.related-apps-container {
  margin: 16px 0 8px;
  padding: 0;
  background: transparent !important;
  border-radius: 0;
  width: 100%;
  max-width: 100%;
}
.related-apps-container h3 { 
  display: none !important; 
}
.related-apps-slider-wrapper {
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
}
.related-apps-slider {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0;
  margin: 0;
  width: 100%;
  max-width: 100%;
}
.related-apps-slider.single { 
  flex-direction: column; 
}

.related-app-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  width: 100%;
  max-width: 100%;
  background: var(--card-bg);
  border-radius: 12px;
  border: 1px solid #cccccc;
  box-shadow: none !important;
  transition: all 0.2s ease;
  cursor: pointer;
  text-decoration: none;
  box-sizing: border-box;
  margin: 0;
}
.related-app-card:hover { 
  border-color: var(--primary); 
  background: #f8f9fa; 
}
.related-app-card:active { 
  transform: scale(0.98); 
}
.related-app-card .app-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #f1f3f4;
  flex-shrink: 0;
  transition: background-color 0.3s ease;
}
.related-app-card .app-icon img { 
  width: 100%; 
  height: 100%; 
  object-fit: cover; 
}
.related-app-card .app-icon svg { 
  width: 28px; 
  height: 28px; 
}
.related-app-card .app-info { 
  flex: 1; 
  min-width: 0; 
}
.related-app-card .app-name { 
  font-size: 14px; 
  font-weight: 600; 
  color: var(--text-color); 
  line-height: 1.3; 
  transition: color 0.3s ease; 
}
.related-app-card .app-dev { 
  font-size: 12px; 
  color: #5f6368; 
  margin-top: 2px; 
  transition: color 0.3s ease; 
}
.related-app-card .app-arrow { 
  color: #9aa0a6; 
  flex-shrink: 0; 
  font-size: 18px; 
}
.related-apps-scroll-btn { 
  display: none !important; 
}

/* ========== صفحه پروفایل ========== */
.profile-page { 
  padding: 0; 
}
.profile-cover { 
  height: 120px; 
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%); 
  position: relative; 
}
.profile-cover-pattern { 
  position: absolute; 
  top: 0; 
  left: 0; 
  right: 0; 
  bottom: 0; 
  opacity: 0.12; 
  background-image: radial-gradient(circle at 20% 50%, white 2px, transparent 2px), radial-gradient(circle at 80% 20%, white 2px, transparent 2px), radial-gradient(circle at 50% 80%, white 3px, transparent 3px); 
  background-size: 35px 35px, 45px 45px, 25px 25px; 
}
.profile-avatar-row { 
  display: flex; 
  justify-content: center; 
  margin-top: -40px; 
  position: relative; 
  z-index: 2; 
}
.profile-avatar-new { 
  width: 80px; 
  height: 80px; 
  border-radius: 50%; 
  background: var(--card-bg); 
  border: 4px solid var(--card-bg); 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  box-shadow: 0 3px 12px rgba(0,0,0,0.1); 
  transition: background-color 0.3s ease, border-color 0.3s ease; 
}
.profile-avatar-new svg { 
  width: 48px; 
  height: 48px; 
  color: var(--primary); 
}
.profile-details { 
  text-align: center; 
  padding: 10px 16px 0; 
}
.profile-fullname { 
  font-size: 18px; 
  font-weight: 700; 
  color: var(--text-color); 
  transition: color 0.3s ease; 
}
.profile-username { 
  font-size: 13px; 
  color: #5f6368; 
  margin-top: 2px; 
  transition: color 0.3s ease; 
}
.profile-metrics { 
  display: flex; 
  justify-content: space-around; 
  padding: 16px 14px; 
  margin: 14px; 
  background: #f8f9fa; 
  border-radius: 14px; 
  transition: background-color 0.3s ease; 
}
.profile-metric { 
  text-align: center; 
}
.profile-metric-value { 
  font-size: 18px; 
  font-weight: 700; 
  color: var(--primary); 
}
.profile-metric-label { 
  font-size: 11px; 
  color: #5f6368; 
  margin-top: 2px; 
  transition: color 0.3s ease; 
}
.profile-section-title { 
  font-size: 15px; 
  font-weight: 600; 
  color: var(--text-color); 
  padding: 0 16px 7px; 
  transition: color 0.3s ease; 
}
.profile-menu-new { 
  padding: 0 16px; 
}
.profile-menu-card { 
  display: flex; 
  align-items: center; 
  gap: 12px; 
  padding: 12px 14px; 
  background: #f8f9fa; 
  border-radius: 12px; 
  margin-bottom: 7px; 
  cursor: pointer; 
  transition: 0.2s; 
  box-shadow: none !important; 
}
.profile-menu-card:hover { 
  background: rgba(var(--primary-rgb), 0.05); 
}
.profile-menu-icon-new { 
  width: 36px; 
  height: 36px; 
  border-radius: 10px; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  flex-shrink: 0; 
}
.profile-menu-icon-new.purple { 
  background: rgba(var(--primary-rgb), 0.1); 
  color: var(--primary); 
}
.profile-menu-icon-new.blue { 
  background: var(--primary-light); 
  color: var(--primary); 
}
.profile-menu-icon-new.green { 
  background: #e6f4ea; 
  color: #34a853; 
}
.profile-menu-icon-new.orange { 
  background: #fef7e0; 
  color: #f9ab00; 
}
.profile-menu-icon-new.red { 
  background: #fce8e6; 
  color: #ea4335; 
}
.profile-menu-icon-new svg { 
  width: 18px; 
  height: 18px; 
}
.profile-menu-text { 
  flex: 1; 
  font-size: 14px; 
  font-weight: 500; 
  color: var(--text-color); 
  transition: color 0.3s ease; 
}
.profile-menu-arrow-new { 
  color: #dadce0; 
}

.profile-logged-out { 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  height: 60vh; 
}
.profile-login-prompt { 
  text-align: center; 
}
.profile-login-prompt h2 { 
  font-size: 20px; 
  font-weight: 700; 
  color: var(--text-color); 
  margin-bottom: 8px; 
  transition: color 0.3s ease; 
}
.profile-login-prompt p { 
  font-size: 14px; 
  color: #5f6368; 
  margin-bottom: 24px; 
  transition: color 0.3s ease; 
}
.profile-login-btn { 
  background: var(--primary); 
  color: white; 
  border: none; 
  padding: 12px 32px; 
  border-radius: 24px; 
  font-size: 15px; 
  font-weight: 600; 
  cursor: pointer; 
  font-family: 'Vazirmatn', sans-serif; 
  box-shadow: none !important; 
}
.profile-login-btn:hover { 
  background: var(--primary-hover); 
}

/* ========== مودال‌ها ========== */
.modal { 
  display: none; 
  position: fixed; 
  top: 0; 
  left: 0; 
  right: 0; 
  bottom: 0; 
  background: rgba(0,0,0,0.5); 
  z-index: 100; 
  align-items: flex-end; 
  justify-content: center; 
}
.modal.active { 
  display: flex; 
}
.modal-content { 
  background: var(--card-bg); 
  border-radius: 20px 20px 0 0; 
  padding: 24px; 
  width: 100%; 
  max-width: 480px; 
  max-height: 80vh; 
  overflow-y: auto; 
  animation: slideUp 0.3s ease; 
  transition: background-color 0.3s ease; 
}
.modal-small { 
  max-width: 480px; 
}
@keyframes slideUp { 
  from { transform: translateY(100%); } 
  to { transform: translateY(0); } 
}
.modal-header { 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  margin-bottom: 20px; 
}
.modal-header h2 { 
  font-size: 18px; 
  font-weight: 700; 
  color: var(--text-color); 
  transition: color 0.3s ease; 
}
.modal-close { 
  width: 32px; 
  height: 32px; 
  border-radius: 50%; 
  border: none; 
  background: #f1f3f4; 
  cursor: pointer; 
  font-size: 16px; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  box-shadow: none !important; 
  transition: background-color 0.3s ease, color 0.3s ease; 
}
.modal-close:hover { 
  background: rgba(var(--primary-rgb), 0.1); 
}

.login-desc { 
  font-size: 13px; 
  color: #5f6368; 
  margin-bottom: 12px; 
  text-align: center; 
  transition: color 0.3s ease; 
}
.login-input { 
  width: 100%; 
  padding: 12px 16px; 
  border: 2px solid #e0e0e0; 
  border-radius: 12px; 
  font-size: 16px; 
  font-family: 'Vazirmatn', sans-serif; 
  outline: none; 
  margin-bottom: 10px; 
  text-align: center; 
  direction: ltr; 
  letter-spacing: 2px; 
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease; 
}
.login-input:focus { 
  border-color: var(--primary); 
}
.login-error { 
  color: #ea4335; 
  font-size: 12px; 
  text-align: center; 
  margin-bottom: 8px; 
  min-height: 18px; 
}
.login-timer { 
  text-align: center; 
  font-size: 13px; 
  color: #5f6368; 
  margin-bottom: 10px; 
  min-height: 20px; 
  direction: ltr; 
  transition: color 0.3s ease; 
}
.login-submit-btn { 
  width: 100%; 
  padding: 12px; 
  background: var(--primary); 
  color: white; 
  border: none; 
  border-radius: 12px; 
  font-size: 15px; 
  font-weight: 600; 
  cursor: pointer; 
  font-family: 'Vazirmatn', sans-serif; 
  box-shadow: none !important; 
}
.login-submit-btn:hover { 
  background: var(--primary-hover); 
}
.login-resend-btn { 
  width: 100%; 
  padding: 10px; 
  background: transparent; 
  color: var(--primary); 
  border: none; 
  font-size: 13px; 
  cursor: pointer; 
  font-family: 'Vazirmatn', sans-serif; 
  margin-top: 6px; 
  box-shadow: none !important; 
}
.login-resend-btn:disabled { 
  color: #9aa0a6; 
  cursor: not-allowed; 
}

/* ========== صفحه پرداخت ========== */
.pay-container { 
  padding: 0 0 90px; 
}
.pay-app-row { 
  display: flex; 
  align-items: center; 
  gap: 14px; 
  padding: 16px; 
}
.pay-app-icon-wrap { 
  width: 52px; 
  height: 52px; 
  background: #f1f3f4; 
  border-radius: 14px; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  flex-shrink: 0; 
  overflow: hidden; 
  transition: background-color 0.3s ease; 
}
.pay-app-details { 
  flex: 1; 
}
.pay-app-name { 
  font-size: 16px; 
  font-weight: 600; 
  color: var(--text-color); 
  transition: color 0.3s ease; 
}
.pay-app-dev { 
  font-size: 13px; 
  color: #5f6368; 
  margin-top: 2px; 
  transition: color 0.3s ease; 
}
.pay-divider { 
  height: 1px; 
  background: var(--border-color); 
  margin: 0 16px; 
  transition: background-color 0.3s ease; 
}
.pay-methods-section { 
  padding: 16px; 
}
.pay-methods-label { 
  font-size: 13px; 
  font-weight: 600; 
  color: var(--text-color); 
  margin-bottom: 10px; 
  transition: color 0.3s ease; 
}
.pay-method-row { 
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  padding: 12px 14px; 
  background: #f8f9fa; 
  border-radius: 14px; 
  margin-bottom: 8px; 
  cursor: pointer; 
  transition: 0.2s; 
  border: 2px solid transparent; 
}
.pay-method-row:hover { 
  background: #f0f0f0; 
}
.pay-method-row.active { 
  background: #f0f6ff; 
  border-color: var(--primary); 
}
.pay-method-left { 
  display: flex; 
  align-items: center; 
  gap: 12px; 
  flex: 1; 
}
.pay-method-circle { 
  width: 20px; 
  height: 20px; 
  border-radius: 50%; 
  border: 2px solid #dadce0; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  flex-shrink: 0; 
  transition: border-color 0.3s ease; 
}
.pay-method-row.active .pay-method-circle { 
  border-color: var(--primary); 
}
.pay-method-circle-inner { 
  width: 10px; 
  height: 10px; 
  border-radius: 50%; 
  background: transparent; 
  transition: 0.2s; 
}
.pay-method-row.active .pay-method-circle-inner { 
  background: var(--primary); 
}
.pay-method-icon-wrap { 
  width: 40px; 
  height: 40px; 
  border-radius: 10px; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  flex-shrink: 0; 
}
.pay-method-icon-wrap.blue-bg { 
  background: var(--primary); 
}
.pay-method-icon-wrap.green-bg { 
  background: #34a853; 
}
.pay-method-text { 
  flex: 1; 
}
.pay-method-name { 
  font-size: 14px; 
  font-weight: 600; 
  color: var(--text-color); 
  transition: color 0.3s ease; 
}
.pay-method-sub { 
  font-size: 12px; 
  color: #5f6368; 
  margin-top: 2px; 
  transition: color 0.3s ease; 
}
.pay-method-checkmark { 
  color: var(--primary); 
  font-size: 16px; 
  font-weight: 700; 
  display: none; 
}
.pay-method-row.active .pay-method-checkmark { 
  display: block; 
}
.pay-discount-box { 
  background: #f8f9fa; 
  border-radius: 14px; 
  padding: 14px; 
  margin-top: 4px; 
  transition: background-color 0.3s ease; 
}
.pay-discount-header { 
  display: flex; 
  align-items: center; 
  gap: 8px; 
  font-size: 14px; 
  font-weight: 600; 
  color: var(--text-color); 
  margin-bottom: 10px; 
  transition: color 0.3s ease; 
}
.pay-discount-input-row { 
  display: flex; 
  gap: 8px; 
}
.pay-discount-input { 
  flex: 1; 
  padding: 10px 14px; 
  background: var(--card-bg); 
  border: 1px solid #e0e0e0; 
  border-radius: 12px; 
  font-size: 14px; 
  outline: none; 
  font-family: 'Vazirmatn', sans-serif; 
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease; 
}
.pay-discount-input:focus { 
  border-color: var(--primary); 
}
.pay-discount-apply-btn { 
  padding: 10px 20px; 
  background: var(--primary); 
  color: white; 
  border: none; 
  border-radius: 12px; 
  font-size: 14px; 
  font-weight: 600; 
  cursor: pointer; 
  font-family: 'Vazirmatn', sans-serif; 
  white-space: nowrap; 
  box-shadow: none !important; 
}
.pay-discount-apply-btn:hover { 
  background: var(--primary-hover); 
}
.pay-bottom-bar { 
  position: fixed; 
  bottom: 0; 
  left: 50%; 
  transform: translateX(-50%); 
  width: 100%; 
  max-width: 480px; 
  display: flex; 
  align-items: center; 
  gap: 14px; 
  padding: 12px 16px 20px; 
  background: var(--card-bg); 
  border-top: 1px solid var(--border-color); 
  z-index: 30; 
  transition: background-color 0.3s ease, border-color 0.3s ease; 
}
.pay-bottom-info { 
  flex: 1; 
}
.pay-bottom-price { 
  font-size: 18px; 
  font-weight: 700; 
  color: var(--text-color); 
  transition: color 0.3s ease; 
}
.pay-bottom-note { 
  font-size: 11px; 
  color: #34a853; 
  margin-top: 2px; 
}
.pay-bottom-btn { 
  background: var(--primary); 
  color: white; 
  border: none; 
  padding: 16px 64px; 
  border-radius: 14px; 
  font-size: 17px; 
  font-weight: 600; 
  cursor: pointer; 
  font-family: 'Vazirmatn', sans-serif; 
  transition: 0.2s; 
  white-space: nowrap; 
  flex-shrink: 0; 
  box-shadow: none !important; 
}
.pay-bottom-btn:hover { 
  background: var(--primary-hover); 
}

.section-header{ 
  display:none;
}
hr { 
  margin: 6px 16px; 
  border: 0.5px solid #f1f3f4; 
  transition: border-color 0.3s ease; 
}

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.4; }
  100% { opacity: 1; }
}

/* ========== واکنش‌گرایی موبایل ========== */
@media (max-width: 400px) { 
  .app-card { min-width: 90px; max-width: 90px; }
  .app-icon { width: 68px; height: 68px; border-radius: 16px; }
  .app-icon svg { width: 34px; height: 34px; }
  .app-name { font-size: 11px; }
  .container { max-width: 100%; } 
  .bottom-nav { max-width: 100%; } 
}

/* ========== صفحه دستیار ========== */
.assistant-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--card-bg);
  position: relative;
  padding-top: 0;
  justify-content: center;
  transition: background-color 0.3s ease;
}
.assistant-chat-messages {
  flex: 0 0 auto;
  overflow-y: auto;
  padding: 6px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 0;
  opacity: 0;
  transition: all 0.3s ease;
}
.assistant-chat-messages:not(:empty) {
  flex: 1;
  max-height: none;
  opacity: 1;
}
.assistant-input-section {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  justify-content: center;
}
.assistant-hint-text {
  text-align: right;
  font-size: 24px;
  font-weight: 700;
  color: #000000;
  padding: 8px 20px 12px;
  font-family: 'Vazirmatn', sans-serif;
  background: transparent;
  letter-spacing: -0.5px;
  transition: color 0.3s ease;
}
.assistant-chat-input-wrapper {
  position: relative;
  padding: 4px 16px 10px;
  background: var(--card-bg);
  border-top: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: background-color 0.3s ease;
}
.assistant-chat-input-bar {
  display: flex;
  align-items: center;
  gap: 6px;
}
.assistant-input-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  background: #f1f3f4;
  border-radius: 24px;
  padding: 2px 4px;
  gap: 2px;
  transition: background-color 0.3s ease;
}
.assistant-chat-input {
  flex: 1;
  padding: 8px 10px;
  background: transparent;
  border: none;
  font-size: 15px;
  outline: none;
  font-family: 'Vazirmatn', sans-serif;
  min-width: 0;
  color: var(--text-color);
  transition: color 0.3s ease;
}
.assistant-chat-input::placeholder { 
  color: #5f6368; 
  transition: color 0.3s ease; 
}
.assistant-attach-wrapper { 
  position: relative; 
  display: flex; 
  align-items: center; 
}
.assistant-attach-btn { 
  width: 38px; 
  height: 38px; 
  border-radius: 50%; 
  background: transparent; 
  border: none; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  cursor: pointer; 
  color: #5f6368; 
  transition: 0.2s; 
  box-shadow: none !important; 
}
.assistant-attach-btn:hover { 
  background: rgba(var(--primary-rgb), 0.1); 
}
.assistant-attach-btn svg { 
  width: 18px; 
  height: 18px; 
}
.assistant-attach-dropdown {
  position: absolute;
  bottom: 50px;
  left: 0;
  background: var(--card-bg);
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  min-width: 150px;
  z-index: 100;
  display: none;
  overflow: hidden;
  animation: fadeInUp 0.2s ease;
  transition: background-color 0.3s ease;
}
.assistant-attach-dropdown.show { 
  display: block; 
}
.assistant-attach-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  transition: 0.2s;
  font-size: 13px;
  color: var(--text-color);
}
.assistant-attach-item:hover { 
  background: #f1f3f4; 
}
.assistant-attach-item svg { 
  width: 18px; 
  height: 18px; 
}
.assistant-quick-questions {
  padding: 8px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--card-bg);
  border-top: none;
  transition: background-color 0.3s ease;
}
.assistant-quick-question-item {
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: all 0.2s ease;
}
.assistant-quick-question-item:hover { 
  opacity: 0.8; 
}
.assistant-quick-question-text {
  font-size: 15px;
  color: #5f6368;
  padding: 12px 8px 10px 8px;
  font-weight: 500;
  line-height: 1.5;
  transition: color 0.3s ease;
}
.assistant-quick-question-divider {
  height: 1px;
  background: linear-gradient(90deg, var(--border-color) 0%, var(--border-color) 85%, transparent 100%);
  margin: 0 8px;
  transition: background 0.3s ease;
}
.assistant-image-thumb {
  max-width: 180px;
  max-height: 180px;
  border-radius: 12px;
  cursor: pointer;
  object-fit: cover;
}
.assistant-file-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: rgba(0,0,0,0.05);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  font-size: 12px;
}
.assistant-msg {
  max-width: 80%;
  padding: 8px 12px;
  border-radius: 18px;
  font-size: 13px;
  line-height: 1.5;
  position: relative;
  word-wrap: break-word;
}
.assistant-msg.sent {
  align-self: flex-end;
  background: var(--primary);
  color: white;
  border-bottom-right-radius: 4px;
}
.assistant-msg.received {
  align-self: flex-start;
  background: #f1f3f4;
  color: var(--text-color);
  border-bottom-left-radius: 4px;
  transition: background-color 0.3s ease, color 0.3s ease;
}
.assistant-msg-time {
  font-size: 9px;
  opacity: 0.7;
  margin-top: 3px;
  text-align: left;
  font-family: 'Vazirmatn', monospace;
  direction: ltr;
}
.assistant-msg audio { 
  width: 200px; 
  height: 38px; 
  border-radius: 30px; 
}
.assistant-msg video { 
  max-width: 200px; 
  border-radius: 12px; 
}

/* ========== آیکون‌های بازگشت ========== */
.back-btn svg,
.search-back-btn svg,
.magazine-search-back-btn svg,
.chats-search-back-btn svg,
#back-from-detail svg,
#back-from-chat svg,
#back-from-news svg,
#back-from-category svg,
#back-from-payment svg {
  transform: scaleX(-1);
}

/* ========== PWA ========== */
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.05); }
  100% { opacity: 1; transform: scale(1); }
}
.splash-screen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease;
}
.splash-screen.hide { 
  opacity: 0; 
  pointer-events: none; 
}
.splash-screen .splash-content { 
  text-align: center; 
  color: white; 
}
.splash-screen .splash-icon { 
  width: 80px; 
  height: 80px; 
  margin-bottom: 20px; 
  animation: bounce 0.8s ease; 
}
.splash-screen .splash-title { 
  font-size: 24px; 
  font-weight: 700; 
  margin-bottom: 8px; 
}
.splash-screen .splash-subtitle { 
  font-size: 14px; 
  opacity: 0.8; 
}
@keyframes bounce {
  0% { transform: scale(0.8); opacity: 0; }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

@media all and (display-mode: standalone) {
  body { padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
  .bottom-nav { padding-bottom: calc(8px + env(safe-area-inset-bottom)); }
  .detail-floating-install,
  .chat-detail-input-bar,
  .pay-bottom-bar { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
}

.offline-indicator {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: #ea4335;
  color: white;
  text-align: center;
  padding: 8px;
  font-size: 12px;
  z-index: 1000;
  transform: translateY(-100%);
  transition: transform 0.3s ease;
}
.offline-indicator.show { 
  transform: translateY(0); 
}

* { 
  -webkit-tap-highlight-color: transparent; 
}

.toast-message {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: #202124;
  color: white;
  padding: 10px 20px;
  border-radius: 30px;
  font-size: 14px;
  z-index: 1000;
  white-space: nowrap;
  animation: fadeInUp 0.3s ease;
}

#newsHeader { 
  transition: box-shadow 0.3s ease; 
}
#newsHeaderTitle {
  opacity: 0;
  transition: opacity 0.3s ease;
  font-size: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}
#newsHeaderBorder {
  height: 1px;
  background: var(--border-color);
  width: 100%;
  margin-top: 4px;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.header-scrolled #newsHeaderTitle { 
  opacity: 1 !important; 
}
.header-scrolled #newsHeaderBorder { 
  opacity: 1 !important; 
}
.header-scrolled { 
  box-shadow: 0 2px 8px rgba(0,0,0,0.08) !important; 
}

@media (max-width: 500px) {
  .toast-message { 
    white-space: normal; 
    text-align: center; 
    max-width: 90%; 
  }
}

/* ========== تنظیمات ========== */
.settings-content { 
  padding: 4px 0; 
}
.settings-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid #f1f3f4;
  transition: border-color 0.3s ease;
}
.settings-item:last-child { 
  border-bottom: none; 
}
.settings-item-left { 
  display: flex; 
  align-items: center; 
  gap: 14px; 
}
.settings-item-icon { 
  width: 42px; 
  height: 42px; 
  border-radius: 12px; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  flex-shrink: 0; 
}
.settings-item-info { 
  flex: 1; 
}
.settings-item-title { 
  font-size: 15px; 
  font-weight: 500; 
  color: var(--text-color); 
  transition: color 0.3s ease; 
}
.settings-item-desc { 
  font-size: 12px; 
  color: #5f6368; 
  margin-top: 2px; 
  transition: color 0.3s ease; 
}
.settings-divider { 
  height: 1px; 
  background: #f1f3f4; 
  margin: 12px 0; 
  transition: background-color 0.3s ease; 
}
.settings-info { 
  background: #f8f9fa; 
  border-radius: 12px; 
  padding: 14px 16px; 
  margin-top: 8px; 
  transition: background-color 0.3s ease; 
}
.settings-info-item { 
  display: flex; 
  justify-content: space-between; 
  padding: 4px 0; 
  font-size: 13px; 
  color: #5f6368; 
  transition: color 0.3s ease; 
}
.settings-switch { 
  position: relative; 
  width: 48px; 
  height: 28px; 
  flex-shrink: 0; 
  cursor: pointer; 
}
.settings-switch input { 
  opacity: 0; 
  width: 0; 
  height: 0; 
}
.settings-slider {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #ccc;
  border-radius: 28px;
  transition: 0.3s;
}
.settings-slider::before {
  content: '';
  position: absolute;
  width: 22px;
  height: 22px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: 0.3s;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}
.settings-switch input:checked + .settings-slider { 
  background: var(--primary); 
}
.settings-switch input:checked + .settings-slider::before { 
  transform: translateX(20px); 
}
.settings-switch input:disabled + .settings-slider { 
  opacity: 0.5; 
  cursor: not-allowed; 
}
.settings-item.changed { 
  animation: settingsHighlight 0.6s ease; 
}
@keyframes settingsHighlight { 
  0% { background: rgba(var(--primary-rgb), 0.15); } 
  100% { background: transparent; } 
}

.settings-page-container {
  padding: 16px;
  background: var(--card-bg);
  min-height: calc(100vh - 60px);
  transition: background-color 0.3s ease;
}
.settings-page-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  cursor: pointer;
  transition: 0.2s;
  border-radius: 12px;
  padding: 14px 12px;
  margin: 0 -12px;
}
.settings-page-item:hover { 
  background: rgba(var(--primary-rgb), 0.05); 
}
.settings-page-item:active { 
  transform: scale(0.98); 
}
.settings-page-item-left { 
  display: flex; 
  align-items: center; 
  gap: 14px; 
}
.settings-page-item-icon { 
  width: 44px; 
  height: 44px; 
  border-radius: 12px; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  flex-shrink: 0; 
}
.settings-page-item-info { 
  flex: 1; 
}
.settings-page-item-title { 
  font-size: 15px; 
  font-weight: 500; 
  color: var(--text-color); 
  transition: color 0.3s ease; 
}
.settings-page-item-desc { 
  font-size: 13px; 
  color: #5f6368; 
  margin-top: 2px; 
  transition: color 0.3s ease; 
}
.settings-page-arrow { 
  color: #9aa0a6; 
  flex-shrink: 0; 
}
.settings-page-divider { 
  height: 1px; 
  background: #f1f3f4; 
  margin: 8px 0; 
  transition: background-color 0.3s ease; 
}
.settings-page-version { 
  display: flex; 
  justify-content: space-between; 
  padding: 8px 4px; 
  font-size: 13px; 
  color: #5f6368; 
  transition: color 0.3s ease; 
}

/* ========== تم‌ها ========== */
.theme-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 4px 0;
}
.theme-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  cursor: pointer;
  transition: 0.2s;
  border: 2px solid transparent;
  background: #f8f9fa;
}
.theme-option:hover { 
  background: #f1f3f4; 
}
.theme-option.active { 
  border-color: var(--primary); 
  background: var(--primary-light); 
}
.theme-option.active .theme-option-check { 
  display: flex; 
  color: var(--primary); 
}
.theme-option-icon { 
  width: 44px; 
  height: 44px; 
  border-radius: 12px; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  flex-shrink: 0; 
}
.theme-option-info { 
  flex: 1; 
}
.theme-option-title { 
  font-size: 15px; 
  font-weight: 500; 
  color: var(--text-color); 
  transition: color 0.3s ease; 
}
.theme-option-desc { 
  font-size: 12px; 
  color: #5f6368; 
  margin-top: 2px; 
  transition: color 0.3s ease; 
}
.theme-option-check { 
  display: none; 
  color: var(--primary); 
  flex-shrink: 0; 
}

/* ========== بنر نصب ========== */
.install-banner {
  position: fixed;
  bottom: 70px;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100%;
  background: var(--card-bg);
  border-radius: 0;
  padding: 12px 20px;
  z-index: 9998;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.12);
  display: none;
  animation: slideUpBanner 0.4s ease;
  border-top: 1px solid var(--border-color);
}
.install-banner.show { 
  display: block; 
}
.install-banner-content {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  max-width: 480px;
  margin: 0 auto;
}
.install-banner-text {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.install-banner-icon { 
  font-size: 28px; 
  flex-shrink: 0; 
}
.install-banner-message {
  color: var(--text-color);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  flex: 1;
  min-width: 0;
  word-break: break-word;
}
.install-banner-btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 10px 24px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Vazirmatn', sans-serif;
  white-space: nowrap;
  flex-shrink: 0;
  transition: 0.3s;
  box-shadow: 0 2px 12px rgba(var(--primary-rgb), 0.3);
}
.install-banner-btn:hover { 
  background: var(--primary-hover); 
  transform: scale(1.03); 
}
.install-banner-btn:active { 
  transform: scale(0.95); 
}
.install-banner-close {
  background: none;
  border: none;
  color: #5f6368;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: 0.3s;
}
.install-banner-close:hover { 
  background: #f1f3f4; 
  color: var(--text-color); 
}

@keyframes slideUpBanner {
  from { opacity: 0; transform: translateY(100%); }
  to { opacity: 1; transform: translateY(0); }
}

.install-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  display: none;
  align-items: flex-end;
  justify-content: center;
}
.install-modal.active { 
  display: flex; 
}
.install-modal-content {
  background: var(--card-bg);
  border-radius: 20px 20px 0 0;
  padding: 24px 20px 30px;
  width: 100%;
  max-width: 480px;
  max-height: 80vh;
  overflow-y: auto;
  animation: slideUpModal 0.3s ease;
}
@keyframes slideUpModal {
  from { opacity: 0; transform: translateY(100%); }
  to { opacity: 1; transform: translateY(0); }
}
.install-modal-header { 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  margin-bottom: 16px; 
}
.install-modal-header h3 { 
  font-size: 18px; 
  font-weight: 700; 
  color: var(--text-color); 
}
.install-modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: #f1f3f4;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s;
}
.install-modal-close:hover { 
  background: #e8eaed; 
}
.install-modal-body { 
  padding: 4px 0; 
}

.install-download-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 16px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Vazirmatn', sans-serif;
  transition: 0.3s;
  box-shadow: 0 4px 16px rgba(var(--primary-rgb), 0.3);
}
.install-download-btn:hover { 
  background: var(--primary-hover); 
  transform: scale(1.02); 
}
.install-download-btn:active { 
  transform: scale(0.97); 
}
.install-download-btn .icon { 
  font-size: 24px; 
}

.install-guide { 
  padding: 8px 0; 
}
.install-guide .step {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: #f8f9fa;
  border-radius: 12px;
  margin-bottom: 10px;
}
.install-guide .step .step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
}
.install-guide .step .step-text { 
  font-size: 14px; 
  color: var(--text-color); 
  flex: 1; 
}
.install-guide .step .step-icon { 
  font-size: 24px; 
  flex-shrink: 0; 
}
.install-guide .step-arrow { 
  text-align: center; 
  color: #9aa0a6; 
  font-size: 20px; 
  padding: 2px 0; 
}

.detail-hero-new { 
  margin: 0 0 16px 0; 
}

/* ========== دسکتاپ ========== */
@media (min-width: 769px) {
  .detail-info-right { 
    float: left; 
  }
  .detail-floating-install { 
    display: none !important; 
  }
  .install-banner { 
    display: none !important; 
  }
}

@media all and (display-mode: standalone) {
  .install-banner { 
    display: none !important; 
  }
}

/* ============================================================ */
/* ========== دارک مود (Dark Mode) ========== */
/* ============================================================ */

body.dark-mode {
  --bg-color: #121212;
  --text-color: #e8eaed;
  --card-bg: #1e1e1e;
  --border-color: #2d2d2d;
  --shadow-color: rgba(0,0,0,0.3);
  background-color: var(--bg-color);
  color: var(--text-color);
}

body.dark-mode .container {
  background-color: var(--card-bg);
  box-shadow: 0 0 20px var(--shadow-color);
}

body.dark-mode .header {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
}

body.dark-mode .search-box {
  background: #2d2d2d;
  color: #9aa0a6;
}
body.dark-mode .search-box input { 
  color: var(--text-color); 
}
body.dark-mode .search-box input::placeholder { 
  color: #5f6368; 
}

body.dark-mode .app-icon { 
  background: #2d2d2d; 
}
body.dark-mode .app-name { 
  color: var(--text-color); 
}
body.dark-mode .section-header h2 { 
  color: var(--text-color); 
}

body.dark-mode .detail-hero-new { 
  background: #2d2d2d; 
}
body.dark-mode .detail-icon-new { 
  background: var(--card-bg); 
}
body.dark-mode .detail-name { 
  color: #ffffff; 
}
body.dark-mode .detail-dev { 
  color: #9aa0a6; 
}
body.dark-mode .detail-stat-card { 
  background: #2d2d2d; 
}
body.dark-mode .detail-stat-value { 
  color: var(--text-color); 
}
body.dark-mode .detail-stat-label { 
  color: #9aa0a6; 
}
body.dark-mode .detail-description h3 { 
  color: var(--text-color); 
}
body.dark-mode .detail-description p { 
  color: #b0b8c0; 
}
body.dark-mode .description-text { 
  color: #b0b8c0; 
}
body.dark-mode .description-toggle-btn { 
  color: #4fc3f7; 
}
body.dark-mode .detail-floating-install {
  background: var(--card-bg);
  border-top: 1px solid var(--border-color);
}
body.dark-mode .detail-bottom-price { 
  color: var(--text-color); 
}

body.dark-mode .chat-item { 
  border-bottom: 1px solid var(--border-color); 
}
body.dark-mode .chat-item:hover { 
  background: #2d2d2d; 
}
body.dark-mode .chat-item.active { 
  background: #1a237e;
  border-right-color: var(--primary);
}
body.dark-mode .chat-name { 
  color: var(--text-color); 
}
body.dark-mode .chat-message { 
  color: #9aa0a6; 
}
body.dark-mode .chat-detail-container { 
  background: var(--card-bg); 
}
body.dark-mode .chat-detail-messages { 
  background: var(--card-bg); 
}
body.dark-mode .chat-msg.received {
  background: #2d2d2d;
  color: var(--text-color);
}
body.dark-mode .chat-msg.sent { 
  background: var(--primary); 
  color: white; 
}
body.dark-mode .chat-detail-input-bar {
  background: var(--card-bg);
  border-top: 1px solid var(--border-color);
}
body.dark-mode .chat-input-wrapper { 
  background: #2d2d2d; 
}
body.dark-mode .chat-detail-input { 
  color: var(--text-color); 
}
body.dark-mode .chat-detail-input::placeholder { 
  color: #5f6368; 
}
body.dark-mode .chat-attach-main { 
  color: #9aa0a6; 
}
body.dark-mode .chat-attach-main:hover { 
  background: rgba(var(--primary-rgb), 0.2); 
}
body.dark-mode .chat-attach-dropdown { 
  background: #2d2d2d; 
}
body.dark-mode .chat-attach-item { 
  color: var(--text-color); 
}
body.dark-mode .chat-attach-item:hover { 
  background: #3d3d3d; 
}

body.dark-mode .profile-cover { 
  background: linear-gradient(135deg, #1e3a8a 0%, #1e3a8a 100%); 
}
body.dark-mode .profile-avatar-new { 
  background: var(--card-bg); 
  border-color: var(--card-bg); 
}
body.dark-mode .profile-fullname { 
  color: var(--text-color); 
}
body.dark-mode .profile-username { 
  color: #9aa0a6; 
}
body.dark-mode .profile-menu-card { 
  background: #2d2d2d; 
}
body.dark-mode .profile-menu-card:hover { 
  background: rgba(var(--primary-rgb), 0.1); 
}
body.dark-mode .profile-menu-text { 
  color: var(--text-color); 
}
body.dark-mode .profile-menu-arrow-new { 
  color: #5f6368; 
}
body.dark-mode .profile-metrics { 
  background: #2d2d2d; 
}
body.dark-mode .profile-metric-value { 
  color: var(--primary); 
}
body.dark-mode .profile-metric-label { 
  color: #9aa0a6; 
}
body.dark-mode .profile-login-prompt h2 { 
  color: var(--text-color); 
}
body.dark-mode .profile-login-prompt p { 
  color: #9aa0a6; 
}

body.dark-mode .magazine-tabs { 
  background: #2d2d2d; 
}
body.dark-mode .magazine-tab { 
  color: #9aa0a6; 
}
body.dark-mode .magazine-tab.active {
  background: var(--card-bg);
  color: var(--primary);
}
body.dark-mode .magazine-list-item { 
  background: var(--card-bg); 
}
body.dark-mode .magazine-list-item:hover { 
  background: #2d2d2d; 
}
body.dark-mode .magazine-list-title { 
  color: var(--text-color); 
}
body.dark-mode .magazine-list-desc { 
  color: #9aa0a6; 
}
body.dark-mode .magazine-list-meta { 
  color: #5f6368; 
}

body.dark-mode .news-detail-title { 
  color: var(--text-color); 
}
body.dark-mode .news-detail-body { 
  color: var(--text-color); 
}
body.dark-mode .news-detail-category span {
  background: #1e3a8a;
  color: var(--primary);
}
body.dark-mode .news-detail-meta { 
  color: #9aa0a6; 
}
body.dark-mode .news-detail-image { 
  background: linear-gradient(135deg, #1a1a2e, #2d2d2d); 
}

body.dark-mode .related-apps-container { 
  background: transparent !important; 
}
body.dark-mode .related-app-card {
  background: var(--card-bg);
  border-color: #4a4a4a;
}
body.dark-mode .related-app-card:hover {
  border-color: var(--primary);
  background: #2d2d2d;
}
body.dark-mode .related-app-card .app-name { 
  color: var(--text-color); 
}
body.dark-mode .related-app-card .app-dev { 
  color: #9aa0a6; 
}
body.dark-mode .related-app-card .app-arrow { 
  color: #5f6368; 
}

body.dark-mode .assistant-container { 
  background: var(--card-bg); 
}
body.dark-mode .assistant-hint-text { 
  color: var(--text-color); 
}
body.dark-mode .assistant-chat-input-wrapper { 
  background: var(--card-bg); 
}
body.dark-mode .assistant-input-wrapper { 
  background: #2d2d2d; 
}
body.dark-mode .assistant-chat-input { 
  color: var(--text-color); 
}
body.dark-mode .assistant-chat-input::placeholder { 
  color: #5f6368; 
}
body.dark-mode .assistant-quick-questions { 
  background: var(--card-bg); 
}
body.dark-mode .assistant-quick-question-text { 
  color: #9aa0a6; 
}
body.dark-mode .assistant-quick-question-divider {
  background: linear-gradient(90deg, var(--border-color) 0%, var(--border-color) 85%, transparent 100%);
}
body.dark-mode .assistant-msg.received {
  background: #2d2d2d;
  color: var(--text-color);
}
body.dark-mode .assistant-msg.sent {
  background: var(--primary);
  color: white;
}
body.dark-mode .assistant-attach-btn { 
  color: #9aa0a6; 
}
body.dark-mode .assistant-attach-btn:hover { 
  background: rgba(var(--primary-rgb), 0.2); 
}
body.dark-mode .assistant-attach-dropdown { 
  background: #2d2d2d; 
}
body.dark-mode .assistant-attach-item { 
  color: var(--text-color); 
}
body.dark-mode .assistant-attach-item:hover { 
  background: #3d3d3d; 
}

body.dark-mode .modal-content { 
  background: var(--card-bg); 
}
body.dark-mode .modal-header h2 { 
  color: var(--text-color); 
}
body.dark-mode .modal-close { 
  background: #2d2d2d; 
  color: var(--text-color); 
}
body.dark-mode .modal-close:hover { 
  background: rgba(var(--primary-rgb), 0.2); 
}
body.dark-mode .login-input {
  background: #2d2d2d;
  border-color: #3d3d3d;
  color: var(--text-color);
}
body.dark-mode .login-input:focus { 
  border-color: var(--primary); 
}
body.dark-mode .login-desc { 
  color: #9aa0a6; 
}
body.dark-mode .login-timer { 
  color: #9aa0a6; 
}

body.dark-mode .bottom-nav {
  background: rgba(30, 30, 30, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 -2px 16px rgba(0,0,0,0.3);
}
body.dark-mode .nav-item { 
  color: #5f6368; 
}
body.dark-mode .nav-item.active { 
  color: var(--primary); 
  background: rgba(var(--primary-rgb), 0.15);
}
body.dark-mode .nav-item.active svg {
  stroke: var(--primary);
}

body.dark-mode .pay-container { 
  background: var(--card-bg); 
}
body.dark-mode .pay-app-row { 
  background: var(--card-bg); 
}
body.dark-mode .pay-app-name { 
  color: var(--text-color); 
}
body.dark-mode .pay-app-dev { 
  color: #9aa0a6; 
}
body.dark-mode .pay-divider { 
  background: var(--border-color); 
}
body.dark-mode .pay-method-row { 
  background: #2d2d2d; 
}
body.dark-mode .pay-method-row.active { 
  background: #1e3a8a; 
  border-color: var(--primary); 
}
body.dark-mode .pay-method-name { 
  color: var(--text-color); 
}
body.dark-mode .pay-method-sub { 
  color: #9aa0a6; 
}
body.dark-mode .pay-discount-box { 
  background: #2d2d2d; 
}
body.dark-mode .pay-discount-header { 
  color: var(--text-color); 
}
body.dark-mode .pay-discount-input {
  background: var(--card-bg);
  border-color: #3d3d3d;
  color: var(--text-color);
}
body.dark-mode .pay-discount-input:focus { 
  border-color: var(--primary); 
}
body.dark-mode .pay-bottom-bar {
  background: var(--card-bg);
  border-top: 1px solid var(--border-color);
}
body.dark-mode .pay-bottom-price { 
  color: var(--text-color); 
}

body.dark-mode .search-overlay { 
  background: var(--card-bg); 
}
body.dark-mode .search-overlay-header {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
}
body.dark-mode .search-back-btn { 
  background: #2d2d2d; 
  color: var(--text-color); 
}
body.dark-mode .search-back-btn:hover { 
  background: rgba(var(--primary-rgb), 0.2); 
}
body.dark-mode .search-overlay-input { 
  background: #2d2d2d; 
  color: var(--text-color); 
}
body.dark-mode .search-overlay-input:focus { 
  background: #3d3d3d; 
}
body.dark-mode .search-results-title {
  color: #9aa0a6;
  border-bottom-color: var(--border-color);
}
body.dark-mode .search-result-item:hover { 
  background: #2d2d2d; 
}
body.dark-mode .search-result-icon { 
  background: #2d2d2d; 
}
body.dark-mode .search-result-name { 
  color: var(--text-color); 
}
body.dark-mode .search-result-dev { 
  color: #9aa0a6; 
}
body.dark-mode .search-empty { 
  color: #5f6368; 
}

body.dark-mode .magazine-search-overlay { 
  background: var(--card-bg); 
}
body.dark-mode .magazine-search-overlay-header {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
}
body.dark-mode .magazine-search-back-btn { 
  background: #2d2d2d; 
  color: var(--text-color); 
}
body.dark-mode .magazine-search-back-btn:hover { 
  background: rgba(var(--primary-rgb), 0.2); 
}
body.dark-mode .magazine-search-overlay-input { 
  background: #2d2d2d; 
  color: var(--text-color); 
}
body.dark-mode .magazine-search-overlay-input:focus { 
  background: #3d3d3d; 
}
body.dark-mode .magazine-search-results-title {
  color: #9aa0a6;
  border-bottom-color: var(--border-color);
}
body.dark-mode .magazine-search-result-item { 
  border-bottom-color: var(--border-color); 
}
body.dark-mode .magazine-search-result-item:hover { 
  background: #2d2d2d; 
}
body.dark-mode .magazine-search-result-title { 
  color: var(--text-color); 
}
body.dark-mode .magazine-search-result-desc { 
  color: #9aa0a6; 
}

body.dark-mode .chats-search-overlay { 
  background: var(--card-bg); 
}
body.dark-mode .chats-search-overlay-header {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
}
body.dark-mode .chats-search-back-btn { 
  background: #2d2d2d; 
  color: var(--text-color); 
}
body.dark-mode .chats-search-back-btn:hover { 
  background: rgba(var(--primary-rgb), 0.2); 
}
body.dark-mode .chats-search-overlay-input { 
  background: #2d2d2d; 
  color: var(--text-color); 
}
body.dark-mode .chats-search-overlay-input:focus { 
  background: #3d3d3d; 
}
body.dark-mode .chats-search-results-title {
  color: #9aa0a6;
  border-bottom-color: var(--border-color);
}
body.dark-mode .chats-search-result-item { 
  border-bottom-color: var(--border-color); 
}
body.dark-mode .chats-search-result-item:hover { 
  background: #2d2d2d; 
}
body.dark-mode .chats-search-result-name { 
  color: var(--text-color); 
}
body.dark-mode .chats-search-result-message { 
  color: #9aa0a6; 
}

body.dark-mode .settings-item { 
  border-bottom-color: var(--border-color); 
}
body.dark-mode .settings-item-title { 
  color: var(--text-color); 
}
body.dark-mode .settings-item-desc { 
  color: #9aa0a6; 
}
body.dark-mode .settings-divider { 
  background: var(--border-color); 
}
body.dark-mode .settings-info { 
  background: #2d2d2d; 
}
body.dark-mode .settings-info-item { 
  color: #9aa0a6; 
}
body.dark-mode .settings-slider { 
  background: #3d3d3d; 
}
body.dark-mode .settings-switch input:checked + .settings-slider { 
  background: var(--primary); 
}
body.dark-mode .settings-page-container { 
  background: var(--card-bg); 
}
body.dark-mode .settings-page-item-title { 
  color: var(--text-color); 
}
body.dark-mode .settings-page-item-desc { 
  color: #9aa0a6; 
}
body.dark-mode .settings-page-divider { 
  background: var(--border-color); 
}
body.dark-mode .settings-page-version { 
  color: #9aa0a6; 
}
body.dark-mode .settings-page-item:hover { 
  background: rgba(var(--primary-rgb), 0.1); 
}

body.dark-mode .theme-option { 
  background: #2d2d2d; 
}
body.dark-mode .theme-option:hover { 
  background: #3d3d3d; 
}
body.dark-mode .theme-option.active {
  background: #1e3a8a;
  border-color: var(--primary);
}
body.dark-mode .theme-option-title { 
  color: var(--text-color); 
}
body.dark-mode .theme-option-desc { 
  color: #9aa0a6; 
}

body.dark-mode .install-banner {
  background: var(--card-bg);
  border-top-color: var(--border-color);
}
body.dark-mode .install-banner-message { 
  color: var(--text-color); 
}
body.dark-mode .install-banner-close { 
  color: #9aa0a6; 
}
body.dark-mode .install-banner-close:hover { 
  background: #2d2d2d; 
  color: var(--text-color); 
}
body.dark-mode .install-modal-content { 
  background: var(--card-bg); 
}
body.dark-mode .install-modal-header h3 { 
  color: var(--text-color); 
}
body.dark-mode .install-modal-close { 
  background: #2d2d2d; 
  color: var(--text-color); 
}
body.dark-mode .install-modal-close:hover { 
  background: #3d3d3d; 
}
body.dark-mode .install-guide .step { 
  background: #2d2d2d; 
}
body.dark-mode .install-guide .step .step-text { 
  color: var(--text-color); 
}

body.dark-mode hr { 
  border-color: var(--border-color); 
}
body.dark-mode .category-list .list-card { 
  border-bottom-color: var(--border-color); 
}
body.dark-mode .category-list .list-card:hover { 
  background: #2d2d2d; 
}
body.dark-mode .category-list .list-icon { 
  background: #2d2d2d; 
}
body.dark-mode .category-list .list-title { 
  color: var(--text-color); 
}
body.dark-mode .category-list .list-dev { 
  color: #9aa0a6; 
}
body.dark-mode .chat-time { 
  color: #9aa0a6; 
}
body.dark-mode .chat-send-btn { 
  background: #2d2d2d; 
}
body.dark-mode .chat-send-btn.visible { 
  background: var(--primary); 
}
body.dark-mode .chat-mic-btn { 
  color: #9aa0a6; 
}
body.dark-mode .chat-mic-btn:hover { 
  background: rgba(var(--primary-rgb), 0.2); 
}
body.dark-mode .login-submit-btn { 
  background: var(--primary); 
}
body.dark-mode .login-submit-btn:hover { 
  background: var(--primary-hover); 
}
body.dark-mode .login-resend-btn { 
  color: var(--primary); 
}
body.dark-mode .pay-method-row:hover { 
  background: #3d3d3d; 
}
body.dark-mode .pay-method-row.active { 
  background: #1e3a8a; 
}
body.dark-mode .pay-discount-apply-btn { 
  background: var(--primary); 
}
body.dark-mode .pay-discount-apply-btn:hover { 
  background: var(--primary-hover); 
}
body.dark-mode .pay-bottom-btn { 
  background: var(--primary); 
}
body.dark-mode .pay-bottom-btn:hover { 
  background: var(--primary-hover); 
}

body.dark-mode .profile-menu-icon-new.purple { 
  background: rgba(var(--primary-rgb), 0.2); 
  color: var(--primary); 
}
body.dark-mode .profile-menu-icon-new.blue { 
  background: #1e3a8a; 
  color: var(--primary); 
}
body.dark-mode .profile-menu-icon-new.green { 
  background: #1a3a1a; 
  color: #34a853; 
}
body.dark-mode .profile-menu-icon-new.orange { 
  background: #3a2a00; 
  color: #f9ab00; 
}
body.dark-mode .profile-menu-icon-new.red { 
  background: #3a1a1a; 
  color: #ea4335; 
}
body.dark-mode .profile-login-btn { 
  background: var(--primary); 
}
body.dark-mode .profile-login-btn:hover { 
  background: var(--primary-hover); 
}

body.dark-mode .toast-message { 
  background: #2d2d2d; 
  color: var(--text-color); 
}
body.dark-mode .toast-message.error { 
  background: #ea4335; 
  color: white; 
}
body.dark-mode .toast-message.success { 
  background: #34a853; 
  color: white; 
}

/* ============================================================ */
/* ========== استایل‌های دسکتاپ (Desktop) ========== */
/* ============================================================ */

@media (min-width: 769px) {
  .container {
    max-width: 100% !important;
    border-radius: 0 !important;
    height: 100vh !important;
  }

  .bottom-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: auto !important;
    max-width: 100% !important;
    padding: 6px 24px;
    border-radius: 0 !important;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    z-index: 9997;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    height: 56px;
    gap: 0 !important;
  }
  .bottom-nav.hidden {
    transform: translateY(-100%) !important;
    opacity: 0;
    pointer-events: none;
  }

  /* ========== لوگو در دسکتاپ ========== */
  .bottom-nav .logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-right: 0;
    margin-left: 0;
    order: 0;
    flex-shrink: 0;
    cursor: pointer;
    transition: opacity 0.2s ease;
  }
  .bottom-nav .logo-container:hover { 
    opacity: 0.8; 
  }
  .bottom-nav .logo-container .logo-icon {
    width: 32px;
    height: 32px;
    background: var(--primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    font-weight: 700;
  }
  .bottom-nav .logo-container .logo-text {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-color);
    white-space: nowrap;
  }

  body.dark-mode .bottom-nav .logo-container .logo-text { 
    color: var(--text-color); 
  }

  /* ========== جستجو در دسکتاپ ========== */
  .bottom-nav .search-section {
    margin-right: auto;
    margin-left: 12px;
    max-width: 350px;
    width: 100%;
    padding: 0 8px;
    order: 1;
  }
  .bottom-nav .search-box {
    background: #f1f3f4;
    border-radius: 24px;
    padding: 4px 12px;
    gap: 6px;
    font-size: 12px;
    border: 1px solid transparent;
    transition: 0.2s;
    width: 100%;
    height: 34px;
  }
  .bottom-nav .search-box:hover { 
    border-color: var(--primary); 
  }
  .bottom-nav .search-box input { 
    font-size: 12px; 
    padding: 4px 0; 
  }
  .bottom-nav .search-box .search-icon { 
    width: 14px; 
    height: 14px; 
  }
  .bottom-nav .search-box input::placeholder { 
    font-size: 12px; 
  }

  /* ========== آیتم‌های منو در دسکتاپ (افقی) ========== */
  .bottom-nav .nav-item {
    flex-direction: row;
    gap: 0 !important;
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 0;
    transition: 0.2s;
    color: #5f6368;
    border-bottom: 3px solid transparent;
    margin: 0;
    position: relative;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    order: 2;
  }
  .bottom-nav .nav-item svg { 
    display: none !important; 
  }
  .bottom-nav .nav-item span { 
    font-size: 14px; 
    font-weight: 500; 
  }
  .bottom-nav .nav-item:hover { 
    color: var(--primary); 
    background: transparent; 
  }
  .bottom-nav .nav-item.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: transparent;
  }
  .bottom-nav .nav-item:first-child span { 
    font-weight: 600; 
    color: var(--text-color); 
  }

  .header { 
    display: none !important; 
  }
  .page-header { 
    display: none !important; 
  }

  .slider-section {
    margin: 56px 0 16px 0;
    border-radius: 0;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding: 0;
  }
  .slide { 
    min-height: 350px; 
    border-radius: 0; 
  }
  .slides-container { 
    border-radius: 0; 
  }

  .detail-page-wrapper {
    display: flex;
    flex-direction: column;
    padding: 0 24px 20px;
    max-width: 1200px;
    margin: 56px auto 0;
    width: 100%;
    position: relative;
  }

  .detail-stats-row-wrapper {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
  }

  .detail-stats-row {
    display: flex;
    gap: 10px;
    flex: 1;
    min-width: 0;
    margin-bottom: 0 !important;
  }
  .detail-stats-row .detail-stat-card {
    flex: 1;
    text-align: center;
    padding: 12px 8px;
    background: #f8f9fa;
    border-radius: 12px;
    transition: background-color 0.3s ease;
    min-width: 0;
  }
  .detail-stats-row .detail-stat-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
    transition: color 0.3s ease;
  }
  .detail-stats-row .detail-stat-label {
    font-size: 10px;
    color: #5f6368;
    margin-top: 2px;
    transition: color 0.3s ease;
  }

  .detail-floating-install {
    position: relative !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    transform: none !important;
    width: auto !important;
    max-width: 240px !important;
    min-width: 300px !important;
    margin: 0 !important;
    padding: 10px 16px !important;
    background: #f8f9fa !important;
    border-radius: 12px !important;
    border: 1px solid var(--border-color) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 6px !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04) !important;
    z-index: 10 !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    position: static !important;
    flex-shrink: 0 !important;
  }
  .detail-floating-install .detail-bottom-info { 
    text-align: center; 
  }
  .detail-floating-install .detail-bottom-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-color);
    line-height: 1.3;
  }
  .detail-floating-install .detail-bottom-note { 
    font-size: 10px; 
    color: #34a853; 
    margin-top: 1px; 
  }
  .detail-floating-install .detail-install-btn {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 10px;
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    cursor: pointer;
    font-family: 'Vazirmatn', sans-serif;
    transition: 0.2s;
    box-shadow: none !important;
    white-space: nowrap;
  }
  .detail-floating-install .detail-install-btn:hover { 
    background: var(--primary-hover); 
  }

  .detail-info-section { 
    padding: 16px 0; 
  }
  .detail-hero-new {
    padding: 20px 24px;
    border-radius: 16px;
    background: #f8f9fa;
    margin: 0 0 16px 0;
    max-width: 100%;
  }
  .detail-icon-new { 
    width: 72px !important; 
    height: 72px !important; 
    border-radius: 18px !important; 
  }
  .detail-name { 
    font-size: 22px; 
  }
  .detail-dev { 
    font-size: 14px; 
  }

  .modal { 
    align-items: center !important; 
    justify-content: center !important; 
  }
  .modal-content {
    border-radius: 24px !important;
    max-width: 420px !important;
    max-height: 85vh;
    animation: modalFadeIn 0.3s ease !important;
  }
  .modal-small { 
    max-width: 420px !important; 
  }
  @keyframes modalFadeIn {
    from { opacity: 0; transform: scale(0.95) translateY(-20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
  }

  .chats-container {
    max-width: 1200px;
    margin: 56px auto 0;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    background: var(--card-bg);
    display: flex;
    flex-direction: row;
    height: calc(100vh - 120px);
    position: relative;
  }

  .chats-container .chats-list-wrapper {
    width: 320px;
    min-width: 320px;
    border-left: 1px solid #cccccc;
    overflow-y: auto;
    height: 100%;
    flex-shrink: 0;
    background: var(--card-bg);
    transition: all 0.3s ease;
  }
  .chats-container .chats-list-wrapper.centered {
    width: 100%;
    min-width: unset;
    border-right: none !important;
    border: none !important;
    box-shadow: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .chats-container .chats-list-wrapper.centered #chatsContent {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
  }

  .chats-container .chat-detail-container {
    flex: 1;
    height: 100%;
    border-radius: 0;
    border: none;
    margin: 0;
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
  }
  .chats-container .chat-detail-container .chat-detail-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    background: var(--card-bg);
  }
  .chats-container .chat-detail-container .chat-detail-input-bar {
    position: relative !important;
    bottom: auto !important;
    left: auto !important;
    transform: none !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 8px 16px 12px;
    border-top: 1px solid var(--border-color);
    background: var(--card-bg);
  }
  .chats-container .chat-detail-container .chat-detail-input-bar .chat-input-wrapper {
    background: #f1f3f4;
    border-radius: 24px;
    padding: 4px 6px;
  }
  .chats-container .chat-detail-container .chat-detail-input-bar .chat-detail-input { 
    padding: 10px 8px; 
  }

  .chats-container .chat-detail-container .chat-empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    flex-direction: column;
    color: #5f6368;
    padding: 40px;
  }
  .chats-container .chat-detail-container .chat-empty-state svg {
    width: 64px;
    height: 64px;
    color: #dadce0;
    margin-bottom: 16px;
  }
  .chats-container .chat-detail-container .chat-empty-state h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 8px;
  }
  .chats-container .chat-detail-container .chat-empty-state p { 
    font-size: 14px; 
    color: #5f6368; 
  }

  .chats-container .chats-search-desktop {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    background: var(--card-bg);
  }
  .chats-container .chats-search-desktop .search-box {
    background: #f1f3f4;
    border-radius: 24px;
    display: flex;
    align-items: center;
    padding: 8px 14px;
    gap: 8px;
    border: 1px solid transparent;
    transition: 0.2s;
  }
  .chats-container .chats-search-desktop .search-box:hover { 
    border-color: var(--primary); 
  }
  .chats-container .chats-search-desktop .search-box input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 13px;
    color: var(--text-color);
    flex: 1;
    font-family: 'Vazirmatn', sans-serif;
    text-align: right;
  }
  .chats-container .chats-search-desktop .search-box input::placeholder { 
    color: #5f6368; 
  }
  .chats-container .chats-search-desktop .search-box .search-icon { 
    width: 16px; 
    height: 16px; 
    color: #5f6368; 
  }

  .magazine-container {
    max-width: 1200px;
    margin: 56px auto 0;
    display: flex;
    flex-direction: row;
    gap: 20px;
    padding: 0 20px;
    height: calc(100vh - 120px);
    overflow: hidden;
  }

  .magazine-search-desktop-wrapper {
    display: flex;
    flex-direction: column;
    width: 220px;
    min-width: 220px;
    flex-shrink: 0;
    height: 100%;
    border-left: 1px solid var(--border-color);
    padding: 0 0 0 12px;
  }
  .magazine-search-desktop-wrapper .magazine-search-desktop {
    padding: 0 0 12px 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 12px;
  }
  .magazine-search-desktop-wrapper .magazine-search-desktop .search-box {
    background: #f1f3f4;
    border-radius: 24px;
    display: flex;
    align-items: center;
    padding: 8px 14px;
    gap: 8px;
    border: 1px solid transparent;
    transition: 0.2s;
  }
  .magazine-search-desktop-wrapper .magazine-search-desktop .search-box:hover { 
    border-color: var(--primary); 
  }
  .magazine-search-desktop-wrapper .magazine-search-desktop .search-box input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 13px;
    color: var(--text-color);
    flex: 1;
    font-family: 'Vazirmatn', sans-serif;
    text-align: right;
  }
  .magazine-search-desktop-wrapper .magazine-search-desktop .search-box input::placeholder { 
    color: #5f6368; 
  }
  .magazine-search-desktop-wrapper .magazine-search-desktop .search-box .search-icon { 
    width: 16px; 
    height: 16px; 
    color: #5f6368; 
  }

  .magazine-tabs-wrapper {
    width: 220px;
    min-width: 220px;
    flex-shrink: 0;
    overflow-y: auto;
    height: 100%;
    padding: 0 0 0 12px;
  }
  .magazine-tabs-wrapper .magazine-tabs {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: transparent;
    border-radius: 0;
    padding: 0;
    margin: 0;
  }
  .magazine-tabs-wrapper .magazine-tab {
    flex: none;
    text-align: right;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    color: #5f6368;
    transition: 0.2s;
    background: transparent;
    border-right: 3px solid transparent;
    box-shadow: none !important;
  }
  .magazine-tabs-wrapper .magazine-tab:hover { 
    background: #f8f9fa; 
    color: var(--text-color); 
  }
  .magazine-tabs-wrapper .magazine-tab.active {
    background: var(--primary-light);
    color: var(--primary);
    border-right-color: var(--primary);
    box-shadow: none !important;
  }

  .magazine-list-wrapper {
    flex: 1;
    overflow-y: auto;
    height: 100%;
    padding: 0 4px 0 0;
  }
  .magazine-list-wrapper .magazine-list { 
    display: flex; 
    flex-direction: column; 
    gap: 4px; 
  }
  .magazine-list-wrapper .magazine-list-item {
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid #f1f3f4;
    transition: 0.2s;
  }
  .magazine-list-wrapper .magazine-list-item:hover { 
    border-color: var(--primary); 
    background: #f8f9fa; 
  }

  .news-detail-container {
    max-width: 900px;
    margin: 56px auto 0;
    padding: 20px 24px !important;
  }
  .news-detail-title { 
    font-size: 28px; 
  }
  .news-detail-image { 
    height: 280px; 
  }
  .news-detail-body { 
    font-size: 16px; 
    line-height: 2; 
  }

  .category-container {
    max-width: 800px;
    margin: 56px auto 0;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    background: var(--card-bg);
  }

  .profile-page {
    max-width: 600px;
    margin: 56px auto 0;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    background: var(--card-bg);
  }
  .profile-cover { 
    height: 100px; 
  }

  .pay-container {
    max-width: 600px;
    margin: 56px auto 0;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    background: var(--card-bg);
  }
  .pay-bottom-bar {
    position: relative !important;
    bottom: auto !important;
    left: auto !important;
    transform: none !important;
    width: 100% !important;
    max-width: 600px !important;
    margin: 16px auto 0 !important;
    border-radius: 16px !important;
    border: 1px solid var(--border-color) !important;
    background: var(--card-bg) !important;
    padding: 16px 24px !important;
  }

  .assistant-container {
    max-width: 800px;
    margin: 56px auto 0;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    background: var(--card-bg);
    height: calc(100vh - 120px);
  }
  .assistant-hint-text { 
    font-size: 28px; 
    padding: 16px 24px 8px; 
  }
  .assistant-chat-messages { 
    padding: 16px 24px; 
  }
  .assistant-chat-input-wrapper { 
    padding: 8px 16px 16px; 
  }

  .category-slider-section .category-app-row { 
    padding: 6px 20px 14px; 
    gap: 16px; 
  }
  .category-slider-section .app-card { 
    min-width: 130px; 
    max-width: 130px; 
  }
  .category-slider-section .app-icon { 
    width: 90px; 
    height: 90px; 
    border-radius: 24px; 
  }
  .category-slider-section .app-name { 
    font-size: 14px; 
  }

  .modal-content { 
    border-radius: 24px; 
    max-width: 500px; 
    max-height: 85vh; 
  }
  .modal-small { 
    max-width: 420px; 
  }

  .nav-item.has-notification::after { 
    top: 4px; 
    right: 8px; 
    width: 7px; 
    height: 7px; 
  }

  .btn { 
    font-size: 14px; 
    padding: 10px 24px; 
    border-radius: 12px; 
  }

   /* ============================================================ */
  /* ========== 🆕 دسکتاپ: searchOverlay زیر اینپوت جستجو ========== */
  /* ============================================================ */
  .search-overlay {
    /* ========== موقعیت با JS تنظیم میشه ========== */
    position: fixed;
    max-height: 70vh;
    height: auto;
    margin: 0;
    border-radius: 16px;
    background: var(--card-bg);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: searchOverlayDropdown 0.2s ease;
  }
  
  @keyframes searchOverlayDropdown {
    from {
      opacity: 0;
      transform: translateY(-8px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  /* ========== مخفی کردن هدر داخلی در دسکتاپ ========== */
  .search-overlay .search-overlay-header {
    display: none;
  }
  
  /* ========== نتایج جستجو ========== */
  .search-overlay .search-results {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    max-height: 60vh;
  }
  
  /* ========== نتیجه item ها کمی فشرده‌تر ========== */
  .search-overlay .search-result-item {
    padding: 10px 12px;
    gap: 12px;
  }
  
  .search-overlay .search-result-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
  }
  
  .search-overlay .search-result-name {
    font-size: 14px;
  }
  
  .search-overlay .search-result-dev {
    font-size: 11px;
  }

  .chat-detail-input-bar .chat-send-btn {
    opacity: 0.6;
    cursor: default;
    transition: all 0.2s ease;
    display: flex !important;
  }
  .chat-detail-input-bar .chat-send-btn.visible {
    opacity: 1;
    cursor: pointer;
  }
  .chat-detail-input-bar .chat-send-btn.visible:hover { 
    background: var(--primary-hover); 
    transform: scale(1.02); 
  }
  .chat-detail-input-bar .chat-send-btn:disabled { 
    opacity: 0.4; 
    cursor: not-allowed; 
  }

  .chat-detail-input-bar { 
    display: flex !important; 
  }
  .chat-detail-input-bar .chat-input-wrapper { 
    display: flex !important; 
    flex: 1 !important; 
  }
  .chat-detail-input-bar .chat-attach-wrapper { 
    display: flex !important; 
  }
  .chat-detail-input-bar .chat-attach-main { 
    display: flex !important; 
  }
  .chat-detail-input-bar .chat-mic-btn { 
    display: flex !important; 
  }
  .chat-detail-input-bar .chat-send-btn { 
    display: flex !important; 
  }

  .chats-container .chats-search-desktop.hidden { 
    display: none !important; 
  }

  .chat-empty-state {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #5f6368;
    padding: 40px;
    text-align: center;
  }
  .chat-empty-state svg { 
    width: 64px; 
    height: 64px; 
    color: #dadce0; 
    margin-bottom: 16px; 
  }
  .chat-empty-state h3 { 
    font-size: 18px; 
    font-weight: 600; 
    color: var(--text-color); 
    margin-bottom: 8px; 
  }
  .chat-empty-state p { 
    font-size: 14px; 
    color: #5f6368; 
  }

  body.dark-mode .detail-floating-install {
    background: #2d2d2d !important;
    border-color: #3d3d3d !important;
  }
  body.dark-mode .detail-floating-install .detail-bottom-price { 
    color: var(--text-color); 
  }
  body.dark-mode .detail-stats-row .detail-stat-card { 
    background: #2d2d2d; 
  }
  body.dark-mode .detail-stats-row .detail-stat-value { 
    color: var(--text-color); 
  }
  body.dark-mode .detail-stats-row .detail-stat-label { 
    color: #9aa0a6; 
  }
  body.dark-mode .chats-container .chats-list-wrapper { 
    border-right-color: #3d3d3d; 
  }
  body.dark-mode .chats-container .chats-list-wrapper.centered { 
    border-right: none !important; 
  }
}
@media (min-width: 768px) {
  .mobile-stats { 
    display: none !important; 
  }
}
/* ========== مخفی کردن جستجوی اخبار در موبایل ========== */
@media (max-width: 768px) {
  .magazine-search-desktop-wrapper,
  #magazineSearchDesktopWrapper,
  .magazine-search-desktop,
  #magazineSearchDesktop {
    display: none !important;
  }
}
@media (max-width: 768px) {
  .desktop-stats { 
    display: none !important; 
  }
  .chat-empty-state { 
    display: none !important; 
  }
}

@media (min-width: 1024px) {
  .container { 
    max-width: 100% !important; 
  }
  .slide { 
    min-height: 400px; 
  }
  .slider-section { 
    padding: 0; 
    margin: 56px 0 20px 0; 
  }
  .detail-floating-install { 
    max-width: 280px !important; 
    padding: 12px 20px !important; 
  }
  .detail-floating-install .detail-install-btn { 
    padding: 10px 20px; 
    font-size: 14px; 
    min-width: 80px; 
  }
  .detail-floating-install .detail-bottom-price { 
    font-size: 16px; 
  }
  .detail-info-section { 
    padding-right: 0; 
  }
  .detail-name { 
    font-size: 26px; 
  }
  .detail-icon-new { 
    width: 80px !important; 
    height: 80px !important; 
  }
  .news-detail-title { 
    font-size: 32px; 
  }
  .news-detail-image { 
    height: 320px; 
  }
  .bottom-nav .nav-item { 
    padding: 6px 20px; 
    font-size: 14px; 
  }
  .bottom-nav .nav-item span { 
    font-size: 15px; 
  }
  .bottom-nav .search-section { 
    max-width: 400px; 
  }
  .bottom-nav .logo-container .logo-text { 
    font-size: 18px; 
  }
  .chats-container .chats-list-wrapper { 
    width: 360px; 
    min-width: 360px; 
  }
  .magazine-tabs-wrapper { 
    width: 250px; 
    min-width: 250px; 
  }
  .magazine-search-desktop-wrapper { 
    width: 250px; 
    min-width: 250px; 
  }
}

@media (min-width: 481px) and (max-width: 768px) {
  .bottom-nav { 
    max-width: 100% !important; 
    padding: 6px 16px; 
  }
  .bottom-nav .nav-item { 
    flex-direction: row; 
    gap: 4px; 
    font-size: 11px; 
    padding: 4px 10px; 
  }
  .bottom-nav .nav-item svg { 
    width: 18px; 
    height: 18px; 
  }
  .slide { 
    min-height: 220px; 
  }
  .detail-floating-install { 
    padding: 12px 20px !important; 
  }
  .detail-floating-install .detail-install-btn { 
    padding: 12px 32px; 
    font-size: 15px; 
  }
  .detail-name { 
    font-size: 18px; 
  }
}
/* ============================================================ */
/* ========== استایل‌های صفحه جزئیات اپلیکیشن (توضیحات) ========== */
/* ============================================================ */

/* ========== هدر توضیحات ========== */
.app-desc-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  margin-bottom: 8px !important;
}

.app-desc-header h3 {
  font-size: 16px !important;
  font-weight: 600 !important;
  margin: 0 !important;
  color: #202124 !important;
}

/* ========== دکمه "جزئیات بیشتر" - پیش‌فرض مخفی ========== */


/* ========== نمایش دکمه فقط در موبایل با کلاس is-visible ========== */
@media (max-width: 768px) {
  .app-desc-more-link.is-visible {
    display: inline-flex !important;
    align-items: center !important;
    gap: 3px !important;
    background: none !important;
    border: none !important;
    color: #3B82F6 !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    font-family: 'Vazirmatn', sans-serif !important;
    padding: 4px 0 !important;
    font-size: 13px !important;
    white-space: nowrap !important;
    text-decoration: none !important;
    transition: color 0.2s ease !important;
  }
  
  .app-desc-more-link.is-visible:hover {
    text-decoration: underline !important;
  }
  
  .app-desc-more-link.is-visible svg {
    width: 14px !important;
    height: 14px !important;
  }
}

/* ========== در دسکتاپ همیشه مخفی ========== */
@media (min-width: 769px) {
  .app-desc-more-link,
  .app-desc-more-link.is-visible {
    display: none !important;
  }
}

/* ========== متن توضیحات ========== */
.app-desc-text {
  font-size: 13px !important;
  color: #5f6368 !important;
  line-height: 1.75 !important;
  word-wrap: break-word !important;
}

.app-desc-text img {
  max-width: 100% !important;
  height: auto !important;
  border-radius: 10px !important;
  margin: 8px 0 !important;
}

.app-desc-text p {
  margin-bottom: 10px !important;
}

/* ========== کلاس Clamp (فقط موبایل) ========== */
@media (max-width: 768px) {
  .app-desc-text.is-clamped {
    display: -webkit-box !important;
    -webkit-line-clamp: 4 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
  }
}

/* ========== در دسکتاپ همیشه کامل ========== */
@media (min-width: 769px) {
  .app-desc-text,
  .app-desc-text.is-clamped {
    -webkit-line-clamp: unset !important;
    display: block !important;
    overflow: visible !important;
  }
}

/* ============================================================ */
/* ========== مودال تمام‌صفحه توضیحات ========== */
/* ============================================================ */

.app-desc-modal {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  background: #ffffff !important;
  z-index: 10000 !important;
  display: flex !important;
  flex-direction: column !important;
  opacity: 0 !important;
  visibility: hidden !important;
  transform: translateY(100%) !important;
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease !important;
}

.app-desc-modal.is-open {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) !important;
}

.app-desc-modal-header {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 14px 16px !important;
  border-bottom: 1px solid #e8eaed !important;
  background: #ffffff !important;
  flex-shrink: 0 !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 2 !important;
}

.app-desc-modal-close {
  width: 40px !important;
  height: 40px !important;
  border-radius: 50% !important;
  border: none !important;
  background: #f1f3f4 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: 0.2s !important;
  flex-shrink: 0 !important;
}

.app-desc-modal-close:hover {
  background: #e8eaed !important;
}

.app-desc-modal-close svg {
  width: 22px !important;
  height: 22px !important;
  color: #5f6368 !important;
}

.app-desc-modal-title {
  font-size: 17px !important;
  font-weight: 700 !important;
  color: #202124 !important;
  margin: 0 !important;
  flex: 1 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.app-desc-modal-body {
  flex: 1 !important;
  overflow-y: auto !important;
  padding: 20px 16px 60px !important;
  -webkit-overflow-scrolling: touch !important;
}

.app-desc-modal-content {
  font-size: 14px !important;
  color: #202124 !important;
  line-height: 1.9 !important;
  word-wrap: break-word !important;
}

.app-desc-modal-content p {
  margin-bottom: 14px !important;
}

.app-desc-modal-content img {
  max-width: 100% !important;
  height: auto !important;
  border-radius: 12px !important;
  margin: 12px 0 !important;
}

.app-desc-modal-content ul,
.app-desc-modal-content ol {
  padding-right: 24px !important;
  margin-bottom: 14px !important;
}

.app-desc-modal-content h1,
.app-desc-modal-content h2,
.app-desc-modal-content h3 {
  margin-top: 20px !important;
  margin-bottom: 10px !important;
}

/* ========== دارک مود ========== */
body.dark-mode .app-desc-header h3 {
  color: #e8eaed !important;
}

body.dark-mode .app-desc-text {
  color: #b0b8c0 !important;
}

body.dark-mode .app-desc-modal {
  background: #1e1e1e !important;
}

body.dark-mode .app-desc-modal-header {
  background: #1e1e1e !important;
  border-bottom-color: #2d2d2d !important;
}

body.dark-mode .app-desc-modal-close {
  background: #2d2d2d !important;
}

body.dark-mode .app-desc-modal-close:hover {
  background: #3d3d3d !important;
}

body.dark-mode .app-desc-modal-close svg {
  color: #e8eaed !important;
}

body.dark-mode .app-desc-modal-title {
  color: #e8eaed !important;
}

body.dark-mode .app-desc-modal-content {
  color: #e8eaed !important;
}

/* ============================================================ */
/* ========== صفحه جزئیات اپلیکیشن (app-detail) ========== */
/* ============================================================ */

/* ========== دسکتاپ: تنظیم عرض دقیق ========== */
@media (min-width: 769px) {
  
  /* ========== والد: چیدمان افقی ========== */
  .detail-info-section {
    display: flex !important;
    flex-direction: row !important;
    gap: 24px !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    padding: 0 !important;
  }
  
  /* ========== باکس ثبت نام (راست) - عرض ثابت ========== */
  .detail-info-right {
    width: 280px !important;
    min-width: 280px !important;
    max-width: 280px !important;
    flex: 0 0 280px !important;
    order: 0 !important;
  }
  
  /* ========== باکس توضیحات (چپ) - عرض مشخص ========== */
  .detail-info-left {
    /* ========== عرض پایه ========== */
    width: 750px !important;
    min-width: 400px !important;
    max-width: 750px !important;
    flex: 1 1 auto !important;
    order: 1 !important;
  }
}

/* ============================================================ */
/* ========== ریسپانسیو: تنظیمات برای هر سایز ========== */
/* ============================================================ */

/* ========== دسکتاپ بزرگ (1440px+) - عرض بیشتر ========== */
@media (min-width: 1440px) {
  .detail-info-left {
    width: 900px !important;
    max-width: 900px !important;
  }
  .detail-info-right {
    width: 300px !important;
    min-width: 300px !important;
    max-width: 300px !important;
  }
}

/* ========== دسکتاپ استاندارد (1200px - 1439px) ========== */
@media (min-width: 1200px) and (max-width: 1439px) {
  .detail-info-left {
    width: 800px !important;
    max-width: 800px !important;
  }
  .detail-info-right {
    width: 280px !important;
    min-width: 280px !important;
    max-width: 280px !important;
  }
}

/* ========== دسکتاپ کوچک (992px - 1199px) ========== */
@media (min-width: 992px) and (max-width: 1199px) {
  .detail-info-left {
    width: 650px !important;
    max-width: 650px !important;
  }
  .detail-info-right {
    width: 260px !important;
    min-width: 260px !important;
    max-width: 260px !important;
  }
}

/* ========== تبلت افقی (769px - 991px) ========== */
@media (min-width: 769px) and (max-width: 991px) {
  .detail-info-left {
    width: 480px !important;
    max-width: 480px !important;
  }
  .detail-info-right {
    width: 230px !important;
    min-width: 230px !important;
    max-width: 230px !important;
  }
  .detail-info-section {
    gap: 16px !important;
  }
}

/* ========== موبایل (تا 768px) ========== */
@media (max-width: 768px) {
  .detail-info-left {
    width: 100% !important;
    max-width: 100% !important;
    flex: 1 1 100% !important;
  }
}


/* ============================================================ */
/* ========== صفحه جزئیات اپلیکیشن - چیدمان ========== */
/* ============================================================ */

@media (min-width: 769px) {
  
  .detail-info-section {
    display: flex !important;
    flex-direction: row !important;
    gap: 24px !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    padding: 0 !important;
  }
  
  /* ========== توضیحات: سمت راست ========== */
  .detail-info-left {
    order: 0 !important;
    width: 750px !important;
    max-width: 750px !important;
    min-width: 400px !important;
    flex: 1 1 auto !important;
  }
  
  /* ========== باکس ثبت نام: سمت چپ ========== */
  .detail-info-right {
    order: 1 !important;
    width: 280px !important;
    min-width: 280px !important;
    max-width: 280px !important;
    flex: 0 0 280px !important;
  }
}

/* ========== ریسپانسیو ========== */

/* دسکتاپ بزرگ */
@media (min-width: 1440px) {
  .detail-info-left {
    width: 900px !important;
    max-width: 900px !important;
  }
  .detail-info-right {
    width: 300px !important;
    min-width: 300px !important;
    max-width: 300px !important;
  }
}

/* دسکتاپ استاندارد */
@media (min-width: 1200px) and (max-width: 1439px) {
  .detail-info-left {
    width: 800px !important;
    max-width: 800px !important;
  }
}

/* دسکتاپ کوچک */
@media (min-width: 992px) and (max-width: 1199px) {
  .detail-info-left {
    width: 650px !important;
    max-width: 650px !important;
  }
  .detail-info-right {
    width: 260px !important;
    min-width: 260px !important;
    max-width: 260px !important;
  }
}

/* تبلت افقی */
@media (min-width: 769px) and (max-width: 991px) {
  .detail-info-left {
    width: 480px !important;
    max-width: 480px !important;
  }
  .detail-info-right {
    width: 230px !important;
    min-width: 230px !important;
    max-width: 230px !important;
  }
  .detail-info-section {
    gap: 16px !important;
  }
}

/* موبایل */
@media (max-width: 768px) {
  .detail-info-section {
    flex-direction: column !important;
    padding: 0 16px 16px 16px !important;
  }
  
  .detail-info-left {
    width: 100% !important;
    max-width: 100% !important;
    order: 0 !important;
  }
  
 .detail-info-right {
    display: block !important;  /* ← نمایش داده بشه */
    width: 100% !important;
    margin-bottom: 16px;
  }
}


/* ============================================================ */
/* ========== لودینگ فقط روی محتوا ========== */
/* ============================================================ */

#page-content {
    position: relative !important;
}

/* ========== لودینگ داخل page-content ========== */
#page-content > .page-loading {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 50 !important;
}

/* ========== مخفی کردن لودینگ در موبایل که ناحیه کمی دارد ========== */
@media (max-width: 768px) {
    #page-content > .page-loading {
        /* تمام محتوا را می‌پوشاند */
        position: absolute !important;
    }
}

/* ============================================================ */
/* ========== حذف underline از همه کارت‌های <a> ========== */
/* ============================================================ */

a.app-card,
a.section-more-link,
a.list-card,
a.related-app-card,
a.section-header span,
a.section-header a {
  text-decoration: none !important;
  color: inherit !important;
}

/* ========== حذف underline در حالت hover ========== */
a.app-card:hover,
a.section-more-link:hover,
a.list-card:hover,
a.related-app-card:hover {
  text-decoration: none !important;
}

/* ========== حذف underline در حالت visited ========== */
a.app-card:visited,
a.section-more-link:visited,
a.list-card:visited,
a.related-app-card:visited {
  text-decoration: none !important;
  color: inherit !important;
}

/* ========== حذف underline در حالت focus ========== */
a.app-card:focus,
a.section-more-link:focus,
a.list-card:focus,
a.related-app-card:focus {
  text-decoration: none !important;
  outline: none;
}



/* ============================================================ */
/* ========== 🆕 searchOverlay - دسکتاپ ========== */
/* ============================================================ */
@media (min-width: 769px) {
  #searchOverlay.search-overlay {
    position: fixed !important;
    top: 64px !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;
    transform: translateX(-50%) !important;
    width: 90% !important;
    max-width: 600px !important;
    height: auto !important;
    max-height: 70vh !important;
    border-radius: 16px !important;
    background: var(--card-bg) !important;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15) !important;
    z-index: 9999 !important;
    flex-direction: column !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  

  
  /* ========== نتایج جستجو ========== */
  #searchOverlay .search-results {
    flex: 1 !important;
    overflow-y: auto !important;
    padding: 16px !important;
    max-height: 60vh !important;
    background: var(--card-bg) !important;
  }
  
  #searchOverlay .search-results-title {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #5f6368 !important;
    margin-bottom: 12px !important;
    padding-bottom: 8px !important;
    border-bottom: 1px solid var(--border-color) !important;
  }
  
  #searchOverlay #searchResultsList {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
  }
  
  #searchOverlay .search-result-item {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 10px 12px !important;
    cursor: pointer !important;
    transition: 0.2s !important;
    border-radius: 10px !important;
  }
  
  #searchOverlay .search-result-item:hover {
    background: #f8f9fa !important;
  }
  
  #searchOverlay .search-result-icon {
    width: 40px !important;
    height: 40px !important;
    border-radius: 10px !important;
    background: #f1f3f4 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    overflow: hidden !important;
  }
  
  #searchOverlay .search-result-icon img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }
  
  #searchOverlay .search-result-info {
    flex: 1 !important;
    min-width: 0 !important;
  }
  
  #searchOverlay .search-result-name {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: var(--text-color) !important;
  }
  
  #searchOverlay .search-result-dev {
    font-size: 11px !important;
    color: #5f6368 !important;
    margin-top: 2px !important;
  }
}

/* ========== دارک مود ========== */
@media (min-width: 769px) {
  body.dark-mode #searchOverlay.search-overlay {
    background: var(--card-bg) !important;
  }
  
  body.dark-mode #searchOverlay .search-results {
    background: var(--card-bg) !important;
  }
  
  body.dark-mode #searchOverlay .search-result-item:hover {
    background: #2d2d2d !important;
  }
  
  body.dark-mode #searchOverlay .search-result-icon {
    background: #2d2d2d !important;
  }
  
  body.dark-mode #searchOverlay .search-result-name {
    color: var(--text-color) !important;
  }
  
  body.dark-mode #searchOverlay .search-result-dev {
    color: #9aa0a6 !important;
  }
}



/* ============================================================ */
/* ========== 🆕 searchOverlay - هم‌عرض با desktopSearchBox ========== */
/* ============================================================ */
@media (min-width: 769px) {
  #searchOverlay.search-overlay {
    position: fixed !important;
    top: 64px !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;
    transform: translateX(-50%) !important;
    /* ========== 🆕 عرض هم‌عرض با desktopSearchBox ========== */
    width: 350px !important;       /* ← پیش‌فرض */
    max-width: 350px !important;
    min-width: 300px !important;
    height: auto !important;
    max-height: 70vh !important;
    border-radius: 16px !important;
    background: var(--card-bg) !important;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15) !important;
    z-index: 9999 !important;
    flex-direction: column !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  
  #searchOverlay .search-overlay-header {
    display: none !important;
  }
  
  #searchOverlay .search-results {
    flex: 1 !important;
    overflow-y: auto !important;
    padding: 16px !important;
    max-height: 60vh !important;
    background: var(--card-bg) !important;
  }
}

/* ========== دسکتاپ بزرگ ========== */
@media (min-width: 1024px) {
  #searchOverlay.search-overlay {
    width: 400px !important;
    max-width: 400px !important;
  }
}

/* ========== 🆕 FIX: نمایش اینپوت در دسکتاپ ========== */
@media (min-width: 769px) {
  #searchOverlay .search-overlay-header {
    display: flex !important;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    background: var(--card-bg);
  }
  
  #searchOverlay .search-overlay-input-wrapper {
    flex: 1;
  }
  
  #searchOverlay .search-overlay-input {
    width: 100%;
    padding: 10px 16px;
    border: none;
    background: #f1f3f4;
    border-radius: 24px;
    font-size: 14px;
    font-family: 'Vazirmatn', sans-serif;
    outline: none;
    text-align: right;
    color: var(--text-color);
  }
  
  #searchOverlay .search-overlay-input:focus {
    background: #e8eaed;
  }
  
  #searchOverlay .search-back-btn {
    display: flex !important;
  }
}


/* ========== 🆕 FIX: در دسکتاپ، اینپوت داخل overlay مخفی بشه ========== */
@media (min-width: 769px) {
  #searchOverlay .search-overlay-header {
    display: none !important;
  }
  
  #searchOverlay .search-overlay-input-wrapper {
    display: none !important;
  }
  
  #searchOverlay .search-overlay-input {
    display: none !important;
  }
  
  /* ========== فقط نتایج نمایش داده بشن ========== */
  #searchOverlay .search-results {
    padding: 12px;
    max-height: 60vh;
    overflow-y: auto;
  }
}


/* ============================================================ */
/* ========== 🆕 Search Dropdown دسکتاپ ========== */
/* ============================================================ */

/* ========== wrapper ========== */
.search-section-wrapper {
  position: relative;
  margin-right: auto;
  margin-left: 12px;
  max-width: 350px;
  width: 100%;
  order: 1;
}

/* ========== dropdown ========== */
.desktop-search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  width: 100%;
  max-height: 70vh;
  overflow-y: auto;
  background: var(--card-bg);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  z-index: 9999;
  display: none;
  flex-direction: column;
  padding: 8px;
}

.desktop-search-dropdown.show {
  display: flex;
}

/* ========== در دسکتاپ بزرگ ========== */
@media (min-width: 1024px) {
  .search-section-wrapper {
    max-width: 400px;
  }
}

/* ========== مخفی کردن در موبایل ========== */
@media (max-width: 768px) {
  .search-section-wrapper {
    display: none !important;
  }
  .desktop-search-dropdown {
    display: none !important;
  }
}

/* ========== دارک مود ========== */
body.dark-mode .desktop-search-dropdown {
  background: var(--card-bg);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* ============================================================ */
/* ========== 🆕 Search Backdrop (پس‌زمینه تاریک) ========== */
/* ============================================================ */

.search-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 9995; /* ← زیر dropdown، بالای بقیه */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  pointer-events: none;
}

.search-backdrop.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* ========== مخفی در موبایل ========== */
@media (max-width: 768px) {
  .search-backdrop {
    display: none !important;
  }
}

/* ========== دارک مود ========== */
body.dark-mode .search-backdrop {
  background: rgba(0, 0, 0, 0.5);
}

/* ========== 🆕 مخفی کردن searchOverlay در دسکتاپ ========== */
@media (min-width: 769px) {
  #searchOverlay {
    display: none !important;
  }
}
/* ========== 🆕 نمایش هدر در موبایل (override) ========== */
@media (max-width: 768px) {
  #searchOverlay .search-overlay-header {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    height: auto !important;
    padding: 12px 16px !important;
  }
  
  #searchOverlay .search-back-btn {
    display: flex !important;
    visibility: visible !important;
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    flex-shrink: 0 !important;
  }
  
  #searchOverlay .search-overlay-input-wrapper {
    display: block !important;
    flex: 1 !important;
  }
  
  #searchOverlay .search-overlay-input {
    display: block !important;
    width: 100% !important;
  }
}
/* ============================================================ */
/* ========== 🆕 FIX: SVG داخل دکمه‌ها کلیک رو نگیره ========== */
/* ============================================================ */

.search-back-btn svg,
.search-back-btn svg *,
.magazine-search-back-btn svg,
.magazine-search-back-btn svg *,
.chats-search-back-btn svg,
.chats-search-back-btn svg *,
.back-btn svg,
.back-btn svg *,
.modal-close svg,
.modal-close svg *,
.share-btn svg,
.share-btn svg * {
  pointer-events: none !important;
}


.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ============================================================
/* ========== 🆕 پیام محدودیت مهمان ========== */
/* ============================================================ */

.assistant-limit-message {
  background: linear-gradient(135deg, #fef7e0, #fef3c7);
  border: 2px solid #f9ab00;
  border-radius: 16px;
  padding: 20px 18px;
  margin: 12px 8px;
  text-align: center;
  animation: limitMessageFadeIn 0.4s ease;
}

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

.assistant-limit-icon {
  font-size: 36px;
  margin-bottom: 8px;
}

.assistant-limit-title {
  font-size: 15px;
  font-weight: 700;
  color: #92400e;
  margin-bottom: 6px;
}

.assistant-limit-desc {
  font-size: 13px;
  color: #a16207;
  line-height: 1.6;
  margin-bottom: 14px;
}

.assistant-limit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 24px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Vazirmatn', sans-serif;
  transition: 0.2s;
}

.assistant-limit-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.assistant-limit-btn:active {
  transform: translateY(0);
}

.assistant-limit-btn svg {
  width: 18px;
  height: 18px;
}

/* ========== دارک مود ========== */
body.dark-mode .assistant-limit-message {
  background: linear-gradient(135deg, #3a2a00, #2d2000);
  border-color: #f9ab00;
}

body.dark-mode .assistant-limit-title {
  color: #fbbf24;
}

body.dark-mode .assistant-limit-desc {
  color: #fcd34d;
}

/* ========== نمایش تعداد پیام باقی‌مانده ========== */
.assistant-guest-counter {
  position: fixed;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(59, 130, 246, 0.95);
  color: white;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  animation: counterFadeIn 0.3s ease;
}

@keyframes counterFadeIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-10px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.assistant-guest-counter.warning {
  background: rgba(249, 171, 0, 0.95);
}

.assistant-guest-counter.danger {
  background: rgba(234, 67, 53, 0.95);
}
/* ============================================================ */
/* ========== 🆕 هدر مهمان ========== */
/* ============================================================ */

.assistant-guest-header {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 50;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* ========== فقط در موبایل نمایش ========== */
@media (max-width: 768px) {
  .assistant-guest-header {
    display: flex !important;
  }
  
  /* ========== در موبایل، header پیش‌فرض رو مخفی کن ========== */
  .assistant-container {
    padding-top: 0 !important;
  }
}

/* ========== دکمه بازگشت ========== */
.assistant-guest-back-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #f1f3f4;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #5f6368;
  transition: 0.2s;
  flex-shrink: 0;
}

.assistant-guest-back-btn:hover {
  background: rgba(var(--primary-rgb), 0.1);
  color: var(--primary);
}

.assistant-guest-back-btn:active {
  transform: scale(0.95);
}

.assistant-guest-back-btn svg {
  width: 22px;
  height: 22px;
  transform: scaleX(-1);
}

/* ========== عنوان ========== */
.assistant-guest-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-color);
  flex: 1;
  text-align: center;
}

/* ========== دکمه ورود ========== */
.assistant-guest-login-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Vazirmatn', sans-serif;
  transition: 0.2s;
  flex-shrink: 0;
}

.assistant-guest-login-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.3);
}

.assistant-guest-login-btn:active {
  transform: translateY(0);
}

.assistant-guest-login-btn svg {
  width: 16px;
  height: 16px;
}

/* ============================================================ */
/* ========== 🆕 Modal هشدار پاک شدن چت ========== */
/* ============================================================ */

.assistant-clear-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.assistant-clear-modal.show {
  opacity: 1;
  visibility: visible;
}

.assistant-clear-modal-content {
  background: var(--card-bg);
  border-radius: 24px;
  padding: 30px 24px 24px;
  max-width: 380px;
  width: 100%;
  text-align: center;
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s ease;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.assistant-clear-modal.show .assistant-clear-modal-content {
  transform: scale(1) translateY(0);
}

/* ========== آیکون هشدار ========== */
.assistant-clear-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 16px;
  background: #fef7e0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f9ab00;
  animation: assistantClearPulse 2s ease-in-out infinite;
}

@keyframes assistantClearPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.assistant-clear-icon svg {
  width: 44px;
  height: 44px;
}

/* ========== عنوان ========== */
.assistant-clear-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 8px;
}

/* ========== توضیحات ========== */
.assistant-clear-desc {
  font-size: 14px;
  color: #5f6368;
  line-height: 1.7;
  margin-bottom: 24px;
}

/* ========== دکمه‌ها ========== */
.assistant-clear-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.assistant-clear-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 20px;
  border: none;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Vazirmatn', sans-serif;
  transition: 0.2s;
  width: 100%;
}

.assistant-clear-btn svg {
  width: 18px;
  height: 18px;
}

/* ========== دکمه پاک کردن ========== */
.assistant-clear-btn.clear {
  background: #fce8e6;
  color: #ea4335;
  border: 2px solid transparent;
}

.assistant-clear-btn.clear:hover {
  background: #ea4335;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(234, 67, 53, 0.3);
}

.assistant-clear-btn.clear:active {
  transform: translateY(0);
}

/* ========== دکمه ورود ========== */
.assistant-clear-btn.login {
  background: var(--primary);
  color: white;
}

.assistant-clear-btn.login:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.3);
}

.assistant-clear-btn.login:active {
  transform: translateY(0);
}

/* ========== دارک مود ========== */
body.dark-mode .assistant-guest-header {
  background: var(--card-bg);
  border-bottom-color: var(--border-color);
}

body.dark-mode .assistant-guest-back-btn {
  background: #2d2d2d;
  color: #9aa0a6;
}

body.dark-mode .assistant-guest-back-btn:hover {
  background: rgba(var(--primary-rgb), 0.2);
  color: var(--primary);
}

body.dark-mode .assistant-guest-title {
  color: var(--text-color);
}

body.dark-mode .assistant-clear-modal-content {
  background: #1e1e1e;
}

body.dark-mode .assistant-clear-icon {
  background: #3a2a00;
}

body.dark-mode .assistant-clear-title {
  color: #e8eaed;
}

body.dark-mode .assistant-clear-desc {
  color: #9aa0a6;
}

body.dark-mode .assistant-clear-btn.clear {
  background: #3a1a1a;
  color: #ea4335;
}

body.dark-mode .assistant-clear-btn.clear:hover {
  background: #ea4335;
  color: white;
}

/* ========== ریسپانسیو برای موبایل‌های کوچک ========== */
@media (max-width: 380px) {
  .assistant-guest-login-btn span {
    display: none;
  }
  
  .assistant-guest-login-btn {
    padding: 8px 10px;
  }
  
  .assistant-guest-header {
    padding: 10px 12px;
  }
}

/* ============================================================ */
/* ========== 🆕 حذف padding-bottom در صفحه دستیار ========== */
/* ============================================================ */

@media (max-width: 768px) {
  body.assistant-page #page-content {
    padding-bottom: 0 !important;
  }
  
  body.assistant-page .container {
    padding-bottom: 0 !important;
  }
  
  body.assistant-page .assistant-container {
    padding-bottom: 0 !important;
    height: 100vh !important;
    max-height: 100vh !important;
  }
}

/* Pixvan AI-style conversation input bar */
.chat-detail-input-bar {
  box-sizing: border-box !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: calc(100% - 28px) !important;
  max-width: 780px !important;
  min-height: 124px !important;
  padding: 12px 14px 10px !important;
  display: flex !important;
  align-items: flex-end !important;
  gap: 10px !important;
  background: #fff !important;
  border: 1px solid #e3e5e8 !important;
  border-radius: 25px !important;
  box-shadow: 0 2px 7px rgba(0,0,0,.045) !important;
}
.chat-input-wrapper {
  position: relative !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
  min-height: 100px !important;
  align-self: stretch !important;
  display: flex !important;
  align-items: flex-end !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0 0 0 0 !important;
  gap: 8px !important;
  box-shadow: none !important;
}
.chat-detail-input {
  position: absolute !important;
  inset: 0 0 44px 0 !important;
  width: 100% !important;
  height: auto !important;
  box-sizing: border-box !important;
  padding: 6px 2px !important;
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  font-size: 15px !important;
  align-self: flex-start !important;
}
.chat-detail-input::placeholder { color: #b9bdc4 !important; }
.chat-attach-wrapper {
  position: absolute !important;
  left: 0 !important;
  bottom: 0 !important;
  z-index: 3 !important;
}
.chat-attach-main {
  width: 38px !important; height: 38px !important;
  background: transparent !important; border: 0 !important;
  color: #17191c !important; border-radius: 50% !important;
}
.chat-attach-main svg { width: 19px !important; height: 19px !important; }
.chat-mic-btn { display: none !important; }
.chat-send-btn {
  width: 36px !important; height: 36px !important;
  flex: 0 0 36px !important; margin: 0 0 0 0 !important;
  background: #b8c8f7 !important; color: white !important;
  border: 0 !important; opacity: 1 !important;
  box-shadow: none !important;
}
.chat-send-btn.visible { background: #aebff3 !important; opacity: 1 !important; }
.chat-send-btn svg { width: 19px !important; height: 19px !important; transform: rotate(-90deg); }
body.dark-mode .chat-detail-input-bar {
  background: #202124 !important; border-color: #45474b !important;
  box-shadow: 0 2px 8px rgba(0,0,0,.2) !important;
}
body.dark-mode .chat-detail-input { color: #f2f3f5 !important; }
body.dark-mode .chat-attach-main { color: #f2f3f5 !important; }
@media (max-width: 600px) {
  .chat-detail-input-bar { width: calc(100% - 20px) !important; min-height: 118px !important; border-radius: 23px !important; padding: 10px 12px 9px !important; bottom: 8px !important; }
  .chat-input-wrapper { min-height: 98px !important; }
}


/* Pixvan conversations input: match assistant send icon and swap attachment/mic positions */
.chat-detail-input-bar .chat-attach-wrapper {
  left: auto !important;
  right: 44px !important;
  bottom: 0 !important;
}
.chat-detail-input-bar .chat-mic-btn {
  display: flex !important;
  position: absolute !important;
  left: 0 !important;
  right: auto !important;
  bottom: 0 !important;
  width: 38px !important;
  height: 38px !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 3 !important;
  background: transparent !important;
  color: #17191c !important;
  border: 0 !important;
  border-radius: 50% !important;
}
.chat-detail-input-bar .chat-mic-btn svg { width: 19px !important; height: 19px !important; }
.chat-detail-input-bar .chat-send-btn svg {
  width: 19px !important;
  height: 19px !important;
  transform: rotate(-90deg) !important;
}
body.dark-mode .chat-detail-input-bar .chat-mic-btn { color: #f2f3f5 !important; }
@media (max-width: 600px) {
  .chat-detail-input-bar .chat-attach-wrapper { right: 44px !important; }
  .chat-detail-input-bar .chat-mic-btn { left: 0 !important; }
}
/* ============================================================ */
/* ========== 🆕 اسلایدر خدمات مشابه ========== */
/* ============================================================ */

.similar-apps-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #e8eaed;
  width: 100%;
}

.similar-apps-section .section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 0;
}

.similar-apps-section .section-header h2 {
  font-size: 17px;
  font-weight: 600;
  color: #202124;
  margin: 0;
  transition: color 0.3s ease;
}

.similar-apps-row {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  gap: 12px;
  padding: 6px 0 10px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  width: 100%;
}

.similar-apps-row::-webkit-scrollbar {
  display: none;
}

.similar-apps-row .app-card {
  display: block !important;
  min-width: 110px !important;
  max-width: 110px !important;
  width: 110px !important;
  flex: 0 0 110px !important;
  text-align: center;
  cursor: pointer;
  scroll-snap-align: start;
  transition: transform 0.2s ease;
  text-decoration: none;
  color: inherit;
}

.similar-apps-row .app-card:hover {
  transform: scale(1.05);
}

.similar-apps-row .app-card:active {
  transform: scale(0.95);
}

.similar-apps-row .app-icon {
  width: 80px;
  height: 80px;
  background: #f1f3f4;
  border-radius: 20px;
  margin: 0 auto 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 8px rgba(0,0,0,0.08);
  overflow: hidden;
  transition: background-color 0.3s ease;
}

.similar-apps-row .app-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.similar-apps-row .app-icon svg {
  width: 40px;
  height: 40px;
}

.similar-apps-row .app-name {
  font-size: 13px;
  font-weight: 500;
  color: #202124;
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-word;
  max-height: 36px;
  transition: color 0.3s ease;
}

/* ========== دارک مود اسلایدر ========== */
body.dark-mode .similar-apps-section {
  border-top-color: #2d2d2d;
}

body.dark-mode .similar-apps-section .section-header h2 {
  color: #e8eaed;
}

body.dark-mode .similar-apps-row .app-icon {
  background: #2d2d2d;
}

body.dark-mode .similar-apps-row .app-name {
  color: #e8eaed;
}

/* ========== دسکتاپ ========== */
@media (min-width: 769px) {
  .similar-apps-section {
    margin-top: 32px;
    padding-top: 24px;
  }

  .similar-apps-section .section-header h2 {
    font-size: 20px;
  }

  .similar-apps-row {
    gap: 16px;
    padding: 8px 0 16px;
  }

  .similar-apps-row .app-card {
    min-width: 130px !important;
    max-width: 130px !important;
    width: 130px !important;
    flex: 0 0 130px !important;
  }

  .similar-apps-row .app-icon {
    width: 90px;
    height: 90px;
    border-radius: 24px;
  }

  .similar-apps-row .app-name {
    font-size: 14px;
  }
}

/* ========== موبایل ========== */
@media (max-width: 768px) {
  .similar-apps-section {
    margin-top: 20px;
    padding-top: 16px;
    padding-left: 16px;
    padding-right: 16px;
    margin-bottom: 50px;
  }

  .similar-apps-row {
    margin-left: -16px;
    margin-right: -16px;
    padding-left: 16px;
    padding-right: 16px;
  }
}

/* ============================================================ */
/* ========== 🆕 اسلایدر اخبار مشابه (بدون تصویر) ========== */
/* ============================================================ */

.similar-news-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #e8eaed;
  width: 100%;
  position: relative;
}

.similar-news-section .section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 0;
  gap: 10px;
}

.similar-news-section .section-header h2 {
  font-size: 17px;
  font-weight: 600;
  color: #202124;
  margin: 0;
  transition: color 0.3s ease;
  flex: 1;
}

/* ========== 🆕 دکمه‌های چپ/راست ========== */
.similar-news-nav {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.similar-news-nav-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid #e8eaed;
  background: white;
  color: #5f6368;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  padding: 0;
}

.similar-news-nav-btn:hover {
  background: #3B82F6;
  color: white;
  border-color: #3B82F6;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(59,130,246,0.3);
}

.similar-news-nav-btn:active {
  transform: translateY(0);
}

.similar-news-nav-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  background: white;
  color: #9aa0a6;
  border-color: #e8eaed;
  transform: none;
  box-shadow: none;
}

.similar-news-nav-btn svg {
  width: 18px;
  height: 18px;
  pointer-events: none;
}

/* ========== 🆕 در موبایل دکمه‌ها مخفی بشن (سوایپ کافیه) ========== */
@media (max-width: 768px) {
  .similar-news-nav {
    display: none;
  }
}

/* ========== ردیف اسلایدر ========== */
.similar-news-row {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  gap: 12px;
  padding: 6px 0 10px;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  width: 100%;
}

.similar-news-row::-webkit-scrollbar {
  display: none;
}

/* ========== کارت خبر (بدون تصویر) ========== */
.similar-news-card {
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  min-width: 240px !important;
  max-width: 240px !important;
  width: 240px !important;
  flex: 0 0 240px !important;
  scroll-snap-align: start;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  border-radius: 14px;
  overflow: hidden;
  background: white;
  border: 1px solid #e8eaed;
  transition: all 0.2s ease;
  box-sizing: border-box;
  padding: 14px 16px;
  min-height: 140px;
}

.similar-news-card:hover {
  border-color: #3B82F6;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.similar-news-card:active {
  transform: scale(0.98);
}

.similar-news-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.similar-news-title {
  font-size: 14px;
  font-weight: 700;
  color: #202124;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  transition: color 0.3s ease;
}

/* ========== 🆕 توضیحات کوتاه ========== */
.similar-news-desc {
  font-size: 12px;
  color: #5f6368;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  transition: color 0.3s ease;
}

.similar-news-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #9aa0a6;
  margin-top: auto;
  padding-top: 6px;
  border-top: 1px dashed #f1f3f4;
}

.similar-news-meta .category {
  color: #3B82F6;
  font-weight: 600;
}

/* ========== دارک مود ========== */
body.dark-mode .similar-news-section {
  border-top-color: #2d2d2d;
}

body.dark-mode .similar-news-section .section-header h2 {
  color: #e8eaed;
}

body.dark-mode .similar-news-nav-btn {
  background: #2d2d2d;
  border-color: #3d3d3d;
  color: #9aa0a6;
}

body.dark-mode .similar-news-nav-btn:hover {
  background: #3B82F6;
  color: white;
  border-color: #3B82F6;
}

body.dark-mode .similar-news-nav-btn:disabled {
  background: #2d2d2d;
  color: #5f6368;
  border-color: #3d3d3d;
}

body.dark-mode .similar-news-card {
  background: #1e1e1e;
  border-color: #2d2d2d;
}

body.dark-mode .similar-news-card:hover {
  border-color: #3B82F6;
  background: #2d2d2d;
}

body.dark-mode .similar-news-title {
  color: #e8eaed;
}

body.dark-mode .similar-news-desc {
  color: #9aa0a6;
}

body.dark-mode .similar-news-meta {
  border-top-color: #2d2d2d;
}

/* ========== دسکتاپ ========== */
@media (min-width: 769px) {
  .similar-news-section {
    margin-top: 32px;
    padding-top: 24px;
  }

  .similar-news-section .section-header h2 {
    font-size: 20px;
  }

  .similar-news-row {
    gap: 16px;
    padding: 8px 0 16px;
  }

  .similar-news-card {
    min-width: 280px !important;
    max-width: 280px !important;
    width: 280px !important;
    flex: 0 0 280px !important;
    min-height: 160px;
    padding: 16px 18px;
  }

  .similar-news-title {
    font-size: 15px;
  }

  .similar-news-desc {
    font-size: 13px;
    -webkit-line-clamp: 3;
  }
}

@media (max-width: 768px) {
    
  .detail-stats-row {
    display: none !important;
  }

  /* ========== 🆕 آمار موبایل: مقدار بالای برچسب ========== */
  .detail-stats-row.mobile-stats {
    display: flex !important;
    flex-direction: row !important;
    gap: 10px !important;
    padding: 12px 16px !important;
    margin: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .detail-stats-row.mobile-stats .detail-stat-card {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    flex: 1 !important;
    padding: 10px 6px !important;
    background: #f8f9fa !important;
    border-radius: 12px !important;
    min-width: 0 !important;
    gap: 3px !important;
  }

  .detail-stats-row.mobile-stats .detail-stat-value {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #202124 !important;
    line-height: 1.2 !important;
    order: 1 !important;
  }

  .detail-stats-row.mobile-stats .detail-stat-label {
    font-size: 11px !important;
    color: #5f6368 !important;
    margin-top: 0 !important;
    order: 2 !important;
  }

  body.dark-mode .detail-stats-row.mobile-stats .detail-stat-card {
    background: #2d2d2d !important;
  }

  body.dark-mode .detail-stats-row.mobile-stats .detail-stat-value {
    color: #e8eaed !important;
  }

  body.dark-mode .detail-stats-row.mobile-stats .detail-stat-label {
    color: #9aa0a6 !important;
  }

}

/* ========== 🆕 Footer ========== */
.site-footer {
  background: #f8f9fa;
  border-top: 1px solid #e8eaed;
  padding: 30px 20px 20px;
    flex-shrink: 0;
  margin-top: 40px;
  display: block;
}

@media (max-width: 768px) {
  .site-footer {
    display: none;
  }
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 1000px;
  margin: 0 auto 20px;
}

.footer-section h3 {
  font-size: 14px;
  font-weight: 700;
  color: #202124;
  margin-bottom: 12px;
}

.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-section li {
  margin-bottom: 8px;
}

.footer-section a {
  font-size: 13px;
  color: #5f6368;
  text-decoration: none;
  transition: 0.2s;
}

.footer-section a:hover {
  color: #3B82F6;
}

.footer-bottom {
  text-align: center;
  font-size: 12px;
  color: #9aa0a6;
  padding-top: 16px;
  border-top: 1px solid #e8eaed;
  max-width: 1000px;
  margin: 0 auto;
}

body.dark-mode .site-footer {
  background: #1a1a1a;
  border-top-color: #2d2d2d;
}

body.dark-mode .footer-section h3 {
  color: #e8eaed;
}

body.dark-mode .footer-section a {
  color: #9aa0a6;
}

body.dark-mode .footer-section a:hover {
  color: #3B82F6;
}

body.dark-mode .footer-bottom {
  color: #5f6368;
  border-top-color: #2d2d2d;
}

    /* ========== 🆕 لینک دسته‌بندی ========== */
    .detail-stat-category-link {
      text-decoration: none !important;
      color: inherit !important;
      cursor: pointer;
      transition: background-color 0.2s ease, transform 0.2s ease;
    }
    
    .detail-stat-category-link:hover {
      background-color: rgba(59, 130, 246, 0.1) !important;
    }
    
    .detail-stat-category-link:active {
      transform: scale(0.97);
    }
    
    .detail-stat-category-link .detail-stat-value {
      color: #3B82F6 !important;
    }
    
    body.dark-mode .detail-stat-category-link:hover {
      background-color: rgba(59, 130, 246, 0.2) !important;
    }
    
    body.dark-mode .detail-stat-category-link .detail-stat-value {
      color: #60A5FA !important;
    }
    
    
    /* footer - همیشه بعد از container */
.site-footer {
  background: #f8f9fa;
  border-top: 1px solid #e8eaed;
  padding: 30px 20px 20px;
  display: block;
}

@media (max-width: 768px) {
  .site-footer {
    display: none !important;
  }
}

/* ========== 🆕 لینک دسته‌بندی ========== */
.detail-stat-category-link {
  text-decoration: none !important;
  color: inherit !important;
  cursor: pointer;
  display: flex !important;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

/* دسکتاپ: نمایش افقی مثل بقیه کارت‌ها */
@media (min-width: 769px) {
  .detail-stats-row.desktop-stats .detail-stat-category-link {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 8px 12px !important;
    background: rgba(255,255,255,0.6) !important;
    border-radius: 8px !important;
    text-align: right !important;
    min-width: 0 !important;
    border: none !important;
    gap: 8px !important;
  }
  
  .detail-stats-row.desktop-stats .detail-stat-category-link .detail-stat-value {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #3B82F6 !important;
    text-align: right;
    order: 1;
  }
  
  .detail-stats-row.desktop-stats .detail-stat-category-link .detail-stat-label {
    font-size: 11px !important;
    color: #5f6368 !important;
    margin-top: 0 !important;
    order: 2;
  }
  
  body.dark-mode .detail-stats-row.desktop-stats .detail-stat-category-link {
    background: rgba(255,255,255,0.08) !important;
  }
  
  body.dark-mode .detail-stats-row.desktop-stats .detail-stat-category-link .detail-stat-value {
    color: #60A5FA !important;
  }
}

/* موبایل: نمایش عمودی مثل بقیه کارت‌ها */
@media (max-width: 768px) {
  .detail-stats-row.mobile-stats .detail-stat-category-link {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    flex: 1 !important;
    padding: 10px 6px !important;
    background: #f8f9fa !important;
    border-radius: 12px !important;
    min-width: 0 !important;
    gap: 3px !important;
  }
  
  .detail-stats-row.mobile-stats .detail-stat-category-link .detail-stat-value {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #202124 !important;
    line-height: 1.2 !important;
    order: 1 !important;
  }
  
  .detail-stats-row.mobile-stats .detail-stat-category-link .detail-stat-label {
    font-size: 11px !important;
    color: #5f6368 !important;
    margin-top: 0 !important;
    order: 2 !important;
  }
  
  body.dark-mode .detail-stats-row.mobile-stats .detail-stat-category-link {
    background: #2d2d2d !important;
  }
  
  body.dark-mode .detail-stats-row.mobile-stats .detail-stat-category-link .detail-stat-value {
    color: #60A5FA !important;
  }
}

.detail-stat-category-link:hover {
  background-color: rgba(59, 130, 246, 0.1) !important;
}

.detail-stat-category-link:active {
  transform: scale(0.97);
}
/* ========== موبایل: اسکرول داخلی container ========== */
@media (max-width: 768px) {
    html, body {
        margin: 0;
        padding: 0;
        height: 100%;
        overflow: hidden;
    }
    
    body {
        background-color: var(--bg-color, #f5f5f5);
        font-family: 'Vazirmatn', 'Segoe UI', Roboto, sans-serif;
        color: var(--text-color, #202124);
    }
    
    .container {
        max-width: 480px;
        margin: 0 auto;
        background-color: var(--card-bg, #ffffff);
        box-shadow: 0 0 20px var(--shadow-color, rgba(0,0,0,0.05));
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
        display: flex;
        flex-direction: column;
        position: relative;
        overflow: hidden;
    }
    
    #page-content {
        flex: 1;
        overflow-y: auto;
        overflow-x: hidden;
        padding-bottom: 80px;
    }
    
    .site-footer {
        display: none !important;
    }
}

/* ========== دسکتاپ: اسکرول body، فوتر با محتوا ========== */
@media (min-width: 769px) {
    html, body {
        margin: 0;
        padding: 0;
        min-height: 100%;
    }
    
    body {
        background-color: var(--bg-color, #f5f5f5);
        font-family: 'Vazirmatn', 'Segoe UI', Roboto, sans-serif;
        color: var(--text-color, #202124);
        overflow-x: hidden;
    }
    
    .container {
        max-width: 100%;  /* در دسکتاپ، تمام عرض */
        margin: 0 auto;
        background-color: var(--card-bg, #ffffff);
        box-shadow: 0 0 20px var(--shadow-color, rgba(0,0,0,0.05));
        min-height: 100vh;
        border-radius: 0;
        display: flex;
        flex-direction: column;
        position: relative;
        overflow: visible;
    }
    
    #page-content {
        flex: 1;
        overflow-y: visible;
        overflow-x: hidden;
    }
    
    .site-footer {
        display: block;
        background: #f8f9fa;
        border-top: 1px solid #e8eaed;
        padding: 20px 20px 14px;
        width: 100%;
        box-sizing: border-box;
    }
}

/* اصلاح اسکرول دسکتاپ و جایگاه فوتر */
@media (min-width: 769px) {
    html,
    body {
        height: auto !important;
        min-height: 100%;
        overflow-x: hidden !important;
        overflow-y: auto !important;
    }

    .container {
        height: auto !important;
        min-height: 100vh;
        max-height: none !important;
        overflow: visible !important;
        display: flex;
        flex-direction: column;
    }

    #page-content {
        flex: 1 0 auto;
        min-height: 0;
        overflow: visible !important;
    }

    .site-footer {
        margin-top: auto;
        flex-shrink: 0;
        position: static;
    }
}
@media (min-width: 769px) {
    .container {
        height: auto !important;
        min-height: 100vh;
        max-height: none !important;
        overflow: visible !important;
    }

    #page-content {
        height: auto !important;
        min-height: 0;
        overflow: visible !important;
    }

    .magazine-container {
        height: auto !important;
        overflow: visible !important;
    }

    .magazine-list-wrapper {
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
    }
}

@media (min-width: 769px) {
    #magazineContainer {
        overflow: visible !important;
        height: auto !important;
        min-height: 100vh;
        padding-right: 290px !important;
        box-sizing: border-box;
    }

    #magazineSearchDesktopWrapper {
        position: fixed !important;
        top: 80px !important;
        right: max(20px, calc((100vw - 1200px) / 2 + 20px)) !important;
        width: 250px !important;
        min-width: 250px !important;
        height: auto !important;
        max-height: calc(100vh - 100px) !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        align-self: flex-start !important;
        z-index: 999 !important;
        background: var(--card-bg, #fff);
    }
}
/* ============================================================ */
/* ========== 🆕 دکمه سبد خرید در هدر ========== */
/* ============================================================ */

.cart-header-btn {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #f1f3f4;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #5f6368;
  transition: 0.2s;
  flex-shrink: 0;
  padding: 0;
}
.cart-header-btn:hover {
  background: rgba(59, 130, 246, 0.1);
  color: #3B82F6;
}
.cart-header-btn svg {
  width: 22px;
  height: 22px;
}
.cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 10px;
  background: #ea4335;
  color: white;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Vazirmatn', sans-serif;
  border: 2px solid var(--card-bg, #fff);
  box-sizing: content-box;
  line-height: 1;
}
body.dark-mode .cart-header-btn {
  background: #2d2d2d;
  color: #9aa0a6;
}
body.dark-mode .cart-header-btn:hover {
  background: rgba(59, 130, 246, 0.2);
  color: #60A5FA;
}
body.dark-mode .cart-badge {
  border-color: #1e1e1e;
}

/* ============================================================ */
/* ========== 🆕 صفحه سبد خرید ========== */
/* ============================================================ */

.cart-page-container {
  padding: 16px;
  background: var(--card-bg, #fff);
  min-height: calc(100vh - 60px);
  transition: background-color .3s ease;
}

.cart-items-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.cart-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: #fff;
  border: 1px solid #eef0f2;
  border-radius: 16px;
  transition: .2s;
  position: relative;
}
.cart-item:hover {
  border-color: #3B82F6;
  box-shadow: 0 4px 12px rgba(59,130,246,.08);
}

.cart-item-image {
  width: 80px;
  height: 80px;
  border-radius: 12px;
  background: #f1f3f4;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  text-decoration: none;
}
.cart-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cart-item-image .no-image {
  font-size: 32px;
  color: #9aa0a6;
}

.cart-item-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cart-item-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-color, #202124);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-decoration: none;
}
.cart-item-name:hover {
  color: #3B82F6;
}

.cart-item-prices {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.cart-item-price {
  font-size: 14px;
  font-weight: 700;
  color: #3B82F6;
}
.cart-item-price span {
  font-size: 11px;
  font-weight: 500;
}

.cart-item-old {
  font-size: 11px;
  color: #9aa0a6;
  text-decoration: line-through;
}

.cart-item-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
}

.cart-qty-control {
  display: flex;
  align-items: center;
  gap: 0;
  background: #f1f3f4;
  border-radius: 20px;
  overflow: hidden;
}
.cart-qty-btn {
  width: 30px;
  height: 30px;
  border: none;
  background: transparent;
  color: #202124;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: .2s;
}
.cart-qty-btn:hover { background: #e0e3e7; }
.cart-qty-btn:disabled { opacity: .4; cursor: not-allowed; }
.cart-qty-value {
  min-width: 32px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: #202124;
  padding: 0 4px;
}

.cart-item-subtotal {
  font-size: 13px;
  font-weight: 700;
  color: #202124;
}
.cart-item-subtotal span {
  font-size: 10px;
  font-weight: 500;
  color: #5f6368;
}

.cart-item-remove {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fce8e6;
  border: none;
  color: #ea4335;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: .2s;
}
.cart-item-remove:hover {
  background: #ea4335;
  color: white;
}
.cart-item-remove svg {
  width: 14px;
  height: 14px;
}

.cart-empty {
  text-align: center;
  padding: 60px 20px;
  color: #9aa0a6;
}
.cart-empty svg {
  width: 80px;
  height: 80px;
  margin: 0 auto 16px;
  display: block;
  opacity: .4;
}
.cart-empty-title {
  font-size: 17px;
  font-weight: 700;
  color: #202124;
  margin-bottom: 8px;
}
.cart-empty-desc {
  font-size: 14px;
  color: #5f6368;
  margin-bottom: 20px;
}
.cart-empty-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 28px;
  background: #3B82F6;
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Vazirmatn', sans-serif;
  transition: .2s;
}
.cart-empty-btn:hover { background: #2563EB; }

.cart-summary {
  background: #f8f9fa;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 100px;
  border: 1px solid #eef0f2;
}
.cart-summary-title {
  font-size: 15px;
  font-weight: 700;
  color: #202124;
  margin-bottom: 12px;
}
.cart-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: 13px;
  color: #5f6368;
}
.cart-summary-row.discount { color: #34a853; }
.cart-summary-row.total {
  font-size: 16px;
  font-weight: 700;
  color: #202124;
  padding-top: 12px;
  margin-top: 8px;
  border-top: 1px solid #e8eaed;
}

.cart-checkout-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px 20px;
  background: var(--card-bg, #fff);
  border-top: 1px solid #e8eaed;
  z-index: 30;
}
.cart-checkout-info { flex: 1; }
.cart-checkout-total {
  font-size: 18px;
  font-weight: 700;
  color: #202124;
}
.cart-checkout-note {
  font-size: 11px;
  color: #34a853;
  margin-top: 2px;
}
.cart-checkout-btn {
  background: #3B82F6;
  color: white;
  border: none;
  padding: 16px 40px;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Vazirmatn', sans-serif;
  transition: .2s;
  white-space: nowrap;
  flex-shrink: 0;
}
.cart-checkout-btn:hover { background: #2563EB; }
.cart-checkout-btn:disabled { background: #cbd5e1; cursor: not-allowed; }

/* ========== دارک مود ========== */
body.dark-mode .cart-item { background: #2d2d2d; border-color: #3d3d3d; }
body.dark-mode .cart-item-name { color: #e8eaed; }
body.dark-mode .cart-item-image { background: #3d3d3d; }
body.dark-mode .cart-qty-control { background: #3d3d3d; }
body.dark-mode .cart-qty-btn { color: #e8eaed; }
body.dark-mode .cart-qty-btn:hover { background: #4d4d4d; }
body.dark-mode .cart-qty-value { color: #e8eaed; }
body.dark-mode .cart-item-subtotal { color: #e8eaed; }
body.dark-mode .cart-summary { background: #2d2d2d; border-color: #3d3d3d; }
body.dark-mode .cart-summary-title { color: #e8eaed; }
body.dark-mode .cart-summary-row.total { color: #e8eaed; border-top-color: #3d3d3d; }
body.dark-mode .cart-checkout-bar { background: #1e1e1e; border-top-color: #2d2d2d; }
body.dark-mode .cart-checkout-total { color: #e8eaed; }
body.dark-mode .cart-empty-title { color: #e8eaed; }

/* ========== دسکتاپ ========== */
@media (min-width: 769px) {
  .cart-page-container {
    max-width: 900px;
    margin: 56px auto 0;
    padding: 24px 28px 40px;
    border-radius: 16px;
    border: 1px solid #eef0f2;
    background: #fff;
  }
  .cart-checkout-bar {
    position: relative !important;
    bottom: auto !important;
    left: auto !important;
    transform: none !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 16px 0 0 !important;
    border-radius: 16px !important;
    border: 1px solid #e8eaed !important;
    background: #f8f9fa !important;
    padding: 16px 20px !important;
  }
  .cart-checkout-btn {
    padding: 14px 48px;
    font-size: 15px;
  }
}

/* ============================================================ */
/* ========== 🆕 مدال نصب اپ ========== */
/* ============================================================ */
.cart-install-modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.cart-install-modal.show {
  opacity: 1;
  visibility: visible;
}
.cart-install-modal-content {
  background: var(--card-bg, #fff);
  border-radius: 24px;
  padding: 30px 24px 24px;
  max-width: 400px;
  width: 100%;
  text-align: center;
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s ease;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}
.cart-install-modal.show .cart-install-modal-content {
  transform: scale(1) translateY(0);
}
.cart-install-modal-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 16px;
  background: #e8f0fe;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #3B82F6;
}
.cart-install-modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-color, #202124);
  margin-bottom: 8px;
}
.cart-install-modal-desc {
  font-size: 14px;
  color: #5f6368;
  line-height: 1.7;
  margin-bottom: 22px;
}
.cart-install-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cart-install-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  border: none;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Vazirmatn', sans-serif;
  transition: 0.2s;
  width: 100%;
}
.cart-install-btn .icon {
  font-size: 18px;
}
.cart-install-btn.direct {
  background: #3B82F6;
  color: white;
}
.cart-install-btn.direct:hover {
  background: #2563EB;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}
.cart-install-btn.bazaar {
  background: #00a693;
  color: white;
}
.cart-install-btn.bazaar:hover {
  background: #008a7a;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 166, 147, 0.3);
}
.cart-install-btn:active {
  transform: translateY(0);
}
.cart-install-cancel {
  background: transparent;
  color: #5f6368;
  border: none;
  padding: 12px;
  font-size: 13px;
  cursor: pointer;
  font-family: 'Vazirmatn', sans-serif;
  transition: 0.2s;
  width: 100%;
  border-radius: 10px;
}
.cart-install-cancel:hover {
  background: #f1f3f4;
  color: #202124;
}

body.dark-mode .cart-install-modal-content { background: #1e1e1e; }
body.dark-mode .cart-install-modal-icon { background: #1a237e; color: #60A5FA; }
body.dark-mode .cart-install-modal-title { color: #e8eaed; }
body.dark-mode .cart-install-modal-desc { color: #9aa0a6; }
body.dark-mode .cart-install-cancel { color: #9aa0a6; }
body.dark-mode .cart-install-cancel:hover { background: #2d2d2d; color: #e8eaed; }

/* ============================================================ */
/* ========== 🆕 مدال موجودی صفر ========== */
/* ============================================================ */
.cart-stock-modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.cart-stock-modal.show {
  opacity: 1;
  visibility: visible;
}
.cart-stock-modal-content {
  background: var(--card-bg, #fff);
  border-radius: 24px;
  padding: 30px 24px 24px;
  max-width: 380px;
  width: 100%;
  text-align: center;
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s ease;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}
.cart-stock-modal.show .cart-stock-modal-content {
  transform: scale(1) translateY(0);
}
.cart-stock-modal-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 16px;
  background: #fef7e0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f9ab00;
}
.cart-stock-modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-color, #202124);
  margin-bottom: 8px;
}
.cart-stock-modal-desc {
  font-size: 14px;
  color: #5f6368;
  line-height: 1.7;
  margin-bottom: 22px;
}
.cart-stock-modal-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 20px;
  background: #3B82F6;
  color: white;
  border: none;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Vazirmatn', sans-serif;
  transition: 0.2s;
  width: 100%;
}
.cart-stock-modal-btn:hover {
  background: #2563EB;
  transform: translateY(-1px);
}
.cart-stock-modal-btn:active {
  transform: translateY(0);
}

body.dark-mode .cart-stock-modal-content { background: #1e1e1e; }
body.dark-mode .cart-stock-modal-icon { background: #3a2a00; color: #fbbf24; }
body.dark-mode .cart-stock-modal-title { color: #e8eaed; }
body.dark-mode .cart-stock-modal-desc { color: #9aa0a6; }

/* ============================================================ */
/* ========== 🆕 Toast راهنمای دستیار ========== */
/* ============================================================ */
/* ============================================================ */
/* ========== 🆕 Toast راهنمای دستیار ========== */
/* ============================================================ */

.assistant-guide-toast {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: linear-gradient(135deg, #3B82F6, #2563EB);
  color: white;
  padding: 12px 18px;
  border-radius: 16px;
  font-size: 14px;
  font-weight: 500;
  font-family: 'Vazirmatn', sans-serif;
  z-index: 9998;
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.assistant-guide-toast.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  /* 🆕 انیمیشن بالا-پایین خیلی کم */
  animation: assistantToastBounce 2s ease-in-out infinite;
}

/* 🆕 انیمیشن بالا و پایین رفتن خیلی کم */
@keyframes assistantToastBounce {
  0%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(-6px);
  }
}

/* ========== فلش کوچک رو به پایین ========== */
.assistant-guide-toast::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid #2563EB;
}

.assistant-guide-toast-icon {
  font-size: 18px;
  flex-shrink: 0;
}

/* ========== موبایل ========== */
@media (max-width: 768px) {
  .assistant-guide-toast {
    bottom: 78px;
    font-size: 13px;
    padding: 10px 16px;
    max-width: calc(100% - 32px);
    white-space: normal;
    text-align: center;
  }
}

/* ========== دسکتاپ: مخفی ========== */
@media (min-width: 769px) {
  .assistant-guide-toast {
    display: none !important;
  }
}

/* ========== دارک مود ========== */
body.dark-mode .assistant-guide-toast {
  background: linear-gradient(135deg, #1e3a8a, #1e40af);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

body.dark-mode .assistant-guide-toast::after {
  border-top-color: #1e40af;
}
/* ========== 🆕 Overlay موبایل ========== */
#searchOverlay {
  display: none;
}

#searchOverlay.is-open {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

@media (min-width: 769px) {
  #searchOverlay {
    display: none !important;
  }
}

/* ============================================================ */
/* ========== 🆕 دکمه شناور سبد خرید (فقط دسکتاپ) ========== */
/* ============================================================ */

@media (min-width: 769px) {
  /* ========== مخفی کردن دکمه سبد خرید از هدر ========== */
  .page-header .cart-header-btn {
    display: none !important;
  }

  /* ========== دکمه شناور سبد خرید پایین-چپ ========== */
  .cart-header-btn.floating-cart-btn {
    display: flex !important;
    position: fixed !important;
    bottom: 24px !important;
    left: 24px !important;
    top: auto !important;
    right: auto !important;
    width: 60px !important;
    height: 60px !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, #3B82F6, #2563EB) !important;
    color: white !important;
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.45) !important;
    z-index: 9998 !important;
    transition: all 0.25s ease !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    border: none !important;
    padding: 0 !important;
  }

  .cart-header-btn.floating-cart-btn:hover {
    background: linear-gradient(135deg, #2563EB, #1D4ED8) !important;
    transform: translateY(-3px) scale(1.05) !important;
    box-shadow: 0 10px 28px rgba(59, 130, 246, 0.6) !important;
  }

  .cart-header-btn.floating-cart-btn:active {
    transform: translateY(0) scale(0.98) !important;
  }

  .cart-header-btn.floating-cart-btn svg {
    width: 26px !important;
    height: 26px !important;
  }

  /* ========== badge روی دکمه شناور ========== */
  .cart-header-btn.floating-cart-btn .cart-badge {
    position: absolute !important;
    top: -4px !important;
    right: -4px !important;
    min-width: 22px !important;
    height: 22px !important;
    padding: 0 6px !important;
    border-radius: 12px !important;
    background: #ea4335 !important;
    color: white !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 2px solid #fff !important;
    box-sizing: content-box !important;
    line-height: 1 !important;
  }

  /* ========== دارک مود ========== */
  body.dark-mode .cart-header-btn.floating-cart-btn {
    background: linear-gradient(135deg, #1e3a8a, #1e40af) !important;
    box-shadow: 0 6px 20px rgba(30, 58, 138, 0.5) !important;
  }

  body.dark-mode .cart-header-btn.floating-cart-btn:hover {
    background: linear-gradient(135deg, #1e40af, #1d4ed8) !important;
    box-shadow: 0 10px 28px rgba(30, 58, 138, 0.7) !important;
  }

  body.dark-mode .cart-header-btn.floating-cart-btn .cart-badge {
    border-color: #1e1e1e !important;
  }
}

/* ========== موبایل: دکمه شناور مخفی ========== */
@media (max-width: 768px) {
  .cart-header-btn.floating-cart-btn {
    display: none !important;
  }
}
/* ============================================================ */
/* ========== 🆕 دکمه شناور سبد خرید (فقط دسکتاپ) ========== */
/* ============================================================ */

#floatingCartBtn {
  display: none !important;
}

@media (min-width: 769px) {
  #floatingCartBtn {
    display: flex !important;
    position: fixed !important;
    bottom: 24px !important;
    left: 24px !important;
    top: auto !important;
    right: auto !important;
    width: 60px !important;
    height: 60px !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, #3B82F6, #2563EB) !important;
    color: white !important;
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.45) !important;
    z-index: 9998 !important;
    transition: all 0.25s ease !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    border: none !important;
    padding: 0 !important;
  }

  #floatingCartBtn:hover {
    background: linear-gradient(135deg, #2563EB, #1D4ED8) !important;
    transform: translateY(-3px) scale(1.05) !important;
    box-shadow: 0 10px 28px rgba(59, 130, 246, 0.6) !important;
  }

  #floatingCartBtn:active {
    transform: translateY(0) scale(0.98) !important;
  }

  #floatingCartBtn svg {
    width: 26px !important;
    height: 26px !important;
  }

  #floatingCartBtn .cart-badge {
    position: absolute !important;
    top: -4px !important;
    right: -4px !important;
    min-width: 22px !important;
    height: 22px !important;
    padding: 0 6px !important;
    border-radius: 12px !important;
    background: #ea4335 !important;
    color: white !important;
    font-size: 11px !important; 
    font-weight: 700 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 2px solid #fff !important;
    box-sizing: content-box !important;
    line-height: 1 !important;
  }

  body.dark-mode #floatingCartBtn {
    background: linear-gradient(135deg, #1e3a8a, #1e40af) !important;
    box-shadow: 0 6px 20px rgba(30, 58, 138, 0.5) !important;
  }

  body.dark-mode #floatingCartBtn:hover {
    background: linear-gradient(135deg, #1e40af, #1d4ed8) !important;
  }

  body.dark-mode #floatingCartBtn .cart-badge {
    border-color: #1e1e1e !important;
  }
}

/* ========== 🆕 لینک دسته‌بندی ========== */
.detail-stat-category-link {
  text-decoration: none !important;
  color: inherit !important;
  cursor: pointer;
  display: flex !important;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

/* دسکتاپ: نمایش افقی مثل بقیه کارت‌ها */
@media (min-width: 769px) {
  .detail-stats-row.desktop-stats .detail-stat-category-link {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 8px 12px !important;
    background: rgba(255,255,255,0.6) !important;
    border-radius: 8px !important;
    text-align: right !important;
    min-width: 0 !important;
    border: none !important;
    gap: 8px !important;
  }
  
  .detail-stats-row.desktop-stats .detail-stat-category-link .detail-stat-value {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #3B82F6 !important;
    text-align: right;
    order: 1;
  }
  
  .detail-stats-row.desktop-stats .detail-stat-category-link .detail-stat-label {
    font-size: 11px !important;
    color: #5f6368 !important;
    margin-top: 0 !important;
    order: 2;
  }
  
  body.dark-mode .detail-stats-row.desktop-stats .detail-stat-category-link {
    background: rgba(255,255,255,0.08) !important;
  }
  
  body.dark-mode .detail-stats-row.desktop-stats .detail-stat-category-link .detail-stat-value {
    color: #60A5FA !important;
  }
}

/* موبایل: نمایش عمودی مثل بقیه کارت‌ها */
@media (max-width: 768px) {
  .detail-stats-row.mobile-stats .detail-stat-category-link {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    flex: 1 !important;
    padding: 10px 6px !important;
    background: #f8f9fa !important;
    border-radius: 12px !important;
    min-width: 0 !important;
    gap: 3px !important;
  }
  
  .detail-stats-row.mobile-stats .detail-stat-category-link .detail-stat-value {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #202124 !important;
    line-height: 1.2 !important;
    order: 1 !important;
  }
  
  .detail-stats-row.mobile-stats .detail-stat-category-link .detail-stat-label {
    font-size: 11px !important;
    color: #5f6368 !important;
    margin-top: 0 !important;
    order: 2 !important;
  }
  
  body.dark-mode .detail-stats-row.mobile-stats .detail-stat-category-link {
    background: #2d2d2d !important;
  }
  
  body.dark-mode .detail-stats-row.mobile-stats .detail-stat-category-link .detail-stat-value {
    color: #60A5FA !important;
  }
}

/* ========== دسکتاپ: نمایش عمودی مثل بقیه کارت‌ها ========== */
@media (min-width: 769px) {
  .detail-stats-row.desktop-stats .detail-stat-category-link {
    display: flex !important;
    flex-direction: column !important;  /* 🆕 عمودی شد */
    align-items: center !important;     /* 🆕 وسط‌چین */
    justify-content: center !important; /* 🆕 وسط‌چین */
    text-align: center !important;
    padding: 8px 12px !important;
    background: rgba(255,255,255,0.6) !important;
    border-radius: 8px !important;
    min-width: 0 !important;
    border: none !important;
    gap: 3px !important;                /* 🆕 فاصله کم بین متن‌ها */
    box-sizing: border-box !important;
  }
  
  /* 🆕 مقدار (اسم دسته‌بندی) میره بالا */
  .detail-stats-row.desktop-stats .detail-stat-category-link .detail-stat-value {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #3B82F6 !important;
    text-align: center !important;
    order: 1 !important;               /* بالا */
    margin: 0 !important;
    line-height: 1.3 !important;
  }
  
  /* 🆕 برچسب (کلمه "دسته‌بندی") میاد پایین */
  .detail-stats-row.desktop-stats .detail-stat-category-link .detail-stat-label {
    font-size: 11px !important;
    color: #5f6368 !important;
    margin-top: 0 !important;
    order: 2 !important;               /* پایین */
    line-height: 1.3 !important;
  }
  
  body.dark-mode .detail-stats-row.desktop-stats .detail-stat-category-link {
    background: rgba(255,255,255,0.08) !important;
  }
  
  body.dark-mode .detail-stats-row.desktop-stats .detail-stat-category-link .detail-stat-value {
    color: #60A5FA !important;
  }
}
/* ========== 🆕 مخفی کردن هدر و فوتر در صفحات سفارشی ========== */
body.hide-header .page-header {
  display: none !important;
}

body.hide-footer .site-footer {
  display: none !important;
}

/* روی موبایل، منوی پایین هم مخفی بشه */
@media (max-width: 768px) {
  body.hide-footer .bottom-nav {
    display: none !important;
  }
}

/* ========== 🆕 لودینگ سه نقطه‌ای (برای صفحات سفارشی) ========== */
.page-loading-custom {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  width: 100%;
  transition: opacity 0.3s ease;
}

.page-loading-custom .page-loading-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-loading-custom .page-loading-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #3B82F6;
  animation: pageLoadingBounce 1.2s infinite ease-in-out both;
}

.page-loading-custom .page-loading-dot:nth-child(1) { animation-delay: -0.24s; }
.page-loading-custom .page-loading-dot:nth-child(2) { animation-delay: -0.12s; }
.page-loading-custom .page-loading-dot:nth-child(3) { animation-delay: 0s; }

/* ============================================================ */
/* ========== 🆕 دایره‌های صفحه خانه ========== */
/* ============================================================ */

.home-circles-section {
  margin: 8px 0 16px;
  padding: 0;
  width: 100%;
}

.home-circles-row {
  display: flex;
  gap: 14px;
  padding: 8px 16px 6px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

.home-circles-row::-webkit-scrollbar {
  display: none;
}

.home-circle-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 76px;
  max-width: 76px;
  flex-shrink: 0;
  scroll-snap-align: start;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.home-circle-item:hover {
  transform: translateY(-2px);
}

.home-circle-item:active {
  transform: scale(0.95);
}

.home-circle-img-wrap {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f1f3f4, #e8eaed);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  border: 2.5px solid #fff;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.home-circle-item:hover .home-circle-img-wrap {
  box-shadow: 0 5px 16px rgba(59, 130, 246, 0.35);
  border-color: #3B82F6;
}

.home-circle-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.home-circle-img-wrap .home-circle-placeholder {
  font-size: 28px;
  color: #9aa0a6;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.home-circle-title {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-color, #202124);
  text-align: center;
  line-height: 1.3;
  max-width: 76px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-word;
  transition: color 0.2s ease;
}

.home-circle-item:hover .home-circle-title {
  color: #3B82F6;
}

/* ========== دارک مود ========== */
body.dark-mode .home-circle-img-wrap {
  background: linear-gradient(135deg, #2d2d2d, #3d3d3d);
  border-color: #1e1e1e;
}

body.dark-mode .home-circle-item:hover .home-circle-img-wrap {
  border-color: #60A5FA;
  box-shadow: 0 5px 16px rgba(96, 165, 250, 0.35);
}

body.dark-mode .home-circle-title {
  color: #e8eaed;
}

body.dark-mode .home-circle-item:hover .home-circle-title {
  color: #60A5FA;
}

/* ========== دسکتاپ ========== */
@media (min-width: 769px) {
  .home-circles-section {
    max-width: 1200px;
    margin: 20px auto 24px;
    padding: 0 20px;
  }

  .home-circles-row {
    gap: 20px;
    padding: 10px 0;
    justify-content: center;
    flex-wrap: wrap;
  }

  .home-circle-item {
    min-width: 92px;
    max-width: 92px;
  }

  .home-circle-img-wrap {
    width: 84px;
    height: 84px;
    border-width: 3px;
  }

  .home-circle-img-wrap .home-circle-placeholder {
    font-size: 34px;
  }

  .home-circle-title {
    font-size: 13px;
    max-width: 92px;
  }
}

/* ========== موبایل کوچک ========== */
@media (max-width: 380px) {
  .home-circles-row {
    gap: 12px;
    padding-left: 12px;
    padding-right: 12px;
  }

  .home-circle-img-wrap {
    width: 62px;
    height: 62px;
  }

  .home-circle-title {
    font-size: 11px;
    max-width: 70px;
  }
}
/* ============================================================ */
/* ========== 🆕 استایل قیمت با کمپین ========== */
/* ============================================================ */

/* ========== کانتینر قیمت ========== */
.detail-bottom-price {
  font-size: 18px;
  font-weight: 700;
  color: #202124;
  line-height: 1.3;
  transition: color 0.3s ease;
}

/* ========== ردیف کمپین (عمودی) ========== */
.price-row-campaign {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
}

/* ========== قیمت اصلی (خط‌خورده، خاکستری) ========== */
.price-row-campaign .price-original {
  font-size: 13px;
  font-weight: 500;
  color: #9aa0a6;
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
  line-height: 1.2;
  display: block;
}

/* ========== قیمت نهایی (بولد، آبی، بزرگ‌تر) ========== */
.price-row-campaign .price-final {
  font-size: 22px;
  font-weight: 800;
  color: #3B82F6;
  line-height: 1.2;
  display: block;
  letter-spacing: -0.3px;
  text-shadow: 0 1px 2px rgba(59, 130, 246, 0.15);
}

/* ========== واحد تومان در قیمت نهایی ========== */
.price-row-campaign .price-final .price-currency {
  font-size: 13px;
  font-weight: 600;
  color: #3B82F6;
  opacity: 0.85;
  margin-right: 2px;
}

/* ========== قیمت عادی (بدون کمپین) ========== */
.price-normal {
  font-size: 18px;
  font-weight: 700;
  color: #202124;
  display: inline-block;
}

/* ============================================================ */
/* ========== دارک مود ========== */
/* ============================================================ */

body.dark-mode .detail-bottom-price {
  color: #e8eaed;
}

body.dark-mode .price-row-campaign .price-original {
  color: #5f6368;
}

body.dark-mode .price-row-campaign .price-final {
  color: #60A5FA;
  text-shadow: 0 1px 2px rgba(96, 165, 250, 0.25);
}

body.dark-mode .price-row-campaign .price-final .price-currency {
  color: #60A5FA;
}

body.dark-mode .price-normal {
  color: #e8eaed;
}

/* ============================================================ */
/* ========== دسکتاپ: قیمت‌ها بزرگ‌تر ========== */
/* ============================================================ */

@media (min-width: 769px) {
  .price-row-campaign .price-original {
    font-size: 14px;
  }

  .price-row-campaign .price-final {
    font-size: 26px;
  }

  .price-row-campaign .price-final .price-currency {
    font-size: 14px;
  }

  .price-normal {
    font-size: 20px;
  }
}

/* ============================================================ */
/* ========== موبایل کوچک ========== */
/* ============================================================ */

@media (max-width: 380px) {
  .price-row-campaign .price-original {
    font-size: 12px;
  }

  .price-row-campaign .price-final {
    font-size: 20px;
  }

  .price-row-campaign .price-final .price-currency {
    font-size: 12px;
  }
}

/* ============================================================ */
/* ========== صفحه پرداخت - قیمت کمپین ========== */
/* ============================================================ */

.pay-bottom-price .price-row-campaign {
  gap: 2px;
  align-items: flex-start;
}

.pay-bottom-price .price-row-campaign .price-original {
  font-size: 13px;
  font-weight: 500;
  color: #9aa0a6;
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
  line-height: 1.2;
  display: block;
}

.pay-bottom-price .price-row-campaign .price-final {
  font-size: 22px;
  font-weight: 800;
  color: #3B82F6;
  line-height: 1.2;
  display: block;
  letter-spacing: -0.3px;
}

.pay-bottom-price .price-row-campaign .price-final .price-currency {
  font-size: 13px;
  font-weight: 600;
  color: #3B82F6;
  opacity: 0.85;
  margin-right: 2px;
}

.pay-bottom-price .price-normal {
  font-size: 18px;
  font-weight: 700;
  color: #202124;
  display: inline-block;
}

body.dark-mode .pay-bottom-price .price-row-campaign .price-original {
  color: #5f6368;
}

body.dark-mode .pay-bottom-price .price-row-campaign .price-final {
  color: #60A5FA;
}

body.dark-mode .pay-bottom-price .price-row-campaign .price-final .price-currency {
  color: #60A5FA;
}

body.dark-mode .pay-bottom-price .price-normal {
  color: #e8eaed;
}

@media (min-width: 769px) {
  .pay-bottom-price .price-row-campaign .price-final {
    font-size: 24px;
  }

  .pay-bottom-price .price-row-campaign .price-original {
    font-size: 14px;
  }

  .pay-bottom-price .price-row-campaign .price-final .price-currency {
    font-size: 14px;
  }

  .pay-bottom-price .price-normal {
    font-size: 20px;
  }
}

/* ============================================================ */
/* ========== 🆕 استایل قیمت با کمپین ========== */
/* ============================================================ */

/* ========== کانتینر قیمت ========== */
.detail-bottom-price {
  font-size: 18px;
  font-weight: 700;
  color: #202124;
  line-height: 1.3;
  transition: color 0.3s ease;
}

/* ========== ردیف کمپین (عمودی) ========== */
.price-row-campaign {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
}

/* ========== قیمت اصلی (خط‌خورده، خاکستری) ========== */
.price-row-campaign .price-original {
  font-size: 13px;
  font-weight: 500;
  color: #9aa0a6;
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
  line-height: 1.2;
  display: block;
}

/* ========== قیمت نهایی (بولد، آبی، بزرگ‌تر) ========== */
.price-row-campaign .price-final {
  font-size: 22px;
  font-weight: 800;
  color: #3B82F6;
  line-height: 1.2;
  display: block;
  letter-spacing: -0.3px;
  text-shadow: 0 1px 2px rgba(59, 130, 246, 0.15);
}

/* ========== واحد تومان در قیمت نهایی ========== */
.price-row-campaign .price-final .price-currency {
  font-size: 13px;
  font-weight: 600;
  color: #3B82F6;
  opacity: 0.85;
  margin-right: 2px;
}

/* ========== قیمت عادی (بدون کمپین) ========== */
.price-normal {
  font-size: 18px;
  font-weight: 700;
  color: #202124;
  display: inline-block;
}

/* ============================================================ */
/* ========== دارک مود ========== */
/* ============================================================ */

body.dark-mode .detail-bottom-price {
  color: #e8eaed;
}

body.dark-mode .price-row-campaign .price-original {
  color: #5f6368;
}

body.dark-mode .price-row-campaign .price-final {
  color: #60A5FA;
  text-shadow: 0 1px 2px rgba(96, 165, 250, 0.25);
}

body.dark-mode .price-row-campaign .price-final .price-currency {
  color: #60A5FA;
}

body.dark-mode .price-normal {
  color: #e8eaed;
}

/* ============================================================ */
/* ========== دسکتاپ: قیمت‌ها بزرگ‌تر ========== */
/* ============================================================ */

@media (min-width: 769px) {
  .price-row-campaign .price-original {
    font-size: 14px;
  }

  .price-row-campaign .price-final {
    font-size: 26px;
  }

  .price-row-campaign .price-final .price-currency {
    font-size: 14px;
  }

  .price-normal {
    font-size: 20px;
  }
}

/* ============================================================ */
/* ========== موبایل کوچک ========== */
/* ============================================================ */

@media (max-width: 380px) {
  .price-row-campaign .price-original {
    font-size: 12px;
  }

  .price-row-campaign .price-final {
    font-size: 20px;
  }

  .price-row-campaign .price-final .price-currency {
    font-size: 12px;
  }
}

/* ============================================================ */
/* ========== صفحه پرداخت - قیمت کمپین ========== */
/* ============================================================ */

.pay-bottom-price .price-row-campaign {
  gap: 2px;
  align-items: flex-start;
}

.pay-bottom-price .price-row-campaign .price-original {
  font-size: 13px;
  font-weight: 500;
  color: #9aa0a6;
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
  line-height: 1.2;
  display: block;
}

.pay-bottom-price .price-row-campaign .price-final {
  font-size: 22px;
  font-weight: 800;
  color: #3B82F6;
  line-height: 1.2;
  display: block;
  letter-spacing: -0.3px;
}

.pay-bottom-price .price-row-campaign .price-final .price-currency {
  font-size: 13px;
  font-weight: 600;
  color: #3B82F6;
  opacity: 0.85;
  margin-right: 2px;
}

.pay-bottom-price .price-normal {
  font-size: 18px;
  font-weight: 700;
  color: #202124;
  display: inline-block;
}

body.dark-mode .pay-bottom-price .price-row-campaign .price-original {
  color: #5f6368;
}

body.dark-mode .pay-bottom-price .price-row-campaign .price-final {
  color: #60A5FA;
}

body.dark-mode .pay-bottom-price .price-row-campaign .price-final .price-currency {
  color: #60A5FA;
}

body.dark-mode .pay-bottom-price .price-normal {
  color: #e8eaed;
}

@media (min-width: 769px) {
  .pay-bottom-price .price-row-campaign .price-final {
    font-size: 24px;
  }

  .pay-bottom-price .price-row-campaign .price-original {
    font-size: 14px;
  }

  .pay-bottom-price .price-row-campaign .price-final .price-currency {
    font-size: 14px;
  }

  .pay-bottom-price .price-normal {
    font-size: 20px;
  }
}