/**
 * Site Celebration Animation CSS
 * Lightweight animations for celebrations
 */

/* Animation Container */
.yeapnews-celebration-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999999;
    background: transparent !important;
}

.yeapnews-celebration-overlay * {
    pointer-events: none;
}

.yeapnews-celebration-canvas {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    display: block;
    pointer-events: none;
    z-index: 999999;
}

/* Close Button */
.yeapnews-celebration-close {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    color: #ffffff !important;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 24px;
    cursor: pointer;
    pointer-events: auto;
    z-index: 1000000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.yeapnews-celebration-close:hover {
    background: rgba(0, 0, 0, 0.9);
}

/* Message Container */
.yeapnews-celebration-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.85);
    color: #ffffff !important;
    padding: 30px 50px;
    border-radius: 15px;
    text-align: center;
    z-index: 1000000;
    pointer-events: auto;
    max-width: 90%;
    animation: fadeInScale 0.5s ease-out;
}

.yeapnews-celebration-message h2 {
    margin: 0 0 15px 0;
    font-size: 2.5em;
    font-weight: bold;
    color: #FFD700 !important;
}

.yeapnews-celebration-message p {
    margin: 0;
    font-size: 1.3em;
    color: #ffffff !important;
}

#yeapnews-celebration-fallback,
#yeapnews-celebration-fallback *,
.yeapnews-celebration-overlay,
.yeapnews-celebration-overlay * {
    text-shadow: none !important;
}

#yeapnews-celebration-fallback,
#yeapnews-celebration-fallback div,
#yeapnews-celebration-fallback p,
.yeapnews-celebration-message,
.yeapnews-celebration-message p {
    color: #ffffff !important;
}

#yeapnews-celebration-fallback h1,
#yeapnews-celebration-fallback h2,
#yeapnews-celebration-fallback h3,
.yeapnews-celebration-message h1,
.yeapnews-celebration-message h2,
.yeapnews-celebration-message h3 {
    color: #FFD700 !important;
}

#yeapnews-celebration-fallback-close,
.yeapnews-celebration-close {
    color: #ffffff !important;
}

@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Confetti Animation */
.yeapnews-confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #f00;
    animation: confettiFall linear forwards;
}

@keyframes confettiFall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Fireworks Animation */
.yeapnews-firework {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #fff;
    animation: fireworkExplode ease-out forwards;
}

@keyframes fireworkExplode {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(50);
        opacity: 0;
    }
}

/* Balloon Animation */
.yeapnews-balloon {
    position: absolute;
    width: 30px;
    height: 40px;
    border-radius: 50% 50% 50% 50%;
    animation: balloonFloat ease-in-out forwards;
}

.yeapnews-balloon::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 20px;
    background: rgba(255, 255, 255, 0.5);
}

@keyframes balloonFloat {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(-20vh) rotate(360deg);
        opacity: 0;
    }
}

/* Stars/Sparkles Animation */
.yeapnews-star {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #FFD700;
    border-radius: 50%;
    animation: starTwinkle ease-in-out forwards;
    box-shadow: 0 0 10px #FFD700;
}

@keyframes starTwinkle {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(2);
        opacity: 1;
    }
    100% {
        transform: scale(0);
        opacity: 0;
    }
}

/* Snow Animation */
.yeapnews-snowflake {
    position: absolute;
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    animation: snowFall linear forwards;
    box-shadow: 0 0 5px white;
}

@keyframes snowFall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

/* Hearts Animation */
.yeapnews-heart {
    position: absolute;
    width: 20px;
    height: 20px;
    background: #ff0000;
    transform: rotate(45deg);
    animation: heartFloat ease-in-out forwards;
}

.yeapnews-heart::before,
.yeapnews-heart::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: #ff0000;
    border-radius: 50%;
}

.yeapnews-heart::before {
    top: -10px;
    left: 0;
}

.yeapnews-heart::after {
    left: -10px;
    top: 0;
}

@keyframes heartFloat {
    0% {
        transform: translateY(100vh) rotate(45deg) scale(0.5);
        opacity: 1;
    }
    100% {
        transform: translateY(-20vh) rotate(45deg) scale(1.5);
        opacity: 0;
    }
}

/* Trophy Animation */
.yeapnews-trophy {
    position: absolute;
    width: 60px;
    height: 80px;
    animation: trophyBounce ease-out forwards;
}

.yeapnews-trophy-icon {
    font-size: 60px;
    color: #FFD700;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
}

@keyframes trophyBounce {
    0% {
        transform: translateY(0) scale(0);
        opacity: 0;
    }
    50% {
        transform: translateY(50vh) scale(1.5);
        opacity: 1;
    }
    100% {
        transform: translateY(50vh) scale(1);
        opacity: 0;
    }
}

/* Custom Image Animation */
.yeapnews-custom-image {
    position: absolute;
    max-width: 100px;
    max-height: 100px;
    animation: customImageFloat ease-in-out forwards;
}

@keyframes customImageFloat {
    0% {
        transform: translateY(0) rotate(0deg) scale(0.5);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(360deg) scale(1.5);
        opacity: 0;
    }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .yeapnews-celebration-message {
        padding: 20px 30px;
        max-width: 95%;
    }

    .yeapnews-celebration-message h2 {
        font-size: 1.8em;
    }

    .yeapnews-celebration-message p {
        font-size: 1.1em;
    }

    .yeapnews-celebration-close {
        width: 35px;
        height: 35px;
        font-size: 20px;
    }
}

/* Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .yeapnews-celebration-overlay {
        display: none !important;
    }
}
