/* 元旦节模式动画效果样式 — 雪花 / 灯笼 / 烟花 / 彩带 */

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

/* ========== 天空渐变（喜庆热烈的节日色调） ========== */
.newyear-sky {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 997;
    background: radial-gradient(ellipse at 50% 0%, rgba(229,57,53,.12) 0%, transparent 42%),
                radial-gradient(ellipse at 85% 15%, rgba(255,215,0,.1) 0%, transparent 38%),
                radial-gradient(ellipse at 15% 70%, rgba(255,82,82,.08) 0%, transparent 35%),
                radial-gradient(ellipse at 70% 50%, rgba(255,152,0,.07) 0%, transparent 32%),
                radial-gradient(ellipse at 30% 60%, rgba(244,67,54,.06) 0%, transparent 30%),
                radial-gradient(ellipse at 60% 85%, rgba(255,215,0,.05) 0%, transparent 28%);
}

/* ========== 底部光晕 ========== */
.newyear-glow {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 35%;
    pointer-events: none;
    z-index: 998;
    background: radial-gradient(ellipse at 50% 100%, rgba(255,215,0,.12) 0%, rgba(229,57,53,.05) 40%, transparent 70%);
}

/* ========== 顶部横幅 ========== */
.newyear-banner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    pointer-events: none;
    z-index: 1002;
    background: linear-gradient(90deg, #b71c1c, #e53935, #ffd700, #ff5252, #ff8f00, #ffd700, #ff5252, #e53935, #b71c1c);
    box-shadow: 0 2px 14px rgba(229,57,53,.3);
}

.newyear-banner::after {
    content: '';
    position: absolute;
    top: 6px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #ffd700 10%, #ff5252 35%, #ffd700 60%, #e53935 85%, transparent);
    opacity: .5;
}

/* ========== 标题 ========== */
.newyear-title {
    position: fixed;
    top: 50%;
    left: 50%;
    margin: 0;
    transform: translate(-50%, -50%);
    font-family: 'Ma Shan Zheng', 'STXingkai', 'STKaiti', 'KaiTi', '华文行楷', '楷体', cursive, serif;
    font-size: 6.5rem;
    font-weight: normal;
    letter-spacing: .18em;
    background: linear-gradient(135deg, #c62828, #e53935, #ffd700, #ff5252, #ff8f00, #ffd700, #e53935);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 25px rgba(229,57,53,.45), 0 0 55px rgba(255,215,0,.35);
    -webkit-text-stroke: 1px rgba(198,40,40,.08);
    z-index: 1003;
    opacity: 0;
    animation: newyearTitleAnim 5s ease-in-out forwards, newyearTitleShift 6s ease-in-out forwards;
    pointer-events: none;
}

@keyframes newyearTitleAnim {
    0%   { opacity: 0; transform: translate(-50%, -50%) scale(1.5); }
    15%  { opacity: 1; transform: translate(-50%, -50%) scale(.95); }
    25%  { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    75%  { opacity: .85; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(1); }
}

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

/* ========== 雪花飘落 ========== */
.newyear-snow {
    position: absolute;
    pointer-events: none;
    will-change: transform;
    animation: newyearSnowFloat 10s linear forwards;
    z-index: 1001;
    filter: drop-shadow(0 0 4px rgba(255,255,255,.5));
}

.newyear-snow svg {
    display: block;
}

@keyframes newyearSnowFloat {
    0%   { transform: translateY(-30px) translateX(0) rotate(0deg); opacity: 0; }
    10%  { opacity: .7; }
    30%  { transform: translateY(20vh) translateX(15px) rotate(90deg); }
    55%  { transform: translateY(42vh) translateX(-20px) rotate(200deg); }
    80%  { transform: translateY(68vh) translateX(25px) rotate(320deg); opacity: .5; }
    100% { transform: translateY(108vh) translateX(-30px) rotate(420deg); opacity: 0; }
}

/* ========== 灯笼 ========== */
.newyear-lantern {
    position: absolute;
    pointer-events: none;
    will-change: transform;
    animation: lanternSwing 8s linear forwards;
    z-index: 1001;
    filter: drop-shadow(0 0 12px rgba(255,50,50,.25));
}

.newyear-lantern svg {
    display: block;
}

@keyframes lanternSwing {
    0%   { transform: translateY(-60px) rotate(-5deg); opacity: 0; }
    10%  { opacity: .7; }
    25%  { transform: translateY(15vh) rotate(5deg); }
    50%  { transform: translateY(35vh) rotate(-4deg); }
    75%  { transform: translateY(58vh) rotate(3deg); opacity: .55; }
    100% { transform: translateY(108vh) rotate(-6deg); opacity: 0; }
}

/* ========== 彩带 ========== */
.newyear-ribbon {
    position: absolute;
    pointer-events: none;
    will-change: transform;
    animation: newyearRibbonFloat 9s linear forwards;
    z-index: 1001;
    filter: drop-shadow(0 2px 4px rgba(200,0,0,.12));
}

.newyear-ribbon svg {
    display: block;
}

@keyframes newyearRibbonFloat {
    0%   { transform: translateY(-40px) translateX(0) rotate(0deg); opacity: 0; }
    8%   { opacity: .55; }
    30%  { transform: translateY(18vh) translateX(20px) rotate(15deg); }
    55%  { transform: translateY(42vh) translateX(-15px) rotate(-10deg); }
    80%  { transform: translateY(68vh) translateX(25px) rotate(20deg); opacity: .4; }
    100% { transform: translateY(108vh) translateX(-10px) rotate(-30deg); opacity: 0; }
}

/* ========== 烟花 ========== */
.newyear-firework {
    position: absolute;
    pointer-events: none;
    will-change: transform;
    z-index: 1003;
}

.newyear-particle {
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    animation: newyearParticleBurst .9s linear forwards;
}

@keyframes newyearParticleBurst {
    0%   { transform: translate(0, 0) scale(1); opacity: .7; }
    100% { transform: translate(var(--px), var(--py)) scale(0); opacity: 0; }
}

/* ========== 五彩纸屑飘落 ========== */
.newyear-confetti {
    position: absolute;
    width: 10px;
    height: 5px;
    border-radius: 2px;
    pointer-events: none;
    z-index: 1000;
    animation: confettiNewyearFloat 9s linear forwards;
    transform: rotate(calc(var(--cr, 0deg)));
}

@keyframes confettiNewyearFloat {
    0%   { transform: translateY(-20px) translateX(0) rotate(0deg); opacity: 0; }
    8%   { opacity: .8; }
    25%  { transform: translateY(18vh) translateX(25px) rotate(120deg); }
    50%  { transform: translateY(40vh) translateX(-18px) rotate(260deg); }
    75%  { transform: translateY(64vh) translateX(28px) rotate(400deg); opacity: .55; }
    100% { transform: translateY(108vh) translateX(-20px) rotate(540deg); opacity: 0; }
}

/* ========== 鞭炮飘落 ========== */
.newyear-firecracker {
    position: absolute;
    pointer-events: none;
    will-change: transform;
    animation: firecrackerFloat 10s linear forwards;
    z-index: 1001;
    filter: drop-shadow(0 2px 4px rgba(200,0,0,.18));
}

.newyear-firecracker svg {
    display: block;
}

@keyframes firecrackerFloat {
    0%   { transform: translateY(-50px) translateX(0) rotate(0deg); opacity: 0; }
    8%   { opacity: .6; }
    25%  { transform: translateY(16vh) translateX(-18px) rotate(-12deg); }
    50%  { transform: translateY(38vh) translateX(22px) rotate(8deg); }
    75%  { transform: translateY(62vh) translateX(-10px) rotate(-6deg); opacity: .45; }
    100% { transform: translateY(108vh) translateX(15px) rotate(15deg); opacity: 0; }
}

/* 响应式 */
@media (max-width: 768px) {
    .newyear-title {
        font-size: 4.2rem;
        letter-spacing: .12em;
    }
}

@media (max-width: 480px) {
    .newyear-title {
        font-size: 3rem;
        letter-spacing: .1em;
    }
}