/* 各节日氛围层 + 全局视觉增强 v2.2 */

/* ---- 氛围遮罩（每节日独立色调） ---- */
.fest-atmosphere {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    animation: festAtmoFadeIn 1.2s ease forwards;
}

@keyframes festAtmoFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fest-atmosphere--newyear {
    background:
        radial-gradient(ellipse 80% 50% at 50% 100%, rgba(255, 90, 40, 0.08) 0%, transparent 55%),
        radial-gradient(ellipse 40% 30% at 10% 0%, rgba(255, 200, 50, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse 40% 30% at 90% 0%, rgba(255, 200, 50, 0.06) 0%, transparent 50%);
}

.fest-atmosphere--national {
    background:
        radial-gradient(ellipse 50% 40% at 15% 5%, rgba(255, 50, 50, 0.07) 0%, transparent 50%),
        radial-gradient(ellipse 50% 40% at 85% 5%, rgba(255, 50, 50, 0.07) 0%, transparent 50%),
        linear-gradient(180deg, rgba(255, 215, 0, 0.03) 0%, transparent 30%);
}

.fest-atmosphere--christmas {
    background:
        radial-gradient(ellipse 100% 60% at 50% 0%, rgba(180, 220, 255, 0.12) 0%, transparent 45%),
        linear-gradient(180deg, rgba(20, 60, 100, 0.06) 0%, transparent 50%);
}

.fest-atmosphere--midautumn {
    background:
        radial-gradient(ellipse 35% 25% at 88% 6%, rgba(255, 220, 100, 0.18) 0%, transparent 70%),
        linear-gradient(180deg, rgba(8, 12, 35, 0.35) 0%, rgba(15, 20, 50, 0.08) 35%, transparent 65%),
        radial-gradient(ellipse 100% 40% at 50% 100%, rgba(30, 40, 80, 0.12) 0%, transparent 50%);
}

.fest-atmosphere--lantern {
    background:
        radial-gradient(ellipse 60% 50% at 50% 0%, rgba(255, 140, 60, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse 80% 40% at 50% 100%, rgba(255, 80, 30, 0.05) 0%, transparent 45%);
}

.fest-atmosphere--dragonboat {
    background:
        linear-gradient(180deg, rgba(46, 80, 22, 0.04) 0%, transparent 25%),
        linear-gradient(0deg, rgba(30, 100, 140, 0.12) 0%, transparent 18%);
}

.fest-atmosphere--children {
    background:
        radial-gradient(circle at 20% 80%, rgba(255, 107, 157, 0.06) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(77, 150, 255, 0.06) 0%, transparent 40%),
        radial-gradient(circle at 50% 20%, rgba(255, 217, 61, 0.05) 0%, transparent 35%);
}

/* ---- 星空 ---- */
.fest-starfield {
    position: fixed;
    inset: 0;
    z-index: 2;
    pointer-events: none;
}

.fest-star {
    position: absolute;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.8);
    animation: festStarTwinkle 3s ease-in-out infinite;
}

@keyframes festStarTwinkle {
    0%, 100% { opacity: 0.2; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* ---- 金粉飘尘（新年） ---- */
.fest-gold-dust {
    position: fixed;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    overflow: hidden;
}

.fest-dust-particle {
    position: absolute;
    bottom: -10px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: radial-gradient(circle, #fff8dc 0%, #ffd700 60%, transparent 100%);
    box-shadow: 0 0 6px rgba(255, 215, 0, 0.8);
    animation: festDustRise linear infinite;
}

@keyframes festDustRise {
    0% { transform: translateY(0) translateX(0) scale(0); opacity: 0; }
    10% { opacity: 1; transform: scale(1); }
    90% { opacity: 0.6; }
    100% { transform: translateY(-110vh) translateX(30px) scale(0.3); opacity: 0; }
}

/* ---- 儿童节彩点 ---- */
.fest-confetti-dots {
    position: fixed;
    inset: 0;
    z-index: 2;
    pointer-events: none;
}

.fest-confetti-dot {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    animation: festDotFloat 8s ease-in-out infinite;
}

@keyframes festDotFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.4; }
    50% { transform: translateY(-20px) rotate(180deg); opacity: 0.9; }
}

/* ---- 元素入场 stagger ---- */
.fest-fx-enter {
    animation: festFxEnter 0.9s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.fest-fx-enter-d1 { animation-delay: 0.15s; }
.fest-fx-enter-d2 { animation-delay: 0.3s; }
.fest-fx-enter-d3 { animation-delay: 0.45s; }

@keyframes festFxEnter {
    from { opacity: 0; transform: translateY(-20px) scale(0.92); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---- 中秋：月亮光晕 + CSS 花瓣 ---- */
.ma-moon-halo {
    position: absolute;
    inset: -25%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 220, 100, 0.35) 0%, rgba(255, 180, 50, 0.1) 40%, transparent 70%);
    animation: maHaloPulse 4s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes maHaloPulse {
    0% { transform: scale(0.95); opacity: 0.7; }
    100% { transform: scale(1.08); opacity: 1; }
}

.ma-moon-wrap.fest-fx-enter { animation-name: festFxEnter, maMoonFloat; animation-duration: 0.9s, 8s; animation-delay: 0s, 0.9s; animation-iteration-count: 1, infinite; animation-fill-mode: backwards, none; }

.ma-petal {
    position: fixed;
    z-index: 9997;
    pointer-events: none;
    will-change: transform, opacity;
}

.ma-petal-shape {
    display: block;
    width: 10px;
    height: 10px;
    background: radial-gradient(ellipse at 30% 30%, #ffe082 0%, #ffb300 50%, #ff8f00 100%);
    border-radius: 50% 0 50% 0;
    box-shadow: 0 0 8px rgba(255, 200, 80, 0.7);
    transform: rotate(45deg);
}

.ma-petal-shape::before,
.ma-petal-shape::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: inherit;
    border-radius: inherit;
    box-shadow: inherit;
}

.ma-petal-shape::before { transform: rotate(72deg); }
.ma-petal-shape::after { transform: rotate(144deg); }

/* ---- 各节日主元素 glow 增强 ---- */
.deng-box, .deng-box1 { filter: drop-shadow(0 0 20px rgba(255, 100, 50, 0.35)); }
.nd-blimp { filter: drop-shadow(0 0 16px rgba(255, 50, 50, 0.25)); }
.lf-hanging-lantern { filter: drop-shadow(0 0 24px rgba(255, 120, 40, 0.45)); }
.cm-lights-container { filter: drop-shadow(0 4px 12px rgba(255, 255, 255, 0.15)); }
.cd-mascot-container { filter: drop-shadow(0 8px 20px rgba(102, 126, 234, 0.25)); }

/* ---- 圣诞雪花增强 ---- */
.cm-snow {
    background: radial-gradient(circle, #fff 30%, rgba(255,255,255,0.6) 100%) !important;
    box-shadow: 0 0 8px rgba(255,255,255,0.9), 0 0 2px rgba(200,230,255,0.8) !important;
}

/* ---- 国庆彩带增强 ---- */
.nd-confetti {
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
}

@media (max-width: 768px) {
    .fest-atmosphere--midautumn {
        background:
            radial-gradient(ellipse 40% 25% at 90% 5%, rgba(255, 220, 100, 0.15) 0%, transparent 60%),
            linear-gradient(180deg, rgba(8, 12, 35, 0.28) 0%, transparent 40%);
    }
    .fest-star { display: none; }
    .fest-starfield .fest-star:nth-child(-n+15) { display: block; }
}

@media (prefers-reduced-motion: reduce) {
    .fest-atmosphere, .fest-dust-particle, .fest-star, .fest-confetti-dot, .ma-moon-halo {
        animation: none !important;
    }
}
