/* File: public_html/assets/css/animations.css */
/* Animation Styles for Sarwajanik Durga Mandir Website */

/* Intro Screen */
.intro-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0a0a0a;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.intro-screen.fade-out {
    opacity: 0;
    visibility: hidden;
}

.intro-content {
    text-align: center;
    z-index: 10;
}

/* Golden Glowing Text */
.golden-text {
    font-size: 4rem;
    font-weight: 700;
    color: #d4af37;
    text-shadow: 
        0 0 10px #d4af37,
        0 0 20px #d4af37,
        0 0 40px #d4af37,
        0 0 80px #d4af37;
    animation: goldenPulse 2s ease-in-out infinite;
    font-family: 'Playfair Display', Georgia, serif;
    letter-spacing: 0.1em;
}

@keyframes goldenPulse {
    0%, 100% {
        text-shadow: 
            0 0 10px #d4af37,
            0 0 20px #d4af37,
            0 0 40px #d4af37,
            0 0 80px #d4af37;
        transform: scale(1);
    }
    50% {
        text-shadow: 
            0 0 20px #ffd700,
            0 0 40px #ffd700,
            0 0 80px #ffd700,
            0 0 120px #ffd700;
        transform: scale(1.05);
    }
}

/* Mantra Text */
.mantra-text {
    font-size: 1.5rem;
    color: #fff;
    margin-top: 2rem;
    font-family: 'Noto Sans Devanagari', 'Mangal', sans-serif;
    line-height: 2;
    opacity: 0.9;
    min-height: 4rem;
}

.mantra-text .typed {
    border-right: 2px solid #d4af37;
    animation: cursorBlink 0.7s infinite;
}

@keyframes cursorBlink {
    0%, 100% { border-color: transparent; }
    50% { border-color: #d4af37; }
}

/* Skip Button */
.skip-btn {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    background: transparent;
    border: 2px solid #d4af37;
    color: #d4af37;
    padding: 0.75rem 2rem;
    font-size: 1rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 100;
}

.skip-btn:hover {
    background: #d4af37;
    color: #0a0a0a;
}

/* Flower Petals */
.petals-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 5;
}

.petal {
    position: absolute;
    top: -50px;
    width: 20px;
    height: 20px;
    border-radius: 50% 0 50% 50%;
    opacity: 0.8;
    animation: fall linear infinite;
}

.petal.pink { background: #ff6b9d; }
.petal.red { background: #ff4444; }
.petal.orange { background: #ff8c00; }
.petal.yellow { background: #ffd700; }

@keyframes fall {
    0% {
        transform: translateY(-50px) rotate(0deg) translateX(0);
        opacity: 1;
    }
    25% {
        transform: translateY(25vh) rotate(90deg) translateX(20px);
    }
    50% {
        transform: translateY(50vh) rotate(180deg) translateX(-20px);
    }
    75% {
        transform: translateY(75vh) rotate(270deg) translateX(20px);
    }
    100% {
        transform: translateY(100vh) rotate(360deg) translateX(0);
        opacity: 0;
    }
}

/* Diya Flame */
.diya-container {
    position: absolute;
    bottom: 20%;
    z-index: 8;
}

.diya-container.left {
    left: 10%;
}

.diya-container.right {
    right: 10%;
}

.diya {
    position: relative;
    width: 60px;
    height: 30px;
}

.diya-bowl {
    width: 60px;
    height: 30px;
    background: linear-gradient(180deg, #8b4513, #5d3a1a);
    border-radius: 0 0 30px 30px;
    position: relative;
}

.diya-bowl::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 10px;
    background: #3d2314;
    border-radius: 50%;
}

.flame {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    width: 15px;
    height: 30px;
    background: linear-gradient(180deg, #fff, #ff8c00, #ff4500);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    animation: flicker 0.1s ease-in-out infinite alternate;
    box-shadow: 
        0 0 20px #ff8c00,
        0 0 40px #ff4500,
        0 0 60px #ff0000;
}

.flame::before {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    background: #3d2314;
    border-radius: 50%;
}

@keyframes flicker {
    0% {
        transform: translateX(-50%) scale(1) rotate(-2deg);
        opacity: 1;
    }
    100% {
        transform: translateX(-50%) scale(1.1) rotate(2deg);
        opacity: 0.9;
    }
}

/* Aarti Diya Animation */
.aarti-diya {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.aarti-diya.show {
    opacity: 1;
}

.aarti-diya .diya {
    transform: scale(1.5);
}

.aarti-diya .flame {
    animation: aartiFlicker 0.08s ease-in-out infinite alternate;
}

@keyframes aartiFlicker {
    0% {
        transform: translateX(-50%) scale(1.2) rotate(-3deg);
        box-shadow: 
            0 0 30px #ff8c00,
            0 0 60px #ff4500,
            0 0 90px #ff0000;
    }
    100% {
        transform: translateX(-50%) scale(1.3) rotate(3deg);
        box-shadow: 
            0 0 40px #ff8c00,
            0 0 80px #ff4500,
            0 0 120px #ff0000;
    }
}

/* Fade In Animation */
.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Slide In Animations */
.slide-in-left {
    animation: slideInLeft 0.5s ease forwards;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: slideInRight 0.5s ease forwards;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scale In Animation */
.scale-in {
    animation: scaleIn 0.3s ease forwards;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Glow Animation */
.glow {
    animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px var(--primary-color);
    }
    50% {
        box-shadow: 0 0 20px var(--primary-color), 0 0 40px var(--primary-color);
    }
}

/* Pulse Animation */
.pulse {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Bounce Animation */
.bounce {
    animation: bounce 1s ease infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Rotate Animation */
.rotate {
    animation: rotate 2s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Shimmer Effect */
.shimmer {
    position: relative;
    overflow: hidden;
}

.shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    100% {
        left: 100%;
    }
}

/* Scroll Reveal */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Ripple Effect */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.ripple:active::after {
    width: 300px;
    height: 300px;
}

/* Confetti Animation */
.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    pointer-events: none;
    animation: confetti-fall 3s ease-out forwards;
}

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

/* Responsive Animations */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .golden-text {
        font-size: 2.5rem;
    }
    
    .mantra-text {
        font-size: 1rem;
        padding: 0 1rem;
    }
    
    .diya-container.left {
        left: 5%;
    }
    
    .diya-container.right {
        right: 5%;
    }
    
    .petal {
        width: 15px;
        height: 15px;
    }
}
