/* ========== استایل‌های کلی ========== */
:root {
  --primary-red: #E03131;
  --dark-color: #1a1a1a;
  --mid-gray: #757575;
  --light-gray: #f5f5f5;
  --border-color: #e0e0e0;
  --background-color: #ffffff;
}

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

body {
  font-family: 'Vazirmatn', sans-serif;
  background-color: var(--light-gray);
  color: var(--dark-color);
  line-height: 1.7;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

.container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ========== استایل‌های اصلی سایت ========== */
main {
  padding: 20px 0;
}

.news-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.news-article {
  background: var(--background-color);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: transform 0.2s ease-in-out;
}

.news-article:hover {
    transform: translateY(-5px);
}

.news-article img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.news-content {
    padding: 16px;
}

.news-content .category {
    font-size: 12px;
    font-weight: bold;
    color: var(--primary-red);
    margin-bottom: 8px;
}

.news-content h2 {
    font-size: 18px;
    margin-bottom: 8px;
    line-height: 1.5;
}

.news-content p {
    font-size: 14px;
    color: var(--mid-gray);
}

/* ========== فوتر ========== */
footer {
  text-align: center;
  padding: 20px;
  margin-top: 30px;
  background: var(--dark-color);
  color: var(--light-gray);
  font-size: 14px;
}

/* ========== بخش نمایش تک خبر ========== */

/* کلاس کمکی برای مخفی کردن عناصر */
.hidden {
  display: none !important;
}

.article-view {
  background-color: #fff;
  padding: 20px 30px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.article-view .back-button {
  display: inline-block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 20px;
  cursor: pointer;
  color: var(--primary-red);
  background: none;
  border: none;
  padding: 5px 10px;
  font-family: 'Vazirmatn', sans-serif;
}

.article-view .back-button:hover {
  text-decoration: underline;
}

.article-view .article-header img {
  width: 100%;
  max-height: 450px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
}

.article-view .article-header h1 {
  font-size: 32px;
  line-height: 1.4;
  margin-bottom: 15px;
}

.article-view .article-content {
  font-size: 17px;
  line-height: 1.8;
  color: #333;
}

.article-view .article-content p {
  margin-bottom: 1.5em;
}

/* استایل واکنش‌گرا برای بخش تک خبر */
@media (max-width: 768px) {
  .article-view {
    padding: 15px;
  }
  .article-view .article-header h1 {
    font-size: 24px;
  }
  .article-view .article-content {
    font-size: 16px;
  }
}

/* حالت تیره */
body.dark-mode {
  background-color: #121212;
  color: #f1f1f1;
}

/* حالت تیره بهبود یافته - مشکی مطلق */
body.dark-mode {
  background-color: #000000 !important;
  color: #ffffff !important;
}

/* حالت تیره برای لوگو */
body.dark-mode .nav-logo span {
  color: #ffffff;
}

body.dark-mode .nav-logo {
  border-bottom-color: #333;
}

/* لینک‌ها و متون */
body.dark-mode a {
  color: #4dabf7 !important;
}
body.dark-mode a:hover {
  color: #82cfff !important;
}

/* کارت‌ها، باکس‌ها و سکشن‌ها */
body.dark-mode .card,
body.dark-mode article,
body.dark-mode section,
body.dark-mode div,
body.dark-mode header,
body.dark-mode footer,
body.dark-mode nav {
  background-color: #111111 !important;
  color: #f1f1f1 !important;
  border-color: #222 !important;
}

/* دکمه‌ها */
body.dark-mode button,
body.dark-mode .menu-btn {
  background-color: #222 !important;
  color: #fff !important;
  border: 1px solid #333 !important;
}
body.dark-mode button:hover,
body.dark-mode .menu-btn:hover {
  background-color: #333 !important;
}

/* ورودی‌ها و پاپ‌آپ‌ها */
body.dark-mode input,
body.dark-mode textarea {
  background-color: #1a1a1a !important;
  color: #fff !important;
  border: 1px solid #333 !important;
}
body.dark-mode .modal-content {
  background-color: #111 !important;
  color: #fff !important;
}

/* دکمه‌های منو */
.menu-btn {
  margin-left: 10px;
  padding: 8px 12px;
  border: none;
  cursor: pointer;
  border-radius: 8px;
  background: #007bff;
  color: white;
}
.menu-btn:hover { background: #0056b3; }

/* پاپ‌آپ ورود/عضویت */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}
.modal-content {
  background: #fff;
  color: #000;
  margin: 10% auto;
  padding: 20px;
  border-radius: 12px;
  width: 90%;
  max-width: 400px;
  text-align: center;
}
.modal-content input {
  display: block;
  width: 90%;
  margin: 10px auto;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 8px;
}
.modal-content button {
  margin: 5px;
  padding: 8px 16px;
  background-color: #007bff;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}
.modal-content button:hover { background-color: #0056b3; }
.close {
  float: right;
  font-size: 24px;
  cursor: pointer;
}
body.dark-mode .modal-content {
  background: #1e1e1e;
  color: #fff;
}

/* استایل‌های فرم احراز هویت */
#auth-modal .modal-content h2 {
  margin-bottom: 20px;
  text-align: center;
}

#auth-modal .modal-content input {
  display: block;
  width: 90%;
  margin: 10px auto;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-family: 'Vazirmatn', sans-serif;
}

#auth-modal .modal-content button {
  margin: 10px 5px;
  padding: 10px 20px;
  background-color: var(--primary-red);
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-family: 'Vazirmatn', sans-serif;
  font-size: 14px;
}

#auth-modal .modal-content button:hover {
  background-color: #c92a2a;
}

#auth-modal .modal-content p {
  margin: 15px 0;
  text-align: center;
  font-size: 14px;
}

#auth-modal .modal-content a {
  color: var(--primary-red);
  text-decoration: underline;
  cursor: pointer;
}

#verify-email {
  font-weight: bold;
  color: var(--primary-red);
}

/* حالت تیره برای فرم‌ها */
body.dark-mode #auth-modal .modal-content {
  background: #1e1e1e;
  color: #fff;
}

body.dark-mode #auth-modal .modal-content input {
  background-color: #2d2d2d;
  color: #fff;
  border: 1px solid #444;
}

/* ========== استایل‌های اضافه شده برای لوگو ========== */
/* استایل لوگو در هدر */
.header-logo {
  display: flex;
  align-items: center;
}

.header-logo img {
  height: 40px;
  width: auto;
}

/* استایل لوگو در منو */
.nav-logo {
  display: none;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 10px;
  padding-bottom: 10px;
}

.nav-logo a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 10px !important;
  border-bottom: none !important;
}

.nav-logo img {
  height: 35px;
  width: auto;
}

.nav-logo span {
  font-size: 18px;
  font-weight: 700;
  color: var(--dark-color);
}

/* نمایش لوگو در منوی موبایل */
@media (max-width: 1024px) {
  .nav-logo {
    display: block;
  }
  
  /* مخفی کردن لوگو هدر در موبایل */
  .header-logo {
    display: none;
  }
}

/* نمایش لوگو هدر در دسکتاپ */
@media (min-width: 1025px) {
  .header-logo {
    display: flex;
  }
}
/* استایل‌های سیستم جستجو */
.search-input-container {
  display: flex;
  gap: 10px;
  margin: 20px 0;
}

#search-input {
  flex: 1;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 16px;
}

#search-execute-btn {
  padding: 12px 24px;
  background: #E03131;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

#search-execute-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.search-results {
  margin-top: 20px;
  max-height: 400px;
  overflow-y: auto;
}

.results-count {
  color: #666;
  margin-bottom: 15px;
}

.search-result-item {
  border-bottom: 1px solid #eee;
  padding: 15px 0;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.search-result-link:hover h3 {
  color: #E03131;
}

.search-result-category {
  color: #E03131;
  font-size: 0.9em;
  margin: 5px 0;
}

.search-result-summary {
  color: #666;
  line-height: 1.5;
}

.no-results {
  text-align: center;
  color: #666;
  padding: 40px 0;
}
/* ========== سیستم اشتراک‌گذاری جدید ========== */
.share-section-compact {
    margin: 20px 0;
    text-align: center;
}

.share-main-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--primary-red);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Vazirmatn', sans-serif;
    box-shadow: 0 2px 8px rgba(224, 49, 49, 0.3);
}

.share-main-btn:hover {
    background: #c92a2a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(224, 49, 49, 0.4);
}

/* مودال اشتراک‌گذاری */
.share-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.share-modal-content {
    background: var(--background-color);
    margin: 10% auto;
    padding: 0;
    border-radius: 16px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

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

.share-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.share-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.close-share-modal {
    font-size: 24px;
    cursor: pointer;
    color: var(--mid-gray);
    transition: color 0.2s ease;
}

.close-share-modal:hover {
    color: var(--primary-red);
}

.share-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    background: var(--border-color);
    padding: 1px;
}

.share-option-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 16px;
    background: var(--background-color);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Vazirmatn', sans-serif;
}

.share-option-btn:hover {
    background: var(--light-gray);
    transform: scale(1.05);
}

.share-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.share-option-btn:hover .share-icon {
    transform: scale(1.1);
}

.share-option-btn span {
    font-size: 12px;
    font-weight: 500;
}

/* رنگ‌های مختلف برای هر پلتفرم */
.share-option-btn.whatsapp .share-icon {
    background: #25D366;
    color: white;
}

.share-option-btn.telegram .share-icon {
    background: #0088CC;
    color: white;
}

.share-option-btn.instagram .share-icon {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    color: white;
}

.share-option-btn.facebook .share-icon {
    background: #1877F2;
    color: white;
}

.share-option-btn.eitaa .share-icon {
    background: #00A0E3;
    color: white;
}

.share-option-btn.copy .share-icon {
    background: var(--mid-gray);
    color: white;
}

/* حالت تیره */
body.dark-mode .share-modal-content {
    background: #1e1e1e;
    color: #fff;
}

body.dark-mode .share-modal-header {
    border-color: #333;
}

body.dark-mode .share-option-btn {
    background: #1e1e1e;
    color: #fff;
}

body.dark-mode .share-option-btn:hover {
    background: #2d2d2d;
}

/* ریسپانسیو */
@media (max-width: 480px) {
    .share-modal-content {
        margin: 20% auto;
        width: 95%;
    }
    
    .share-options {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .share-option-btn {
        padding: 16px 12px;
    }
    
    .share-icon {
        width: 40px;
        height: 40px;
    }
    
    .share-option-btn span {
        font-size: 11px;
    }
}
/* ========== سیستم ذخیره مقالات ========== */
.bookmark-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--light-gray);
    color: var(--mid-gray);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Vazirmatn', sans-serif;
    margin-top: 10px;
}

.bookmark-btn:hover {
    background: #e0e0e0;
    transform: translateY(-1px);
}

.bookmark-btn.bookmarked {
    background: var(--primary-red);
    color: white;
    border-color: var(--primary-red);
}

.bookmark-btn.bookmarked:hover {
    background: #c92a2a;
}

.bookmark-btn svg {
    transition: transform 0.2s ease;
}

.bookmark-btn:hover svg {
    transform: scale(1.1);
}

/* کانتینر action های مقاله */
.article-actions {
    display: flex;
    gap: 10px;
    margin: 20px 0;
    flex-wrap: wrap;
}

/* استایل برای مقالات در لیست */
.news-article .bookmark-btn {
    margin-top: 15px;
    padding: 6px 12px;
    font-size: 12px;
}

/* پیام ذخیره/حذف */
.bookmark-message {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: var(--dark-color);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    z-index: 10001;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.bookmark-message.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* صفحه مقالات ذخیره شده */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--mid-gray);
}

.empty-state svg {
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    margin-bottom: 10px;
    font-size: 20px;
    color: var(--dark-color);
}

.empty-state p {
    margin-bottom: 25px;
    font-size: 15px;
}

.browse-articles-btn {
    padding: 12px 24px;
    background: var(--primary-red);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.browse-articles-btn:hover {
    background: #c92a2a;
    transform: translateY(-2px);
}

/* متادیتاهای مقاله در لیست ذخیره‌ها */
.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.remove-bookmark-btn {
    background: none;
    border: none;
    color: var(--mid-gray);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.remove-bookmark-btn:hover {
    color: var(--primary-red);
    background: rgba(224, 49, 49, 0.1);
}

.bookmark-date {
    font-size: 11px;
    color: var(--mid-gray);
    margin-top: 8px;
    text-align: left;
}

/* حالت تیره */
body.dark-mode .bookmark-btn {
    background: #2d2d2d;
    color: #ccc;
    border-color: #444;
}

body.dark-mode .bookmark-btn:hover {
    background: #3d3d3d;
}

body.dark-mode .bookmark-btn.bookmarked {
    background: var(--primary-red);
    color: white;
}

body.dark-mode .empty-state h3 {
    color: #fff;
}

body.dark-mode .remove-bookmark-btn:hover {
    background: rgba(224, 49, 49, 0.2);
}

/* ریسپانسیو */
@media (max-width: 768px) {
    .bookmark-message {
        top: 80px;
        font-size: 13px;
        padding: 10px 20px;
    }
    
    .article-actions {
        justify-content: center;
    }
    
    .empty-state {
        padding: 40px 15px;
    }
    
    .empty-state svg {
        width: 48px;
        height: 48px;
    }
}
/* استایل برای دکمه ثانویه */
.secondary-btn {
    background: var(--mid-gray);
    color: var(--dark-color);
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    margin: 5px;
    transition: all 0.3s ease;
}

.secondary-btn:hover {
    background: var(--light-gray);
    transform: translateY(-2px);
}

/* بهبود استایل empty-state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--mid-gray);
}

.empty-state h3 {
    margin: 20px 0 10px;
    color: var(--dark-color);
}

.empty-state p {
    margin-bottom: 25px;
    line-height: 1.6;
}

.browse-articles-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    margin: 10px 5px;
    transition: all 0.3s ease;
}

.browse-articles-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}
/* ========== سیستم Loading ========== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    flex-direction: column;
    gap: 20px;
}

.loading-overlay.dark-mode {
    background: rgba(0, 0, 0, 0.95);
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #E03131;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-overlay.dark-mode .loading-spinner {
    border: 5px solid #333;
    border-top: 5px solid #E03131;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    font-size: 18px;
    color: #E03131;
    font-weight: 500;
}

.loading-overlay.dark-mode .loading-text {
    color: #E03131;
}

.loading-dots {
    display: inline-block;
    animation: dots 1.5s steps(5, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60% { content: '...'; }
    80%, 100% { content: ''; }
}

.hidden {
    display: none !important;
}
/* استایل‌های صفحه درباره ما */
.about-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.about-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
}

.about-header h1 {
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.about-subtitle {
    font-size: 1.2rem;
    color: var(--mid-gray);
    line-height: 1.6;
}

.about-section {
    margin-bottom: 3rem;
}

.about-section h2 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.about-section p {
    line-height: 1.8;
    font-size: 1.1rem;
    color: var(--dark-color);
    text-align: justify;
}

.domains-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.domain-item {
    background: var(--bg-color);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.domain-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.domain-item h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.domain-item p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--mid-gray);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.social-link {
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.social-link.instagram {
    background: linear-gradient(45deg, #E1306C, #F77737);
    color: white;
}

.social-link.telegram {
    background: #0088cc;
    color: white;
}

.social-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.about-note {
    background: var(--light-bg);
    padding: 2rem;
    border-radius: 12px;
    border-right: 4px solid var(--primary-color);
    margin-top: 2rem;
}

.about-note h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.about-note p {
    color: var(--dark-color);
    line-height: 1.7;
}

/* حالت تیره */
.dark-mode .domain-item {
    background: var(--dark-bg);
    border-color: var(--dark-border);
}

.dark-mode .about-note {
    background: var(--dark-bg);
}

/* رسپانسیو */
@media (max-width: 768px) {
    .about-header h1 {
        font-size: 2rem;
    }
    
    .about-subtitle {
        font-size: 1.1rem;
    }
    
    .domains-grid {
        grid-template-columns: 1fr;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .about-section h2 {
        font-size: 1.5rem;
    }
}
/* استایل برای محتوای مقالات */
.article-content {
    line-height: 1.8;
    text-align: justify;
    font-size: 1.1rem;
}

.article-content p {
    margin-bottom: 1.5em;
    text-align: justify;
}

.article-content br {
    display: block;
    content: "";
    margin-top: 0.5em;
}
/* ========== استایل‌های حرفه‌ای برای فرم‌های احراز هویت ========== */
.auth-modal-enhanced .modal-content {
  border-radius: 20px;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
  background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}

.auth-modal-enhanced .modal-header {
  background: linear-gradient(135deg, #E03131 0%, #c92a2a 100%);
  color: white;
  padding: 30px;
  text-align: center;
  position: relative;
}

.auth-modal-enhanced .modal-header h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
}

.auth-modal-enhanced .close {
  position: absolute;
  top: 20px;
  left: 20px;
  color: white;
  font-size: 28px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.2);
}

.auth-modal-enhanced .close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

.auth-modal-enhanced .form-container {
  padding: 40px;
}

.auth-modal-enhanced .input-group {
  position: relative;
  margin-bottom: 25px;
}

.auth-modal-enhanced .input-group input {
  width: 100%;
  padding: 16px 20px;
  border: 2px solid #e9ecef;
  border-radius: 12px;
  font-size: 16px;
  background: #ffffff;
  transition: all 0.3s ease;
  font-family: 'Vazirmatn', sans-serif;
}

.auth-modal-enhanced .input-group input:focus {
  border-color: #E03131;
  box-shadow: 0 0 0 3px rgba(224, 49, 49, 0.1);
  transform: translateY(-2px);
}

.auth-modal-enhanced .input-group label {
  position: absolute;
  top: 50%;
  right: 15px;
  transform: translateY(-50%);
  color: #6c757d;
  transition: all 0.3s ease;
  pointer-events: none;
  background: white;
  padding: 0 8px;
}

.auth-modal-enhanced .input-group input:focus + label,
.auth-modal-enhanced .input-group input:not(:placeholder-shown) + label {
  top: 0;
  font-size: 12px;
  color: #E03131;
  font-weight: 600;
}

.auth-modal-enhanced .submit-btn {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #E03131 0%, #c92a2a 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Vazirmatn', sans-serif;
  position: relative;
  overflow: hidden;
}

.auth-modal-enhanced .submit-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(224, 49, 49, 0.3);
}

.auth-modal-enhanced .submit-btn:active {
  transform: translateY(-1px);
}

.auth-modal-enhanced .submit-btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.5);
  opacity: 0;
  border-radius: 100%;
  transform: scale(1, 1) translate(-50%);
  transform-origin: 50% 50%;
}

.auth-modal-enhanced .submit-btn:focus:not(:active)::after {
  animation: ripple 1s ease-out;
}

@keyframes ripple {
  0% {
    transform: scale(0, 0);
    opacity: 0.5;
  }
  100% {
    transform: scale(20, 20);
    opacity: 0;
  }
}

.auth-modal-enhanced .form-footer {
  text-align: center;
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid #e9ecef;
}

.auth-modal-enhanced .form-footer a {
  color: #E03131;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

.auth-modal-enhanced .form-footer a:hover {
  color: #c92a2a;
  text-decoration: underline;
}

.auth-modal-enhanced .social-login {
  margin: 25px 0;
  text-align: center;
}

.auth-modal-enhanced .social-divider {
  position: relative;
  text-align: center;
  margin: 25px 0;
  color: #6c757d;
}

.auth-modal-enhanced .social-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  right: 0;
  left: 0;
  height: 1px;
  background: #e9ecef;
}

.auth-modal-enhanced .social-divider span {
  background: white;
  padding: 0 15px;
  position: relative;
}

.auth-modal-enhanced .social-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 15px;
}

.auth-modal-enhanced .social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  border: 2px solid #e9ecef;
  border-radius: 10px;
  background: white;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Vazirmatn', sans-serif;
  font-size: 14px;
}

.auth-modal-enhanced .social-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.auth-modal-enhanced .social-btn.google {
  color: #DB4437;
  border-color: #DB4437;
}

.auth-modal-enhanced .social-btn.github {
  color: #333;
  border-color: #333;
}

/* حالت تیره */
body.dark-mode .auth-modal-enhanced .modal-content {
  background: linear-gradient(145deg, #1a1a1a 0%, #2d2d2d 100%);
}

body.dark-mode .auth-modal-enhanced .input-group input {
  background: #2d2d2d;
  border-color: #444;
  color: white;
}

body.dark-mode .auth-modal-enhanced .input-group label {
  background: #2d2d2d;
}

body.dark-mode .auth-modal-enhanced .social-btn {
  background: #2d2d2d;
  border-color: #444;
  color: white;
}
/* ========== اصلاحات برای اسکرول در موبایل ========== */
@media (max-width: 768px) {
  .auth-modal-enhanced .modal-content {
    margin: 5% auto;
    max-height: 90vh;
    overflow-y: auto;
    width: 95%;
  }
  
  .auth-modal-enhanced .form-container {
    padding: 30px 25px;
  }
  
  .auth-modal-enhanced .modal-header {
    padding: 25px 20px;
    position: sticky;
    top: 0;
    background: linear-gradient(135deg, #E03131 0%, #c92a2a 100%);
    z-index: 10;
  }
  
  .auth-modal-enhanced .social-buttons {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  
  .auth-modal-enhanced .input-group input {
    padding: 14px 45px 14px 15px;
    font-size: 16px; /* جلوگیری از زوم در iOS */
  }
  
  .auth-modal-enhanced .form-footer {
    position: sticky;
    bottom: 0;
    background: white;
    padding: 15px 0;
    margin-bottom: -20px;
    border-top: 1px solid #e9ecef;
  }
  
  body.dark-mode .auth-modal-enhanced .form-footer {
    background: #1a1a1a;
  }
}

/* استایل‌های عمومی برای اسکرول */
.auth-modal-enhanced .modal-content {
  max-height: 85vh;
  overflow-y: auto;
}

/* مخفی کردن اسکرولبار در دسکتاپ اما فعال بودن اسکرول */
.auth-modal-enhanced .modal-content::-webkit-scrollbar {
  width: 6px;
}

.auth-modal-enhanced .modal-content::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.auth-modal-enhanced .modal-content::-webkit-scrollbar-thumb {
  background: #E03131;
  border-radius: 10px;
}

.auth-modal-enhanced .modal-content::-webkit-scrollbar-thumb:hover {
  background: #c92a2a;
}

/* حالت تیره برای اسکرولبار */
body.dark-mode .auth-modal-enhanced .modal-content::-webkit-scrollbar-track {
  background: #2d2d2d;
}

body.dark-mode .auth-modal-enhanced .modal-content::-webkit-scrollbar-thumb {
  background: #E03131;
}

/* بهبود ارتفاع برای فرم‌های مختلف */
.auth-modal-enhanced #login-form .form-container,
.auth-modal-enhanced #register-form .form-container,
.auth-modal-enhanced #forgot-password-form .form-container {
  min-height: auto;
}

/* استایل برای موبایل‌های بسیار کوچک */
@media (max-width: 480px) {
  .auth-modal-enhanced .modal-content {
    margin: 2% auto;
    max-height: 96vh;
    width: 98%;
    border-radius: 15px;
  }
  
  .auth-modal-enhanced .form-container {
    padding: 25px 20px;
  }
  
  .auth-modal-enhanced .modal-header {
    padding: 20px 15px;
  }
  
  .auth-modal-enhanced .modal-header h2 {
    font-size: 20px;
  }
  
  .auth-modal-enhanced .modal-subtitle {
    font-size: 14px;
  }
  
  .auth-modal-enhanced .input-group {
    margin-bottom: 20px;
  }
  
  .auth-modal-enhanced .submit-btn {
    padding: 14px;
    font-size: 15px;
  }
}

/* جلوگیری از اسکرول بدنه صفحه هنگام باز بودن مودال */
body.modal-open {
  overflow: hidden;
}
/* ========== استایل‌های صفحه تغییر رمز عبور ========== */
.reset-password-container {
    max-width: 500px;
    margin: 0 auto;
    padding: 40px 20px;
}

.reset-password-form {
    background: var(--background-color);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
}

.reset-password-form h2 {
    text-align: center;
    margin-bottom: 20px;
    color: var(--primary-red);
    font-size: 28px;
}

.reset-instructions {
    text-align: center;
    color: var(--mid-gray);
    margin-bottom: 30px;
    line-height: 1.6;
}

/* حالت تیره */
body.dark-mode .reset-password-form {
    background: #1e1e1e;
    border-color: #333;
}

/* ریسپانسیو */
@media (max-width: 768px) {
    .reset-password-container {
        padding: 20px 15px;
    }
    
    .reset-password-form {
        padding: 30px 25px;
    }
    
    .reset-password-form h2 {
        font-size: 24px;
    }
}
/* ========== اصلاحات دکمه بستن مودال احراز هویت ========== */
.auth-modal-enhanced .close {
  position: absolute;
  top: 15px;
  left: 15px;
  color: white;
  font-size: 28px;
  font-weight: bold;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  z-index: 1000;
  cursor: pointer;
  border: none;
}

.auth-modal-enhanced .close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
  color: white;
}

/* استایل برای حالت موبایل */
@media (max-width: 768px) {
  .auth-modal-enhanced .close {
    top: 10px;
    left: 10px;
    width: 35px;
    height: 35px;
    font-size: 24px;
  }
}

/* اطمینان از نمایش صحیح در همه حالت‌ها */
.auth-modal-enhanced .modal-header {
  position: relative;
}

.auth-modal-enhanced .modal-header h2 {
  margin-right: 50px; /* ایجاد فضا برای دکمه بستن */
}
/* استایل‌های آمار پیشرفته */
.popular-articles-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    box-shadow: var(--shadow);
    grid-column: 1 / -1;
}

.popular-articles-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.popular-article-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(248, 249, 250, 0.8);
    border-radius: 8px;
    border-right: 4px solid var(--primary-red);
}

.article-title {
    font-weight: 500;
    flex: 1;
}

.view-count {
    background: var(--primary-red);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* بهبود استایل آمار بازدید در لیست مقالات */
.article-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: 500;
}
/* ========== استایل‌های اسلایدشو ========== */
.slideshow-container {
  position: relative;
  max-width: 1300px;
  margin: 0 auto 30px auto;
  padding: 0 16px;
  height: 300px;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.slides-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.slide.active {
  opacity: 1;
}

.slide-link {
  display: block;
  width: 100%;
  height: 100%;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

/* دکمه‌های کنترل */
.slide-prev,
.slide-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(224, 49, 49, 0.8);
  color: white;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
}

.slide-prev:hover,
.slide-next:hover {
  background: rgba(224, 49, 49, 1);
  transform: translateY(-50%) scale(1.1);
}

.slide-prev {
  left: 20px;
}

.slide-next {
  right: 20px;
}

/* نقاط نشانگر */
.slides-dots {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
  direction: ltr;
}

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

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

.dot:hover {
  background: rgba(255, 255, 255, 0.8);
}

/* حالت تیره */
body.dark-mode .slideshow-container {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

body.dark-mode .slide-prev,
body.dark-mode .slide-next {
  background: rgba(224, 49, 49, 0.6);
}

body.dark-mode .slide-prev:hover,
body.dark-mode .slide-next:hover {
  background: rgba(224, 49, 49, 0.9);
}

/* ریسپانسیو */
@media (max-width: 768px) {
  .slideshow-container {
    height: 200px;
    margin-bottom: 20px;
    padding: 0 10px;
  }
  
  .slide-prev,
  .slide-next {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
  
  .slide-prev {
    left: 10px;
  }
  
  .slide-next {
    right: 10px;
  }
  
  .slides-dots {
    bottom: 10px;
  }
  
  .dot {
    width: 10px;
    height: 10px;
  }
}

@media (max-width: 480px) {
  .slideshow-container {
    height: 150px;
  }
}
/* ========== اصلاحات حالت تاریک برای دکمه‌ها ========== */
body.dark-mode .icon-btn {
    background-color: #333 !important;
    color: #ffffff !important;
    border: 1px solid #555 !important;
}

body.dark-mode .icon-btn:hover {
    background-color: #444 !important;
    border-color: #777 !important;
}

body.dark-mode .icon-btn svg {
    fill: #ffffff !important;
}

body.dark-mode .search-btn,
body.dark-mode #theme-toggle {
    background-color: #333 !important;
    color: #ffffff !important;
    border: 1px solid #555 !important;
}

body.dark-mode .search-btn:hover,
body.dark-mode #theme-toggle:hover {
    background-color: #444 !important;
    border-color: #777 !important;
}

body.dark-mode .search-btn svg,
body.dark-mode #theme-toggle svg {
    fill: #ffffff !important;
}

/* دکمه‌های هدر در حالت تاریک */
body.dark-mode .header-left .icon-btn,
body.dark-mode .header-right .icon-btn {
    background-color: #333 !important;
    color: #fff !important;
    border: 1px solid #555 !important;
}

body.dark-mode .header-left .icon-btn:hover,
body.dark-mode .header-right .icon-btn:hover {
    background-color: #444 !important;
    border-color: #777 !important;
}

/* دکمه منوی موبایل */
body.dark-mode #mobile-menu-toggle {
    background-color: #333 !important;
    color: #fff !important;
    border: 1px solid #555 !important;
}

body.dark-mode #mobile-menu-toggle:hover {
    background-color: #444 !important;
    border-color: #777 !important;
}

/* دکمه‌های جستجو در حالت تاریک */
body.dark-mode #search-execute-btn {
    background: #E03131 !important;
    color: white !important;
}

body.dark-mode #search-execute-btn:hover {
    background: #c92a2a !important;
}

/* بهبود کنتراست برای متن‌ها در حالت تاریک */
body.dark-mode {
    color: #f0f0f0 !important;
}

body.dark-mode .news-content h2 {
    color: #ffffff !important;
}

body.dark-mode .news-content p {
    color: #cccccc !important;
}

body.dark-mode .category {
    color: #ff6b6b !important;
}

/* بهبود دکمه‌های فرم در حالت تاریک */
body.dark-mode .submit-btn {
    background: #E03131 !important;
    color: white !important;
}

body.dark-mode .submit-btn:hover {
    background: #c92a2a !important;
}

/* دکمه‌های secondary در حالت تاریک */
body.dark-mode .secondary-btn {
    background: #555 !important;
    color: #fff !important;
}

body.dark-mode .secondary-btn:hover {
    background: #666 !important;
}
/* ========== اصلاحات loading spinner در حالت تاریک ========== */
body.dark-mode .loading-spinner {
    border: 5px solid #333 !important;
    border-top: 5px solid #E03131 !important;
}

body.dark-mode .loading-text {
    color: #E03131 !important;
}

/* اطمینان از نمایش صحیح انیمیشن */
.loading-spinner {
    animation: spin 1s linear infinite !important;
}

/* بهبود visibility در حالت تاریک */
body.dark-mode .loading-overlay {
    background: rgba(0, 0, 0, 0.95) !important;
}

body.dark-mode .loading-text {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* بهبود dots animation در حالت تاریک */
body.dark-mode .loading-dots {
    color: #E03131 !important;
}
/* ========== اصلاحات صفحه درباره ما در حالت تاریک ========== */
body.dark-mode .about-page {
    color: #f0f0f0 !important;
}

body.dark-mode .about-header h1 {
    color: #E03131 !important;
}

body.dark-mode .about-subtitle {
    color: #cccccc !important;
}

body.dark-mode .about-section h2 {
    color: #E03131 !important;
    border-bottom-color: #333 !important;
}

body.dark-mode .about-section p {
    color: #e0e0e0 !important;
}

body.dark-mode .domain-item {
    background: #1a1a1a !important;
    border-color: #333 !important;
}

body.dark-mode .domain-item h3 {
    color: #E03131 !important;
}

body.dark-mode .domain-item p {
    color: #cccccc !important;
}

body.dark-mode .about-note {
    background: #1a1a1a !important;
    border-right-color: #E03131 !important;
}

body.dark-mode .about-note h3 {
    color: #E03131 !important;
}

body.dark-mode .about-note p {
    color: #e0e0e0 !important;
}

body.dark-mode .social-link.instagram {
    background: linear-gradient(45deg, #E1306C, #F77737) !important;
    color: white !important;
}

body.dark-mode .social-link.telegram {
    background: #0088cc !important;
    color: white !important;
}

/* بهبود خوانایی لینک‌ها */
body.dark-mode .about-page a {
    color: #4dabf7 !important;
}

body.dark-mode .about-page a:hover {
    color: #82cfff !important;
}

/* بهبود جداکننده‌ها */
body.dark-mode .about-header {
    border-bottom-color: #333 !important;
}

/* تضمین خوانایی همه متن‌ها */
body.dark-mode .about-content * {
    color: #e0e0e0 !important;
}

body.dark-mode .about-content h1,
body.dark-mode .about-content h2,
body.dark-mode .about-content h3 {
    color: #E03131 !important;
}

/* بهبود contrast برای متن‌های مهم */
body.dark-mode .about-note,
body.dark-mode .domain-item {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3) !important;
}
/* در style.css */
.pwa-install-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: #E03131;
    color: white;
    border: none;
    border-radius: 25px;
    padding: 12px 20px;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(224, 49, 49, 0.4);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.pwa-install-btn:hover {
    background: #c92a2a;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(224, 49, 49, 0.6);
}

.pwa-install-btn.hidden {
    display: none;
}

/* حالت تیره */
body.dark-mode .pwa-install-btn {
    background: #E03131;
    color: white;
}