/* ============================================
   FESTIVE THEMES - Italian Holidays
   ============================================ */

/* Base festive body styles */
body.festive-christmas,
body.festive-newyear,
body.festive-epiphany {
	position: relative;
	overflow-x: hidden;
}

/* ============================================
   CHRISTMAS THEME
   ============================================ */

body.festive-christmas {
	background: linear-gradient(135deg, #0a0e27 0%, #1a1f3a 50%, #0f1419 100%);
	position: relative;
}

body.festive-christmas::before {
	content: "";
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background:
		radial-gradient(
			circle at 20% 30%,
			rgba(255, 255, 255, 0.1) 0%,
			transparent 50%
		),
		radial-gradient(
			circle at 80% 70%,
			rgba(255, 215, 0, 0.1) 0%,
			transparent 50%
		),
		radial-gradient(
			circle at 50% 50%,
			rgba(255, 20, 147, 0.05) 0%,
			transparent 50%
		);
	pointer-events: none;
	z-index: 0;
	animation: twinkle 3s ease-in-out infinite;
}

/* Snowflakes Animation */
.snowflakes {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	z-index: 1000;
	overflow: hidden;
}

.snowflake {
	position: absolute;
	top: -10px;
	color: #fff;
	font-size: 1em;
	font-family: Arial, sans-serif;
	text-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
	animation: snowfall linear infinite;
	opacity: 0.8;
}

@keyframes snowfall {
	0% {
		transform: translateY(0) translateX(0) rotate(0deg);
		opacity: 0.8;
	}
	100% {
		transform: translateY(100vh) translateX(var(--drift)) rotate(360deg);
		opacity: 0;
	}
}

/* Stars Animation */
.stars {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	z-index: 999;
}

.star {
	position: absolute;
	width: 2px;
	height: 2px;
	background: #fff;
	border-radius: 50%;
	box-shadow: 0 0 6px rgba(255, 255, 255, 0.8);
	animation: twinkle-star 2s ease-in-out infinite;
}

@keyframes twinkle-star {
	0%,
	100% {
		opacity: 0.3;
		transform: scale(1);
	}
	50% {
		opacity: 1;
		transform: scale(1.5);
	}
}

@keyframes twinkle {
	0%,
	100% {
		opacity: 0.5;
	}
	50% {
		opacity: 1;
	}
}

/* ============================================
   NEW YEAR THEME
   ============================================ */

body.festive-newyear {
	background: linear-gradient(135deg, #0a0a2e 0%, #16213e 50%, #1a1a3e 100%);
	position: relative;
}

body.festive-newyear::before {
	content: "";
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background:
		radial-gradient(
			circle at 30% 40%,
			rgba(255, 215, 0, 0.15) 0%,
			transparent 50%
		),
		radial-gradient(
			circle at 70% 60%,
			rgba(255, 20, 147, 0.1) 0%,
			transparent 50%
		),
		radial-gradient(
			circle at 50% 20%,
			rgba(0, 191, 255, 0.1) 0%,
			transparent 50%
		);
	pointer-events: none;
	z-index: 0;
	animation: sparkle 2s ease-in-out infinite;
}

/* Confetti Animation */
.confetti {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	z-index: 1000;
	overflow: hidden;
}

.confetti-piece {
	position: absolute;
	width: 10px;
	height: 10px;
	background: var(--confetti-color);
	top: -10px;
	animation: confetti-fall linear infinite;
	border-radius: 2px;
}

@keyframes confetti-fall {
	0% {
		transform: translateY(0) translateX(0) rotate(0deg);
		opacity: 1;
	}
	100% {
		transform: translateY(100vh) translateX(var(--confetti-drift))
			rotate(720deg);
		opacity: 0;
	}
}

@keyframes sparkle {
	0%,
	100% {
		opacity: 0.6;
	}
	50% {
		opacity: 1;
	}
}

/* ============================================
   EPIPHANY THEME
   ============================================ */

body.festive-epiphany {
	background: linear-gradient(135deg, #1a0a2e 0%, #16213e 50%, #0f3460 100%);
	position: relative;
}

body.festive-epiphany::before {
	content: "";
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background:
		radial-gradient(
			circle at 25% 35%,
			rgba(255, 215, 0, 0.2) 0%,
			transparent 50%
		),
		radial-gradient(
			circle at 75% 65%,
			rgba(255, 255, 255, 0.15) 0%,
			transparent 50%
		),
		radial-gradient(
			circle at 50% 50%,
			rgba(138, 43, 226, 0.1) 0%,
			transparent 50%
		);
	pointer-events: none;
	z-index: 0;
	animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
	0%,
	100% {
		opacity: 0.7;
	}
	50% {
		opacity: 1;
	}
}

/* ============================================
   LOGIN SCREEN FESTIVE DECORATIONS
   ============================================ */

.festive-login-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	z-index: 1;
	overflow: hidden;
}

/* Floating festive icons */
.festive-icon {
	position: absolute;
	font-size: 2rem;
	opacity: 0.7;
	animation: float 6s ease-in-out infinite;
	filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.festive-icon:nth-child(odd) {
	animation-duration: 8s;
	animation-direction: reverse;
}

.festive-icon:nth-child(3n) {
	animation-duration: 10s;
}

@keyframes float {
	0%,
	100% {
		transform: translateY(0) translateX(0) rotate(0deg);
	}
	25% {
		transform: translateY(-20px) translateX(10px) rotate(5deg);
	}
	50% {
		transform: translateY(-40px) translateX(-10px) rotate(-5deg);
	}
	75% {
		transform: translateY(-20px) translateX(5px) rotate(3deg);
	}
}

/* Christmas specific login decorations */
body.festive-christmas .festive-login-overlay .festive-icon {
	color: #ffd700;
	text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

/* New Year specific login decorations */
body.festive-newyear .festive-login-overlay .festive-icon {
	color: #ff1493;
	text-shadow: 0 0 10px rgba(255, 20, 147, 0.5);
}

/* Epiphany specific login decorations */
body.festive-epiphany .festive-login-overlay .festive-icon {
	color: #ffd700;
	text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

/* ============================================
   FESTIVE BUTTON ENHANCEMENTS
   ============================================ */

body.festive-christmas .hero-btn,
body.festive-newyear .hero-btn,
body.festive-epiphany .hero-btn {
	position: relative;
	overflow: hidden;
}

body.festive-christmas .hero-btn::before,
body.festive-newyear .hero-btn::before,
body.festive-epiphany .hero-btn::before {
	content: "";
	position: absolute;
	top: -50%;
	left: -50%;
	width: 200%;
	height: 200%;
	background: linear-gradient(
		45deg,
		transparent,
		rgba(255, 255, 255, 0.3),
		transparent
	);
	animation: shimmer-button 3s infinite;
}

@keyframes shimmer-button {
	0% {
		transform: translateX(-100%) translateY(-100%) rotate(45deg);
	}
	100% {
		transform: translateX(100%) translateY(100%) rotate(45deg);
	}
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 768px) {
	.festive-icon {
		font-size: 1.5rem;
	}

	.snowflake {
		font-size: 0.8em;
	}

	.confetti-piece {
		width: 8px;
		height: 8px;
	}
}

/* ============================================
   PERFORMANCE OPTIMIZATIONS
   ============================================ */

.snowflakes,
.confetti,
.stars,
.festive-login-overlay {
	will-change: transform, opacity;
	transform: translateZ(0);
	backface-visibility: hidden;
}

/* Reduce animations on low-end devices */
@media (prefers-reduced-motion: reduce) {
	.snowflake,
	.confetti-piece,
	.star,
	.festive-icon {
		animation: none;
	}

	body.festive-christmas::before,
	body.festive-newyear::before,
	body.festive-epiphany::before {
		animation: none;
	}
}
