* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', 'STHeiti', 'WenQuanYi Micro Hei', Arial, sans-serif;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 50%, #d63031 100%);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* 背景粒子效果 */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1; /* 在人物前面 */
}

.particles::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(255, 215, 0, 0.3) 2px, transparent 2px),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.2) 1px, transparent 1px),
        radial-gradient(circle at 40% 40%, rgba(255, 182, 193, 0.4) 1px, transparent 1px);
    background-size: 100px 100px, 150px 150px, 200px 200px;
    animation: sparkle 3s ease-in-out infinite alternate;
}

@keyframes sparkle {
    0% { opacity: 0.5; transform: scale(1); }
    100% { opacity: 1; transform: scale(1.1); }
}

/* 装饰元素 */
.decorations {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1; /* 在人物前面 */
}

/* 灯笼装饰 */
.lantern {
    position: absolute;
    font-size: 3rem;
    animation: swingLantern 4s ease-in-out infinite;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.6));
}

/* 不同大小的灯笼 */
.lantern-1, .lantern-3, .lantern-7 {
    font-size: 3.5rem;
}

.lantern-2, .lantern-5, .lantern-9 {
    font-size: 2.8rem;
}

.lantern-4, .lantern-6, .lantern-8, .lantern-10 {
    font-size: 3.2rem;
}

.lantern-1 {
    top: 10%;
    left: 15%;
    animation-delay: 0s;
}

.lantern-2 {
    top: 15%;
    right: 20%;
    animation-delay: 1s;
}

.lantern-3 {
    top: 25%;
    left: 5%;
    animation-delay: 2s;
}

.lantern-4 {
    top: 20%;
    right: 8%;
    animation-delay: 3s;
}

.lantern-5 {
    top: 5%;
    left: 30%;
    animation-delay: 1.5s;
}

.lantern-6 {
    top: 8%;
    right: 35%;
    animation-delay: 2.5s;
}

.lantern-7 {
    top: 30%;
    left: 25%;
    animation-delay: 0.5s;
}

.lantern-8 {
    top: 35%;
    right: 25%;
    animation-delay: 3.5s;
}

.lantern-9 {
    top: 12%;
    left: 60%;
    animation-delay: 1.8s;
}

.lantern-10 {
    top: 18%;
    right: 60%;
    animation-delay: 2.8s;
}

@keyframes swingLantern {
    0%, 100% { transform: rotate(-5deg) translateY(0); }
    25% { transform: rotate(5deg) translateY(-10px); }
    50% { transform: rotate(-3deg) translateY(-5px); }
    75% { transform: rotate(3deg) translateY(-8px); }
}

/* 气球装饰 */
.balloon {
    position: absolute;
    font-size: 2.5rem;
    animation: floatBalloon 6s ease-in-out infinite;
    filter: drop-shadow(0 0 8px rgba(255, 105, 180, 0.5));
}

.balloon-1 {
    top: 60%;
    left: 10%;
    animation-delay: 0s;
}

.balloon-2 {
    top: 70%;
    right: 15%;
    animation-delay: 1.5s;
}

.balloon-3 {
    top: 50%;
    left: 8%;
    animation-delay: 3s;
}

.balloon-4 {
    top: 65%;
    right: 12%;
    animation-delay: 4.5s;
}

.balloon-5 {
    top: 80%;
    left: 20%;
    animation-delay: 2s;
}

@keyframes floatBalloon {
    0%, 100% { transform: translateY(0) translateX(0) rotate(0deg); }
    25% { transform: translateY(-20px) translateX(10px) rotate(5deg); }
    50% { transform: translateY(-10px) translateX(-5px) rotate(-3deg); }
    75% { transform: translateY(-15px) translateX(8px) rotate(2deg); }
}

/* 烟花装饰 - 真实粒子效果 */
.fireworks-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.firework {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    pointer-events: none;
}

.firework-trail {
    position: absolute;
    width: 2px;
    height: 20px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));
    border-radius: 1px;
    pointer-events: none;
}

.firework-particle {
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    pointer-events: none;
}

/* 烟花爆炸动画 */
@keyframes fireworkLaunch {
    0% {
        transform: translateY(100vh);
        opacity: 1;
    }
    100% {
        transform: translateY(0);
        opacity: 0.8;
    }
}

@keyframes fireworkExplode {
    0% {
        opacity: 1;
        transform: scale(0);
    }
    20% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(1.5);
    }
}

@keyframes particleFall {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(100px) scale(0.3);
    }
}

/* 角色样式 */
.character {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    animation: float 4s ease-in-out infinite;
    /* 确保容器也没有背景 */
    background: none !important;
    border: none !important;
}

.left-character {
    left: 50px;
    animation-delay: 0s;
}

.right-character {
    right: 50px;
    animation-delay: 2s;
}

.character img {
    width: 250px;
    height: auto;
    transition: all 0.3s ease;
    /* 强制清除所有可能的背景和边框 */
    background: none !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.character:hover img {
    transform: scale(1.05);
}

.character-glow {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border-radius: 20px;
    opacity: 0.3;
    z-index: -1;
    animation: glow 2s ease-in-out infinite alternate;
}

.left-character .character-glow {
    background: linear-gradient(45deg, #4ecdc4, #45b7d1, #4ecdc4);
}

.right-character .character-glow {
    background: linear-gradient(45deg, #ff6b6b, #fd79a8, #ff6b6b);
}

@keyframes float {
    0%, 100% { 
        transform: translateY(-50%) translateX(0);
        -webkit-transform: translateY(-50%) translateX(0);
    }
    50% { 
        transform: translateY(-60%) translateX(10px);
        -webkit-transform: translateY(-60%) translateX(10px);
    }
}

@-webkit-keyframes float {
    0%, 100% { 
        -webkit-transform: translateY(-50%) translateX(0);
        transform: translateY(-50%) translateX(0);
    }
    50% { 
        -webkit-transform: translateY(-60%) translateX(10px);
        transform: translateY(-60%) translateX(10px);
    }
}

/* 简洁的角色样式 - 避免透明框问题 */
.character-simple {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    -webkit-transform: translateY(-50%);
    -moz-transform: translateY(-50%);
    -ms-transform: translateY(-50%);
    width: 250px;
    z-index: 2;
    background: none !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    transition: transform 0.3s ease;
    -webkit-transition: -webkit-transform 0.3s ease;
    -moz-transition: -moz-transform 0.3s ease;
    animation: float 4s ease-in-out infinite;
    -webkit-animation: float 4s ease-in-out infinite;
    -moz-animation: float 4s ease-in-out infinite;
}

.left-simple {
    left: 50px;
    animation-delay: 0s;
    -webkit-animation-delay: 0s;
    -moz-animation-delay: 0s;
}

.right-simple {
    right: 50px;
    animation-delay: 2s;
    -webkit-animation-delay: 2s;
    -moz-animation-delay: 2s;
}

.character-simple:hover {
    transform: translateY(-50%) scale(1.05);
    -webkit-transform: translateY(-50%) scale(1.05);
    -moz-transform: translateY(-50%) scale(1.05);
    -ms-transform: translateY(-50%) scale(1.05);
}

@keyframes glow {
    0% { opacity: 0.3; }
    100% { opacity: 0.6; }
}

/* 主要内容区域 */
.main-content {
    position: relative;
    z-index: 3;
    text-align: center;
    padding: 50px 20px;
    max-width: 600px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.title {
    font-size: 2.6rem;
    font-weight: 700;
    color: #ffd700;
    text-shadow: 
        2px 2px 0px #d63031,
        4px 4px 0px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(255, 215, 0, 0.6);
    margin-bottom: 40px;
    letter-spacing: 0.06em;
    font-family: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', '华文行楷', 'STXingkai', serif;
    background: linear-gradient(45deg, #ffd700, #ffed4e, #ffc107, #ffd700);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 100%;
    animation: titleGlow 3s ease-in-out infinite alternate, titleShine 4s linear infinite;
    position: relative;
    text-align: center;
    line-height: 1.2;
    word-spacing: 0.1em;
    /* 针对长标题的优化 */
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
}

.title::before {
    content: '诛仙3-仙逆帮会新年祝福';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    color: #ffd700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    z-index: -1;
    -webkit-text-fill-color: #ffd700;
}

@keyframes titleGlow {
    0% { 
        text-shadow: 
            2px 2px 0px #d63031,
            4px 4px 0px rgba(0, 0, 0, 0.3),
            0 0 20px rgba(255, 215, 0, 0.6);
        transform: scale(1);
    }
    50% {
        text-shadow: 
            2px 2px 0px #d63031,
            4px 4px 0px rgba(0, 0, 0, 0.3),
            0 0 25px rgba(255, 215, 0, 0.8),
            0 0 40px rgba(255, 215, 0, 0.4);
        transform: scale(1.01);
    }
    100% { 
        text-shadow: 
            2px 2px 0px #d63031,
            4px 4px 0px rgba(0, 0, 0, 0.3),
            0 0 30px rgba(255, 215, 0, 1),
            0 0 50px rgba(255, 215, 0, 0.5);
        transform: scale(1.02);
    }
}

@keyframes titleShine {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* 二维码区域 */
.qr-container {
    background: rgba(255, 255, 255, 0.95);
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    margin: 30px 0;
    transition: transform 0.3s ease;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 215, 0, 0.3);
}

.qr-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 215, 0, 0.6);
}

.qr-frame {
    position: relative;
    display: inline-block;
    margin-bottom: 15px;
}

.qr-frame img {
    width: 150px;
    height: 150px;
    border-radius: 10px;
    display: block;
    pointer-events: auto;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* 二维码扫描框效果 */
.qr-corner {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 3px solid #ff6b6b;
}

.qr-corner-tl {
    top: -5px;
    left: -5px;
    border-right: none;
    border-bottom: none;
    border-radius: 5px 0 0 0;
}

.qr-corner-tr {
    top: -5px;
    right: -5px;
    border-left: none;
    border-bottom: none;
    border-radius: 0 5px 0 0;
}

.qr-corner-bl {
    bottom: -5px;
    left: -5px;
    border-right: none;
    border-top: none;
    border-radius: 0 0 0 5px;
}

.qr-corner-br {
    bottom: -5px;
    right: -5px;
    border-left: none;
    border-top: none;
    border-radius: 0 0 5px 0;
}

/* 扫描动画 */
.qr-frame::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #ff6b6b, transparent);
    animation: qrScan 2s ease-in-out infinite;
}

@keyframes qrScan {
    0% {
        top: 0;
        opacity: 1;
    }
    50% {
        top: 50%;
        opacity: 0.8;
    }
    100% {
        top: 100%;
        opacity: 0;
    }
}

.qr-text {
    color: #333;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    letter-spacing: 0.05em;
    margin: 10px 0 5px 0;
}

.qr-subtitle {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
    font-family: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

/* 祝福语文本 */
.blessing-text {
    background: rgba(255, 255, 255, 0.1);
    padding: 25px;
    border-radius: 15px;
    margin: 30px 0;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.blessing-text p {
    color: #fff;
    font-size: 1.3rem;
    font-weight: 500;
    margin: 15px 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    font-family: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', '楷体', 'KaiTi', serif;
    line-height: 1.6;
    letter-spacing: 0.05em;
    animation: textShine 4s ease-in-out infinite;
}

@keyframes textShine {
    0%, 100% {
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    }
    50% {
        text-shadow: 
            2px 2px 4px rgba(0, 0, 0, 0.7),
            0 0 20px rgba(255, 255, 255, 0.3);
    }
}

/* 更换二维码按钮 */
.change-qr-btn {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    color: #333;
    border: none;
    padding: 15px 35px;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.change-qr-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    background: linear-gradient(45deg, #ffed4e, #ffd700);
}

/* 飘动祝福语 */
.floating-messages {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 4;
}

.floating-message {
    position: absolute;
    color: #ffd700;
    font-size: 1.1rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    animation: floatMessage 8s linear infinite;
    white-space: nowrap;
}

@keyframes floatMessage {
    0% {
        transform: translateX(-100px);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateX(calc(100vw + 100px));
        opacity: 0;
    }
}

/* 版权水印 */
.watermark {
    position: fixed;
    bottom: 10px;
    right: 10px;
    color: rgba(255, 255, 255, 0.3);
    font-size: 12px;
    z-index: 1000;
    pointer-events: none;
    user-select: none;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .character {
        display: none;
    }
    
    .title {
        font-size: 1.8rem;
        letter-spacing: 0.04em;
        word-spacing: 0.05em;
        line-height: 1.3;
    }
    
    .blessing-text p {
        font-size: 1.1rem;
    }
    
    .main-content {
        padding: 30px 15px;
    }
    
    .qr-container {
        padding: 20px;
    }
    
    .qr-frame img {
        width: 120px;
        height: 120px;
    }
    
    .qr-corner {
        width: 15px;
        height: 15px;
        border-width: 2px;
    }
    
    .qr-text {
        font-size: 1rem;
    }
    
    .qr-subtitle {
        font-size: 0.8rem;
    }
    
    /* 移动端装饰元素调整 */
    .lantern {
        font-size: 2rem;
    }
    
    .balloon {
        font-size: 1.8rem;
    }
    
    /* 重新定位装饰元素 */
    .lantern-1 { top: 5%; left: 5%; }
    .lantern-2 { top: 8%; right: 5%; }
    .lantern-3 { top: 15%; left: 2%; }
    .lantern-4 { top: 12%; right: 2%; }
    .lantern-5 { top: 3%; left: 50%; }
    .lantern-6 { top: 18%; right: 50%; }
    .lantern-7 { top: 25%; left: 8%; }
    .lantern-8 { top: 22%; right: 8%; }
    .lantern-9 { display: none; } /* 隐藏避免过于拥挤 */
    .lantern-10 { display: none; }
    
    .balloon-1 { top: 75%; left: 5%; }
    .balloon-2 { top: 80%; right: 5%; }
    .balloon-3 { top: 70%; left: 2%; }
    .balloon-4 { top: 85%; right: 8%; }
    .balloon-5 { display: none; } /* 隐藏一个气球避免过于拥挤 */
}

@media (max-width: 480px) {
    .title {
        font-size: 1.4rem;
        letter-spacing: 0.03em;
        word-spacing: 0.03em;
        line-height: 1.4;
    }
    
    .blessing-text p {
        font-size: 1rem;
    }
    
    .change-qr-btn {
        font-size: 1rem;
        padding: 12px 25px;
    }
    
    /* 进一步缩小装饰元素 */
    .lantern {
        font-size: 1.5rem;
    }
    
    .balloon {
        font-size: 1.3rem;
    }
}