/* ========================================
   SPRING FLOWER EFFECT - Hoa Mai & Hoa Đào
   Realistic falling flower petal animation
   ======================================== */

/* Container - Fullscreen overlay */
.spring-flowers-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    overflow: hidden;
    z-index: 9999;
}

/* Base Petal Style */
.flower-petal {
    position: absolute;
    pointer-events: none;
    will-change: transform, opacity;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* Hoa Mai - Golden Yellow Apricot Blossom */
.flower-mai {
    width: 18px;
    height: 18px;
    background: radial-gradient(ellipse at 30% 30%,
            #FFE066 0%,
            #FFD700 40%,
            #FFC107 70%,
            #E6A800 100%);
    border-radius: 50% 50% 50% 0;
    transform-origin: center center;
    box-shadow:
        inset -2px -2px 4px rgba(230, 168, 0, 0.3),
        inset 2px 2px 4px rgba(255, 255, 255, 0.4);
}

/* Petal variation 1 */
.flower-mai.v1 {
    border-radius: 60% 40% 50% 50%;
    width: 16px;
    height: 20px;
}

/* Petal variation 2 */
.flower-mai.v2 {
    border-radius: 50% 50% 40% 60%;
    width: 14px;
    height: 16px;
}

/* Hoa Đào - Soft Pink Peach Blossom */
.flower-dao {
    width: 20px;
    height: 20px;
    background: radial-gradient(ellipse at 30% 30%,
            #FFE4EC 0%,
            #FFB8D0 35%,
            #FF8CB8 65%,
            #FF6B9D 100%);
    border-radius: 50% 50% 50% 0;
    transform-origin: center center;
    box-shadow:
        inset -2px -2px 4px rgba(255, 107, 157, 0.2),
        inset 2px 2px 4px rgba(255, 255, 255, 0.5);
}

/* Petal variation 1 */
.flower-dao.v1 {
    border-radius: 55% 45% 50% 50%;
    width: 18px;
    height: 22px;
    background: radial-gradient(ellipse at 40% 40%,
            #FFF0F5 0%,
            #FFC0CB 40%,
            #FF91A4 100%);
}

/* Petal variation 2 */
.flower-dao.v2 {
    border-radius: 50% 50% 45% 55%;
    width: 15px;
    height: 18px;
    background: radial-gradient(ellipse at 35% 35%,
            #FFE4EC 0%,
            #FFD0E0 50%,
            #FFB0C8 100%);
}

/* Petal center dot (optional - for full flowers) */
.flower-petal.full::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 4px;
    height: 4px;
    background: #FFD700;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.flower-dao.full::after {
    background: #FF6B9D;
}

/* Animation keyframes for variety */
@keyframes flutter {

    0%,
    100% {
        transform: rotateZ(0deg) rotateY(0deg);
    }

    25% {
        transform: rotateZ(15deg) rotateY(20deg);
    }

    50% {
        transform: rotateZ(-10deg) rotateY(-15deg);
    }

    75% {
        transform: rotateZ(10deg) rotateY(10deg);
    }
}

@keyframes sway {

    0%,
    100% {
        transform: translateX(0);
    }

    50% {
        transform: translateX(30px);
    }
}

/* Gentle glow for night/dark mode */
@media (prefers-color-scheme: dark) {
    .flower-mai {
        filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.4));
    }

    .flower-dao {
        filter: drop-shadow(0 0 6px rgba(255, 139, 184, 0.4));
    }
}

/* Performance optimization for mobile */
@media (max-width: 768px) {
    .spring-flowers-container {
        /* Reduce particle count via JS on mobile */
        opacity: 0.85;
    }

    .flower-petal {
        filter: none;
        /* Remove shadow on mobile for performance */
    }
}

/* Disable for reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .spring-flowers-container {
        display: none;
    }
}

/* ========================================
   SNOW EFFECT - Tuyết Rơi
   Soft falling snowflakes (Style #7)
   ======================================== */

/* Snowflake Base - Soft white circular with glow */
.snowflake {
    position: absolute;
    pointer-events: none;
    will-change: transform, opacity;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 40%,
            #ffffff 0%,
            #ffffff 50%,
            rgba(255, 255, 255, 0.95) 70%,
            rgba(255, 255, 255, 0.7) 100%);
    box-shadow:
        0 0 10px rgba(255, 255, 255, 0.9),
        0 0 20px rgba(255, 255, 255, 0.5),
        0 0 30px rgba(200, 220, 255, 0.3);
    filter: blur(0.3px);
}

/* Snowflake sizes - larger for visibility */
.snowflake.size-s {
    width: 4px;
    height: 4px;
    box-shadow:
        0 0 6px rgba(255, 255, 255, 0.8),
        0 0 12px rgba(255, 255, 255, 0.4);
}

.snowflake.size-m {
    width: 7px;
    height: 7px;
    box-shadow:
        0 0 8px rgba(255, 255, 255, 0.9),
        0 0 16px rgba(255, 255, 255, 0.5);
}

.snowflake.size-l {
    width: 10px;
    height: 10px;
    box-shadow:
        0 0 12px rgba(255, 255, 255, 1),
        0 0 24px rgba(255, 255, 255, 0.6),
        0 0 40px rgba(200, 220, 255, 0.3);
}

/* Crystal snowflake - 6-branch star pattern like #7 */
.snowflake.crystal {
    border-radius: 0;
    background: none !important;
    box-shadow: none !important;
    position: relative;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.8));
}

/* Main cross + diagonal for 6-branch effect */
.snowflake.crystal::before {
    content: '❄';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: inherit;
    color: white;
    text-shadow:
        0 0 4px rgba(255, 255, 255, 1),
        0 0 8px rgba(200, 220, 255, 0.8);
    line-height: 1;
}

.snowflake.crystal.size-s {
    width: 10px;
    height: 10px;
}

.snowflake.crystal.size-s::before {
    font-size: 10px;
}

.snowflake.crystal.size-m {
    width: 14px;
    height: 14px;
}

.snowflake.crystal.size-m::before {
    font-size: 14px;
}

.snowflake.crystal.size-l {
    width: 18px;
    height: 18px;
}

.snowflake.crystal.size-l::before {
    font-size: 18px;
}

/* Extra bright glow on dark backgrounds */
@media (prefers-color-scheme: dark) {
    .snowflake {
        filter: drop-shadow(0 0 8px rgba(255, 255, 255, 1));
    }

    .snowflake.crystal::before {
        text-shadow:
            0 0 6px rgba(255, 255, 255, 1),
            0 0 12px rgba(180, 210, 255, 0.9),
            0 0 20px rgba(150, 180, 255, 0.6);
    }
}

/* Mobile optimization */
@media (max-width: 768px) {
    .snowflake {
        box-shadow: 0 0 6px rgba(255, 255, 255, 0.8);
    }
}