/* ===================================
   HIỆU ỨNG KHÔNG KHÍ TẾT
   =================================== */

/* Container cho hiệu ứng Tết - không ảnh hưởng đến nội dung trang */
#tet-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

/* Hoa mai rơi */
.tet-flower {
    position: absolute;
    font-size: 20px;
    animation: fall linear infinite;
    opacity: 0.8;
}

/* Lì xì rơi */
.tet-envelope {
    position: absolute;
    font-size: 24px;
    animation: fall-rotate linear infinite;
    opacity: 0.9;
}

/* Pháo hoa */
.firework {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    animation: firework-explosion 1.5s ease-out forwards;
}

/* Chữ Tết rơi */
.tet-text {
    position: absolute;
    font-size: 18px;
    font-weight: bold;
    color: #ff0000;
    text-shadow: 2px 2px 4px rgba(255, 215, 0, 0.8);
    animation: fall-swing linear infinite;
    opacity: 0.85;
}

/* Animation: Rơi thẳng */
@keyframes fall {
    0% {
        transform: translateY(-100px);
        opacity: 0;
    }

    10% {
        opacity: 0.8;
    }

    90% {
        opacity: 0.8;
    }

    100% {
        transform: translateY(100vh);
        opacity: 0;
    }
}

/* Animation: Rơi và xoay */
@keyframes fall-rotate {
    0% {
        transform: translateY(-100px) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: 0.9;
    }

    90% {
        opacity: 0.9;
    }

    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

/* Animation: Rơi và lắc lư */
@keyframes fall-swing {
    0% {
        transform: translateY(-100px) translateX(0);
        opacity: 0;
    }

    10% {
        opacity: 0.85;
    }

    25% {
        transform: translateY(25vh) translateX(20px);
    }

    50% {
        transform: translateY(50vh) translateX(-20px);
    }

    75% {
        transform: translateY(75vh) translateX(20px);
    }

    90% {
        opacity: 0.85;
    }

    100% {
        transform: translateY(100vh) translateX(0);
        opacity: 0;
    }
}

/* Animation: Pháo hoa nổ */
@keyframes firework-explosion {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }

    100% {
        transform: translate(var(--x), var(--y)) scale(0);
        opacity: 0;
    }
}

/* Hiệu ứng ánh sáng pháo hoa */
.firework-burst {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    box-shadow: 0 0 10px currentColor, 0 0 20px currentColor;
}

/* Responsive: Giảm số lượng hiệu ứng trên mobile */
@media (max-width: 768px) {

    .tet-flower,
    .tet-envelope,
    .tet-text {
        font-size: 16px;
    }

    .firework {
        width: 3px;
        height: 3px;
    }
}

/* Tắt hiệu ứng nếu người dùng bật reduce motion */
@media (prefers-reduced-motion: reduce) {
    #tet-background {
        display: none;
    }
}