/* ═══════════════════════════════════════════
   شب‌های وحشت - استایل اصلی (v2 - حرفه‌ای)
   ═══════════════════════════════════════════ */

:root {
    --black: #0a0a0a;
    --black-light: #141418;
    --black-lighter: #1e1e24;
    --black-card: #18181e;
    --white: #f0ebe3;
    --white-dim: #b8b0a4;
    --white-muted: #7a756c;
    --blood: #7a1a1a;
    --blood-light: #9a2a2a;
    --blood-dark: #5a1212;
    --gold: #c9a959;
    --gold-light: #dcc07a;
    --gold-dim: #a88a3a;
    --gold-bg: rgba(201, 169, 89, 0.08);
    --gold-border: rgba(201, 169, 89, 0.2);
    --teal: #1a7a7a;
    --zarchesh: #8b1a1a;
    --night-blue: #0a1a2a;
    --silver: #b8b0a8;
    --success: #2d8a4e;
    --success-bg: rgba(45, 138, 78, 0.12);
    --warning: #d4a017;
    --warning-bg: rgba(212, 160, 23, 0.12);
    --danger: #c0392b;
    --danger-bg: rgba(192, 57, 43, 0.12);
    --info: #2980b9;
    --info-bg: rgba(41, 128, 185, 0.12);
    --radius: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --radius-sm: 6px;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.2);
    --shadow: 0 4px 24px rgba(0,0,0,0.35);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.5);
    --shadow-glow: 0 0 30px rgba(201, 169, 89, 0.08);
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
    --font: 'Vazirmatn', 'IRANSans', 'Tahoma', sans-serif;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
    font-family: var(--font);
    background: var(--black);
    color: var(--white);
    line-height: 1.75;
    direction: rtl;
    min-height: 100vh;
    overflow-x: hidden;
}

a { color: var(--gold); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--gold-light); }
img { max-width: 100%; height: auto; display: block; }
::selection { background: var(--blood); color: var(--white); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 800px; margin: 0 auto; padding: 0 24px; }

/* ═══ اسکرولبار ═══ */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--black); }
::-webkit-scrollbar-thumb { background: var(--blood); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

/* ═══════════════════════════════════════════
   هدر
   ═══════════════════════════════════════════ */
.site-header {
    background: rgba(10, 10, 10, 0.92);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(201, 169, 89, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0;
}
.site-header .container { max-width: 1300px; }
.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    gap: 24px;
}

/* لوگو */
.logo a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}
.logo-icon { font-size: 1.8rem; line-height: 1; }
.logo-text {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--gold);
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--gold), #e8d5a0, var(--gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* منوی اصلی */
.main-nav { display: flex; align-items: center; }
.main-nav ul { display: flex; list-style: none; gap: 2px; }
.main-nav a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius);
    color: var(--white-dim);
    font-size: 0.92rem;
    font-weight: 500;
    transition: var(--transition);
    white-space: nowrap;
    text-decoration: none;
}
.main-nav a:hover {
    color: var(--gold);
    background: var(--gold-bg);
}
.main-nav a.active {
    color: var(--gold);
    background: var(--gold-bg);
}
.main-nav .has-dropdown { position: relative; }
.main-nav .dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--black-card);
    border: 1px solid var(--black-lighter);
    border-radius: var(--radius-lg);
    min-width: 220px;
    padding: 8px;
    box-shadow: var(--shadow-lg);
    z-index: 100;
}
.main-nav .has-dropdown:hover .dropdown { display: block; }
.main-nav .dropdown a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    font-size: 0.88rem;
    border-radius: var(--radius-sm);
}
.main-nav .dropdown a:hover { background: var(--gold-bg); }

/* ابزارهای هدر */
.header-tools { display: flex; align-items: center; gap: 8px; }

.btn-icon {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: var(--radius);
    background: transparent;
    color: var(--white-dim);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-size: 1rem;
}
.btn-icon:hover {
    background: var(--gold-bg);
    color: var(--gold);
}

.mobile-menu-toggle { display: none; }

/* منوی کاربر */
.user-menu { position: relative; }
.btn-user {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--black-lighter);
    border: 1px solid rgba(201, 169, 89, 0.12);
    border-radius: var(--radius);
    padding: 6px 14px 6px 8px;
    color: var(--white);
    cursor: pointer;
    font-family: var(--font);
    font-size: 0.88rem;
    transition: var(--transition);
}
.btn-user:hover { border-color: var(--gold-border); }
.user-menu .dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: var(--black-card);
    border: 1px solid var(--black-lighter);
    border-radius: var(--radius-lg);
    min-width: 200px;
    padding: 8px;
    box-shadow: var(--shadow-lg);
}
.user-menu:hover .dropdown { display: block; }
.user-menu .dropdown a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: var(--white-dim);
    font-size: 0.88rem;
}
.user-menu .dropdown a:hover { background: var(--gold-bg); color: var(--gold); }
.user-menu .dropdown .divider { border-top: 1px solid var(--black-lighter); margin: 4px 8px; }

.avatar-small { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; border: 2px solid var(--gold-border); }
.avatar-tiny { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }

/* نوار جستجو */
.search-bar {
    display: none;
    background: var(--black-light);
    border-top: 1px solid var(--black-lighter);
    padding: 16px 0;
}
.search-bar.active { display: block; }
.search-form { display: flex; gap: 10px; max-width: 700px; margin: 0 auto; }
.search-input {
    flex: 1;
    padding: 14px 20px;
    background: var(--black-lighter);
    border: 1px solid var(--black-lighter);
    border-radius: var(--radius);
    color: var(--white);
    font-size: 1rem;
    font-family: var(--font);
    transition: var(--transition);
}
.search-input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px var(--gold-bg);
}

/* ═══════════════════════════════════════════
   دکمه‌ها
   ═══════════════════════════════════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 24px;
    border: none;
    border-radius: var(--radius);
    font-family: var(--font);
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
    line-height: 1.4;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
    background: linear-gradient(135deg, var(--blood), var(--blood-light));
    color: var(--white);
    box-shadow: 0 2px 12px rgba(122, 26, 26, 0.3);
}
.btn-primary:hover {
    background: linear-gradient(135deg, var(--blood-light), #b03030);
    color: var(--white);
    box-shadow: 0 4px 20px rgba(122, 26, 26, 0.4);
    transform: translateY(-1px);
}
.btn-outline {
    background: transparent;
    border: 1.5px solid var(--gold-border);
    color: var(--gold);
}
.btn-outline:hover {
    background: var(--gold-bg);
    border-color: var(--gold);
    color: var(--gold);
}
.btn-sm { padding: 7px 16px; font-size: 0.84rem; border-radius: var(--radius-sm); }
.btn-lg { padding: 14px 32px; font-size: 1rem; border-radius: var(--radius-lg); }
.btn-block { width: 100%; }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #d44637; }
.btn-success { background: var(--success); color: white; }
.btn-success:hover { background: #38a05e; }
.btn-ghost { background: transparent; color: var(--white-dim); }
.btn-ghost:hover { background: var(--gold-bg); color: var(--gold); }

/* ═══════════════════════════════════════════
   فرم‌ها (بازسازی کامل - UI حرفه‌ای)
   ═══════════════════════════════════════════ */
.form-group {
    margin-bottom: 22px;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--white-dim);
    letter-spacing: 0.3px;
}

/* تکست‌باکس و اینپوت */
.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 13px 16px;
    background: var(--black-lighter);
    border: 1.5px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius);
    color: var(--white);
    font-family: var(--font);
    font-size: 0.95rem;
    line-height: 1.5;
    transition: var(--transition);
    appearance: none;
    -webkit-appearance: none;
}

.form-input:hover,
.form-select:hover,
.form-textarea:hover {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(30, 30, 36, 0.8);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--gold);
    background: var(--black-lighter);
    box-shadow: 0 0 0 3px rgba(201, 169, 89, 0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--white-muted);
    font-weight: 400;
}

/* سایزهای مختلف */
.form-input.lg,
.form-textarea.lg {
    padding: 16px 20px;
    font-size: 1.15rem;
    border-radius: var(--radius-lg);
}

.form-input.sm,
.form-select.sm {
    padding: 8px 12px;
    font-size: 0.85rem;
}

/* سلکت */
.form-select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%237a756c' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 14px center;
    padding-left: 36px;
}

/* تکست‌اریا */
.form-textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.8;
}

/* آیکون داخل اینپوت */
.input-icon {
    position: relative;
}
.input-icon i {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--white-muted);
    font-size: 0.9rem;
    pointer-events: none;
    transition: var(--transition);
}
.input-icon .form-input {
    padding-right: 42px;
}
.input-icon .form-input:focus + i,
.input-icon:focus-within i {
    color: var(--gold);
}

/* پسورد تاگل */
.toggle-password {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--white-muted);
    cursor: pointer;
    padding: 4px;
    font-size: 0.9rem;
    transition: var(--transition);
}
.toggle-password:hover { color: var(--gold); }

/* چک‌باکس و رادیو */
.checkbox-label,
.radio-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.92rem;
    color: var(--white-dim);
    padding: 6px 0;
    user-select: none;
}
.checkbox-label input[type="checkbox"],
.radio-label input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--gold);
    cursor: pointer;
    border-radius: 4px;
}

/* هینت و راهنما */
.form-hint {
    display: block;
    margin-top: 6px;
    font-size: 0.8rem;
    color: var(--white-muted);
    line-height: 1.5;
}

.form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
    flex-wrap: wrap;
    gap: 10px;
}

.form-link {
    color: var(--gold);
    font-size: 0.88rem;
    font-weight: 500;
}
.form-link:hover { color: var(--gold-light); }

/* تفکیک‌کننده فرم */
.form-separator {
    border-top: 1px solid var(--black-lighter);
    margin: 28px 0 22px;
    padding-top: 20px;
}
.form-separator h4 {
    color: var(--gold);
    font-size: 1rem;
    margin-bottom: 0;
}

/* ═══════════════════════════════════════════
   اسلایدشو
   ═══════════════════════════════════════════ */
.hero-slider {
    position: relative;
    height: 520px;
    overflow: hidden;
}
.slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease;
}
.slide.active { opacity: 1; }
.slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(10,10,10,0.88) 0%, rgba(10,10,10,0.4) 50%, rgba(10,10,10,0.7) 100%);
}
.slide-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    padding: 40px 0;
}
.slide-category {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--blood);
    color: var(--white);
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
    width: fit-content;
    margin-bottom: 16px;
}
.slide-title {
    font-size: 2.8rem;
    font-weight: 900;
    margin-bottom: 16px;
    line-height: 1.35;
    text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}
.slide-excerpt {
    font-size: 1.1rem;
    color: var(--silver);
    max-width: 600px;
    margin-bottom: 24px;
    line-height: 1.8;
}
.slide-meta {
    display: flex;
    gap: 24px;
    color: var(--silver);
    font-size: 0.9rem;
    margin-bottom: 28px;
}
.slide-meta i { color: var(--gold); margin-left: 4px; }
.slide-actions { display: flex; gap: 14px; }

.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(201, 169, 89, 0.15);
    color: var(--white);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: var(--transition);
}
.slider-nav:hover {
    background: var(--blood);
    border-color: var(--blood);
    transform: translateY(-50%) scale(1.05);
}
.slider-prev { right: 20px; }
.slider-next { left: 20px; }
.slider-dots {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}
.slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid rgba(201, 169, 89, 0.5);
    background: transparent;
    cursor: pointer;
    transition: var(--transition);
}
.slider-dot.active {
    background: var(--gold);
    border-color: var(--gold);
    transform: scale(1.2);
}

/* ═══════════════════════════════════════════
   آمار
   ═══════════════════════════════════════════ */
.site-stats {
    padding: 50px 0;
    background: var(--black-light);
    border-top: 1px solid var(--black-lighter);
    border-bottom: 1px solid var(--black-lighter);
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}
.stat-item { text-align: center; }
.stat-icon {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: var(--gold);
}
.stat-number {
    font-size: 2rem;
    font-weight: 900;
    color: var(--white);
    line-height: 1.2;
}
.stat-label {
    color: var(--white-muted);
    font-size: 0.88rem;
    margin-top: 4px;
}

/* ═══════════════════════════════════════════
   بخش‌ها
   ═══════════════════════════════════════════ */
.section { padding: 60px 0; }
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}
.section-title {
    font-size: 1.4rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
}
.title-icon { font-size: 1.2rem; }
.section-link {
    color: var(--gold);
    font-size: 0.88rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ═══════════════════════════════════════════
   کارت داستان
   ═══════════════════════════════════════════ */
.stories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}
.story-card {
    background: var(--black-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.04);
    transition: var(--transition);
}
.story-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow), var(--shadow-glow);
    border-color: var(--gold-border);
}
.card-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 10;
}
.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}
.story-card:hover .card-image img { transform: scale(1.06); }
.card-category {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--blood);
    color: var(--white);
    padding: 4px 14px;
    border-radius: 16px;
    font-size: 0.78rem;
    font-weight: 600;
}
.card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--gold);
    color: var(--black);
    padding: 4px 14px;
    border-radius: 16px;
    font-size: 0.78rem;
    font-weight: 700;
}
.card-body { padding: 20px; }
.card-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.5;
}
.card-title a { color: var(--white); }
.card-title a:hover { color: var(--gold); }
.card-excerpt {
    color: var(--white-muted);
    font-size: 0.88rem;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.7;
}
.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 0.82rem;
    color: var(--white-muted);
}
.card-author { display: flex; align-items: center; gap: 6px; }
.card-stats {
    display: flex;
    gap: 16px;
    font-size: 0.8rem;
    color: var(--white-muted);
    padding-top: 12px;
    border-top: 1px solid var(--black-lighter);
}
.card-stats i { color: var(--gold); margin-left: 3px; }

.story-card.compact .card-image { aspect-ratio: 16 / 9; }
.stories-grid.small { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

/* ═══════════════════════════════════════════
   دسته‌بندی‌ها
   ═══════════════════════════════════════════ */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 18px;
}
.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 28px 16px;
    background: var(--black-card);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: var(--radius-lg);
    text-align: center;
    transition: var(--transition);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}
.category-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--cat-color, var(--gold));
    opacity: 0;
    transition: var(--transition);
}
.category-card:hover {
    border-color: var(--cat-color, var(--gold-border));
    transform: translateY(-3px);
    box-shadow: var(--shadow-sm);
}
.category-card:hover::before { opacity: 1; }
.category-icon {
    font-size: 2rem;
    color: var(--cat-color, var(--gold));
    margin-bottom: 12px;
}
.category-name { font-weight: 700; color: var(--white); margin-bottom: 4px; }
.category-count { font-size: 0.82rem; color: var(--white-muted); }

/* ═══════════════════════════════════════════
   پربازدید
   ═══════════════════════════════════════════ */
.popular-list { display: flex; flex-direction: column; gap: 12px; }
.popular-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--black-card);
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.04);
    transition: var(--transition);
}
.popular-item:hover {
    border-color: var(--gold-border);
    background: rgba(24, 24, 30, 0.8);
}
.popular-rank {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--gold);
    min-width: 40px;
    text-align: center;
}
.popular-item:nth-child(1) .popular-rank { color: #ffd700; }
.popular-item:nth-child(2) .popular-rank { color: #c0c0c0; }
.popular-item:nth-child(3) .popular-rank { color: #cd7f32; }
.popular-image {
    width: 72px; height: 72px;
    border-radius: var(--radius);
    overflow: hidden;
    flex-shrink: 0;
}
.popular-image img { width: 100%; height: 100%; object-fit: cover; }
.popular-info { flex: 1; }
.popular-info h4 { font-size: 0.95rem; margin-bottom: 4px; }
.popular-info h4 a { color: var(--white); }
.popular-info h4 a:hover { color: var(--gold); }
.popular-meta {
    display: flex;
    gap: 16px;
    font-size: 0.82rem;
    color: var(--white-muted);
}

/* ═══════════════════════════════════════════
   نویسندگان
   ═══════════════════════════════════════════ */
.authors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 24px;
}
.author-card { text-align: center; }
.author-avatar {
    width: 100px; height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--gold-border);
    margin-bottom: 12px;
    transition: var(--transition);
}
.author-card:hover .author-avatar {
    border-color: var(--gold);
    transform: scale(1.05);
}
.author-name { font-size: 1rem; font-weight: 700; margin-bottom: 4px; }
.author-name a { color: var(--white); }
.author-stats {
    font-size: 0.82rem;
    color: var(--white-muted);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* ═══════════════════════════════════════════
   تگ‌ها
   ═══════════════════════════════════════════ */
.tags-cloud { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.tag-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 18px;
    background: var(--black-card);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 20px;
    color: var(--white-dim);
    font-size: 0.88rem;
    transition: var(--transition);
}
.tag-item:hover {
    border-color: var(--gold-border);
    color: var(--gold);
    background: var(--gold-bg);
}
.tag-count {
    font-size: 0.75rem;
    color: var(--white-muted);
}

/* ═══════════════════════════════════════════
   خبرنامه
   ═══════════════════════════════════════════ */
.newsletter-section { background: var(--black-light); }
.newsletter-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    padding: 48px;
    background: var(--black-card);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: var(--radius-xl);
}
.newsletter-text h2 { font-size: 1.4rem; margin-bottom: 6px; }
.newsletter-text p { color: var(--white-muted); font-size: 0.92rem; }
.newsletter-form {
    display: flex;
    gap: 10px;
    flex: 1;
    max-width: 420px;
}
.newsletter-input {
    flex: 1;
    padding: 14px 20px;
    background: var(--black);
    border: 1.5px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius);
    color: var(--white);
    font-family: var(--font);
    font-size: 0.95rem;
    transition: var(--transition);
}
.newsletter-input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px var(--gold-bg);
}

/* ═══════════════════════════════════════════
   فوتر
   ═══════════════════════════════════════════ */
.site-footer {
    background: var(--black-light);
    border-top: 1px solid var(--black-lighter);
    padding: 50px 0 0;
}
.site-footer.compact { padding: 20px 0; }
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}
.footer-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.footer-logo .logo-text { color: var(--gold); font-size: 1.1rem; font-weight: 700; }
.footer-desc { color: var(--white-muted); font-size: 0.88rem; margin-bottom: 16px; line-height: 1.8; }
.social-links { display: flex; gap: 10px; }
.social-links a {
    width: 40px; height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--black-lighter);
    border-radius: 50%;
    color: var(--white-dim);
    font-size: 1rem;
    transition: var(--transition);
}
.social-links a:hover { background: var(--gold); color: var(--black); }
.footer-col h4 { color: var(--gold); margin-bottom: 16px; font-size: 1rem; font-weight: 700; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: var(--white-muted); font-size: 0.88rem; }
.footer-links a:hover { color: var(--gold); }
.footer-contact li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--white-muted);
    margin-bottom: 10px;
    font-size: 0.88rem;
}
.footer-contact i { color: var(--gold); width: 16px; }
.footer-bottom {
    border-top: 1px solid var(--black-lighter);
    padding: 20px 0;
    display: flex;
    justify-content: space-between;
    color: var(--white-muted);
    font-size: 0.82rem;
}

/* ═══════════════════════════════════════════
   صفحه داستان
   ═══════════════════════════════════════════ */
.story-page { padding: 30px 0 60px; }
.story-hero {
    border-radius: var(--radius-xl);
    overflow: hidden;
    margin-bottom: 32px;
    position: relative;
}
.story-hero-image { width: 100%; max-height: 500px; object-fit: cover; }
.story-hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(transparent 50%, var(--black));
}
.story-header { margin-bottom: 32px; }
.story-category {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 18px;
    background: var(--cat-color, var(--blood));
    color: var(--white);
    border-radius: 16px;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 16px;
}
.story-title {
    font-size: 2.4rem;
    font-weight: 900;
    margin-bottom: 16px;
    line-height: 1.4;
}
.story-excerpt {
    font-size: 1.1rem;
    color: var(--silver);
    margin-bottom: 24px;
    line-height: 1.9;
}
.trigger-warning {
    background: var(--danger-bg);
    border: 1px solid rgba(192, 57, 43, 0.3);
    border-radius: var(--radius);
    padding: 14px 20px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #e74c3c;
    font-size: 0.92rem;
}
.story-meta-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0;
    border-top: 1px solid var(--black-lighter);
    border-bottom: 1px solid var(--black-lighter);
}
.author-link { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.author-avatar { width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--gold-border); }
.author-name { color: var(--white); font-weight: 600; display: block; font-size: 0.95rem; }
.author-label { color: var(--white-muted); font-size: 0.8rem; }
.story-info { display: flex; gap: 22px; color: var(--white-muted); font-size: 0.9rem; }
.story-info i { color: var(--gold); margin-left: 4px; }

.story-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--black-lighter);
}
.toolbar-right, .toolbar-left { display: flex; gap: 8px; }
.like-btn.active, .bookmark-btn.active { color: var(--gold); }
.like-btn.active i { color: #e74c3c; }

.story-content {
    font-size: 1.15rem;
    line-height: 2.1;
    padding: 32px 0;
    max-width: 800px;
    margin: 0 auto;
}
.story-content p { margin-bottom: 22px; }
.story-content h2, .story-content h3 { color: var(--gold); margin: 32px 0 16px; }
.story-content blockquote {
    border-right: 4px solid var(--gold);
    padding: 18px 28px;
    margin: 24px 0;
    background: var(--black-light);
    border-radius: 0 var(--radius) var(--radius) 0;
    color: var(--silver);
    font-style: italic;
}

.story-footer { padding: 32px 0; border-top: 1px solid var(--black-lighter); }
.story-tags { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 24px; }
.story-tags i { color: var(--gold); margin-left: 6px; }
.story-tag {
    padding: 5px 16px;
    background: var(--black-lighter);
    border-radius: 16px;
    font-size: 0.85rem;
    color: var(--white-dim);
    transition: var(--transition);
}
.story-tag:hover { background: var(--gold); color: var(--black); }

.story-share { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.share-btn {
    width: 42px; height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: white;
    font-size: 1.1rem;
    transition: var(--transition);
}
.share-btn:hover { transform: scale(1.1); }
.share-btn.telegram { background: #0088cc; }
.share-btn.whatsapp { background: #25d366; }
.share-btn.twitter { background: #1da1f2; }

.story-rating {
    text-align: center;
    padding: 24px;
    background: var(--black-card);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.04);
}
.story-rating h4 { margin-bottom: 12px; }
.star-rating { display: inline-flex; gap: 4px; }
.star { font-size: 1.6rem; color: var(--black-lighter); cursor: pointer; transition: var(--transition); }
.star.filled { color: var(--gold); }
.star.half { color: var(--gold-dim); }
.rating-number { margin-right: 10px; color: var(--silver); font-size: 0.9rem; }

.story-series {
    padding: 24px;
    background: var(--black-card);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.04);
    margin-bottom: 32px;
}
.story-series h3 { margin-bottom: 16px; color: var(--gold); }
.series-list { display: flex; flex-direction: column; gap: 8px; }
.series-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 18px;
    background: var(--black-lighter);
    border-radius: var(--radius);
    color: var(--white-dim);
    transition: var(--transition);
    text-decoration: none;
}
.series-item:hover, .series-item.current { background: var(--blood); color: var(--white); }
.series-number { font-weight: 800; color: var(--gold); min-width: 30px; }

.author-card-full {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 28px;
    background: var(--black-card);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.04);
    margin-bottom: 32px;
}
.author-avatar-large { width: 80px; height: 80px; border-radius: 50%; border: 3px solid var(--gold-border); }
.author-info h3 { margin-bottom: 6px; }
.author-info p { color: var(--white-muted); font-size: 0.92rem; margin-bottom: 12px; line-height: 1.7; }

/* ═══════════════════════════════════════════
   نظرات
   ═══════════════════════════════════════════ */
.comments-section { padding: 32px 0; }
.comments-title {
    font-size: 1.2rem;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.comment-form { margin-bottom: 32px; }
.comment-textarea {
    width: 100%;
    padding: 16px;
    background: var(--black-lighter);
    border: 1.5px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius);
    color: var(--white);
    font-family: var(--font);
    resize: vertical;
    min-height: 100px;
    margin-bottom: 12px;
    transition: var(--transition);
}
.comment-textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px var(--gold-bg);
}
.login-notice {
    color: var(--white-muted);
    text-align: center;
    padding: 24px;
    background: var(--black-card);
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.04);
}
.comments-list { display: flex; flex-direction: column; gap: 16px; }
.comment {
    padding: 20px;
    background: var(--black-card);
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.04);
}
.comment.reply {
    margin-right: 40px;
    border-right: 3px solid var(--gold);
}
.comment-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.comment-avatar { width: 40px; height: 40px; border-radius: 50%; }
.comment-avatar.small { width: 30px; height: 30px; }
.comment-author { font-weight: 600; font-size: 0.92rem; }
.comment-date { color: var(--white-muted); font-size: 0.8rem; }
.comment-body { color: var(--white-dim); line-height: 1.9; margin-bottom: 12px; }
.comment-actions { display: flex; gap: 16px; }
.comment-actions button {
    background: none;
    border: none;
    color: var(--white-muted);
    cursor: pointer;
    font-family: var(--font);
    font-size: 0.85rem;
    transition: var(--transition);
}
.comment-actions button:hover { color: var(--gold); }
.comment-replies { margin-top: 16px; border-top: 1px solid var(--black-lighter); padding-top: 16px; }
.no-comments { text-align: center; color: var(--white-muted); padding: 40px; }

/* ═══════════════════════════════════════════
   صفحه لیست
   ═══════════════════════════════════════════ */
.page-header { padding: 40px 0; text-align: center; }
.page-title { font-size: 2rem; font-weight: 900; margin-bottom: 8px; }
.page-description { color: var(--white-muted); font-size: 0.95rem; }
.stories-layout { display: grid; grid-template-columns: 1fr 300px; gap: 32px; }
.stories-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 16px 20px;
    background: var(--black-card);
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.04);
}
.filter-form select {
    padding: 9px 36px 9px 14px;
    background: var(--black-lighter);
    border: 1.5px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-sm);
    color: var(--white);
    font-family: var(--font);
    font-size: 0.88rem;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%237a756c' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 12px center;
}
.filter-form select:focus { outline: none; border-color: var(--gold); }
.view-btn {
    width: 36px; height: 36px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: none;
    color: var(--white-muted);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}
.view-btn.active, .view-btn:hover { background: var(--gold); color: var(--black); border-color: var(--gold); }

.stories-sidebar { position: sticky; top: 80px; align-self: start; }
.sidebar-widget {
    padding: 22px;
    background: var(--black-card);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.04);
    margin-bottom: 20px;
}
.sidebar-widget h3 { color: var(--gold); margin-bottom: 16px; font-size: 1rem; font-weight: 700; }
.sidebar-search { display: flex; }
.sidebar-search input {
    flex: 1;
    padding: 11px 14px;
    background: var(--black-lighter);
    border: 1.5px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    color: var(--white);
    font-family: var(--font);
    font-size: 0.88rem;
}
.sidebar-search input:focus { outline: none; border-color: var(--gold); }
.sidebar-search button {
    padding: 11px 16px;
    background: var(--gold);
    border: none;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--black);
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
}
.sidebar-search button:hover { background: var(--gold-light); }
.sidebar-categories { list-style: none; }
.sidebar-categories li { margin-bottom: 4px; }
.sidebar-categories a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: var(--white-dim);
    font-size: 0.88rem;
    transition: var(--transition);
    text-decoration: none;
}
.sidebar-categories a:hover, .sidebar-categories li.active a {
    background: var(--gold-bg);
    color: var(--gold);
}
.sidebar-categories span {
    margin-right: auto;
    font-size: 0.78rem;
    color: var(--white-muted);
    background: var(--black-lighter);
    padding: 2px 8px;
    border-radius: 10px;
}
.no-results { text-align: center; padding: 60px 0; color: var(--white-muted); }
.no-results h3 { margin: 16px 0; color: var(--white); }

/* ═══════════════════════════════════════════
   صفحه‌بندی
   ═══════════════════════════════════════════ */
.pagination { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 32px 0; }
.pagination-list { display: flex; gap: 6px; list-style: none; }
.pagination-link {
    padding: 9px 16px;
    background: var(--black-card);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: var(--radius-sm);
    color: var(--white-dim);
    font-size: 0.88rem;
    transition: var(--transition);
    text-decoration: none;
}
.pagination-link:hover, .pagination-link.active {
    background: var(--gold);
    color: var(--black);
    border-color: var(--gold);
}
.pagination-info { color: var(--white-muted); font-size: 0.82rem; }

/* ═══════════════════════════════════════════
   پیام‌ها و هشدارها
   ═══════════════════════════════════════════ */
.alert {
    padding: 14px 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.92rem;
    animation: slideDown 0.3s ease;
}
.alert-success { background: var(--success-bg); border: 1px solid rgba(45, 138, 78, 0.25); color: #2ecc71; }
.alert-error { background: var(--danger-bg); border: 1px solid rgba(192, 57, 43, 0.25); color: #e74c3c; }
.alert-warning { background: var(--warning-bg); border: 1px solid rgba(212, 160, 23, 0.25); color: #f39c12; }
.alert-info { background: var(--info-bg); border: 1px solid rgba(41, 128, 185, 0.25); color: #3498db; }

.flash-message {
    padding: 14px 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideDown 0.3s ease;
}
.flash-success { background: var(--success-bg); border: 1px solid rgba(45, 138, 78, 0.25); color: #2ecc71; }
.flash-error { background: var(--danger-bg); border: 1px solid rgba(192, 57, 43, 0.25); color: #e74c3c; }
.flash-close {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    margin-right: auto;
    font-size: 1.2rem;
    padding: 4px;
}

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

/* ═══════════════════════════════════════════
   صفحه احراز هویت
   ═══════════════════════════════════════════ */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
    background: radial-gradient(ellipse at center, rgba(122, 26, 26, 0.06) 0%, transparent 60%);
}
.auth-container { width: 100%; max-width: 440px; }
.auth-card {
    background: var(--black-card);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: var(--radius-xl);
    padding: 44px;
    box-shadow: var(--shadow-lg);
}
.auth-logo { text-align: center; margin-bottom: 28px; }
.auth-logo .logo-icon.large { font-size: 3.2rem; }
.auth-logo .logo-text {
    display: block;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--gold);
    margin-top: 8px;
}
.auth-title {
    text-align: center;
    margin-bottom: 28px;
    font-size: 1.3rem;
    font-weight: 700;
}
.auth-footer {
    text-align: center;
    margin-top: 24px;
    color: var(--white-muted);
    font-size: 0.9rem;
}

/* ═══════════════════════════════════════════
   Reading Progress
   ═══════════════════════════════════════════ */
.reading-progress {
    position: fixed;
    top: 0; right: 0; left: 0;
    height: 3px;
    background: var(--black-lighter);
    z-index: 9999;
}
.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--blood), var(--gold));
    transition: width 0.1s;
    border-radius: 0 3px 3px 0;
}

/* ═══════════════════════════════════════════
   لودینگ
   ═══════════════════════════════════════════ */
.loading-overlay {
    position: fixed; inset: 0;
    background: rgba(10,10,10,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}
.spinner {
    width: 48px; height: 48px;
    border: 3px solid var(--black-lighter);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ═══════════════════════════════════════════
   ریسپانسیو
   ═══════════════════════════════════════════ */
@media (max-width: 1024px) {
    .stories-layout { grid-template-columns: 1fr; }
    .stories-sidebar { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
    .slide-title { font-size: 2.2rem; }
}

@media (max-width: 768px) {
    .main-nav { display: none; }
    .mobile-menu-toggle { display: flex; }
    .main-nav.active {
        display: block;
        position: absolute;
        top: 100%; right: 0; left: 0;
        background: var(--black-card);
        border-bottom: 1px solid var(--black-lighter);
        padding: 12px;
        box-shadow: var(--shadow-lg);
    }
    .main-nav.active ul { flex-direction: column; }
    .main-nav.active .dropdown { position: static; box-shadow: none; }

    .hero-slider { height: 420px; }
    .slide-title { font-size: 1.6rem; }
    .slide-excerpt { display: none; }
    .slide-actions { flex-direction: column; }

    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .stat-number { font-size: 1.4rem; }

    .stories-grid { grid-template-columns: 1fr; }
    .categories-grid { grid-template-columns: repeat(2, 1fr); }
    .authors-grid { grid-template-columns: repeat(2, 1fr); }

    .newsletter-content { flex-direction: column; text-align: center; padding: 32px 24px; }
    .newsletter-form { max-width: 100%; }

    .footer-grid { grid-template-columns: 1fr; gap: 28px; }
    .footer-bottom { flex-direction: column; text-align: center; gap: 6px; }

    .story-title { font-size: 1.6rem; }
    .story-meta-bar { flex-direction: column; gap: 16px; }
    .story-info { flex-wrap: wrap; gap: 12px; }
    .story-toolbar { flex-wrap: wrap; }

    .stories-sidebar { grid-template-columns: 1fr; }
    .stories-toolbar { flex-wrap: wrap; gap: 10px; }

    .page-title { font-size: 1.6rem; }
}

/* ═══════════════════════════════════════════
    حالت روشن
    ═══════════════════════════════════════════ */
.light-mode {
    --black: #f8f6f1;
    --black-light: #f0ebe3;
    --black-lighter: #e5dfd5;
    --black-card: #ffffff;
    --white: #1a1a1a;
    --white-dim: #4a4a4a;
    --white-muted: #777777;
    --silver: #555555;
    --blood: #9a2a2a;
    --blood-light: #b83a3a;
    --gold: #8b6914;
    --gold-light: #a88020;
    --gold-dim: #6b5210;
    --gold-bg: rgba(139, 105, 20, 0.08);
    --gold-border: rgba(139, 105, 20, 0.25);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow: 0 4px 24px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.12);
    --shadow-glow: 0 0 30px rgba(139, 105, 20, 0.06);
}

.light-mode .site-header {
    background: rgba(248, 246, 241, 0.92);
    border-bottom-color: rgba(139, 105, 20, 0.1);
}
.light-mode .site-header::after { display: none; }
.light-mode a { color: var(--gold); }
.light-mode a:hover { color: var(--gold-light); }
.light-mode ::selection { background: var(--blood); color: #fff; }

.light-mode .site-footer { background: #f0ebe3; border-top-color: #e5dfd5; }
.light-mode .newsletter-section { background: #f0ebe3; }
.light-mode .site-stats { background: #f0ebe3; border-top-color: #e5dfd5; border-bottom-color: #e5dfd5; }

.light-mode body::before { display: none; }
.light-mode .dark-mode { background-image: none; }

/* ═══════════════════════════════════════════
    ریسپانسیو
    ═══════════════════════════════════════════ */
@media (max-width: 480px) {
    .container { padding: 0 16px; }
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .hero-slider { height: 360px; }
    .slide-content { padding: 20px 0; }
    .story-content { font-size: 1.05rem; }
    .auth-card { padding: 28px 20px; }
    .header-tools .btn-outline { display: none; }
    .user-menu span { display: none; }
}
