/**
 * 节日主题样式
 * Forum Theme - Festival Theme Styles
 */

/* ========== 节日横幅 ========== */
.festival-banner {
    padding: 12px 20px;
    text-align: center;
    font-size: 14px;
    line-height: 1.6;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.festival-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.festival-banner i {
    font-size: 18px;
    margin-right: 8px;
    vertical-align: middle;
}

.festival-banner strong {
    font-size: 15px;
}

/* ========== 春节主题 ========== */
body.festival-spring_festival .festival-banner {
    background: linear-gradient(135deg, #d32f2f 0%, #c62828 100%);
    color: #ffd700;
    border-bottom: 3px solid #ffd700;
}

/* ========== 元宵节主题 ========== */
body.festival-lantern_festival .festival-banner {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff5252 100%);
    color: #fff;
    border-bottom: 3px solid #ffd700;
}

/* ========== 清明节主题 ========== */
body.festival-qingming .festival-banner {
    background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
    color: #fff;
    border-bottom: 3px solid #81c784;
}

/* ========== 劳动节主题 ========== */
body.festival-labor_day .festival-banner {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: #fff;
    border-bottom: 3px solid #ffb74d;
}

/* ========== 端午节主题 ========== */
body.festival-dragon_boat .festival-banner {
    background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
    color: #fff;
    border-bottom: 3px solid #81c784;
}

/* ========== 中秋节主题 ========== */
body.festival-mid_autumn .festival-banner {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: #fff;
    border-bottom: 3px solid #ffd54f;
}

/* ========== 国庆节主题 ========== */
body.festival-national_day .festival-banner {
    background: linear-gradient(135deg, #d32f2f 0%, #c62828 100%);
    color: #ffd700;
    border-bottom: 3px solid #ffd700;
}

/* ========== 圣诞节主题 ========== */
body.festival-christmas .festival-banner {
    background: linear-gradient(135deg, #c62828 0%, #2e7d32 50%, #c62828 100%);
    color: #fff;
    border-bottom: 3px solid #ffd700;
}

/* ========== 元旦主题 ========== */
body.festival-new_year .festival-banner {
    background: linear-gradient(135deg, #1976d2 0%, #0d47a1 100%);
    color: #ffd700;
    border-bottom: 3px solid #ffd700;
}

/* ========== 情人节主题 ========== */
body.festival-valentine .festival-banner {
    background: linear-gradient(135deg, #e91e63 0%, #c2185b 100%);
    color: #fff;
    border-bottom: 3px solid #f48fb1;
}

/* ========== 万圣节主题 ========== */
body.festival-halloween .festival-banner {
    background: linear-gradient(135deg, #ff6f00 0%, #212121 100%);
    color: #fff;
    border-bottom: 3px solid #ff6f00;
}

/* ========== 装饰元素容器 ========== */
.festival-decorations {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

/* ========== 灯笼装饰 ========== */
.festival-lantern {
    position: absolute;
    width: 60px;
    height: 80px;
    background: radial-gradient(ellipse at center, #ff4444 0%, #cc0000 100%);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    box-shadow: 0 0 20px rgba(255, 68, 68, 0.6), inset 0 0 10px rgba(0, 0, 0, 0.3);
    animation: lanternSwing 3s ease-in-out infinite;
}

.festival-lantern::before {
    content: '福';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ffd700;
    font-size: 24px;
    font-weight: bold;
}

.festival-lantern::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 10px;
    background: #ffd700;
    border-radius: 50%;
}

@keyframes lanternSwing {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

/* ========== 月亮装饰 ========== */
.festival-moon {
    position: absolute;
    top: 80px;
    right: 100px;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle at 30% 30%, #fff9e6 0%, #ffd700 100%);
    border-radius: 50%;
    box-shadow: 0 0 40px rgba(255, 215, 0, 0.8), 0 0 80px rgba(255, 215, 0, 0.4);
    animation: moonGlow 4s ease-in-out infinite;
}

@keyframes moonGlow {
    0%, 100% { box-shadow: 0 0 40px rgba(255, 215, 0, 0.8), 0 0 80px rgba(255, 215, 0, 0.4); }
    50% { box-shadow: 0 0 60px rgba(255, 215, 0, 1), 0 0 120px rgba(255, 215, 0, 0.6); }
}

/* ========== 柳枝装饰（清明节） ========== */
.festival-willow {
    position: absolute;
    font-size: 48px;
    opacity: 0.8;
    animation: willowSway 4s ease-in-out infinite;
    transform-origin: top center;
}

@keyframes willowSway {
    0%, 100% { transform: rotate(-8deg); }
    50% { transform: rotate(8deg); }
}

/* ========== 国旗装饰 ========== */
.festival-flag {
    position: absolute;
    width: 80px;
    height: 60px;
    background: linear-gradient(to bottom, #de2910 0%, #de2910 100%);
    animation: flagWave 2s ease-in-out infinite;
}

.festival-flag::before {
    content: '★';
    position: absolute;
    top: 10px;
    left: 15px;
    color: #ffde00;
    font-size: 20px;
}

@keyframes flagWave {
    0%, 100% { transform: perspective(400px) rotateY(-10deg); }
    50% { transform: perspective(400px) rotateY(10deg); }
}

/* ========== 圣诞树装饰 ========== */
.festival-tree {
    position: absolute;
    bottom: 20px;
    width: 0;
    height: 0;
    border-left: 40px solid transparent;
    border-right: 40px solid transparent;
    border-bottom: 80px solid #2e7d32;
}

.festival-tree::before {
    content: '★';
    position: absolute;
    top: -20px;
    left: -10px;
    color: #ffd700;
    font-size: 20px;
}

/* ========== 动画元素基础样式 ========== */
.festival-particle {
    position: absolute;
    pointer-events: none;
}

/* 雪花 */
.festival-snow {
    color: #fff;
    font-size: 20px;
    animation: snowFall linear infinite;
}

@keyframes snowFall {
    0% {
        transform: translateY(-100px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0.3;
    }
}

/* 爱心 */
.festival-heart {
    color: #ff69b4;
    font-size: 24px;
    animation: heartFloat linear infinite;
}

@keyframes heartFloat {
    0% {
        transform: translateY(100vh) scale(0.5);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) scale(1);
        opacity: 0;
    }
}

/* 烟花 */
.festival-firework {
    width: 8px;   /* 从4px增加到8px */
    height: 8px;
    border-radius: 50%;
    animation: fireworkExplode 1.5s ease-out forwards;  /* 从1s增加到1.5s */
}

@keyframes fireworkExplode {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translate(var(--tx), var(--ty)) scale(0);
        opacity: 0;
    }
}

/* 烟花中心闪光 */
@keyframes fireworkFlash {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    50% {
        transform: scale(2);
        opacity: 1;
    }
    100% {
        transform: scale(3);
        opacity: 0;
    }
}

/* 蝙蝠 */
.festival-bat {
    color: #212121;
    font-size: 24px;
    animation: batFly 8s linear infinite;
}

@keyframes batFly {
    0% {
        transform: translateX(-100px) translateY(0);
    }
    25% {
        transform: translateX(25vw) translateY(-50px);
    }
    50% {
        transform: translateX(50vw) translateY(0);
    }
    75% {
        transform: translateX(75vw) translateY(-50px);
    }
    100% {
        transform: translateX(calc(100vw + 100px)) translateY(0);
    }
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
    .festival-lantern {
        width: 40px;
        height: 60px;
    }
    
    .festival-lantern::before {
        font-size: 16px;
    }
    
    .festival-moon {
        width: 60px;
        height: 60px;
        right: 20px;
    }
    
    .festival-flag {
        width: 50px;
        height: 40px;
    }
    
    .festival-tree {
        border-left: 25px solid transparent;
        border-right: 25px solid transparent;
        border-bottom: 50px solid #2e7d32;
    }
}
