/* ==========================================================================
   جلوه‌های اختیاریِ سایت — روشن/خاموش از پنلِ ادمین (SiteSetting)
   عمداً جدا از season.css نگه داشته شده تا هیچ‌وقت کدِ فصلیِ کارکننده
   دست‌نخورده باقی بماند.
   ========================================================================== */

/* ---------- ۱) رنگی‌کردنِ روزشمار (رنگین‌کمانیِ پاییزی) ---------- */

.countdown.effect-rainbow .cd-num {
    background: linear-gradient(90deg, #ff5e5e, #ffb347, #ffe14d, #7ee081, #59c9ff, #a68bff, #ff6fd8);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: rainbow-shift 4s linear infinite;
}
@keyframes rainbow-shift {
    0%   { background-position: 0% center; }
    100% { background-position: 200% center; }
}
@media (prefers-reduced-motion: reduce) {
    .countdown.effect-rainbow .cd-num { animation: none; }
}

/* ---------- ۲) نورپردازیِ «چیزی نزدیک می‌شود» — فقط صفحه‌ی اصلی ---------- */
.approach-glow {
    position: fixed;
    top: -20vh; left: 50%;
    width: 140vw; height: 60vh;
    transform: translateX(-50%);
    pointer-events: none;
    z-index: 0;
    background: radial-gradient(ellipse at center,
        color-mix(in srgb, var(--season-accent, var(--accent)) 35%, transparent) 0%,
        transparent 65%);
    opacity: 0.32;
    animation: approach-pulse 6s ease-in-out infinite;
}
@keyframes approach-pulse {
    0%, 100% { opacity: 0.20; transform: translateX(-50%) scale(0.94); }
    50%      { opacity: 0.40; transform: translateX(-50%) scale(1.05); }
}
@media (prefers-reduced-motion: reduce) { .approach-glow { display: none; } }

/* ---------- ۳) تمِ بارانی — مستقل از فصل، هم‌زمان با آن فعال می‌ماند ---------- */
html[data-rain="true"] body::before {
    content: '';
    position: fixed; inset: 0;
    pointer-events: none;
    z-index: 2;
    background: linear-gradient(180deg, rgba(40,55,75,0.10), rgba(20,30,45,0.16));
    mix-blend-mode: multiply;
}
.p-rain {
    width: 2px !important;
    border-radius: 2px;
    background: linear-gradient(180deg, rgba(180,210,255,0.05), rgba(180,210,255,0.75));
    animation-name: rain-fall;
    animation-timing-function: linear;
}
@keyframes rain-fall {
    0%   { transform: translate3d(0, -10vh, 0); opacity: 0; }
    6%   { opacity: var(--op, 0.6); }
    92%  { opacity: var(--op, 0.6); }
    100% { transform: translate3d(-2vw, 108vh, 0); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .p-rain { display: none; } }

/* ---------- ۴) رعدوبرقِ نامحسوس ---------- */
.lightning-flash {
    position: fixed; inset: 0;
    pointer-events: none;
    z-index: 3;
    background: #eaf3ff;
    opacity: 0;
}
.lightning-flash.flash-on { animation: lightning-strike 0.55s ease-out; }
@keyframes lightning-strike {
    0%   { opacity: 0; }
    8%   { opacity: 0.20; }
    16%  { opacity: 0.03; }
    24%  { opacity: 0.14; }
    40%  { opacity: 0; }
    100% { opacity: 0; }
}