/* ============================================================
   AURORA.CSS – طراحی خلاقانه جدید
   پالت: Midnight + Aurora + Gold Radiance
   ============================================================ */

/* ============================================================
   ۱. متغیرهای جدید پالت – حالت روشن
   ============================================================ */
:root,
html[data-theme="light"] {
    /* ============ پس‌زمینه‌ها با تن رنگی ظریف ============ */
    --bg:            #fbfaf7;
    --bg-soft:       #ffffff;
    --bg-alt:        #f5f2ff; /* لمس بنفش ظریف */
    --bg-card:       #ffffff;
    --bg-elev:       #ffffff;
    --bg-tint:       #f8f6ff;

    /* ============ رنگ‌های برند ============ */
    --navy:          #0f1a3a;
    --navy-2:        #1a2b58;
    --navy-3:        #2a3f7a;
    --indigo:        #4f46e5;
    --indigo-2:      #6366f1;
    --purple:        #8b5cf6;
    --purple-2:      #a78bfa;

    /* ============ طلایی درخشان ============ */
    --gold:          #e0a82e;
    --gold-2:        #f5c542;
    --gold-3:        #fcd34d;
    --gold-soft:     rgba(245,197,66,.12);
    --gold-glow:     rgba(245,197,66,.4);
    --gold-deep:     #b8841a;

    /* ============ رنگ‌های مکمل ============ */
    --cyan:          #06b6d4;
    --cyan-soft:     rgba(6,182,212,.1);
    --mint:          #10b981;
    --mint-soft:     rgba(16,185,129,.1);
    --rose:          #f43f5e;
    --rose-soft:     rgba(244,63,94,.1);
    --peach:         #fb923c;

    /* ============ متن‌ها ============ */
    --text:          #0a0f1e;
    --text-soft:     #3a4459;
    --text-mute:     #7c8499;
    --text-inv:      #ffffff;

    /* ============ خطوط ============ */
    --border:        #ebe8f5;
    --border-soft:   #f5f3fa;
    --border-strong: #dcd6ea;

    /* ============ سایه‌های رنگی ============ */
    --shadow-xs:     0 1px 3px rgba(15,26,58,.04);
    --shadow-sm:     0 4px 16px rgba(15,26,58,.06);
    --shadow-md:     0 12px 32px rgba(15,26,58,.08);
    --shadow-lg:     0 24px 60px rgba(15,26,58,.12);
    --shadow-xl:     0 32px 80px rgba(15,26,58,.16);
    --shadow-gold:   0 12px 32px rgba(224,168,46,.25);
    --shadow-purple: 0 12px 32px rgba(139,92,246,.25);
    --shadow-cyan:   0 12px 32px rgba(6,182,212,.25);

    /* ============ گرادیان‌ها ============ */
    --grad-hero: linear-gradient(135deg,
        #0f1a3a 0%,
        #1a2b58 30%,
        #2a3f7a 60%,
        #4f46e5 100%);

    --grad-aurora:
        radial-gradient(ellipse 80% 50% at 20% 0%, rgba(109,74,255,.18), transparent 60%),
        radial-gradient(ellipse 60% 60% at 80% 20%, rgba(34,211,238,.12), transparent 60%),
        radial-gradient(ellipse 70% 50% at 50% 100%, rgba(245,197,66,.14), transparent 60%),
        radial-gradient(ellipse 50% 60% at 10% 80%, rgba(244,114,182,.10), transparent 60%);

    --grad-gold:  linear-gradient(135deg, #fcd34d 0%, #f5c542 40%, #e0a82e 70%, #b8841a 100%);
    --grad-purple: linear-gradient(135deg, #a78bfa, #8b5cf6, #6d4aff);
    --grad-cyan:  linear-gradient(135deg, #67e8f9, #22d3ee, #06b6d4);
    --grad-rose:  linear-gradient(135deg, #fda4af, #f472b6, #f43f5e);

    /* ============ Border-radius جدید ============ */
    --r-xs: 8px;
    --r-sm: 12px;
    --r:    20px;
    --r-lg: 28px;
    --r-xl: 40px;
    --r-pill: 999px;

    color-scheme: light;
}

/* ============================================================
   ۲. متغیرهای حالت تاریک
   ============================================================ */
html[data-theme="dark"] {
    --bg:            #050b18;
    --bg-soft:       #0a1226;
    --bg-alt:        #0d1730;
    --bg-card:       #0f1a35;
    --bg-elev:       #16234a;
    --bg-tint:       #0a1226;

    --navy:          #050b18;
    --navy-2:        #0a1226;
    --navy-3:        #1a2b58;
    --indigo:        #6366f1;
    --indigo-2:      #818cf8;
    --purple:        #a78bfa;
    --purple-2:      #c4b5fd;

    --gold:          #f5c542;
    --gold-2:        #fcd34d;
    --gold-3:        #fde68a;
    --gold-soft:     rgba(245,197,66,.14);
    --gold-glow:     rgba(245,197,66,.5);
    --gold-deep:     #b8841a;

    --cyan:          #22d3ee;
    --cyan-soft:     rgba(34,211,238,.14);
    --mint:          #34d399;
    --mint-soft:     rgba(52,211,153,.14);
    --rose:          #fb7185;
    --rose-soft:     rgba(251,113,133,.14);
    --peach:         #fb923c;

    --text:          #f0f4ff;
    --text-soft:     #b8c1dd;
    --text-mute:     #7c8aab;
    --text-inv:      #050b18;

    --border:        #1e2a4a;
    --border-soft:   #15203e;
    --border-strong: #2d3a60;

    --shadow-xs:     0 1px 3px rgba(0,0,0,.5);
    --shadow-sm:     0 4px 16px rgba(0,0,0,.5);
    --shadow-md:     0 12px 32px rgba(0,0,0,.6);
    --shadow-lg:     0 24px 60px rgba(0,0,0,.7);
    --shadow-xl:     0 32px 80px rgba(0,0,0,.8);
    --shadow-gold:   0 12px 40px rgba(245,197,66,.35);
    --shadow-purple: 0 12px 40px rgba(167,139,250,.35);
    --shadow-cyan:   0 12px 40px rgba(34,211,238,.35);

    --grad-hero: linear-gradient(135deg,
        #050b18 0%,
        #0a1226 30%,
        #1a2b58 70%,
        #4f46e5 100%);

    --grad-aurora:
        radial-gradient(ellipse 80% 50% at 20% 0%, rgba(109,74,255,.28), transparent 60%),
        radial-gradient(ellipse 60% 60% at 80% 20%, rgba(34,211,238,.18), transparent 60%),
        radial-gradient(ellipse 70% 50% at 50% 100%, rgba(245,197,66,.20), transparent 60%),
        radial-gradient(ellipse 50% 60% at 10% 80%, rgba(244,114,182,.15), transparent 60%);

    --grad-gold:   linear-gradient(135deg, #fde68a, #fcd34d, #f5c542, #e0a82e);
    --grad-purple: linear-gradient(135deg, #c4b5fd, #a78bfa, #8b5cf6);
    --grad-cyan:   linear-gradient(135deg, #a5f3fc, #67e8f9, #22d3ee);
    --grad-rose:   linear-gradient(135deg, #fecdd3, #fda4af, #fb7185);

    color-scheme: dark;
}

/* ============================================================
   ۳. پس‌زمینه Aurora متحرک برای کل سایت
   ============================================================ */
html {
    background: var(--bg);
    transition: background-color .5s cubic-bezier(.4,0,.2,1);
}

body {
    background: var(--bg);
    color: var(--text);
    position: relative;
    min-height: 100vh;
    overflow-x: hidden;
    transition: background-color .5s cubic-bezier(.4,0,.2,1),
                color .4s cubic-bezier(.4,0,.2,1);
}

/* لایه aurora پشت همه چیز */
body::before {
    content: '';
    position: fixed;
    inset: -10%;
    background: var(--grad-aurora);
    animation: auroraFlow 30s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
    opacity: .9;
}

@keyframes auroraFlow {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: .85;
    }
    33% {
        transform: translate(-3%, 2%) scale(1.05);
        opacity: 1;
    }
    66% {
        transform: translate(3%, -2%) scale(1.02);
        opacity: .9;
    }
}

body > * { position: relative; z-index: 1; }

/* ============================================================
   ۴. تایپوگرافی زیبا
   ============================================================ */
body {
    font-family: 'Vazirmatn', 'IRANSans', Tahoma, sans-serif;
    font-feature-settings: "ss01" on, "ss02" on, "ss03" on;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    letter-spacing: -.01em;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text);
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1.35;
}

h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); }

a {
    color: var(--gold);
    transition: color .25s cubic-bezier(.4,0,.2,1);
    text-decoration: none;
}

a:hover { color: var(--gold-2); }

/* ============================================================
   ۵. هدر Aurora با انیمیشن
   ============================================================ */
.hero {
    background:
        radial-gradient(ellipse 60% 50% at 50% 0%, rgba(109,74,255,.3), transparent 70%),
        radial-gradient(ellipse 50% 40% at 80% 40%, rgba(245,197,66,.2), transparent 70%),
        radial-gradient(ellipse 60% 50% at 20% 60%, rgba(34,211,238,.15), transparent 70%),
        linear-gradient(135deg, #0a1226 0%, #1a2b58 50%, #4f46e5 100%);
    position: relative;
    overflow: hidden;
    padding: 80px 0 100px;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(2px 2px at 15% 20%, rgba(255,255,255,1), transparent),
        radial-gradient(1px 1px at 60% 40%, rgba(255,255,255,.8), transparent),
        radial-gradient(2.5px 2.5px at 80% 15%, rgba(245,197,66,1), transparent),
        radial-gradient(1.5px 1.5px at 30% 70%, rgba(255,255,255,.9), transparent),
        radial-gradient(1px 1px at 90% 60%, rgba(245,197,66,.8), transparent),
        radial-gradient(2px 2px at 45% 85%, rgba(255,255,255,.9), transparent),
        radial-gradient(1.5px 1.5px at 5% 50%, rgba(255,255,255,.7), transparent),
        radial-gradient(2px 2px at 70% 30%, rgba(34,211,238,.9), transparent);
    background-size: 600px 600px;
    animation: starDrift 120s linear infinite, starTwinkle 5s ease-in-out infinite;
    pointer-events: none;
}

@keyframes starDrift {
    to { background-position: 600px 600px; }
}

@keyframes starTwinkle {
    0%, 100% { filter: brightness(1) drop-shadow(0 0 4px rgba(255,255,255,.6)); }
    50%      { filter: brightness(1.4) drop-shadow(0 0 12px rgba(245,197,66,.8)); }
}

/* عنوان با گرادیان زیبا */
.hero-title {
    background: linear-gradient(120deg,
        #ffffff 0%,
        #fcd34d 25%,
        #f5c542 50%,
        #a78bfa 75%,
        #ffffff 100%);
    background-size: 300% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: titleGradient 8s ease-in-out infinite;
    filter: drop-shadow(0 6px 30px rgba(245,197,66,.5));
}

@keyframes titleGradient {
    0%, 100% { background-position: 0% center; }
    50%      { background-position: 300% center; }
}

/* کتاب شناور با درخشش */
.book-cover {
    background: linear-gradient(150deg,
        #1a2b58 0%,
        #0a1226 40%,
        #050b18 100%);
    border: 2px solid transparent;
    background-clip: padding-box;
    position: relative;
    box-shadow:
        -20px 20px 80px rgba(0,0,0,.8),
        inset 0 0 100px rgba(245,197,66,.2),
        0 0 120px rgba(245,197,66,.4),
        0 0 60px rgba(109,74,255,.35);
    animation: bookGlow 5s ease-in-out infinite, bookFloat 7s ease-in-out infinite;
}

.book-cover::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    padding: 2px;
    background: linear-gradient(135deg,
        #fcd34d,
        #a78bfa,
        #22d3ee,
        #fcd34d);
    background-size: 300% 300%;
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: borderFlow 6s linear infinite;
    pointer-events: none;
}

@keyframes borderFlow {
    0%, 100% { background-position: 0% 50%; }
    50%      { background-position: 100% 50%; }
}

@keyframes bookGlow {
    0%, 100% {
        box-shadow:
            -20px 20px 80px rgba(0,0,0,.8),
            inset 0 0 100px rgba(245,197,66,.2),
            0 0 120px rgba(245,197,66,.4),
            0 0 60px rgba(109,74,255,.35);
    }
    50% {
        box-shadow:
            -20px 20px 80px rgba(0,0,0,.8),
            inset 0 0 120px rgba(245,197,66,.3),
            0 0 160px rgba(245,197,66,.6),
            0 0 80px rgba(109,74,255,.5);
    }
}

@keyframes bookFloat {
    0%, 100% { transform: translateY(0) rotate(-2deg); }
    50%      { transform: translateY(-16px) rotate(2deg); }
}

/* ============================================================
   ۶. نوار آمار با Glassmorphism
   ============================================================ */
.stats-bar {
    background: rgba(255,255,255,.75);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255,255,255,.4);
    border-radius: var(--r-xl);
    box-shadow:
        0 24px 60px rgba(15,26,58,.14),
        inset 0 1px 0 rgba(255,255,255,.9);
    position: relative;
    overflow: hidden;
}

html[data-theme="dark"] .stats-bar {
    background: rgba(15,26,53,.75);
    border-color: rgba(255,255,255,.08);
    box-shadow:
        0 24px 60px rgba(0,0,0,.7),
        inset 0 1px 0 rgba(255,255,255,.08);
}

.stats-bar::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg,
        transparent,
        rgba(245,197,66,.2),
        transparent);
    animation: statsSheen 8s ease-in-out infinite;
    pointer-events: none;
}

@keyframes statsSheen {
    0%, 100% { left: -100%; }
    50%      { left: 100%; }
}

/* اعداد با گرادیان */
.stat-num {
    background: var(--grad-gold);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 900;
    font-size: 2.5rem;
    filter: drop-shadow(0 4px 12px rgba(245,197,66,.3));
    transition: transform .35s cubic-bezier(.2,.9,.3,1.4);
}

.stat:hover .stat-num {
    transform: scale(1.15);
}

/* آیکون‌های رنگی */
.stat-icon {
    background: var(--grad-gold) !important;
    color: #fff !important;
    box-shadow:
        0 10px 24px rgba(245,197,66,.4),
        inset 0 2px 0 rgba(255,255,255,.4) !important;
    transition: transform .4s cubic-bezier(.2,.9,.3,1.5);
}

.stat:hover .stat-icon {
    transform: scale(1.12) rotate(-8deg);
}

/* ============================================================
   ۷. کارت‌های Modern با Glass Effect
   ============================================================ */
.miracle-card,
.latest-card,
.article-card,
.topic-card,
.service-card,
.team-card,
.info-card,
.video-item,
.bookmark-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    position: relative;
    transition: all .5s cubic-bezier(.2,.9,.3,1.2);
}

/* نوار نور بالای کارت */
.miracle-card::before,
.latest-card::before,
.article-card::before,
.topic-card::before,
.service-card::before,
.info-card::before {
    content: '';
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: linear-gradient(90deg,
        transparent,
        var(--gold-2),
        var(--purple),
        var(--cyan),
        var(--gold-2),
        transparent);
    transition: width .6s cubic-bezier(.2,.9,.3,1.2);
    border-radius: 0 0 4px 4px;
    z-index: 3;
}

.miracle-card:hover::before,
.latest-card:hover::before,
.article-card:hover::before,
.topic-card:hover::before,
.service-card:hover::before,
.info-card:hover::before {
    width: 80%;
}

/* درخشش زیر کارت هنگام hover */
.miracle-card::after,
.latest-card::after,
.article-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
        rgba(245,197,66,.06),
        transparent 50%,
        rgba(109,74,255,.06));
    opacity: 0;
    transition: opacity .5s;
    pointer-events: none;
    border-radius: inherit;
}

.miracle-card:hover::after,
.latest-card:hover::after,
.article-card:hover::after {
    opacity: 1;
}

/* Hover state */
.miracle-card:hover,
.latest-card:hover,
.article-card:hover {
    transform: translateY(-10px) scale(1.015);
    border-color: transparent;
    background:
        linear-gradient(var(--bg-card), var(--bg-card)) padding-box,
        linear-gradient(135deg,
            var(--gold-2),
            var(--purple),
            var(--cyan),
            var(--gold-2)) border-box;
    background-size: 100% 100%, 300% 300%;
    animation: cardBorderFlow 4s linear infinite;
    box-shadow:
        0 32px 80px rgba(224,168,46,.2),
        0 24px 60px rgba(109,74,255,.15),
        0 0 0 1px rgba(245,197,66,.3);
}

@keyframes cardBorderFlow {
    0%, 100% { background-position: 0% 50%, 0% 50%; }
    50%      { background-position: 0% 50%, 100% 50%; }
}

/* ============================================================
   ۸. تصاویر با Overlay زیبا
   ============================================================ */
.latest-img,
.article-img,
.miracle-card img {
    position: relative;
    overflow: hidden;
}

.latest-img::after,
.article-img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
        transparent 50%,
        rgba(10,18,38,.6) 100%);
    opacity: 0;
    transition: opacity .5s;
    pointer-events: none;
}

.latest-card:hover .latest-img::after,
.article-card:hover .article-img::after {
    opacity: 1;
}

.latest-img img,
.article-img img {
    transition: transform 1s cubic-bezier(.2,.8,.3,1), filter .6s;
    filter: saturate(1.08) contrast(1.03);
}

.latest-card:hover .latest-img img,
.article-card:hover .article-img img {
    transform: scale(1.15) rotate(1deg);
    filter: saturate(1.25) contrast(1.08) brightness(1.05);
}

/* ============================================================
   ۹. بج‌ها و برچسب‌ها
   ============================================================ */
.latest-badge,
.article-cat {
    background: var(--grad-gold);
    color: #fff;
    padding: 6px 16px;
    border-radius: var(--r-pill);
    font-size: .75rem;
    font-weight: 800;
    box-shadow:
        0 8px 24px rgba(245,197,66,.5),
        inset 0 1px 0 rgba(255,255,255,.5);
    text-shadow: 0 1px 2px rgba(140,95,10,.3);
    position: relative;
    overflow: hidden;
}

.latest-badge::after,
.article-cat::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg,
        transparent,
        rgba(255,255,255,.6),
        transparent);
    animation: badgeShine 3s ease-in-out infinite;
}

@keyframes badgeShine {
    0%, 100% { left: -100%; }
    50%      { left: 100%; }
}

/* ============================================================
   ۱۰. دکمه‌های درخشان جدید
   ============================================================ */
.btn-gold,
.btn-primary {
    background: var(--grad-gold);
    background-size: 200% 200%;
    color: #fff;
    padding: 15px 34px;
    border-radius: var(--r-pill);
    font-weight: 800;
    box-shadow:
        0 12px 32px rgba(245,197,66,.45),
        inset 0 2px 0 rgba(255,255,255,.5),
        inset 0 -2px 0 rgba(0,0,0,.1);
    text-shadow: 0 2px 4px rgba(140,95,10,.4);
    position: relative;
    overflow: hidden;
    transition: all .4s cubic-bezier(.2,.9,.3,1.2);
}

.btn-gold::before,
.btn-primary::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(120deg,
        transparent,
        rgba(255,255,255,.6),
        transparent);
    transition: left .8s cubic-bezier(.4,0,.2,1);
}

.btn-gold:hover::before,
.btn-primary:hover::before {
    left: 100%;
}

.btn-gold:hover,
.btn-primary:hover {
    background-position: 100% 100%;
    transform: translateY(-4px) scale(1.03);
    box-shadow:
        0 20px 48px rgba(245,197,66,.55),
        0 0 40px rgba(245,197,66,.4),
        inset 0 2px 0 rgba(255,255,255,.6);
    color: #fff;
}

/* دکمه outline جدید */
.btn-outline {
    background: rgba(255,255,255,.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1.5px solid rgba(245,197,66,.5);
    color: var(--gold);
    padding: 13px 30px;
    border-radius: var(--r-pill);
    font-weight: 700;
    transition: all .4s;
}

.btn-outline:hover {
    background: var(--gold-soft);
    border-color: var(--gold);
    color: var(--gold-2);
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 32px rgba(245,197,66,.3);
}

/* ============================================================
   ۱۱. سیارات با گرادیان‌های شگفت‌انگیز
   ============================================================ */
.planet {
    box-shadow:
        inset -10px -10px 24px rgba(0,0,0,.5),
        0 8px 24px rgba(0,0,0,.4),
        0 0 40px rgba(245,197,66,.4) !important;
    animation: planetRotate 10s linear infinite, planetFloat 5s ease-in-out infinite;
    position: relative;
}

.planet::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle at 30% 30%,
        rgba(255,255,255,.6),
        transparent 60%);
    pointer-events: none;
}

.planet-0 {
    background: radial-gradient(circle at 30% 30%,
        #fcd34d, #f59e0b, #92400e) !important;
    box-shadow: 0 0 40px rgba(252,211,77,.6),
        inset -10px -10px 24px rgba(0,0,0,.5) !important;
}

.planet-1 {
    background: radial-gradient(circle at 30% 30%,
        #67e8f9, #06b6d4, #0e7490) !important;
    box-shadow: 0 0 40px rgba(34,211,238,.6),
        inset -10px -10px 24px rgba(0,0,0,.5) !important;
}

.planet-2 {
    background: radial-gradient(circle at 30% 30%,
        #86efac, #10b981, #047857) !important;
    box-shadow: 0 0 40px rgba(16,185,129,.6),
        inset -10px -10px 24px rgba(0,0,0,.5) !important;
}

.planet-3 {
    background: radial-gradient(circle at 30% 30%,
        #fde68a, #fbbf24, #d97706) !important;
    box-shadow: 0 0 40px rgba(251,191,36,.6),
        inset -10px -10px 24px rgba(0,0,0,.5) !important;
}

.planet-4 {
    background: radial-gradient(circle at 30% 30%,
        #c4b5fd, #8b5cf6, #6d28d9) !important;
    box-shadow: 0 0 40px rgba(139,92,246,.6),
        inset -10px -10px 24px rgba(0,0,0,.5) !important;
}

.planet-5 {
    background: radial-gradient(circle at 30% 30%,
        #fda4af, #f43f5e, #be123c) !important;
    box-shadow: 0 0 40px rgba(244,63,94,.6),
        inset -10px -10px 24px rgba(0,0,0,.5) !important;
}

@keyframes planetRotate {
    to { transform: rotate(360deg); }
}

@keyframes planetFloat {
    0%, 100% { translate: 0 0; }
    50%      { translate: 0 -6px; }
}

.topic-card:hover .planet {
    transform: scale(1.2) rotate(20deg);
    filter: brightness(1.2);
}

/* ============================================================
   ۱۲. نوار جستجو زیبا
   ============================================================ */
.search-form {
    background: rgba(255,255,255,.1);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1.5px solid rgba(245,197,66,.2);
    border-radius: var(--r-pill);
    padding: 4px;
    display: inline-flex;
    align-items: center;
    transition: all .4s cubic-bezier(.2,.9,.3,1.2);
}

.search-form:focus-within {
    background: rgba(255,255,255,.15);
    border-color: var(--gold);
    box-shadow: 0 0 0 4px rgba(245,197,66,.15),
        0 12px 32px rgba(245,197,66,.2);
    transform: scale(1.02);
}

.search-form input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text);
    padding: 8px 16px;
    font-family: inherit;
    font-size: .9rem;
}

.search-form input::placeholder {
    color: var(--text-mute);
}

.search-form button {
    background: var(--grad-gold);
    color: #fff;
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 16px rgba(245,197,66,.4);
    transition: all .3s cubic-bezier(.2,.9,.3,1.4);
}

.search-form button:hover {
    transform: scale(1.1) rotate(-10deg);
    box-shadow: 0 8px 24px rgba(245,197,66,.6);
}

/* ============================================================
   ۱۳. تب‌ها و فیلترها
   ============================================================ */
.filter-chip {
    background: rgba(255,255,255,.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    color: var(--text-soft);
    padding: 8px 18px;
    border-radius: var(--r-pill);
    font-size: .85rem;
    font-weight: 700;
    transition: all .35s cubic-bezier(.2,.9,.3,1.3);
}

.filter-chip:hover {
    transform: translateY(-2px);
    border-color: var(--gold);
    color: var(--gold);
    background: var(--gold-soft);
}

.filter-chip.active {
    background: var(--grad-gold);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 8px 24px rgba(245,197,66,.4);
    text-shadow: 0 1px 2px rgba(140,95,10,.3);
}

/* ============================================================
   ۱۴. صفحه معجزه – Hero خاص
   ============================================================ */
.miracle-single {
    background: rgba(255,255,255,.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

html[data-theme="dark"] .miracle-single {
    background: rgba(15,26,53,.7);
}

.miracle-single::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg,
        var(--gold),
        var(--purple),
        var(--cyan),
        var(--rose),
        var(--gold));
    background-size: 300% 100%;
    animation: borderFlow 6s linear infinite;
    border-radius: var(--r-xl) var(--r-xl) 0 0;
}

.page-title {
    background: linear-gradient(135deg,
        var(--text),
        var(--gold-deep),
        var(--purple));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    border-bottom: 3px solid var(--gold);
    padding-bottom: 15px;
    font-weight: 900;
}

/* گالری با hover زیبا */
.gallery-item img {
    border-radius: var(--r-sm);
    transition: all .5s cubic-bezier(.2,.9,.3,1.2);
    box-shadow: var(--shadow-sm);
}

.gallery-item:hover img {
    transform: scale(1.05) rotate(-2deg);
    box-shadow:
        0 12px 32px rgba(245,197,66,.35),
        0 0 0 2px var(--gold);
}

/* ============================================================
   ۱۵. امتیازدهی با ستاره‌های درخشان
   ============================================================ */
.rating-stars button {
    font-size: 2rem !important;
    color: var(--border-strong) !important;
    transition: all .3s cubic-bezier(.2,.9,.3,1.4) !important;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,.1));
}

.rating-stars button.filled,
.rating-stars button.half {
    color: var(--gold-2) !important;
    filter: drop-shadow(0 4px 12px rgba(245,197,66,.6));
    animation: starPulse 2s ease-in-out infinite;
}

@keyframes starPulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.05); }
}

.rating-stars button:not(:disabled):hover {
    color: var(--gold) !important;
    transform: scale(1.3) rotate(-15deg) !important;
    filter: drop-shadow(0 6px 20px rgba(245,197,66,.8));
}

/* ============================================================
   ۱۶. فوتر با گرادیان زیبا
   ============================================================ */
.site-footer-rich {
    background:
        radial-gradient(ellipse 60% 50% at 50% 0%, rgba(109,74,255,.15), transparent 70%),
        radial-gradient(ellipse 50% 60% at 80% 100%, rgba(245,197,66,.12), transparent 70%),
        linear-gradient(180deg, var(--bg-soft), var(--bg));
    border-top: 4px solid transparent;
    border-image: linear-gradient(90deg,
        var(--gold),
        var(--purple),
        var(--cyan),
        var(--gold)) 1;
    position: relative;
}

.footer-col h4 {
    color: var(--text);
    position: relative;
    padding-bottom: 14px;
    font-weight: 800;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0; right: 0;
    width: 40px;
    height: 3px;
    background: var(--grad-gold);
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(245,197,66,.4);
}

.footer-col a {
    color: var(--text-soft);
    transition: all .25s cubic-bezier(.4,0,.2,1);
    position: relative;
    padding-right: 0;
}

.footer-col a::before {
    content: '←';
    position: absolute;
    right: -20px;
    opacity: 0;
    transition: all .25s;
    color: var(--gold);
    font-weight: 700;
}

.footer-col a:hover {
    color: var(--gold);
    padding-right: 20px;
}

.footer-col a:hover::before {
    right: 0;
    opacity: 1;
}

/* ============================================================
   ۱۷. اسکرول‌بار زیبا
   ============================================================ */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: var(--bg-alt);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--grad-gold);
    border-radius: 10px;
    border: 2px solid var(--bg-alt);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--gold-2), var(--gold-deep));
}

/* ============================================================
   ۱۸. انتخاب متن
   ============================================================ */
::selection {
    background: var(--gold-2);
    color: var(--navy);
}

::-moz-selection {
    background: var(--gold-2);
    color: var(--navy);
}

/* ============================================================
   ۱۹. Focus با درخشش
   ============================================================ */
*:focus-visible {
    outline: 3px solid var(--gold-2);
    outline-offset: 4px;
    border-radius: 6px;
    box-shadow: 0 0 0 6px rgba(245,197,66,.2);
}

/* ============================================================
   ۲۰. Toast با گرادیان
   ============================================================ */
.qt-toast {
    background: linear-gradient(135deg,
        var(--bg-card) 0%,
        var(--bg-tint) 100%);
    border: 1px solid var(--border);
    border-right: 5px solid var(--gold);
    border-radius: var(--r);
    padding: 16px 26px;
    box-shadow:
        0 20px 60px rgba(0,0,0,.15),
        0 0 0 1px rgba(245,197,66,.15),
        inset 0 1px 0 rgba(255,255,255,.5);
    font-weight: 700;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.qt-toast-success {
    border-right-color: var(--mint);
    background: linear-gradient(135deg,
        rgba(16,185,129,.08),
        var(--bg-card));
}

.qt-toast-error {
    border-right-color: var(--rose);
    background: linear-gradient(135deg,
        rgba(244,63,94,.08),
        var(--bg-card));
}

/* ============================================================
   ۲۱. بخش‌های ویژه صفحه اصلی
   ============================================================ */
.section-title-right.with-line::before {
    background: var(--grad-gold);
    box-shadow: 0 0 24px rgba(245,197,66,.6);
    width: 6px;
    border-radius: 3px;
}

.section-title-center::after {
    background: var(--grad-gold);
    box-shadow: 0 0 20px rgba(245,197,66,.5);
    height: 4px;
}

/* Icon badge چرخان */
.icon-badge {
    background: var(--grad-gold) !important;
    box-shadow:
        0 10px 28px rgba(245,197,66,.5),
        inset 0 2px 0 rgba(255,255,255,.5) !important;
    transition: transform .6s cubic-bezier(.2,.9,.3,1.5);
}

.icon-badge:hover {
    transform: rotate(360deg) scale(1.2);
}

/* Diagram sun */
.sun-core {
    filter: drop-shadow(0 0 20px rgba(245,197,66,.8));
}

.sun-center {
    animation: sunGlow 4s ease-in-out infinite;
}

@keyframes sunGlow {
    0%, 100% {
        box-shadow: 0 0 60px rgba(245,197,66,.6),
            inset 0 -8px 24px rgba(0,0,0,.2);
    }
    50% {
        box-shadow: 0 0 100px rgba(245,197,66,.9),
            0 0 40px rgba(255,200,80,.6),
            inset 0 -8px 24px rgba(0,0,0,.2);
    }
}

/* ============================================================
   ۲۲. هدر پنل مدیریت
   ============================================================ */
.panel-hero {
    background:
        radial-gradient(ellipse 60% 50% at 50% 0%, rgba(109,74,255,.3), transparent 70%),
        radial-gradient(ellipse 50% 40% at 80% 40%, rgba(245,197,66,.25), transparent 70%),
        linear-gradient(135deg, #0a1226 0%, #1a2b58 60%, #4f46e5 100%);
    position: relative;
    overflow: hidden;
}

.panel-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(2px 2px at 20% 30%, rgba(255,255,255,.9), transparent),
        radial-gradient(1px 1px at 70% 20%, rgba(245,197,66,.9), transparent),
        radial-gradient(1px 1px at 40% 80%, rgba(255,255,255,.8), transparent),
        radial-gradient(2px 2px at 85% 70%, rgba(34,211,238,.9), transparent);
    background-size: 350px 350px;
    animation: starDrift 90s linear infinite;
}

.panel-hero-icon {
    background: var(--grad-gold) !important;
    box-shadow:
        0 20px 60px rgba(245,197,66,.5),
        inset 0 2px 0 rgba(255,255,255,.4),
        0 0 80px rgba(245,197,66,.3) !important;
    animation: panelIconPulse 3s ease-in-out infinite;
}

@keyframes panelIconPulse {
    0%, 100% { transform: translateY(0) rotate(-3deg) scale(1); }
    50%      { transform: translateY(-8px) rotate(3deg) scale(1.05); }
}

/* ============================================================
   ۲۳. منوی موبایل با تم جدید
   ============================================================ */
.qt-mobile-menu {
    background:
        radial-gradient(ellipse 80% 60% at 100% 0%, rgba(109,74,255,.15), transparent 60%),
        radial-gradient(ellipse 60% 40% at 0% 100%, rgba(245,197,66,.1), transparent 60%),
        var(--bg-card) !important;
}

.qt-mobile-header {
    background: linear-gradient(135deg,
        rgba(245,197,66,.15),
        rgba(109,74,255,.1),
        transparent) !important;
    border-bottom: 1px solid var(--border) !important;
}

.qt-mobile-nav a {
    position: relative;
    overflow: hidden;
    border-radius: var(--r-sm) !important;
}

.qt-mobile-nav a::before {
    content: '';
    position: absolute;
    top: 50%; right: -50%;
    width: 0; height: 0;
    background: radial-gradient(circle,
        rgba(245,197,66,.2),
        transparent 70%);
    transform: translate(50%, -50%);
    transition: width .5s, height .5s;
    border-radius: 50%;
    z-index: -1;
}

.qt-mobile-nav a:hover::before,
.qt-mobile-nav a:active::before {
    width: 400px;
    height: 400px;
}

.qt-mobile-nav a:hover {
    background: transparent !important;
    color: var(--gold) !important;
}

/* ============================================================
   ۲۴. حباب‌های شناور تزئینی
   ============================================================ */
.aurora-bubble {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
    opacity: .5;
    animation: bubbleFloat 20s ease-in-out infinite;
}

.aurora-bubble-1 {
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(109,74,255,.4), transparent 70%);
    top: 10%; left: -100px;
    animation-delay: 0s;
}

.aurora-bubble-2 {
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(245,197,66,.3), transparent 70%);
    bottom: 10%; right: -150px;
    animation-delay: 5s;
}

.aurora-bubble-3 {
    width: 350px; height: 350px;
    background: radial-gradient(circle, rgba(34,211,238,.3), transparent 70%);
    top: 50%; right: 30%;
    animation-delay: 10s;
}

@keyframes bubbleFloat {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: .5; }
    33%      { transform: translate(30px, -30px) scale(1.1); opacity: .7; }
    66%      { transform: translate(-30px, 20px) scale(.95); opacity: .6; }
}

/* ============================================================
   ۲۵. ریسپانسیو
   ============================================================ */
@media (max-width: 900px) {
    .hero { padding: 60px 0 80px; }
    .stats-bar { border-radius: var(--r-lg); }
    .miracle-single { border-radius: var(--r-lg); padding: 24px; }
}

@media (max-width: 600px) {
    .stat-num { font-size: 2rem; }
    .hero-title { font-size: 2.2rem; }
    .card,
    .miracle-card,
    .latest-card,
    .article-card {
        border-radius: var(--r);
    }
    body::before { inset: -20%; }
}

/* ============================================================
   ۲۶. پشتیبانی از کاهش حرکت
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
    body::before { animation: none; }
}
/* ============================================================
   RTL / LTR — تنظیمات کامل چیدمان
   ============================================================ */

/* ---------- هیرو: متن سمت راست، کتاب سمت چپ (در RTL) ---------- */
.hero-grid {
    display: grid !important;
    grid-template-columns: 1.1fr 1fr !important;
    gap: 40px !important;
    align-items: center !important;
}

/* در RTL: متن راست‌چین، دکمه‌ها از راست شروع */
html[dir="rtl"] .hero-text {
    text-align: right !important;
    direction: rtl !important;
}

html[dir="rtl"] .hero-actions {
    justify-content: flex-start !important;
    direction: rtl !important;
}

html[dir="rtl"] .hero-desc {
    margin-right: 0 !important;
    margin-left: auto !important;
}

/* در LTR: متن چپ‌چین، دکمه‌ها از چپ شروع */
html[dir="ltr"] .hero-text {
    text-align: left !important;
    direction: ltr !important;
}

html[dir="ltr"] .hero-actions {
    justify-content: flex-start !important;
    direction: ltr !important;
}

html[dir="ltr"] .hero-desc {
    margin-left: 0 !important;
    margin-right: auto !important;
}

/* ---------- نوار آمار: هماهنگ با RTL/LTR ---------- */
.stats-bar {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 20px !important;
}

html[dir="rtl"] .stats-bar { direction: rtl !important; }
html[dir="ltr"] .stats-bar { direction: ltr !important; }

/* حذف border-left در اولین آیتم در RTL و برعکس */
html[dir="rtl"] .stat:first-child { border-left: none !important; border-right: none !important; }
html[dir="ltr"] .stat:first-child { border-left: none !important; border-right: none !important; }

html[dir="rtl"] .stat { border-left: 1px solid var(--border) !important; border-right: none !important; }
html[dir="rtl"] .stat:last-child { border-left: none !important; }

html[dir="ltr"] .stat { border-right: 1px solid var(--border) !important; border-left: none !important; }
html[dir="ltr"] .stat:last-child { border-right: none !important; }

/* ---------- فوتر: چیدمان راست‌چین / چپ‌چین ---------- */
html[dir="rtl"] .footer-grid {
    direction: rtl !important;
    text-align: right !important;
}

html[dir="ltr"] .footer-grid {
    direction: ltr !important;
    text-align: left !important;
}

html[dir="rtl"] .footer-col h4 { text-align: right !important; }
html[dir="ltr"] .footer-col h4 { text-align: left !important; }

html[dir="rtl"] .footer-col ul { text-align: right !important; padding-right: 0 !important; }
html[dir="ltr"] .footer-col ul { text-align: left !important; padding-left: 0 !important; }

/* خط زیر عنوان در RTL از راست */
html[dir="rtl"] .footer-col h4::after {
    right: 0 !important;
    left: auto !important;
}

/* خط زیر عنوان در LTR از چپ */
html[dir="ltr"] .footer-col h4::after {
    left: 0 !important;
    right: auto !important;
}

/* اطلاعات تماس */
html[dir="rtl"] .footer-contact-row { direction: rtl !important; }
html[dir="ltr"] .footer-contact-row { direction: ltr !important; }

/* ---------- بردکرامب ---------- */
html[dir="rtl"] .breadcrumb { direction: rtl !important; }
html[dir="ltr"] .breadcrumb { direction: ltr !important; }

/* ---------- منوی هیرو ---------- */
html[dir="rtl"] .hero-nav { direction: rtl !important; }
html[dir="ltr"] .hero-nav { direction: ltr !important; }

/* ---------- سکشن‌ها: title-right در RTL از راست، در LTR از چپ ---------- */
html[dir="rtl"] .section-title-right {
    direction: rtl !important;
    padding-right: 22px !important;
    padding-left: 0 !important;
    border-right: 5px solid var(--gold) !important;
    border-left: none !important;
}

html[dir="ltr"] .section-title-right {
    direction: ltr !important;
    padding-left: 22px !important;
    padding-right: 0 !important;
    border-left: 5px solid var(--gold) !important;
    border-right: none !important;
}

/* ---------- موبایل ---------- */
@media (max-width: 900px) {
    .hero-grid {
        grid-template-columns: 1fr !important;
        gap: 25px !important;
    }

    /* ویژوال در موبایل بالای متن می‌آید */
    .hero-visual {
        order: -1 !important;
        height: 320px !important;
    }

    .hero-text {
        text-align: center !important;
    }

    html[dir="rtl"] .hero-text,
    html[dir="ltr"] .hero-text {
        text-align: center !important;
    }

    .hero-actions {
        justify-content: center !important;
    }

    html[dir="rtl"] .hero-actions,
    html[dir="ltr"] .hero-actions {
        justify-content: center !important;
    }

    .hero-desc {
        margin-left: auto !important;
        margin-right: auto !important;
    }

    .stats-bar {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    html[dir="rtl"] .stat:nth-child(2),
    html[dir="ltr"] .stat:nth-child(2) {
        border-left: none !important;
        border-right: none !important;
    }
}

@media (max-width: 600px) {
    .stats-bar {
        grid-template-columns: 1fr !important;
    }

    .stat {
        border-left: none !important;
        border-right: none !important;
        border-bottom: 1px solid var(--border) !important;
        padding: 14px 0 !important;
    }

    .stat:last-child { border-bottom: none !important; }

    html[dir="rtl"] .section-title-right,
    html[dir="ltr"] .section-title-right {
        border-right: none !important;
        border-left: none !important;
        padding-right: 0 !important;
        padding-left: 0 !important;
        border-bottom: 3px solid var(--gold) !important;
        padding-bottom: 8px !important;
    }
}
/* ============================================================
   UI ENHANCEMENT — تم، ورود/ثبت‌نام، انیمیشن کتاب
   ============================================================ */

/* ============================================================
   ۱. منوی تم زیبا (Theme Toggle)
   ============================================================ */
.qt-theme-menu {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin: 0 4px;
}

.qt-theme-trigger {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: linear-gradient(135deg, rgba(240,201,80,.12), rgba(240,201,80,.06));
    border: 1.5px solid rgba(240,201,80,.25);
    border-radius: 30px;
    color: var(--gold-deep, #b8841a);
    font-family: inherit;
    font-weight: 700;
    font-size: .82rem;
    cursor: pointer;
    transition: all .35s cubic-bezier(.2,.9,.3,1.3);
    overflow: hidden;
}

.qt-theme-trigger::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.4) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform .8s;
}

.qt-theme-trigger:hover::before {
    transform: translateX(100%);
}

.qt-theme-trigger:hover {
    background: linear-gradient(135deg, rgba(240,201,80,.25), rgba(240,201,80,.15));
    border-color: #f0c950;
    color: #b8841a;
    transform: translateY(-2px);
    box-shadow:
        0 8px 20px rgba(240,201,80,.3),
        inset 0 1px 0 rgba(255,255,255,.5);
}

.qt-theme-trigger-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    font-size: 1rem;
    transition: transform .5s cubic-bezier(.2,.9,.3,1.4);
    filter: drop-shadow(0 2px 4px rgba(240,201,80,.4));
}

.qt-theme-trigger:hover .qt-theme-trigger-icon {
    transform: rotate(360deg) scale(1.15);
}

.qt-theme-trigger-label {
    display: inline-block;
    line-height: 1;
}

.qt-theme-caret {
    font-size: .7rem;
    opacity: .7;
    transition: transform .3s;
}

.qt-theme-menu.open .qt-theme-caret {
    transform: rotate(180deg);
}

/* منوی کشویی تم */
.qt-theme-panel {
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%) translateY(-10px) scale(.95);
    min-width: 260px;
    background: var(--bg-card, #fff);
    border: 1px solid var(--border, #e8eef5);
    border-radius: 18px;
    padding: 12px;
    box-shadow:
        0 24px 60px rgba(0,0,0,.18),
        0 0 0 1px rgba(240,201,80,.08);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all .35s cubic-bezier(.2,.9,.3,1.3);
    z-index: 9999;
}

.qt-theme-menu.open .qt-theme-panel {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0) scale(1);
}

.qt-theme-panel::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 12px;
    height: 12px;
    background: var(--bg-card, #fff);
    border-top: 1px solid var(--border, #e8eef5);
    border-left: 1px solid var(--border, #e8eef5);
}

.qt-theme-panel-title {
    font-size: .75rem;
    color: var(--text-mute, #888);
    text-align: center;
    margin: 0 0 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border, #e8eef5);
    font-weight: 700;
    letter-spacing: .5px;
}

.qt-theme-options {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 6px;
}

.qt-theme-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 14px 8px;
    background: transparent;
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    font-family: inherit;
    font-size: .72rem;
    font-weight: 700;
    color: var(--text-soft, #475569);
    transition: all .3s cubic-bezier(.2,.9,.3,1.3);
    position: relative;
    overflow: hidden;
}

.qt-theme-option::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(240,201,80,.2), transparent 70%);
    opacity: 0;
    transition: opacity .3s;
}

.qt-theme-option:hover::before {
    opacity: 1;
}

.qt-theme-option .opt-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    background: var(--bg-alt, #f4f7fb);
    transition: all .35s cubic-bezier(.2,.9,.3,1.4);
    position: relative;
    z-index: 1;
}

.qt-theme-option .opt-label {
    position: relative;
    z-index: 1;
    transition: all .3s;
}

.qt-theme-option:hover {
    border-color: rgba(240,201,80,.4);
    color: #b8841a;
    transform: translateY(-3px);
}

.qt-theme-option:hover .opt-icon {
    transform: scale(1.15) rotate(-8deg);
    box-shadow: 0 8px 20px rgba(240,201,80,.3);
}

.qt-theme-option.active {
    background: linear-gradient(135deg, rgba(240,201,80,.15), rgba(240,201,80,.08));
    border-color: #f0c950;
    color: #b8841a;
    box-shadow: 0 4px 12px rgba(240,201,80,.2);
}

.qt-theme-option.active .opt-icon {
    background: linear-gradient(135deg, #fcd34d, #f0c950);
    color: #fff;
    box-shadow: 0 6px 16px rgba(240,201,80,.5);
    transform: scale(1.1);
}

.qt-theme-option.active::after {
    content: '✓';
    position: absolute;
    top: 6px;
    right: 6px;
    width: 18px;
    height: 18px;
    background: #f0c950;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .65rem;
    font-weight: 900;
    z-index: 2;
    animation: checkPop .4s cubic-bezier(.2,.9,.3,1.5);
}

@keyframes checkPop {
    0% { transform: scale(0); }
    100% { transform: scale(1); }
}

/* تم تاریک – منوی تم */
html[data-theme="dark"] .qt-theme-trigger {
    background: linear-gradient(135deg, rgba(240,201,80,.18), rgba(240,201,80,.08));
    border-color: rgba(240,201,80,.35);
    color: #fcd34d;
}

html[data-theme="dark"] .qt-theme-option .opt-icon {
    background: rgba(255,255,255,.05);
}

/* ============================================================
   ۲. دکمه‌های ورود/ثبت‌نام زیبا
   ============================================================ */
.qt-auth-buttons {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 4px;
}

.qt-btn-login {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: transparent;
    color: var(--text-soft, #475569);
    border: 1.5px solid var(--border, #e8eef5);
    border-radius: 30px;
    font-family: inherit;
    font-weight: 700;
    font-size: .82rem;
    text-decoration: none;
    transition: all .35s cubic-bezier(.2,.9,.3,1.3);
    position: relative;
    overflow: hidden;
}

.qt-btn-login::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 30%, rgba(240,201,80,.3) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform .7s;
}

.qt-btn-login:hover::before {
    transform: translateX(100%);
}

.qt-btn-login:hover {
    color: #b8841a;
    border-color: #f0c950;
    background: rgba(240,201,80,.1);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(240,201,80,.2);
}

.qt-btn-login .btn-icon {
    font-size: .95rem;
    transition: transform .4s cubic-bezier(.2,.9,.3,1.4);
}

.qt-btn-login:hover .btn-icon {
    transform: scale(1.15) rotate(-10deg);
}

.qt-btn-register {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 20px;
    background: linear-gradient(135deg, #fcd34d 0%, #f0c950 40%, #e8b93e 100%);
    background-size: 200% auto;
    color: #fff;
    border: none;
    border-radius: 30px;
    font-family: inherit;
    font-weight: 800;
    font-size: .82rem;
    text-decoration: none;
    text-shadow: 0 1px 2px rgba(140,95,10,.3);
    box-shadow:
        0 8px 20px rgba(240,201,80,.4),
        inset 0 1px 0 rgba(255,255,255,.5);
    transition: all .35s cubic-bezier(.2,.9,.3,1.3);
    position: relative;
    overflow: hidden;
}

.qt-btn-register::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.6) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform .7s;
}

.qt-btn-register:hover::before {
    transform: translateX(100%);
}

.qt-btn-register:hover {
    background-position: 100% 100%;
    color: #fff;
    transform: translateY(-3px) scale(1.03);
    box-shadow:
        0 12px 28px rgba(240,201,80,.55),
        inset 0 1px 0 rgba(255,255,255,.6);
}

.qt-btn-register .btn-icon {
    font-size: .95rem;
    animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% { transform: scale(1) rotate(0); opacity: 1; }
    50% { transform: scale(1.2) rotate(15deg); opacity: .9; }
}

/* ============================================================
   ۳. انیمیشن کتاب شناور – ارتقا یافته
   ============================================================ */
.aurora-hero-visual {
    position: relative;
    min-height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* کتاب با چرخش سه‌بعدی */
.aurora-book {
    width: 250px;
    height: 340px;
    perspective: 1200px;
    position: relative;
    z-index: 3;
    animation: auroraBookFloat 6s ease-in-out infinite;
    transform-style: preserve-3d;
}

@keyframes auroraBookFloat {
    0%, 100% {
        transform: translateY(0) rotateY(-8deg) rotateX(2deg);
    }
    25% {
        transform: translateY(-10px) rotateY(0deg) rotateX(0deg);
    }
    50% {
        transform: translateY(-16px) rotateY(8deg) rotateX(-2deg);
    }
    75% {
        transform: translateY(-8px) rotateY(0deg) rotateX(0deg);
    }
}

.aurora-book-cover {
    width: 100%;
    height: 100%;
    background:
        linear-gradient(150deg, #1a2b58 0%, #0a1730 50%, #050b18 100%);
    border-radius: 14px 6px 6px 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow:
        -30px 30px 80px rgba(0,0,0,.8),
        inset 0 0 100px rgba(240,201,80,.25),
        0 0 120px rgba(240,201,80,.5),
        0 0 60px rgba(109,74,255,.35);
    animation: auroraBookGlow 4s ease-in-out infinite;
    transform-style: preserve-3d;
}

/* حاشیه‌ی طلایی متحرک */
.aurora-book-cover::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    padding: 3px;
    background: linear-gradient(135deg,
        #fcd34d,
        #a78bfa,
        #22d3ee,
        #fcd34d,
        #fcd34d);
    background-size: 300% 300%;
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: auroraBorderFlow 6s linear infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes auroraBorderFlow {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* قاب داخلی طلایی */
.aurora-book-cover::after {
    content: '';
    position: absolute;
    inset: 20px;
    border: 1.5px solid rgba(240,201,80,.5);
    border-radius: 8px;
    pointer-events: none;
    box-shadow: inset 0 0 20px rgba(240,201,80,.15);
    z-index: 1;
}

@keyframes auroraBookGlow {
    0%, 100% {
        box-shadow:
            -30px 30px 80px rgba(0,0,0,.8),
            inset 0 0 100px rgba(240,201,80,.25),
            0 0 120px rgba(240,201,80,.5),
            0 0 60px rgba(109,74,255,.35);
    }
    50% {
        box-shadow:
            -30px 30px 80px rgba(0,0,0,.8),
            inset 0 0 140px rgba(240,201,80,.4),
            0 0 160px rgba(240,201,80,.7),
            0 0 100px rgba(109,74,255,.5);
    }
}

/* عنوان و زیرعنوان با درخشش */
.aurora-book-title {
    font-size: 3.2rem;
    font-weight: 900;
    background: linear-gradient(120deg,
        #fff2c8 0%,
        #fcd34d 25%,
        #f0c950 50%,
        #fcd34d 75%,
        #fff2c8 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: 4px;
    animation: auroraBookTitleShine 4s ease-in-out infinite;
    text-shadow: 0 0 40px rgba(240,201,80,.6);
    position: relative;
    z-index: 2;
}

@keyframes auroraBookTitleShine {
    0%, 100% { background-position: 0% center; }
    50%      { background-position: 200% center; }
}

.aurora-book-sub {
    font-size: .9rem;
    color: rgba(201,182,134,.9);
    margin-top: 14px;
    letter-spacing: 1px;
    position: relative;
    z-index: 2;
}

/* هاله‌های نور پشت کتاب */
.aurora-hero-visual .aurora-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    pointer-events: none;
    z-index: 1;
}

.aurora-glow-1 {
    width: 240px;
    height: 240px;
    background: #7b5cff;
    top: 5%;
    right: 8%;
    opacity: .5;
    animation: auroraGlowPulse 8s ease-in-out infinite;
}

.aurora-glow-2 {
    width: 200px;
    height: 200px;
    background: #4a90e2;
    bottom: 5%;
    left: 5%;
    opacity: .45;
    animation: auroraGlowPulse 8s ease-in-out infinite 3s;
}

.aurora-glow-3 {
    width: 180px;
    height: 180px;
    background: #f0c950;
    bottom: 25%;
    right: 18%;
    opacity: .35;
    animation: auroraGlowPulse 8s ease-in-out infinite 1.5s;
}

@keyframes auroraGlowPulse {
    0%, 100% { transform: scale(1); opacity: .4; }
    50%      { transform: scale(1.2); opacity: .7; }
}

/* عناصر شناور تزئینی – حرفه‌ای */
.aurora-deco {
    position: absolute;
    font-size: 1.8rem;
    filter: drop-shadow(0 0 15px rgba(240,201,80,.7));
    animation: auroraDecoFloat 5s ease-in-out infinite;
    opacity: .9;
    z-index: 2;
}

.aurora-deco-1 { top: 8%;  right: 22%; animation-delay: 0s;   font-size: 2rem; }
.aurora-deco-2 { top: 22%; left: 10%;  animation-delay: 1.2s; font-size: 1.6rem; }
.aurora-deco-3 { bottom: 18%; right: 25%; animation-delay: 2.4s; font-size: 1.9rem; }
.aurora-deco-4 { bottom: 12%; left: 18%; animation-delay: 3.6s; font-size: 1.4rem; }

@keyframes auroraDecoFloat {
    0%, 100% {
        transform: translateY(0) rotate(0) scale(1);
        opacity: .85;
    }
    50% {
        transform: translateY(-20px) rotate(25deg) scale(1.1);
        opacity: 1;
    }
}

/* ذرات شناور اضافی */
.aurora-particle {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: radial-gradient(circle, #fcd34d, transparent 70%);
    box-shadow: 0 0 12px rgba(240,201,80,.8);
    animation: auroraParticleFloat 8s linear infinite;
    z-index: 2;
}

.aurora-particle:nth-child(1) { top: 15%; left: 30%; animation-delay: 0s; }
.aurora-particle:nth-child(2) { top: 45%; right: 15%; animation-delay: 2s; width: 4px; height: 4px; }
.aurora-particle:nth-child(3) { bottom: 25%; left: 25%; animation-delay: 4s; }
.aurora-particle:nth-child(4) { top: 35%; right: 30%; animation-delay: 6s; width: 5px; height: 5px; }
.aurora-particle:nth-child(5) { bottom: 40%; right: 20%; animation-delay: 3s; width: 3px; height: 3px; }

@keyframes auroraParticleFloat {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    10%, 90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-80px) translateX(20px);
        opacity: 0;
    }
}

/* ستاره‌های چشمک‌زن اطراف کتاب */
.aurora-star {
    position: absolute;
    font-size: 1rem;
    animation: auroraStarTwinkle 3s ease-in-out infinite;
    z-index: 2;
    pointer-events: none;
}

.aurora-star-1 { top: 10%;  left: 40%; animation-delay: 0s;   color: #fcd34d; }
.aurora-star-2 { top: 30%;  right: 8%;  animation-delay: .8s; color: #a78bfa; }
.aurora-star-3 { bottom: 20%; left: 10%; animation-delay: 1.6s; color: #22d3ee; }
.aurora-star-4 { bottom: 30%; right: 35%; animation-delay: 2.4s; color: #fcd34d; }
.aurora-star-5 { top: 50%;  left: 5%;   animation-delay: 1.2s; color: #f0c950; }

@keyframes auroraStarTwinkle {
    0%, 100% {
        transform: scale(1) rotate(0);
        opacity: .6;
        filter: drop-shadow(0 0 4px currentColor);
    }
    50% {
        transform: scale(1.3) rotate(180deg);
        opacity: 1;
        filter: drop-shadow(0 0 12px currentColor);
    }
}

/* ============================================================
   موبایل
   ============================================================ */
@media (max-width: 992px) {
    .qt-theme-trigger-label {
        display: none;
    }

    .qt-theme-trigger {
        padding: 8px 12px;
    }

    .qt-theme-panel {
        min-width: 240px;
    }

    .aurora-hero-visual {
        min-height: 340px;
    }

    .aurora-book {
        width: 200px;
        height: 280px;
    }

    .aurora-book-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 600px) {
    .qt-btn-login span:not(.btn-icon),
    .qt-btn-register span:not(.btn-icon) {
        display: none;
    }

    .qt-btn-login,
    .qt-btn-register {
        padding: 9px 14px;
        min-width: 42px;
        justify-content: center;
    }

    .qt-theme-panel {
        min-width: 220px;
        padding: 10px;
    }

    .qt-theme-options {
        gap: 4px;
    }

    .qt-theme-option {
        padding: 12px 4px;
        font-size: .68rem;
    }

    .qt-theme-option .opt-icon {
        width: 34px;
        height: 34px;
        font-size: 1rem;
    }

    .aurora-book {
        width: 170px;
        height: 240px;
    }

    .aurora-book-title {
        font-size: 2rem;
    }

    .aurora-deco { font-size: 1.4rem; }
}

/* ============================================================
   تم تاریک
   ============================================================ */
html[data-theme="dark"] .qt-theme-panel::before {
    background: #131b2a;
    border-color: #1e2a3d;
}

html[data-theme="dark"] .qt-theme-option .opt-icon {
    background: rgba(255,255,255,.06);
}

html[data-theme="dark"] .qt-theme-option:hover {
    border-color: rgba(240,201,80,.5);
    color: #fcd34d;
}

html[data-theme="dark"] .qt-theme-option.active {
    color: #fcd34d;
}
/* ============================================================
   دکمه تم ساده (خورشید/ماه)
   ============================================================ */
.qt-theme-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    margin: 0 4px;
    background: linear-gradient(135deg, rgba(240,201,80,.15), rgba(240,201,80,.08));
    border: 1.5px solid rgba(240,201,80,.3);
    border-radius: 50%;
    cursor: pointer;
    font-family: inherit;
    transition: all .35s cubic-bezier(.2,.9,.3,1.3);
    overflow: hidden;
    flex-shrink: 0;
}

.qt-theme-toggle::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(240,201,80,.4), transparent 70%);
    opacity: 0;
    transition: opacity .35s;
    border-radius: 50%;
}

.qt-theme-toggle:hover::before {
    opacity: 1;
}

.qt-theme-toggle:hover {
    border-color: #f0c950;
    background: linear-gradient(135deg, rgba(240,201,80,.25), rgba(240,201,80,.15));
    transform: translateY(-2px) scale(1.08);
    box-shadow:
        0 8px 20px rgba(240,201,80,.4),
        inset 0 1px 0 rgba(255,255,255,.4);
}

.qt-theme-toggle:active {
    transform: translateY(0) scale(.98);
}

.qt-theme-toggle-icon {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    line-height: 1;
    transition: transform .5s cubic-bezier(.2,.9,.3,1.4);
    filter: drop-shadow(0 2px 4px rgba(240,201,80,.5));
    user-select: none;
}

.qt-theme-toggle:hover .qt-theme-toggle-icon {
    transform: rotate(360deg) scale(1.15);
}

/* رنگ آیکون بر اساس تم فعلی */
html[data-theme="light"] .qt-theme-toggle {
    background: linear-gradient(135deg, rgba(109,74,255,.1), rgba(109,74,255,.05));
    border-color: rgba(109,74,255,.25);
}

html[data-theme="light"] .qt-theme-toggle:hover {
    border-color: #7b5cff;
    background: linear-gradient(135deg, rgba(109,74,255,.2), rgba(109,74,255,.1));
    box-shadow:
        0 8px 20px rgba(109,74,255,.35),
        inset 0 1px 0 rgba(255,255,255,.5);
}

html[data-theme="light"] .qt-theme-toggle-icon {
    filter: drop-shadow(0 2px 4px rgba(109,74,255,.4));
}

html[data-theme="dark"] .qt-theme-toggle {
    background: linear-gradient(135deg, rgba(240,201,80,.15), rgba(240,201,80,.08));
    border-color: rgba(240,201,80,.35);
}

html[data-theme="dark"] .qt-theme-toggle-icon {
    filter: drop-shadow(0 2px 6px rgba(240,201,80,.7));
}

/* موبایل */
@media (max-width: 992px) {
    .qt-theme-toggle {
        width: 38px;
        height: 38px;
    }
    .qt-theme-toggle-icon {
        font-size: 1.1rem;
    }
}

@media (max-width: 600px) {
    .qt-theme-toggle {
        width: 36px;
        height: 36px;
    }
    .qt-theme-toggle-icon {
        font-size: 1rem;
    }
}
/* ============================================================
   بازگشت به انیمیشن زیبای قبلی کتاب
   ============================================================ */

/* هاله‌های نور */
.hero-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: .55;
    animation: glowPulse 8s ease-in-out infinite;
    pointer-events: none;
}

.glow-1 { width: 220px; height: 220px; background: #7b5cff; top: 5%; right: 0%; }
.glow-2 { width: 180px; height: 180px; background: #4a90e2; bottom: 5%; left: 5%; animation-delay: 3s; }
.glow-3 { width: 160px; height: 160px; background: #e0a82e; bottom: 25%; right: 15%; opacity: .3; animation-delay: 1.5s; }

@keyframes glowPulse {
    0%, 100% { transform: scale(1); opacity: .5; }
    50%      { transform: scale(1.15); opacity: .7; }
}

/* کتاب شناور */
.hero-book {
    width: 240px;
    height: 320px;
    perspective: 1000px;
    position: relative;
    z-index: 3;
    animation: bookFloat 6s ease-in-out infinite;
}

@keyframes bookFloat {
    0%, 100% { transform: translateY(0) rotate(-2deg); }
    50%      { transform: translateY(-14px) rotate(2deg); }
}

.book-cover {
    width: 100%;
    height: 100%;
    background: linear-gradient(150deg, #1e3a5f 0%, #0a1730 100%);
    border-radius: 14px 6px 6px 14px;
    border: 2px solid var(--gold, #e0a82e);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow:
        -14px 14px 60px rgba(0,0,0,.7),
        inset 0 0 80px rgba(240,193,75,.18),
        0 0 100px rgba(240,193,75,.35);
    animation: bookGlow 4s ease-in-out infinite;
}

@keyframes bookGlow {
    0%, 100% {
        box-shadow:
            -14px 14px 60px rgba(0,0,0,.7),
            inset 0 0 80px rgba(240,193,75,.18),
            0 0 100px rgba(240,193,75,.35);
    }
    50% {
        box-shadow:
            -14px 14px 60px rgba(0,0,0,.7),
            inset 0 0 100px rgba(240,193,75,.28),
            0 0 140px rgba(240,193,75,.5);
    }
}

.book-cover::before {
    content: '';
    position: absolute;
    inset: 18px;
    border: 1px solid rgba(212,175,55,.4);
    border-radius: 8px;
}

.book-title {
    font-size: 2.8rem;
    font-weight: 900;
    background: linear-gradient(135deg, #f9e7b3, #f0c14b);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: 3px;
}

.book-sub {
    color: rgba(201,182,134,.9);
    font-size: .85rem;
    margin-top: 10px;
}

/* عناصر تزئینی شناور */
.hero-hex {
    position: absolute;
    font-size: 2rem;
    filter: drop-shadow(0 0 12px rgba(240,201,80,.6));
    animation: hexFloat 5s ease-in-out infinite;
    z-index: 2;
}

.hex-1 { top: 8%;  right: 22%; animation-delay: 0s; }
.hex-2 { top: 20%; left: 12%;  animation-delay: 1.2s; }
.hex-3 { bottom: 18%; right: 28%; animation-delay: 2.4s; }
.hex-4 { bottom: 8%; left: 18%;  animation-delay: 3.6s; }

@keyframes hexFloat {
    0%, 100% {
        transform: translateY(0) rotate(0);
        opacity: .85;
    }
    50% {
        transform: translateY(-18px) rotate(20deg);
        opacity: 1;
    }
}

/* موبایل */
@media (max-width: 992px) {
    .hero-book {
        width: 200px;
        height: 270px;
    }
    .book-title { font-size: 2.3rem; }
}

@media (max-width: 600px) {
    .hero-book {
        width: 170px;
        height: 230px;
    }
    .book-title { font-size: 2rem; }
    .hero-hex { font-size: 1.5rem; }
}
/* ============================================================
   دکمه تم (خورشید/ماه) – با CSS خودکار عوض می‌شود
   ============================================================ */
.qt-theme-toggle {
    position: relative;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    margin: 0 6px;
    background: linear-gradient(135deg, rgba(240,201,80,.15), rgba(240,201,80,.08));
    border: 1.5px solid rgba(240,201,80,.35);
    border-radius: 50%;
    cursor: pointer;
    font-family: inherit;
    color: #b8841a;
    transition: all .35s cubic-bezier(.2,.9,.3,1.3);
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
    overflow: hidden;
}

.qt-theme-toggle::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(240,201,80,.35), transparent 70%);
    opacity: 0;
    transition: opacity .35s;
    border-radius: 50%;
    pointer-events: none;
}

.qt-theme-toggle:hover::before {
    opacity: 1;
}

.qt-theme-toggle:hover {
    border-color: #f0c950;
    background: linear-gradient(135deg, rgba(240,201,80,.3), rgba(240,201,80,.15));
    transform: translateY(-2px) scale(1.06);
    box-shadow:
        0 8px 20px rgba(240,201,80,.45),
        inset 0 1px 0 rgba(255,255,255,.4);
}

.qt-theme-toggle:active {
    transform: translateY(0) scale(.95);
}

/* آیکون‌ها */
.qt-icon {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    transition: transform .5s cubic-bezier(.2,.9,.3,1.4);
    pointer-events: none;
}

.qt-icon svg {
    display: block;
    width: 100%;
    height: 100%;
}

/* ⭐ منطق عوض شدن آیکون با CSS – بدون نیاز به JS ⭐ */

/* در تم روشن: فقط ماه نمایش داده می‌شود */
html[data-theme="light"] .qt-icon-sun {
    display: none !important;
}
html[data-theme="light"] .qt-icon-moon {
    display: inline-flex !important;
    color: #7b5cff;
    filter: drop-shadow(0 2px 6px rgba(123,92,255,.5));
}

/* در تم تاریک: فقط خورشید نمایش داده می‌شود */
html[data-theme="dark"] .qt-icon-moon {
    display: none !important;
}
html[data-theme="dark"] .qt-icon-sun {
    display: inline-flex !important;
    color: #fcd34d;
    filter: drop-shadow(0 2px 8px rgba(240,201,80,.7));
}

/* چرخش آیکون در hover */
.qt-theme-toggle:hover .qt-icon {
    transform: rotate(360deg) scale(1.1);
}

/* رنگ دکمه در تم روشن (بنفش) */
html[data-theme="light"] .qt-theme-toggle {
    background: linear-gradient(135deg, rgba(123,92,255,.12), rgba(123,92,255,.06));
    border-color: rgba(123,92,255,.3);
    color: #7b5cff;
}
html[data-theme="light"] .qt-theme-toggle:hover {
    border-color: #7b5cff;
    background: linear-gradient(135deg, rgba(123,92,255,.22), rgba(123,92,255,.12));
    box-shadow:
        0 8px 20px rgba(123,92,255,.35),
        inset 0 1px 0 rgba(255,255,255,.5);
}

/* رنگ دکمه در تم تاریک (طلایی) */
html[data-theme="dark"] .qt-theme-toggle {
    background: linear-gradient(135deg, rgba(240,201,80,.15), rgba(240,201,80,.08));
    border-color: rgba(240,201,80,.4);
    color: #fcd34d;
}

/* موبایل */
@media (max-width: 992px) {
    .qt-theme-toggle {
        width: 38px;
        height: 38px;
        margin: 0 4px;
    }
    .qt-icon {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 600px) {
    .qt-theme-toggle {
        width: 36px;
        height: 36px;
    }
    .qt-icon {
        width: 17px;
        height: 17px;
    }
}
/* ============================================================
   کارت‌های موضوعی غنی (با تامبونیل)
   ============================================================ */
.topic-card-rich {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 18px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: all .4s cubic-bezier(.2,.9,.3,1.2);
    box-shadow: 0 4px 16px rgba(0,0,0,.04);
    position: relative;
    min-height: 260px;
}

.topic-card-rich:hover {
    transform: translateY(-8px);
    box-shadow:
        0 20px 48px rgba(224,168,46,.2),
        0 4px 16px rgba(0,0,0,.08);
    border-color: var(--gold);
}

/* تامبونیل */
.topic-card-thumb {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, #1a2b58, #0a1730);
}

.topic-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .6s cubic-bezier(.2,.9,.3,1);
}

.topic-card-rich:hover .topic-card-thumb img {
    transform: scale(1.1);
}

.topic-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    background: linear-gradient(135deg, #1a2b58 0%, #0a1730 100%);
    color: rgba(240,201,80,.5);
    animation: floatIcon 4s ease-in-out infinite;
}

/* اوورلی تیره برای خوانایی */
.topic-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,.1) 0%,
        rgba(0,0,0,.15) 40%,
        rgba(0,0,0,.75) 100%
    );
    pointer-events: none;
    z-index: 1;
}

/* آیکون کوچک */
.topic-card-icon {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--gold), var(--gold-deep));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(224,168,46,.5);
    z-index: 2;
    border: 2px solid rgba(255,255,255,.7);
}

/* تعداد معجزات */
.topic-card-count {
    position: absolute;
    bottom: 12px;
    left: 12px;
    padding: 5px 14px;
    background: rgba(224,168,46,.95);
    backdrop-filter: blur(8px);
    color: #fff;
    border-radius: 20px;
    font-size: .75rem;
    font-weight: 800;
    box-shadow: 0 4px 12px rgba(224,168,46,.4);
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* بدنه کارت */
.topic-card-body {
    padding: 16px 18px 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.topic-card-name {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text);
    margin: 0;
    line-height: 1.5;
    transition: color .3s;
}

.topic-card-rich:hover .topic-card-name {
    color: var(--gold-deep);
}

.topic-card-preview {
    font-size: .82rem;
    color: var(--text-mute);
    line-height: 1.7;
    margin: 0;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.topic-card-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .82rem;
    font-weight: 700;
    color: var(--gold-deep);
    transition: all .3s;
    margin-top: 4px;
}

.topic-card-link span {
    transition: transform .3s;
    display: inline-block;
}

.topic-card-rich:hover .topic-card-link span {
    transform: translateX(-4px);
}

html[dir="ltr"] .topic-card-rich:hover .topic-card-link span {
    transform: translateX(4px);
}

/* تم تاریک */
html[data-theme="dark"] .topic-card-icon {
    border-color: rgba(255,255,255,.15);
}

html[data-theme="dark"] .topic-card-preview {
    color: rgba(255,255,255,.55);
}

/* موبایل */
@media (max-width: 900px) {
    .topic-card-rich {
        min-height: 240px;
    }

    .topic-card-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .topic-thumb-placeholder {
        font-size: 3rem;
    }

    .topic-card-count {
        font-size: .7rem;
        padding: 4px 10px;
    }
}

@media (max-width: 600px) {
    .topic-card-rich {
        min-height: 220px;
    }

    .topic-card-name {
        font-size: .95rem;
    }

    .topic-card-preview {
        font-size: .78rem;
        -webkit-line-clamp: 1;
    }
}