/* =====================================================
   حالت زمستانی v2.1 – سبک و بدون لگ روی اسکرول
   ===================================================== */

/* لایهٔ مه و یخ‌زدگی – فقط opacity، بدون box-shadow سنگین روی موبایل */
html.dlme-winter body::after {
	content: "";
	position: fixed;
	inset: 0;
	pointer-events: none;
	touch-action: none;
	z-index: 999980;
	background:
		radial-gradient(ellipse at 50% 120%, rgba(200, 230, 255, 0.22), transparent 60%),
		radial-gradient(ellipse at 50% -20%, rgba(190, 225, 255, 0.16), transparent 55%),
		linear-gradient(180deg, rgba(150, 200, 255, 0.07), rgba(190, 225, 255, 0.04));
	box-shadow: inset 0 0 100px 15px rgba(170, 215, 255, 0.25);
	animation: dlme-frost-in 1s ease both;
	transform: translateZ(0);
	will-change: opacity;
	contain: strict;
}

html.dlme-winter.dlme-dark-mode body::after {
	background:
		radial-gradient(ellipse at 50% 120%, rgba(110, 160, 230, 0.15), transparent 60%),
		radial-gradient(ellipse at 50% -20%, rgba(100, 150, 220, 0.12), transparent 55%),
		linear-gradient(180deg, rgba(80, 130, 210, 0.07), rgba(60, 100, 180, 0.04));
	box-shadow: inset 0 0 120px 20px rgba(90, 150, 230, 0.2);
}

@keyframes dlme-frost-in {
	from { opacity: 0; }
	to   { opacity: 1; }
}

/* سردتر شدن رنگ تصاویر – فقط روی دسکتاپ برای عملکرد */
@media (min-width: 769px) {
	html.dlme-winter img,
	html.dlme-winter video {
		filter: saturate(0.92) hue-rotate(-6deg) brightness(1.02);
	}
}

/* هدر و فوتر کمی آبی‌یخی */
html.dlme-winter:not(.dlme-dark-mode) body {
	background-color: #f2f8fd;
}
html.dlme-winter.dlme-dark-mode body {
	background-color: #0d1624 !important;
}
html.dlme-winter.dlme-dark-mode .site-header,
html.dlme-winter.dlme-dark-mode .main-header-bar,
html.dlme-winter.dlme-dark-mode .ast-primary-header-bar,
html.dlme-winter.dlme-dark-mode .site-footer,
html.dlme-winter.dlme-dark-mode .ast-small-footer {
	background-color: #111e30 !important;
	border-color: #1f3350 !important;
}

/* دکمه‌ها در حالت زمستانی: درخشش یخی */
html.dlme-winter .dlme-toggle-button,
html.dlme-winter .dlme-toggle-switch .dlme-slider {
	box-shadow: 0 0 10px rgba(150, 205, 255, 0.4);
}

/* موبایل: لایهٔ frost سبک‌تر و بدون animation سنگین */
@media (max-width: 768px) {
	html.dlme-winter body::after {
		box-shadow: inset 0 0 60px 10px rgba(170, 215, 255, 0.18);
		animation-duration: 0.6s;
	}
	html.dlme-winter.dlme-dark-mode body::after {
		box-shadow: inset 0 0 70px 12px rgba(90, 150, 230, 0.15);
	}
}

@media (prefers-reduced-motion: reduce) {
	html.dlme-winter body::after {
		animation: none;
	}
}
