/**
 * CouldInject WIKI - 节日特效样式
 * 支持圣诞节、万圣节、春节、情人节
 */

/* ==================== 基础容器 ==================== */
.seasonal-effects {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

/* ==================== 节日徽章 ==================== */
.seasonal-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    animation: badgeGlow 2s ease-in-out infinite;
}

.seasonal-badge i {
    font-size: 14px;
}

.seasonal-badge.season-christmas {
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.2), rgba(39, 174, 96, 0.2));
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.3);
}

.seasonal-badge.season-halloween {
    background: linear-gradient(135deg, rgba(243, 156, 18, 0.2), rgba(142, 68, 173, 0.2));
    color: #f39c12;
    border: 1px solid rgba(243, 156, 18, 0.3);
}

.seasonal-badge.season-chinese_new_year {
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.2), rgba(241, 196, 15, 0.2));
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.3);
}

.seasonal-badge.season-valentines {
    background: linear-gradient(135deg, rgba(232, 74, 127, 0.2), rgba(255, 107, 157, 0.2));
    color: #e84a7f;
    border: 1px solid rgba(232, 74, 127, 0.3);
}

@keyframes badgeGlow {
    0%, 100% { box-shadow: 0 0 10px rgba(var(--season-primary-rgb, 232, 74, 127), 0.3); }
    50% { box-shadow: 0 0 20px rgba(var(--season-primary-rgb, 232, 74, 127), 0.5); }
}

/* ==================== 圣诞节 - 雪花效果 ==================== */
.snowflakes {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.snowflake {
    position: absolute;
    top: -50px;
    color: #fff;
    font-size: 1.5rem;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
    animation: snowfall linear infinite;
    opacity: 0.8;
}

.snowflake:nth-child(1) { left: 5%; animation-duration: 15s; animation-delay: 0s; font-size: 1.2rem; }
.snowflake:nth-child(2) { left: 15%; animation-duration: 12s; animation-delay: 2s; font-size: 1.8rem; }
.snowflake:nth-child(3) { left: 25%; animation-duration: 18s; animation-delay: 4s; font-size: 1rem; }
.snowflake:nth-child(4) { left: 35%; animation-duration: 14s; animation-delay: 1s; font-size: 1.5rem; }
.snowflake:nth-child(5) { left: 45%; animation-duration: 16s; animation-delay: 3s; font-size: 1.3rem; }
.snowflake:nth-child(6) { left: 55%; animation-duration: 13s; animation-delay: 5s; font-size: 1.6rem; }
.snowflake:nth-child(7) { left: 65%; animation-duration: 17s; animation-delay: 2s; font-size: 1.1rem; }
.snowflake:nth-child(8) { left: 75%; animation-duration: 11s; animation-delay: 4s; font-size: 1.7rem; }
.snowflake:nth-child(9) { left: 85%; animation-duration: 15s; animation-delay: 1s; font-size: 1.4rem; }
.snowflake:nth-child(10) { left: 92%; animation-duration: 14s; animation-delay: 3s; font-size: 1.2rem; }
.snowflake:nth-child(11) { left: 10%; animation-duration: 19s; animation-delay: 6s; font-size: 0.9rem; }
.snowflake:nth-child(12) { left: 50%; animation-duration: 16s; animation-delay: 7s; font-size: 1.5rem; }

@keyframes snowfall {
    0% {
        transform: translateY(-50px) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

/* 圣诞节主题色覆盖 */
.season-christmas {
    --theme-primary: #e74c3c;
    --theme-secondary: #27ae60;
}

/* ==================== 万圣节 - 蝙蝠效果 ==================== */
.halloween-effects {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.bat {
    position: absolute;
    font-size: 1.5rem;
    animation: batFly linear infinite;
    opacity: 0.7;
    filter: drop-shadow(0 0 5px rgba(142, 68, 173, 0.5));
}

.bat:nth-child(1) { top: 10%; animation-duration: 8s; animation-delay: 0s; }
.bat:nth-child(2) { top: 25%; animation-duration: 10s; animation-delay: 2s; font-size: 1.2rem; }
.bat:nth-child(3) { top: 15%; animation-duration: 7s; animation-delay: 4s; font-size: 1.8rem; }
.bat:nth-child(4) { top: 35%; animation-duration: 9s; animation-delay: 1s; }
.bat:nth-child(5) { top: 20%; animation-duration: 11s; animation-delay: 3s; font-size: 1.3rem; }
.bat:nth-child(6) { top: 30%; animation-duration: 8s; animation-delay: 5s; font-size: 1.6rem; }

@keyframes batFly {
    0% {
        left: -50px;
        transform: translateY(0) scaleX(1);
    }
    25% {
        transform: translateY(-20px) scaleX(1);
    }
    50% {
        transform: translateY(10px) scaleX(1);
    }
    75% {
        transform: translateY(-15px) scaleX(1);
    }
    100% {
        left: calc(100% + 50px);
        transform: translateY(0) scaleX(1);
    }
}

/* 万圣节主题色覆盖 */
.season-halloween {
    --theme-primary: #f39c12;
    --theme-secondary: #8e44ad;
}

/* ==================== 春节 - 灯笼和烟花效果 ==================== */
.cny-effects {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.lantern {
    position: fixed;
    font-size: 3rem;
    animation: lanternSwing 3s ease-in-out infinite;
    filter: drop-shadow(0 0 15px rgba(231, 76, 60, 0.6));
    z-index: 10;
}

.lantern-left {
    top: 80px;
    left: 20px;
    animation-delay: 0s;
}

.lantern-right {
    top: 80px;
    right: 20px;
    animation-delay: 1.5s;
}

@keyframes lanternSwing {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

.firework-particle {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #f1c40f;
    animation: firework 4s ease-out infinite;
    opacity: 0;
}

.firework-particle:nth-child(3) { left: 20%; animation-delay: 0s; background: #e74c3c; }
.firework-particle:nth-child(4) { left: 40%; animation-delay: 1s; background: #f1c40f; }
.firework-particle:nth-child(5) { left: 60%; animation-delay: 2s; background: #e74c3c; }
.firework-particle:nth-child(6) { left: 80%; animation-delay: 0.5s; background: #f39c12; }
.firework-particle:nth-child(7) { left: 30%; animation-delay: 1.5s; background: #e74c3c; }
.firework-particle:nth-child(8) { left: 70%; animation-delay: 2.5s; background: #f1c40f; }
.firework-particle:nth-child(9) { left: 50%; animation-delay: 3s; background: #e74c3c; }
.firework-particle:nth-child(10) { left: 90%; animation-delay: 3.5s; background: #f39c12; }

@keyframes firework {
    0% {
        bottom: 0;
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.5);
    }
    100% {
        bottom: 60%;
        opacity: 0;
        transform: scale(0);
    }
}

/* 春节主题色覆盖 */
.season-chinese_new_year {
    --theme-primary: #e74c3c;
    --theme-secondary: #f1c40f;
}

/* ==================== 情人节 - 爱心效果 ==================== */
.valentines-effects {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.heart {
    position: absolute;
    bottom: -50px;
    color: #e84a7f;
    font-size: 1.5rem;
    animation: heartFloat linear infinite;
    opacity: 0.7;
    filter: drop-shadow(0 0 8px rgba(232, 74, 127, 0.5));
}

.heart:nth-child(1) { left: 8%; animation-duration: 12s; animation-delay: 0s; }
.heart:nth-child(2) { left: 18%; animation-duration: 15s; animation-delay: 2s; font-size: 1.2rem; }
.heart:nth-child(3) { left: 28%; animation-duration: 11s; animation-delay: 4s; font-size: 1.8rem; }
.heart:nth-child(4) { left: 38%; animation-duration: 14s; animation-delay: 1s; color: #ff6b9d; }
.heart:nth-child(5) { left: 48%; animation-duration: 13s; animation-delay: 3s; font-size: 1.3rem; }
.heart:nth-child(6) { left: 58%; animation-duration: 16s; animation-delay: 5s; }
.heart:nth-child(7) { left: 68%; animation-duration: 10s; animation-delay: 2s; font-size: 1.6rem; }
.heart:nth-child(8) { left: 78%; animation-duration: 14s; animation-delay: 4s; color: #ff6b9d; }
.heart:nth-child(9) { left: 88%; animation-duration: 12s; animation-delay: 1s; font-size: 1.4rem; }
.heart:nth-child(10) { left: 95%; animation-duration: 15s; animation-delay: 3s; }

@keyframes heartFloat {
    0% {
        transform: translateY(0) rotate(0deg) scale(1);
        opacity: 0;
    }
    10% {
        opacity: 0.7;
    }
    50% {
        transform: translateY(-50vh) rotate(15deg) scale(1.1);
    }
    90% {
        opacity: 0.5;
    }
    100% {
        transform: translateY(-100vh) rotate(-15deg) scale(0.8);
        opacity: 0;
    }
}

/* 情人节主题色覆盖 */
.season-valentines {
    --theme-primary: #e84a7f;
    --theme-secondary: #ff6b9d;
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 768px) {
    .lantern {
        font-size: 2rem;
    }

    .lantern-left {
        left: 10px;
    }

    .lantern-right {
        right: 10px;
    }

    .snowflake,
    .heart {
        font-size: 1rem;
    }

    .bat {
        font-size: 1.2rem;
    }
}

/* ==================== 减少动画（无障碍） ==================== */
@media (prefers-reduced-motion: reduce) {
    .snowflake,
    .bat,
    .lantern,
    .firework-particle,
    .heart {
        animation: none;
        opacity: 0.5;
    }

    .seasonal-badge {
        animation: none;
    }
}
