/**
 * Tet/Lunar New Year Falling Effect
 * Cherry blossoms, lucky money, and festive decorations
 * Vietnamese Spring Festival theme with red & gold colors
 */

.tet-effect-container,
.snowflakes-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.tet-petal,
.snowflake {
    position: absolute;
    top: -20px;
    user-select: none;
    pointer-events: none;
    animation: tetFall linear infinite;
    opacity: 0.9;
    filter: drop-shadow(0 2px 4px rgba(200, 36, 36, 0.3));
}

/* Different sizes for variety */
.tet-petal:nth-child(3n) {
    font-size: 0.9em;
    opacity: 0.7;
}

.tet-petal:nth-child(4n) {
    font-size: 1.3em;
    opacity: 1;
}

.tet-petal:nth-child(5n) {
    font-size: 0.7em;
    opacity: 0.6;
}

/* Falling animation - gentle float like petals */
@keyframes tetFall {
    0% {
        transform: translateY(0vh) rotate(0deg);
        opacity: 0;
    }

    5% {
        opacity: 0.9;
    }

    95% {
        opacity: 0.9;
    }

    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

/* Swaying animation - more natural for petals */
@keyframes tetSway {

    0%,
    100% {
        transform: translateX(0) rotate(0deg);
    }

    25% {
        transform: translateX(20px) rotate(10deg);
    }

    50% {
        transform: translateX(-10px) rotate(-5deg);
    }

    75% {
        transform: translateX(15px) rotate(8deg);
    }
}

/* Combined animations */
.tet-petal.sway,
.snowflake.sway {
    animation: tetFall linear infinite, tetSway 4s ease-in-out infinite;
}

/* Performance optimization - reduce on mobile */
@media (max-width: 768px) {

    .tet-petal:nth-child(n+20),
    .snowflake:nth-child(n+15) {
        display: none;
    }

    .tet-petal,
    .snowflake {
        font-size: 0.9em;
    }
}

/* Disable on very small screens or low-end devices */
@media (max-width: 480px) and (prefers-reduced-motion: reduce) {

    .tet-effect-container,
    .snowflakes-container {
        display: none;
    }
}

/* ========================================
   TET THEMED DECORATIONS FOR HEADER
   ======================================== */

/* Add festive glow to header on Tet */
.site-header {
    background: linear-gradient(135deg,
            rgba(200, 36, 36, 0.03) 0%,
            rgba(255, 215, 0, 0.02) 50%,
            rgba(200, 36, 36, 0.03) 100%) !important;
}

/* Festive red accent for brand elements */
.text-red-500,
.text-red-600 {
    text-shadow: 0 0 20px rgba(220, 38, 38, 0.15);
}

/* ========================================
   TET 2026 BACKGROUND FOR ENTIRE PAGE
   ======================================== */

/* Apply Tet themed background to the entire page */
body {
    background-image: url('../images/tet-2026-bg.png');
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-position: center center;
    min-height: 100vh;
}

/* Alternative: Add subtle gradient overlay for better readability */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg,
            rgba(255, 255, 255, 0.85) 0%,
            rgba(255, 255, 255, 0.7) 50%,
            rgba(255, 255, 255, 0.85) 100%);
    z-index: -1;
    pointer-events: none;
}

/* Ensure content areas remain readable */
main,
.site-content,
#primary {
    position: relative;
    z-index: 1;
}

/* Make white backgrounds slightly transparent to show background */
.bg-white {
    background-color: rgba(255, 255, 255, 0.95) !important;
}

.bg-gray-50,
.bg-gray-100 {
    background-color: rgba(249, 250, 251, 0.9) !important;
}

/* ========================================
   POPULAR KEYWORDS / SEARCH SPACING FIX
   ======================================== */

/* Reduce gap between search bar and keywords */
.popular-keywords-section {
    margin-top: 4px !important;
    padding: 8px 12px !important;
}

/* Tighter keyword button spacing on mobile */
@media (max-width: 768px) {
    .popular-keywords-section {
        margin: 4px 8px !important;
        padding: 6px 10px !important;
    }

    .keywords-grid {
        gap: 6px !important;
    }

    .keyword-button {
        padding: 6px 10px !important;
        font-size: 11px !important;
    }
}