/* 春节模式动画效果样式 — 烟花 */

@import url('https://fonts.googleapis.com/css2?family=Ma+Shan+Zheng&display=swap');

/* ========== 容器 ========== */
#firework-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    overflow: hidden;
}

/* ========== 烟花火箭（上升阶段） ========== */
.firework-rocket {
    position: absolute;
    pointer-events: none;
    animation: rocketRise .8s ease-in forwards;
    will-change: transform;
}

.firework-rocket::before {
    content: '';
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 6px #ffd54f, 0 0 12px #ff8f00;
}

.firework-rocket::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 0;
    width: 3px;
    height: 10px;
    background: linear-gradient(180deg, transparent, rgba(255,200,50,.5));
    border-radius: 0 0 2px 2px;
    filter: blur(2px);
}

@keyframes rocketRise {
    0% { transform: translateY(0); opacity: 1; }
    80% { opacity: 1; }
    100% { transform: translateY(var(--rise-y)); opacity: 0; }
}

/* ========== 烟花爆炸粒子 ========== */
.firework-particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    animation: fireworkBurst 1.8s ease-out forwards;
    will-change: transform, opacity;
}

.firework-particle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300%;
    height: 300%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, var(--glow-color, rgba(255,220,50,.9)), transparent 60%);
    border-radius: 50%;
    filter: blur(3px);
}

@keyframes fireworkBurst {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    20% {
        opacity: .95;
    }
    100% {
        transform: translate(var(--dx), var(--dy)) scale(0);
        opacity: 0;
    }
}

/* ========== 烟花闪光环 ========== */
.firework-ring {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    animation: ringExpand 1.2s ease-out forwards;
    will-change: transform, opacity;
}

@keyframes ringExpand {
    0% { transform: scale(0); opacity: .8; border-width: 3px; }
    100% { transform: scale(4); opacity: 0; border-width: 0; }
}

/* ========== 金色星星粒子 ========== */
.firework-star {
    position: absolute;
    pointer-events: none;
    animation: starTwinkle 1.5s ease-out forwards;
    will-change: transform, opacity;
}

.firework-star::before,
.firework-star::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    background: var(--star-color, #ffd700);
    border-radius: 1px;
}

.firework-star::before {
    width: 100%;
    height: 2px;
    transform: translate(-50%, -50%);
}

.firework-star::after {
    width: 2px;
    height: 100%;
    transform: translate(-50%, -50%);
}

@keyframes starTwinkle {
    0% { transform: translate(0, 0) scale(0) rotate(0deg); opacity: 1; }
    30% { transform: translate(var(--sdx), var(--sdy)) scale(1) rotate(90deg); opacity: 1; }
    100% { transform: translate(var(--sdx), var(--sdy)) scale(.2) rotate(360deg); opacity: 0; }
}

/* ========== 春节模糊效果 ========== */
.spring-festival-mode .slider-container {
    filter: blur(1px);
    transition: filter 2s ease-in-out;
    background: transparent !important;
}

/* ========== 春节标题 ========== */
.spring-festival-title {
    position: fixed;
    top: 50%;
    left: 50%;
    margin: 0;
    transform: translate(-50%, -50%) rotate(-2deg) skewX(-3deg);
    font-size: 8rem;
    font-weight: normal;
    font-family: 'Ma Shan Zheng', 'STXingkai', 'STKaiti', 'KaiTi', '华文行楷', '楷体', 'FangSong', '仿宋', cursive, serif;
    letter-spacing: .15em;
    background: linear-gradient(135deg, #ff1744, #ff6d00, #ffd700, #ff1744);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 20px rgba(255,23,68,.5), 0 0 50px rgba(255,152,0,.4);
    -webkit-text-stroke: 1px rgba(255,23,68,.12);
    z-index: 1003;
    opacity: 0;
    animation: springFestivalTitleFade 5s ease-in-out forwards,
               springFestivalTitleGradientShift 5s ease-in-out forwards;
    pointer-events: none;
    will-change: opacity, filter;
}

@keyframes springFestivalTitleGradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes springFestivalTitleFade {
    0% { opacity: 0; filter: blur(12px); }
    15% { opacity: 1; filter: blur(0px); }
    80% { opacity: 1; filter: blur(0px); }
    100% { opacity: 0; filter: blur(4px); }
}

/* ========== 春节主题颜色 ========== */
.spring-festival-mode {
    background: linear-gradient(180deg, #fff5f5 0%, #ffebee 30%, #fff3e0 60%, #fff8f0 100%);
    color: #c62828;
}

.spring-festival-mode a {
    color: #d32f2f;
}

.spring-festival-mode a:hover {
    color: #ff6d00;
}

/* 按钮 */
.spring-festival-mode .btn-primary {
    background: linear-gradient(135deg, #ff1744, #d50000);
    border: none;
    box-shadow: 0 4px 15px rgba(255,23,68,.35);
    color: #fff;
}

.spring-festival-mode .btn-primary:hover {
    background: linear-gradient(135deg, #ff5252, #c62828);
    box-shadow: 0 6px 20px rgba(255,23,68,.5);
}

/* 卡片 */
.spring-festival-mode .card {
    background: rgba(255,255,255,.9);
    border: 1px solid rgba(255,23,68,.12);
    box-shadow: 0 4px 20px rgba(255,23,68,.06);
}

.spring-festival-mode .card:hover {
    box-shadow: 0 8px 30px rgba(255,23,68,.12);
}

/* 顶部暖光 */
.spring-festival-mode::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at 50% 0%, rgba(255,200,100,.1) 0%, transparent 55%);
    pointer-events: none;
    z-index: 0;
}

/* 导航栏 */
.spring-festival-mode .navbar {
    background: rgba(255,255,255,.92);
    border-bottom: 1px solid rgba(255,23,68,.15);
}

/* 论坛按钮 */
.spring-festival-mode .forum-category-btn {
    color: #d32f2f;
    background-color: rgba(255,23,68,.06);
    border-color: rgba(255,23,68,.15);
}

.spring-festival-mode .forum-category-btn:hover {
    background-color: rgba(255,23,68,.12);
}

.spring-festival-mode .hint-text h3,
.spring-festival-mode .hint-text p {
    color: #c62828;
}

.spring-festival-mode .hint-box {
    background: rgba(255,255,255,.9) !important;
    border: 2px solid rgba(255,23,68,.12) !important;
    box-shadow: 0 10px 30px rgba(255,23,68,.05), 0 0 0 1px rgba(255,23,68,.05) inset !important;
}

.spring-festival-mode .hint-box:hover {
    background: rgba(255,255,255,.95) !important;
    border-color: rgba(255,23,68,.25) !important;
    box-shadow: 0 20px 40px rgba(255,23,68,.08), 0 0 0 1px rgba(255,23,68,.1) inset !important;
}

.spring-festival-mode .breadcrumb {
    color: #d32f2f;
}

.spring-festival-mode .breadcrumb a {
    color: #ff6d00;
}

/* 页脚 */
body.spring-festival-mode .site-footer {
    background: linear-gradient(180deg, rgba(255,245,245,.95), rgba(255,235,238,.92));
    border-top: 1px solid rgba(255,23,68,.2);
    color: #c62828;
}

body.spring-festival-mode .footer-heading {
    color: #d32f2f;
    text-shadow: 0 0 6px rgba(255,23,68,.2);
}

body.spring-festival-mode .social-link {
    background-color: rgba(255,23,68,.06);
    border: 1px solid rgba(255,23,68,.2);
    color: #d32f2f;
}

body.spring-festival-mode .social-link:hover {
    background-color: rgba(255,23,68,.12);
    border-color: #ff6d00;
    color: #ff6d00;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 5px 15px rgba(255,23,68,.2);
}

body.spring-festival-mode .footer-link {
    color: #d32f2f;
}

body.spring-festival-mode .footer-link:hover {
    color: #ff6d00;
    text-decoration: underline;
    text-decoration-color: #ff6d00;
}

body.spring-festival-mode .footer-copyright {
    color: rgba(198,40,40,.45);
}

/* 手机端标题适配 */
@media (max-width: 768px) {
    .spring-festival-title {
        font-size: 5.5rem;
        letter-spacing: .12em;
        -webkit-text-stroke: 0.5px rgba(255,23,68,.1);
    }
}