/*
Theme Name: RomanLux | رومان لوکس
Theme URI: https://yourdomain.com
Author: اختصاصی رمان
Description: قالب فوق‌حرفه‌ای و لوکس رمان و کتاب الکترونیک با سیستم اشتراک، کیف پول و درگاه مستقیم
Version: 1.0.0
Text Domain: romanlux
*/

:root {
  --primary: #e91e63;
  --primary-hover: #c2185b;
  --secondary: #9c27b0;
  --accent: #ff4081;
  --gold: #f59e0b;
  --bg: #fff5f7;
  --card-bg: #ffffff;
  --text: #2c3e50;
  --text-muted: #7f8c8d;
  --border: #f3d5dd;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(233, 30, 99, 0.08);
}

body.dark-mode {
  --bg: #121217;
  --card-bg: #1e1e26;
  --text: #f0f0f5;
  --text-muted: #a0a0b2;
  --border: #2d2d3a;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Vazirmatn", Tahoma, sans-serif;
}

body {
  background-color: var(--bg);
  color: var(--text);
  direction: rtl;
  text-align: right;
  line-height: 1.7;
  transition: background 0.3s, color 0.3s;
}

a {
  text-decoration: none;
  color: inherit;
}

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}
/* ======================================================
   استایل‌های مدرن صفحه اصلی و کارت‌های رمان (RomanLux)
   ====================================================== */

/* نوار دسته‌بندی‌ها (ژانرها) */
.genres-bar {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 10px 0 20px 0;
  scrollbar-width: none;
}
.genres-bar::-webkit-scrollbar { display: none; }
.genre-chip {
  background: var(--card-bg);
  border: 1px solid var(--border);
  padding: 8px 18px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 3px 10px rgba(0,0,0,0.03);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}
.genre-chip:hover, .genre-chip.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(233, 30, 99, 0.25);
}

/* سرتیتر سکشن‌ها */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 35px 0 20px 0;
}
.section-title {
  font-size: 20px;
  font-weight: 800;
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-title::after {
  content: '';
  position: absolute;
  bottom: -6px;
  right: 0;
  width: 40px;
  height: 3px;
  background: var(--primary);
  border-radius: 4px;
}
.view-all-link {
  font-size: 13px;
  color: var(--primary);
  font-weight: 600;
}

/* گرید شبکه کارت‌های رمان */
.novels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 22px;
}
@media (max-width: 576px) {
  .novels-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
}

/* کارت تکی رمان */
.novel-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  position: relative;
}
.novel-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 25px rgba(233, 30, 99, 0.15);
  border-color: #f7a8be;
}

/* کاور کتاب */
.novel-card-cover {
  position: relative;
  width: 100%;
  padding-top: 140%; /* تناسب ۳ به ۴ کتاب */
  background: #f1f5f9;
  overflow: hidden;
}
.novel-card-cover img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.novel-card:hover .novel-card-cover img {
  transform: scale(1.06);
}

/* بج‌های وضعیت روی کاور */
.novel-badges {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 2;
}
.badge-item {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  color: #fff;
  backdrop-filter: blur(4px);
}
.badge-special { background: rgba(245, 158, 11, 0.9); }
.badge-online { 
  background: rgba(239, 68, 68, 0.9); 
  display: flex; 
  align-items: center; 
  gap: 4px; 
}
.pulse-dot {
  width: 6px;
  height: 6px;
  background: #fff;
  border-radius: 50%;
  animation: pulse 1.2s infinite;
}
@keyframes pulse {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.4); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.7; }
}

/* مشخصات متنی کارت */
.novel-card-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.novel-card-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
  line-height: 1.4;
  height: 40px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.novel-card-author {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.novel-card-footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px dashed var(--border);
  padding-top: 10px;
}
.novel-price {
  font-size: 13px;
  font-weight: 800;
  color: var(--primary);
}
.novel-price.free {
  color: #10b981;
}

/* بنر بزرگ دعوت به نویسندگی و عضویت */
.promo-banner {
  background: linear-gradient(135deg, #e91e63, #9c27b0);
  border-radius: 20px;
  padding: 35px 30px;
  margin: 50px 0;
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  box-shadow: 0 15px 30px rgba(233, 30, 99, 0.25);
}
.promo-btn {
  background: #fff;
  color: var(--primary);
  padding: 12px 28px;
  border-radius: 30px;
  font-weight: bold;
  font-size: 14px;
  transition: all 0.3s;
}
.promo-btn:hover {
  background: #ffe3ec;
  transform: translateY(-2px);
}
/* ======================================================
   استایل‌های اختصاصی صفحه داخلی رمان (Single Novel)
   ====================================================== */

/* مسیر راهنما */
.breadcrumb-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 25px;
  flex-wrap: wrap;
}
.breadcrumb-nav a {
  color: var(--text-muted);
  transition: color 0.2s;
}
.breadcrumb-nav a:hover {
  color: var(--primary);
}

/* کارت اصلی اطلاعات رمان */
.novel-detail-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 30px;
  box-shadow: var(--shadow);
  display: flex;
  gap: 35px;
  margin-bottom: 35px;
}
@media (max-width: 768px) {
  .novel-detail-card {
    flex-direction: column;
    padding: 20px;
  }
}

/* کاور رمان در صفحه داخلی */
.novel-single-cover {
  flex: 0 0 260px;
  max-width: 100%;
  position: relative;
}
.novel-single-cover img {
  width: 100%;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.18);
  display: block;
}

/* جدول مشخصات سریع */
.novel-meta-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 15px;
  background: #fff8f9;
  border: 1px solid #ffe3ec;
  border-radius: 14px;
  padding: 16px 20px;
  margin: 20px 0;
  list-style: none;
}
.novel-meta-item {
  font-size: 14px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.novel-meta-item strong {
  color: var(--text-muted);
  font-weight: normal;
}

/* باکس هشدار بدون سانسور */
.warning-box {
  background: #fff1f2;
  border-right: 4px solid #f43f5e;
  color: #9f1239;
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 25px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* باکس‌های دانلود و دکمه‌ها */
.download-section-box {
  background: var(--card-bg);
  border: 2px dashed #f7a8be;
  border-radius: 18px;
  padding: 25px;
  margin: 35px 0;
  text-align: center;
}
.download-btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
  margin-top: 18px;
}
.btn-dl-pdf {
  background: linear-gradient(135deg, #e91e63, #d81b60);
  color: #fff !important;
  padding: 14px 28px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 6px 18px rgba(233, 30, 99, 0.3);
  transition: all 0.3s;
}
.btn-dl-pdf:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(233, 30, 99, 0.4);
}
.btn-dl-telegram {
  background: #229ed9;
  color: #fff !important;
  padding: 14px 25px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 6px 18px rgba(34, 158, 217, 0.25);
  transition: all 0.3s;
}
.btn-dl-telegram:hover {
  transform: translateY(-2px);
  background: #1c88bd;
}

/* بخش نظرات و فرم */
.novel-comments-area {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 30px;
  margin-top: 40px;
  box-shadow: var(--shadow);
}
.novel-comment-form input,
.novel-comment-form textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  margin-bottom: 15px;
  outline: none;
  background: #fafafa;
  transition: border-color 0.3s;
}
.novel-comment-form input:focus,
.novel-comment-form textarea:focus {
  border-color: var(--primary);
  background: #fff;
}
.btn-submit-comment {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 12px 30px;
  border-radius: 30px;
  font-weight: bold;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.3s;
}
.btn-submit-comment:hover {
  background: #c2185b;
}
/* ======================================================
   قابلیت‌های لوکس: نوار شناور موبایل و بوک‌مارک
   ====================================================== */

/* دکمه بوک‌مارک */
.btn-bookmark {
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 16px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s ease;
}
.btn-bookmark.saved {
  background: #ffe3ec;
  color: var(--primary);
  border-color: #f7a8be;
}
.btn-bookmark:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
}

/* نوار دسترسی سریع پایین صفحه مخصوص موبایل (Mobile Bottom Bar) */
.mobile-floating-bar {
  display: none;
}
@media (max-width: 768px) {
  .mobile-floating-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--border);
    padding: 10px 15px;
    z-index: 999;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.08);
    justify-content: space-between;
    align-items: center;
    gap: 10px;
  }
  .mobile-floating-title {
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 50%;
  }
  .mobile-floating-btn {
    background: var(--primary);
    color: #fff !important;
    padding: 9px 18px;
    border-radius: 25px;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
  }
}
/* ======================================================
   استایل‌های پنجره ورود و ثبت‌نام (Auth Modal)
   ====================================================== */

.auth-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 15px;
  animation: fadeIn 0.25s ease;
}
.auth-modal-overlay.active {
  display: flex;
}

.auth-modal-card {
  background: #ffffff;
  width: 100%;
  max-width: 420px;
  border-radius: 24px;
  padding: 30px;
  box-shadow: 0 25px 50px -12px rgba(233, 30, 99, 0.25);
  position: relative;
  animation: scaleUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes scaleUp {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

.auth-modal-close {
  position: absolute;
  top: 18px;
  left: 18px;
  background: #f1f5f9;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all 0.2s;
}
.auth-modal-close:hover {
  background: #ffe3ec;
  color: var(--primary);
}

/* تب‌های سوییچ بین ورود و ثبت نام */
.auth-tabs {
  display: flex;
  background: #fdf2f5;
  padding: 5px;
  border-radius: 14px;
  margin-bottom: 25px;
}
.auth-tab-btn {
  flex: 1;
  text-align: center;
  padding: 10px;
  font-weight: 700;
  font-size: 14px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: inherit;
}
.auth-tab-btn.active {
  background: #ffffff;
  color: var(--primary);
  box-shadow: 0 4px 12px rgba(233, 30, 99, 0.12);
}

/* فرم‌ها و اینپوت‌ها */
.auth-form {
  display: none;
}
.auth-form.active {
  display: block;
}
.auth-form-group {
  margin-bottom: 16px;
}
.auth-form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}
.auth-form-group input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
  background: #fcfcfd;
}
.auth-form-group input:focus {
  border-color: var(--primary);
  background: #fff;
}

.auth-submit-btn {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: #fff;
  border: none;
  border-radius: 14px;
  font-weight: 700;
  font-size: 15px;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(233, 30, 99, 0.25);
  transition: all 0.3s ease;
  margin-top: 10px;
}
.auth-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(233, 30, 99, 0.35);
}

/* پیام‌های وضعیت (موفق / خطا) */
.auth-feedback-msg {
  display: none;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
  text-align: center;
}
.auth-feedback-msg.error {
  display: block;
  background: #fff1f2;
  color: #be123c;
  border: 1px solid #fecdd3;
}
.auth-feedback-msg.success {
  display: block;
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

/* منوی پروفایل کاربر در هدر */
.user-header-menu {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.user-avatar-small {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  object-fit: cover;
}
.user-dropdown-panel {
  display: none;
  position: absolute;
  top: 115%;
  left: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  min-width: 190px;
  box-shadow: var(--shadow);
  padding: 8px 0;
  z-index: 1000;
}
.user-dropdown-panel.show {
  display: block;
}
.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  transition: background 0.2s, color 0.2s;
}
.user-dropdown-item:hover {
  background: #fff0f5;
  color: var(--primary);
}
/* ======================================================
   هدر اصلی رومان لوکس
   ====================================================== */

.main-header {
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 900;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 18px rgba(44, 62, 80, 0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* جلوگیری از تداخل هدر با نوار مدیریت وردپرس */
body.admin-bar .main-header {
  top: 32px;
}

.header-container {
  width: 100%;
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 24px;
  padding-top: 10px;
  padding-bottom: 10px;
}

/* لوگوی سایت */
.brand-logo {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  color: var(--text);
  line-height: 1.25;
  white-space: nowrap;
}

.brand-name {
  display: block;
  color: var(--primary);
  font-size: 21px;
  font-weight: 900;
  line-height: 1.4;
}

.brand-badge {
  display: block;
  margin-top: 1px;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 600;
}

/* فرم جستجو */
.main-header .search-form {
  position: relative;
  flex: 1 1 420px;
  width: 100%;
  max-width: 520px;
  min-width: 180px;
  margin: 0;
}

.main-header .search-icon {
  position: absolute;
  top: 50%;
  right: 15px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1;
  pointer-events: none;
}

.main-header .search-input {
  width: 100%;
  height: 44px;
  display: block;
  margin: 0;
  padding: 8px 43px 8px 15px;
  color: var(--text);
  background: #fffafb;
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: none;
  font-family: inherit;
  font-size: 13px;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease,
    box-shadow 0.2s ease;
}

.main-header .search-input::placeholder {
  color: #9ca3af;
  opacity: 1;
}

.main-header .search-input:hover {
  border-color: #e9a8ba;
}

.main-header .search-input:focus {
  background: #fff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(233, 30, 99, 0.1);
}

/* بخش حساب کاربری */
.header-user-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: max-content;
}

.btn-login {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 18px;
  color: #fff;
  background: var(--primary);
  border: 1px solid var(--primary);
  border-radius: 8px;
  outline: none;
  box-shadow: 0 5px 14px rgba(233, 30, 99, 0.2);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.btn-login:hover {
  color: #fff;
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  box-shadow: 0 7px 18px rgba(233, 30, 99, 0.28);
  transform: translateY(-1px);
}

.btn-login:focus-visible {
  box-shadow: 0 0 0 3px rgba(233, 30, 99, 0.18);
}

/* کاربر واردشده */
.user-header-menu {
  position: relative;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 3px 5px;
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
}

.user-header-menu:hover {
  background: #fff0f5;
}

.user-header-menu > span {
  white-space: nowrap;
}

.user-avatar-small {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: block;
  border: 2px solid var(--primary);
  border-radius: 50%;
  object-fit: cover;
}

/* منوی کشویی حساب */
.user-dropdown-panel {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 1200;
  width: 230px;
  min-width: 230px;
  padding: 7px 0;
  overflow: hidden;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 15px 35px rgba(44, 62, 80, 0.14);
  cursor: default;
}

.user-dropdown-panel.show {
  display: block;
  animation: romanluxDropdown 0.18s ease-out;
}

@keyframes romanluxDropdown {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.user-dropdown-panel > div {
  overflow: hidden;
}

.user-dropdown-panel > div > div {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-dropdown-item {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 16px;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  transition:
    color 0.2s ease,
    background-color 0.2s ease;
}

.user-dropdown-item:hover {
  color: var(--primary);
  background: #fff0f5;
}

/* حالت تیره */
body.dark-mode .main-header {
  background: rgba(30, 30, 38, 0.96);
}

body.dark-mode .main-header .search-input {
  color: var(--text);
  background: #181820;
  border-color: var(--border);
}

body.dark-mode .main-header .search-input:focus {
  background: #20202a;
}

body.dark-mode .user-header-menu:hover,
body.dark-mode .user-dropdown-item:hover {
  background: #292934;
}

/* ======================================================
   هدر در تبلت
   ====================================================== */

@media (max-width: 900px) {
  .header-container {
    gap: 14px;
  }

  .brand-name {
    font-size: 19px;
  }

  .main-header .search-form {
    flex-basis: 300px;
  }

  .user-header-menu > span {
    display: none;
  }
}

/* ======================================================
   هدر در موبایل
   ====================================================== */

@media (max-width: 700px) {
  body.admin-bar .main-header {
    top: 46px;
  }

  .header-container {
    min-height: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px 12px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .brand-logo {
    min-width: 0;
    align-items: flex-start;
  }

  .brand-name {
    max-width: 100%;
    overflow: hidden;
    font-size: 18px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .brand-badge {
    font-size: 9px;
  }

  .header-user-actions {
    justify-self: end;
    min-width: 0;
  }

  .main-header .search-form {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    max-width: none;
    min-width: 0;
  }

  .main-header .search-input {
    height: 42px;
    font-size: 12px;
  }

  .btn-login {
    min-height: 39px;
    padding: 8px 13px;
    font-size: 12px;
  }

  .user-header-menu {
    min-height: 40px;
  }

  .user-avatar-small {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }

  .user-dropdown-panel {
    top: calc(100% + 8px);
    left: 0;
    width: min(230px, calc(100vw - 30px));
    min-width: 0;
  }
}

/* گوشی‌های کوچک */
@media (max-width: 380px) {
  .container {
    padding-right: 14px;
    padding-left: 14px;
  }

  .brand-name {
    font-size: 16px;
  }

  .btn-login {
    max-width: 145px;
    padding-right: 10px;
    padding-left: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}
/* ================= پروفایل کاربری رومان لوکس ================= */

.profile-header-card {
    background: #fff;
    border: 1px solid #fce7f3;
    border-radius: 18px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    box-shadow: 0 6px 24px rgba(236, 72, 153, 0.08);
    margin-bottom: 25px;
}
.profile-avatar-wrap img {
    width: 96px; height: 96px;
    border-radius: 50%;
    border: 3px solid #f9a8d4;
}
.profile-name-title {
    font-size: 22px; font-weight: 800; color: #1f2937; margin: 0 0 10px;
}
.profile-meta-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.profile-chip {
    background: #fdf2f8; color: #db2777;
    border: 1px solid #fbcfe8;
    padding: 5px 14px; border-radius: 999px;
    font-size: 13px; font-weight: 600;
}
.profile-header-actions { margin-right: auto; }
.btn-profile-logout {
    background: #ef4444; color: #fff;
    padding: 10px 20px; border-radius: 12px;
    text-decoration: none; font-weight: 700; font-size: 14px;
    transition: 0.2s;
}
.btn-profile-logout:hover { background: #dc2626; }

/* تب‌ها */
.profile-tabs-nav {
    display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px;
}
.profile-tab-btn {
    background: #fff; border: 1px solid #fbcfe8; color: #db2777;
    padding: 10px 20px; border-radius: 12px;
    font-family: inherit; font-size: 14px; font-weight: 700;
    cursor: pointer; transition: 0.2s;
}
.profile-tab-btn:hover { background: #fdf2f8; }
.profile-tab-btn.active {
    background: #db2777; color: #fff; border-color: #db2777;
}

/* پنل‌ها */
.profile-tab-pane { display: none; animation: rlxFade 0.3s ease; }
.profile-tab-pane.active { display: block; }
@keyframes rlxFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.profile-pane-header {
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 10px; margin-bottom: 18px;
}
.profile-pane-header h3 { font-size: 18px; color: #1f2937; margin: 0; }
.btn-clear-bookmarks {
    background: #fee2e2; color: #b91c1c; border: none;
    padding: 8px 16px; border-radius: 10px;
    font-family: inherit; font-weight: 700; font-size: 13px; cursor: pointer;
}
.btn-clear-bookmarks:hover { background: #fecaca; }

/* کارت‌های رمان نشان‌شده */
#profileBookmarkGrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 18px;
}
.novel-card {
    background: #fff; border: 1px solid #fce7f3; border-radius: 16px;
    overflow: hidden; box-shadow: 0 4px 16px rgba(236, 72, 153, 0.07);
    transition: 0.25s; display: flex; flex-direction: column;
}
.novel-card:hover { transform: translateY(-4px); box-shadow: 0 10px 26px rgba(236, 72, 153, 0.15); }
.novel-card-cover img { width: 100%; height: 230px; object-fit: cover; display: block; }
.novel-card-body { padding: 12px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.novel-card-title { font-size: 14px; margin: 0; line-height: 1.6; }
.novel-card-title a { color: #1f2937; text-decoration: none; }
.novel-card-title a:hover { color: #db2777; }
.novel-card-author { font-size: 12px; color: #9ca3af; }
.btn-remove-bm {
    margin-top: auto; background: #fdf2f8; color: #db2777;
    border: 1px solid #fbcfe8; border-radius: 8px;
    padding: 6px; font-family: inherit; font-size: 12px; font-weight: 700; cursor: pointer;
}
.btn-remove-bm:hover { background: #fce7f3; }

/* پیام خالی */
.profile-empty-message {
    grid-column: 1 / -1;
    background: #fff; border: 2px dashed #fbcfe8;
    border-radius: 16px; padding: 40px 20px;
    text-align: center; color: #9ca3af; font-size: 14px;
}

/* لیست دیدگاه‌ها */
.profile-comments-list { display: flex; flex-direction: column; gap: 14px; }
.profile-comment-item {
    background: #fff; border: 1px solid #fce7f3;
    border-radius: 14px; padding: 16px 20px;
}
.profile-comment-meta { font-size: 13px; color: #6b7280; margin-bottom: 8px; }
.profile-comment-meta a { color: #db2777; font-weight: 700; text-decoration: none; }
.profile-comment-date {
    background: #fdf2f8; color: #db2777;
    border-radius: 999px; padding: 2px 12px; margin-right: 10px; font-size: 12px;
}
.profile-comment-text { font-size: 14px; color: #374151; line-height: 2; }

/* تنظیمات حساب */
.profile-info-grid { display: flex; flex-direction: column; gap: 14px; max-width: 500px; }
.profile-info-box { display: flex; flex-direction: column; gap: 6px; }
.profile-info-box label { font-size: 13px; font-weight: 700; color: #6b7280; }
.profile-info-box input {
    background: #fdf2f8; border: 1px solid #fbcfe8; border-radius: 10px;
    padding: 10px 14px; font-family: inherit; font-size: 14px; color: #1f2937;
}
.profile-info-box input:disabled { opacity: 0.85; }
.btn-password-reset {
    display: inline-block; background: #db2777; color: #fff;
    padding: 12px 24px; border-radius: 12px;
    text-decoration: none; font-weight: 700; font-size: 14px; transition: 0.2s;
}
.btn-password-reset:hover { background: #be185d; }

@media (max-width: 600px) {
    .profile-header-card { flex-direction: column; text-align: center; }
    .profile-header-actions { margin-right: 0; }
    .profile-meta-chips { justify-content: center; }
}
/* بخش‌بندی صفحه اصلی */
.novel-section-block {
    margin-bottom: 45px;
}
.section-badge-info {
    font-size: 0.85rem;
    color: #9ca3af;
    font-weight: normal;
}
.btn-card-action {
    color: #e11d48;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: 0.2s;
}
.btn-card-action:hover {
    color: #be123c;
    transform: translateX(-3px);
}
.card-vip-highlight {
    border: 1px solid #fde68a !important;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.08) !important;
}
.novel-no-cover {
    display: flex;
    height: 100%;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 13px;
    background: #f8fafc;
}
/* ==========================================================================
   طراحی هیرو بنر جذاب ویترینی (۳ کارت شناور و خرید VIP)
   ========================================================================== */

.main-site-wrapper {
    max-width: 1240px;
    margin: 0 auto;
    padding: 24px 20px 80px;
    font-family: inherit;
}

/* ۱. هیرو بنر ویترینی */
.hero-banner-showcase {
    background: linear-gradient(135deg, #1e112a 0%, #3b143f 40%, #160d20 100%);
    border-radius: 28px;
    padding: 50px 60px;
    margin-bottom: 45px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(30, 17, 42, 0.35);
}

.hero-banner-showcase::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.25) 0%, rgba(0,0,0,0) 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-inner-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    position: relative;
    z-index: 2;
}

.hero-text-side {
    flex: 1.1;
    max-width: 560px;
}

.hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    color: #fbcfe8;
    font-size: 13px;
    font-weight: 700;
    padding: 6px 16px;
    border-radius: 30px;
    margin-bottom: 18px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.hero-main-title {
    font-size: 36px;
    font-weight: 900;
    color: #ffffff;
    line-height: 1.35;
    margin: 0 0 16px;
    letter-spacing: -0.5px;
}

.hero-subtitle {
    font-size: 15px;
    line-height: 1.8;
    color: #e2e8f0;
    margin: 0 0 28px;
}

.hero-action-buttons {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 35px;
}

/* دکمه خرید اشتراک VIP با افکت درخشش طلایی */
.btn-hero-vip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #ffffff !important;
    font-size: 14.5px;
    font-weight: 800;
    padding: 14px 28px;
    border-radius: 16px;
    text-decoration: none;
    box-shadow: 0 10px 25px rgba(245, 158, 11, 0.4);
    transition: all 0.3s ease;
}

.btn-hero-vip:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 14px 30px rgba(245, 158, 11, 0.6);
    background: linear-gradient(135deg, #fbbf24, #d97706);
}

.vip-icon {
    font-size: 18px;
}

.btn-hero-explore {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff !important;
    font-size: 14px;
    font-weight: 700;
    padding: 14px 24px;
    border-radius: 16px;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
}

.btn-hero-explore:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.hero-stats-row {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-stat-item strong {
    display: block;
    color: #ffffff;
    font-size: 18px;
    font-weight: 900;
}

.hero-stat-item span {
    font-size: 12px;
    color: #cbd5e1;
}

.stat-divider {
    width: 1px;
    height: 28px;
    background: rgba(255, 255, 255, 0.15);
}

/* اسلایدر چرخشی خودکار کارت‌های هیرو */
.hero-cards-showcase {
    flex: 0.9;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    height: 330px;
    perspective: 1000px;
}

.hero-floating-card {
    position: absolute;
    width: 180px;
    height: 260px;
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
    transition: all 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    cursor: pointer;
}

.hero-floating-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.card-mini-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 10px;
    background: linear-gradient(transparent, rgba(0,0,0,0.88));
    color: #ffffff;
}

.card-mini-title {
    display: block;
    font-size: 12.5px;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-mini-author {
    display: block;
    font-size: 10.5px;
    color: #cbd5e1;
    margin-top: 2px;
}

/* وضعیت‌های ۳‌بعدی اسلایدر */
.hero-floating-card.pos-center {
    transform: translateX(0) translateY(-6px) scale(1.08) rotate(0deg);
    z-index: 5;
    opacity: 1;
    border-color: rgba(245, 158, 11, 0.7);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.75);
    pointer-events: auto;
}

.hero-floating-card.pos-left {
    transform: translateX(95px) translateY(12px) scale(0.88) rotate(-10deg);
    z-index: 3;
    opacity: 0.8;
    pointer-events: auto;
}

.hero-floating-card.pos-right {
    transform: translateX(-95px) translateY(12px) scale(0.88) rotate(10deg);
    z-index: 3;
    opacity: 0.8;
    pointer-events: auto;
}

.hero-floating-card.pos-hidden {
    transform: translateX(0) translateY(30px) scale(0.6);
    opacity: 0;
    z-index: 1;
    pointer-events: none;
}

/* دکمه‌های تغییر اسلاید */
.hero-slider-nav {
    position: absolute;
    bottom: -10px;
    display: flex;
    gap: 12px;
    z-index: 10;
}

.hero-slider-nav button {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    font-size: 16px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.hero-slider-nav button:hover {
    background: #ec4899;
    border-color: #ec4899;
    transform: scale(1.1);
}


.hero-floating-card {
    position: absolute;
    width: 180px;
    height: 260px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.hero-floating-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.card-mini-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 10px;
    background: linear-gradient(transparent, rgba(0,0,0,0.85));
    color: #ffffff;
}

.card-mini-title {
    display: block;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-mini-author {
    display: block;
    font-size: 10px;
    color: #cbd5e1;
    margin-top: 2px;
}

/* موقعیت‌دهی ۳ کارت */
.card-pos-1 {
    transform: translateX(85px) translateY(10px) rotate(-10deg) scale(0.9);
    z-index: 1;
    opacity: 0.85;
}

.card-pos-2 {
    transform: translateX(0) translateY(-10px) rotate(0deg) scale(1.05);
    z-index: 3;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.7);
    border-color: rgba(245, 158, 11, 0.6);
}

.card-pos-3 {
    transform: translateX(-85px) translateY(10px) rotate(10deg) scale(0.9);
    z-index: 2;
    opacity: 0.85;
}

.hero-floating-card:hover {
    z-index: 10 !important;
    transform: translateY(-15px) scale(1.1) rotate(0deg) !important;
    opacity: 1;
}

/* ۳. نوار ژانرها */
.genres-bar-section {
    margin-bottom: 45px;
}

.genres-scroll-container {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: none;
}
.genres-scroll-container::-webkit-scrollbar { display: none; }

.genre-pill-item {
    white-space: nowrap;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #475569;
    padding: 10px 22px;
    border-radius: 100px;
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.25s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}

.genre-pill-item:hover {
    background: #fdf2f8;
    color: #db2777;
    border-color: #fbcfe8;
    transform: translateY(-2px);
}

.genre-pill-item.active {
    background: linear-gradient(135deg, #ec4899, #be185d);
    color: #ffffff;
    border-color: #ec4899;
    box-shadow: 0 4px 15px rgba(236, 72, 153, 0.35);
}

/* ۴. سرتیتر سکشن‌ها */
.novels-feed-section {
    margin-bottom: 55px;
}

.section-title-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
}

.section-title {
    font-size: 21px;
    font-weight: 900;
    color: #1e293b;
    margin: 0 0 5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.title-decor {
    display: inline-block;
    width: 6px;
    height: 20px;
    background: #ec4899;
    border-radius: 4px;
}
.title-decor.gold { background: #f59e0b; }
.title-decor.blue { background: #3b82f6; }

.section-sub {
    font-size: 13px;
    color: #64748b;
    margin: 0;
}

.section-vip-link {
    font-size: 13px;
    font-weight: 800;
    color: #d97706;
    text-decoration: none;
    background: #fef3c7;
    padding: 6px 14px;
    border-radius: 12px;
    transition: all 0.2s;
}
.section-vip-link:hover {
    background: #fde68a;
}

/* ۵. کارت‌های ۵ ستونه رمان */
.novel-grid-5 {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.novel-card-box {
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.novel-card-box:hover {
    transform: translateY(-6px);
}

.novel-poster-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 2 / 2.9;
    border-radius: 16px;
    overflow: hidden;
    background: #f1f5f9;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.05);
}

.novel-poster-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.novel-card-box:hover .novel-poster-wrap img {
    transform: scale(1.08);
}

.novel-top-tags {
    position: absolute;
    bottom: 10px;
    right: 10px;
    z-index: 2;
}

.tag-live {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(6px);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
}

.live-dot {
    width: 6px;
    height: 6px;
    background: #ef4444;
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.4);
}

.tag-vip {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 20px;
}

.btn-fav-bookmark {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(6px);
    border: none;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
    z-index: 3;
}

.btn-fav-bookmark:hover {
    background: #ffffff;
    color: #ec4899;
    transform: scale(1.15);
}

.btn-fav-bookmark.active {
    background: #ec4899;
    color: #ffffff;
}

.novel-card-info {
    padding-top: 12px;
}

.novel-title {
    font-size: 14.5px;
    font-weight: 800;
    line-height: 1.4;
    margin: 0 0 4px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.novel-title a {
    color: #1e293b;
    text-decoration: none;
    transition: color 0.2s;
}

.novel-title a:hover {
    color: #ec4899;
}

.novel-author {
    font-size: 12px;
    color: #64748b;
    display: block;
}

/* ۶. صفحه‌بندی */
.feed-pagination {
    text-align: center;
    margin-top: 35px;
}

.feed-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    margin: 0 3px;
    border-radius: 10px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #334155;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: 0.2s ease;
}

.feed-pagination .page-numbers.current {
    background: #ec4899;
    color: #ffffff;
    border-color: #ec4899;
}

.feed-pagination .page-numbers:hover:not(.current) {
    background: #fdf2f8;
    color: #ec4899;
    border-color: #fbcfe8;
}

/* ریسپانسیو موبایل و تبلت */
@media (max-width: 1024px) {
    .hero-banner-showcase { padding: 40px 30px; }
    .hero-main-title { font-size: 28px; }
    .novel-grid-5 { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 768px) {
    .hero-inner-container { flex-direction: column-reverse; text-align: center; }
    .hero-action-buttons, .hero-stats-row { justify-content: center; }
    .hero-cards-showcase { height: 260px; width: 100%; margin-bottom: 20px; }
    .hero-floating-card { width: 140px; height: 200px; }
    .card-pos-1 { transform: translateX(60px) rotate(-8deg) scale(0.9); }
    .card-pos-3 { transform: translateX(-60px) rotate(8deg) scale(0.9); }
    .novel-grid-5 { grid-template-columns: repeat(2, 1fr); gap: 14px; }
}
/* محدودسازی اندازه کارت‌های رمان در صفحه اصلی */
.novel-grid-5 {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 15px !important;
    width: 100% !important;
}

.novel-card-box {
    width: 100% !important;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.06);
    border: 1px solid #e2e8f0;
}

.novel-poster-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 2 / 3 !important;
    overflow: hidden;
}

.novel-poster-wrap img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

@media (max-width: 992px) {
    .novel-grid-5 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}

@media (max-width: 576px) {
    .novel-grid-5 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
/* ============================================================
   RomanLux Theme Switcher (حالت شب و روز)
   ============================================================ */
.btn-theme-toggle {
  min-height: 42px;
  width: 42px;
  min-width: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 8px;
  color: var(--text, #1e293b);
  cursor: pointer;
  font-size: 17px;
  outline: none;
  box-shadow: var(--shadow-sm, 0 2px 8px rgba(0, 0, 0, 0.04));
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  user-select: none;
}

.btn-theme-toggle:hover {
  border-color: var(--primary, #e91e63);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(233, 30, 99, 0.15);
}

.btn-theme-toggle:active {
  transform: scale(0.95);
}

.btn-theme-toggle:focus-visible {
  box-shadow: 0 0 0 3px rgba(233, 30, 99, 0.18);
}

/* استایل در حالت فعال بودن تم شب */
body.dark-mode .btn-theme-toggle {
  background: var(--card-bg, #1e1e26);
  border-color: var(--border, #2d2d3a);
  color: #fbbf24; /* رنگ خورشید طلایی در شب */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

body.dark-mode .btn-theme-toggle:hover {
  border-color: var(--primary, #e91e63);
  box-shadow: 0 4px 14px rgba(233, 30, 99, 0.25);
}

/* هماهنگی با ریسپانسیو تبلت و موبایل */
@media (max-width: 768px) {
  .btn-theme-toggle {
    min-height: 39px;
    width: 39px;
    min-width: 39px;
    font-size: 15px;
  }
}
/* ==========================================================================
   پنل و میزکار نویسندگان (Author Dashboard & Modals)
   ========================================================================== */

/* سوییچر حالت پنل */
.mode-switch-btn {
    padding: 9px 18px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #475569;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all .25s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.mode-switch-btn:hover { 
    border-color: var(--primary, #e91e63); 
    color: var(--primary, #e91e63); 
}
.mode-switch-btn.active {
    background: linear-gradient(135deg, var(--primary, #e91e63), #c2185b);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(233,30,99,.35);
}

/* دکمه‌های اکشن جدول نویسنده */
.btn-author-act {
    padding: 7px 14px;
    border-radius: 10px;
    color: #fff;
    font-size: 12px;
    border: none;
    cursor: pointer;
    font-weight: 700;
    transition: transform .15s ease, box-shadow .15s ease;
}
.btn-author-act:hover { 
    transform: translateY(-1px); 
    box-shadow: 0 4px 10px rgba(0,0,0,.15); 
}

/* زیرتب‌های میزکار نویسنده */
.author-subtab-btn {
    padding: 10px 18px;
    border: none;
    background: transparent;
    border-bottom: 2px solid transparent;
    font-size: 14px;
    font-weight: 700;
    color: #64748b;
    cursor: pointer;
    transition: color .2s;
}
.author-subtab-btn.active { 
    color: var(--primary, #e91e63); 
    border-bottom-color: var(--primary, #e91e63); 
}

/* ساختار کلی مودال */
.author-modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .55);
    backdrop-filter: blur(6px);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 15px;
}
.author-modal-box {
    background: #fff;
    border-radius: 22px;
    width: 100%;
    max-width: 620px;
    max-height: 92vh;
    overflow-y: auto;
    box-shadow: 0 25px 60px rgba(0,0,0,.25);
    animation: authorModalPop .3s cubic-bezier(.34,1.56,.64,1);
    position: relative;
}
@keyframes authorModalPop {
    from { opacity: 0; transform: translateY(25px) scale(.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* هدر مودال */
.author-modal-header {
    background: linear-gradient(135deg, var(--primary, #e91e63) 0%, #9d174d 100%);
    color: #fff;
    padding: 18px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 2;
    border-radius: 22px 22px 0 0;
}
.author-modal-header h3 { 
    margin: 0; 
    font-size: 16px; 
    font-weight: 800; 
    color: #fff;
}
.author-modal-close {
    border: none;
    background: rgba(255,255,255,.2);
    color: #fff;
    width: 32px; 
    height: 32px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    transition: background .2s;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.author-modal-close:hover { 
    background: rgba(255,255,255,.35); 
}

/* بدنه مودال */
.author-modal-body { 
    padding: 22px 24px 26px; 
}

/* فیلدهای ورودی */
.author-field-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 6px;
}
.author-field-label .req { 
    color: var(--primary, #e91e63); 
}
.author-input,
.author-input[type="text"],
.author-input[type="number"],
.author-input[type="file"],
select.author-input,
textarea.author-input {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    font-size: 14px;
    font-family: inherit;
    color: #1e293b;
    transition: border-color .2s, box-shadow .2s, background .2s;
    box-sizing: border-box;
}
.author-input:focus {
    outline: none;
    border-color: var(--primary, #e91e63);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(233,30,99,.1);
}
textarea.author-input { 
    resize: vertical; 
    line-height: 1.9; 
}
select.author-input { 
    cursor: pointer; 
}

/* باکس انتخاب ژانر به صورت چیپ */
.genre-chips-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 135px;
    overflow-y: auto;
    padding: 12px;
    border: 1.5px dashed #e2e8f0;
    border-radius: 14px;
    background: #f8fafc;
}
.genre-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 13px;
    border-radius: 20px;
    border: 1.5px solid #e2e8f0;
    background: #fff;
    font-size: 12.5px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    user-select: none;
    transition: all .2s ease;
}
.genre-chip input[type="checkbox"] { 
    display: none; 
}
.genre-chip:hover { 
    border-color: #f9a8d4; 
    color: var(--primary, #e91e63); 
}
.genre-chip.selected {
    background: linear-gradient(135deg, var(--primary, #e91e63), #c2185b);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 3px 8px rgba(233,30,99,.3);
}

/* باکس تنظیم قیمت رمان آنلاین */
.online-pricing-box {
    display: flex;
    gap: 12px;
    background: linear-gradient(135deg, #fdf2f8, #fff1f2);
    padding: 14px;
    border-radius: 14px;
    border: 1.5px solid #fbcfe8;
}

/* دکمه‌های ارسال */
.author-submit-btn {
    width: 100%;
    padding: 13px;
    font-size: 15px;
    font-weight: 800;
    font-family: inherit;
    color: #fff;
    background: linear-gradient(135deg, var(--primary, #e91e63) 0%, #c2185b 100%);
    border: none;
    border-radius: 14px;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(233,30,99,.35);
    transition: transform .15s ease, box-shadow .15s ease;
}
.author-submit-btn:hover { 
    transform: translateY(-2px); 
    box-shadow: 0 10px 24px rgba(233,30,99,.4); 
}
.author-submit-btn:disabled { 
    opacity: .6; 
    cursor: wait; 
    transform: none; 
}
.author-submit-btn.btn-blue {
    background: linear-gradient(135deg, #0ea5e9, #0369a1);
    box-shadow: 0 6px 18px rgba(14,165,233,.35);
}
/* ==========================================================================
   RomanLux - Author Earnings & Payout System
   ========================================================================== */

/* گرید کارت‌های آمار درآمد */
.rlx-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 25px;
}

.rlx-stat-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.rlx-stat-card.highlight {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.rlx-stat-label {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 8px;
    display: block;
}

.rlx-stat-card.highlight .rlx-stat-label {
    color: #ecfdf5;
}

.rlx-stat-val {
    font-size: 22px;
    font-weight: 800;
    color: #1e293b;
    line-height: 1.2;
}

.rlx-stat-val small {
    font-size: 12px;
    font-weight: normal;
    color: #64748b;
    margin-right: 4px;
}

.rlx-stat-card.highlight .rlx-stat-val,
.rlx-stat-card.highlight .rlx-stat-val small {
    color: #ffffff;
}

/* نشانک آمار فروش در لیست رمان‌ها */
.rlx-novel-sales-badge {
    font-size: 12px;
    color: #0f766e;
    background: #f0fdfa;
    border: 1px solid #ccfbf1;
    padding: 4px 10px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-top: 6px;
}

/* ساختار دو ستونه تسویه و سوابق */
.rlx-payout-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    align-items: start;
}

.rlx-box-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 22px;
}

.rlx-box-title {
    margin: 0 0 16px;
    font-size: 17px;
    font-weight: 800;
    color: #0f172a;
}

/* پیام‌ها و هشدارهای شرایط تسویه */
.rlx-notice {
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 13px;
    line-height: 1.7;
    margin-bottom: 16px;
}

.rlx-notice-info {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #475569;
}

.rlx-notice-warning {
    background: #fef3c7;
    border: 1px solid #fde68a;
    color: #92400e;
}

.rlx-notice-muted {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #475569;
}

/* آیتم‌های تاریخچه تسویه */
.rlx-payout-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rlx-payout-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px;
}

.rlx-payout-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    flex-wrap: wrap;
    gap: 8px;
}

.rlx-payout-amount {
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
}

.rlx-payout-meta {
    font-size: 12px;
    color: #64748b;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.rlx-payout-sheba {
    direction: ltr;
    display: inline-block;
    font-family: monospace;
}

/* نشان‌های وضعیت تسویه */
.rlx-badge {
    padding: 3px 9px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
}

.rlx-badge-pending {
    background: #fef3c7;
    color: #92400e;
}

.rlx-badge-paid {
    background: #dcfce7;
    color: #166534;
}

.rlx-badge-rejected {
    background: #fee2e2;
    color: #991b1b;
}

.rlx-admin-note {
    margin-top: 8px;
    padding: 8px 12px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 12px;
    color: #334155;
    line-height: 1.6;
}

.rlx-btn-success {
    background: #059669 !important;
}
.rlx-btn-success:hover {
    background: #047857 !important;
}
/* ====================================================
   RomanLux - رفع تداخل رنگ، اسلایدر و چیدمان گرید
   ==================================================== */

/* ۱. تصحیح رنگ‌های اصلی و تیترها برای حالت روشن و تیره */
:root {
  --bg-dark: #0f172a;
  --card-dark: #1e293b;
  --text-main: #1e293b;
}

body {
  background-color: #f8fafc !important;
  color: var(--text-main) !important;
}

body.dark-mode {
  background-color: #0b0f19 !important;
  color: #f1f5f9 !important;
}

/* ۲. اصلاح ظاهر هیرو بنر */
.hero-banner-showcase {
  background: linear-gradient(135deg, #1e1b4b, #312e81) !important;
  border-radius: 24px;
  padding: 40px 30px;
  margin: 25px 0 35px 0;
  color: #ffffff;
  overflow: hidden;
}

.hero-main-title {
  color: #ffffff !important;
  font-size: 2rem;
  font-weight: 800;
  margin: 15px 0;
}

.hero-subtitle {
  color: #c7d2fe !important;
}

.btn-hero-vip {
  background: linear-gradient(135deg, #f59e0b, #d97706) !important;
  color: #ffffff !important;
  padding: 12px 24px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
}

.btn-hero-explore {
  background: rgba(255, 255, 255, 0.15) !important;
  color: #ffffff !important;
  padding: 12px 24px;
  border-radius: 12px;
  text-decoration: none;
  margin-right: 10px;
}

/* ۳. حل قطعی مشکل روی‌هم‌افتادن کارت‌های اسلایدر */
.hero-cards-showcase {
  position: relative;
  height: 320px;
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
}

.hero-floating-card {
  position: absolute !important;
  top: 0;
  left: 50%;
  width: 200px !important;
  height: 290px !important;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0,0,0,0.4);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1) !important;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) scale(0.7);
}

.hero-floating-card.pos-center {
  opacity: 1 !important;
  visibility: visible !important;
  z-index: 5;
  transform: translateX(-50%) scale(1) !important;
}

.hero-floating-card.pos-left {
  opacity: 0.7 !important;
  visibility: visible !important;
  z-index: 2;
  transform: translateX(-110%) scale(0.85) !important;
}

.hero-floating-card.pos-right {
  opacity: 0.7 !important;
  visibility: visible !important;
  z-index: 2;
  transform: translateX(10%) scale(0.85) !important;
}

.hero-floating-card.pos-hidden {
  opacity: 0 !important;
  visibility: hidden !important;
  transform: translateX(-50%) scale(0.5) !important;
}

.hero-floating-card img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block;
}

.card-mini-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
  padding: 15px 10px 8px;
  color: #fff;
}

.card-mini-title {
  display: block;
  font-weight: 700;
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-mini-author {
  font-size: 0.75rem;
  color: #cbd5e1;
}

.hero-slider-nav {
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: 10;
}

.hero-slider-nav button {
  background: rgba(255,255,255,0.25);
  border: none;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

/* ۴. استایل سرتیترها (حل مشکل ناخوانا بودن) */
.section-title-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 30px 0 18px 0;
  padding-bottom: 10px;
  border-bottom: 2px solid #e2e8f0;
}

body.dark-mode .section-title-wrap {
  border-bottom-color: #1e293b;
}

.section-title {
  font-size: 1.25rem !important;
  font-weight: 800 !important;
  color: #1e293b !important;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

body.dark-mode .section-title {
  color: #f8fafc !important;
}

.section-sub {
  font-size: 0.85rem;
  color: #64748b;
  margin: 4px 0 0 0;
}

/* ۵. شبکه ۵ ستونه منظم کارت‌ها */
.novel-grid-5 {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 18px !important;
  margin-bottom: 35px;
}

@media (max-width: 1024px) {
  .novel-grid-5 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}

@media (max-width: 600px) {
  .novel-grid-5 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px !important; }
}

.novel-card-box {
  background: #ffffff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  border: 1px solid #e2e8f0;
  transition: transform 0.2s ease;
}

body.dark-mode .novel-card-box {
  background: #1e293b;
  border-color: #334155;
}

.novel-card-box:hover {
  transform: translateY(-4px);
}

.novel-poster-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3 !important;
  background: #cbd5e1;
}

.novel-poster-wrap img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block;
}

.novel-card-info {
  padding: 10px;
}

.novel-title {
  font-size: 0.9rem !important;
  margin: 0 0 4px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.novel-title a {
  color: inherit;
  text-decoration: none;
}

.novel-author {
  font-size: 0.78rem;
  color: #64748b;
}

.tag-live, .tag-vip {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  background: #ef4444;
}

.tag-vip {
  background: #f59e0b;
}
/* ==========================================================================
   استایل نوار استوری نویسندگان و مودال نمایش (صفحه اصلی)
   ========================================================================== */

/* نوار افقی استوری‌ها */
.authors-stories-bar {
    width: 100%;
    margin: 25px 0 15px 0;
    padding: 12px 5px;
}

.stories-scroll-container {
    display: flex;
    align-items: center;
    gap: 18px;
    overflow-x: auto;
    padding-bottom: 8px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* مخفی کردن اسکرول‌بار اضافی برای تمیزی */
.stories-scroll-container::-webkit-scrollbar {
    height: 4px;
}
.stories-scroll-container::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

/* هر آیتم استوری نویسنده */
.author-story-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.author-story-item:hover {
    transform: translateY(-3px);
}

/* رینگ گرادیانت دور آواتار (شبیه اینستاگرام) */
.story-ring {
    position: relative;
    width: 66px;
    height: 66px;
    border-radius: 50%;
    padding: 3px;
    background: linear-gradient(45deg, #f09433, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.story-ring img, 
.story-ring .avatar {
    width: 100% !important;
    height: 100% !important;
    border-radius: 50% !important;
    border: 2px solid #ffffff !important;
    object-fit: cover !important;
    background: #fff;
    display: block;
}

/* اسم نویسنده زیر استوری */
.story-author-name {
    font-size: 12px;
    font-weight: 600;
    color: #334155;
    max-width: 74px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}
/* اصلاح واکنش‌گرایی موبایل */
html, body {
    overflow-x: hidden !important;
    max-width: 100vw;
}

/* اسکرول لمسی و نرم نوار استوری */
.stories-slider, .stories-container {
    display: flex !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 12px;
    padding-bottom: 8px;
}
.story-item {
    scroll-snap-align: start;
    flex-shrink: 0;
}

/* چیدمان مرتب ۲ ستونه در موبایل */
@media (max-width: 640px) {
    .novels-grid, .roman-list {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
    .novel-card img {
        height: 180px !important;
        object-fit: cover;
    }
}
/* اسکرول افقی نوار دسته‌بندی‌ها و فیلترها */
.genres-scroll-container.romanlux-scrollable {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
    padding-bottom: 6px;
    white-space: nowrap;
}
.genres-scroll-container.romanlux-scrollable::-webkit-scrollbar {
    height: 5px;
}
.genres-scroll-container.romanlux-scrollable::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}
.genres-scroll-container.romanlux-scrollable .genre-pill-item {
    flex: 0 0 auto;
    scroll-snap-align: start;
    white-space: nowrap;
}
.novel-poster-wrap {
    position: relative;
}
.novel-price-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(15, 23, 42, 0.85);
    color: #38bdf8;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 6px;
    backdrop-filter: blur(4px);
    z-index: 5;
    border: 1px solid rgba(56, 189, 248, 0.3);
}
.novel-price-badge.free {
    color: #34d399;
    border-color: rgba(52, 211, 153, 0.3);
}
.novel-price-badge .currency {
    font-size: 9px;
    font-weight: normal;
    color: #94a3b8;
}
