/* Enhanced Diwali Celebration Effects */
.diwali-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
    background: radial-gradient(ellipse at center, rgba(10, 10, 40, 0.3) 0%, rgba(5, 5, 20, 0.8) 100%);
    opacity: 0;
    animation: containerFadeIn 1s ease-out forwards;
}

@keyframes containerFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Enhanced Firework Styles */
.firework {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    animation: fireworkLaunch 1.8s ease-out forwards;
    filter: blur(1px);
}

.firework-particle {
    position: absolute;
    border-radius: 50%;
    animation: fireworkExplode 1.2s ease-out forwards;
    filter: blur(1px);
    opacity: 0;
}

.firework-trail {
    position: absolute;
    width: 2px;
    height: 2px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
    animation: trailFade 0.3s ease-out forwards;
}

@keyframes fireworkLaunch {
    0% {
        transform: translateY(100vh) scale(0.5);
        opacity: 0;
    }

    20% {
        opacity: 1;
    }

    100% {
        transform: translateY(var(--target-y, 40vh)) scale(1);
        opacity: 1;
    }
}

@keyframes fireworkExplode {
    0% {
        transform: translate(0, 0) scale(0);
        opacity: 0;
    }

    20% {
        opacity: 1;
    }

    80% {
        opacity: 0.8;
    }

    100% {
        transform: translate(var(--tx, 0), var(--ty, 0)) scale(1);
        opacity: 0;
    }
}

@keyframes trailFade {
    0% {
        opacity: 0.8;
        transform: scale(1);
    }

    100% {
        opacity: 0;
        transform: scale(0);
    }
}

/* Enhanced Diya (Lamp) Styles */
.diya {
    position: absolute;
    bottom: 0;
    width: 50px;
    height: 70px;
    z-index: 10;
    filter: drop-shadow(0 0 10px rgba(255, 140, 0, 0.5));
}

.diya-body {
    position: absolute;
    bottom: 0;
    width: 50px;
    height: 35px;
    background: linear-gradient(135deg, #ff6b00, #ff4500, #e63900);
    border-radius: 50% 50% 45% 45%;
    box-shadow: inset 0 5px 15px rgba(255, 255, 255, 0.3), 0 0 25px rgba(255, 140, 0, 0.8), 0 0 40px rgba(255, 100, 0, 0.4);
    border: 1px solid rgba(255, 100, 0, 0.5);
}

.diya-flame {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 15px;
    height: 30px;
    background: linear-gradient(to top, #ffff00 0%, #ffd700 20%, #ff8c00 50%, #ff4500 80%, transparent 100%);
    border-radius: 50% 50% 25% 25%;
    box-shadow: 0 0 25px #ffd700, 0 0 45px #ff8c00, 0 0 65px #ff4500;
    animation: enhancedFlameFlicker 0.8s ease-in-out infinite alternate;
    filter: blur(0.5px);
}

.diya-glow {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.3) 0%, rgba(255, 140, 0, 0.1) 40%, transparent 70%);
    border-radius: 50%;
    animation: glowPulse 2s ease-in-out infinite;
}

@keyframes enhancedFlameFlicker {
    0%, 100% {
        transform: translateX(-50%) scaleY(1) scaleX(1) rotate(0deg);
        height: 30px;
        opacity: 0.9;
    }

    25% {
        transform: translateX(-50%) scaleY(1.1) scaleX(0.9) rotate(-1deg);
        height: 32px;
        opacity: 1;
    }

    50% {
        transform: translateX(-50%) scaleY(0.95) scaleX(1.05) rotate(1deg);
        height: 28px;
        opacity: 0.95;
    }

    75% {
        transform: translateX(-50%) scaleY(1.05) scaleX(0.95) rotate(-0.5deg);
        height: 31px;
        opacity: 1;
    }
}

@keyframes glowPulse {
    0%, 100% {
        opacity: 0.3;
        transform: translateX(-50%) scale(1);
    }

    50% {
        opacity: 0.6;
        transform: translateX(-50%) scale(1.1);
    }
}

/* Enhanced Floating Diyas */
.floating-diya {
    position: absolute;
    animation: enhancedFloat 20s ease-in-out infinite;
    opacity: 0;
    animation-delay: calc(var(--delay, 0) * 1s);
}

@keyframes enhancedFloat {
    0% {
        transform: translateY(100vh) translateX(-50px) rotate(0deg) scale(0.8);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    50% {
        transform: translateY(40vh) translateX(50px) rotate(180deg) scale(1);
        opacity: 0.9;
    }

    90% {
        opacity: 0.8;
    }

    100% {
        transform: translateY(-100px) translateX(-30px) rotate(360deg) scale(0.6);
        opacity: 0;
    }
}

/* Enhanced Celebration Message */
.diwali-message-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    pointer-events: none;
    opacity: 0;
    animation: messageContainerFadeIn 0.5s ease 0.5s forwards;
}

@keyframes messageContainerFadeIn {
    to {
        opacity: 1;
    }
}

.diwali-message {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.95) 0%, rgba(255, 140, 0, 0.9) 100%);
    color: #8B4513;
    padding: 40px 60px;
    border-radius: 20px;
    font-size: 3rem;
    font-weight: 800;
    text-align: center;
    box-shadow: 0 0 60px rgba(255, 215, 0, 0.8), 0 0 100px rgba(255, 140, 0, 0.6), inset 0 0 30px rgba(255, 255, 255, 0.3);
    border: 3px solid rgba(139, 69, 19, 0.3);
    position: relative;
    overflow: hidden;
    transform: scale(0);
    animation: messageEntrance 1.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.5);
}

    .diwali-message::before {
        content: '';
        position: absolute;
        top: -10px;
        left: -10px;
        right: -10px;
        bottom: -10px;
        background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
        animation: shimmer 3s ease-in-out infinite;
        z-index: -1;
    }

    .diwali-message small {
        display: block;
        font-size: 1.5rem;
        margin-top: 15px;
        font-weight: 600;
        color: #5D4037;
        opacity: 0;
        animation: fadeInUp 1s ease 1s forwards;
    }

.diwali-sparkle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    animation: sparkleTwinkle 1.5s ease-in-out infinite;
    box-shadow: 0 0 10px white, 0 0 20px gold;
}

@keyframes messageEntrance {
    0% {
        transform: scale(0) rotate(-10deg);
        opacity: 0;
    }

    70% {
        transform: scale(1.1) rotate(2deg);
        opacity: 1;
    }

    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shimmer {
    0%, 100% {
        transform: translateX(-100%) rotate(45deg);
    }

    50% {
        transform: translateX(100%) rotate(45deg);
    }
}

@keyframes sparkleTwinkle {
    0%, 100% {
        opacity: 0;
        transform: scale(0.5);
    }

    50% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Rangoli Pattern Background Effect */
.rangoli-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.1;
    background: radial-gradient(circle at 20% 80%, rgba(255, 215, 0, 0.3) 0%, transparent 50%), radial-gradient(circle at 80% 20%, rgba(255, 140, 0, 0.3) 0%, transparent 50%), radial-gradient(circle at 40% 40%, rgba(255, 69, 0, 0.2) 0%, transparent 50%);
    animation: rangoliRotate 30s linear infinite;
}

@keyframes rangoliRotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Fade out animation for container */
.diwali-container.fade-out {
    animation: containerFadeOut 2s ease-in-out forwards;
}

@keyframes containerFadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .diwali-message {
        font-size: 2rem;
        padding: 25px 40px;
        margin: 20px;
    }

        .diwali-message small {
            font-size: 1.2rem;
        }

    .diya {
        width: 35px;
        height: 50px;
    }

    .diya-body {
        width: 35px;
        height: 25px;
    }

    .diya-flame {
        width: 10px;
        height: 20px;
        top: -15px;
    }

    .diya-glow {
        width: 40px;
        height: 40px;
        top: -30px;
    }
}

@media (max-width: 480px) {
    .diwali-message {
        font-size: 1.5rem;
        padding: 20px 30px;
    }

        .diwali-message small {
            font-size: 1rem;
        }
}