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

:root {
    --red-primary: #D4252C;
    --red-dark: #A31D22;
    --red-light: #F05356;
    --gold: #FFD700;
    --gold-dark: #DAA520;
    --bg-gradient: linear-gradient(135deg, #FF6B6B 0%, #C92A2A 50%, #8B0000 100%);
    --shadow-primary: 0 20px 60px rgba(212, 37, 44, 0.5);
    --shadow-card: 0 10px 40px rgba(0, 0, 0, 0.3);
}

body {
    font-family: 'Noto Serif SC', serif;
    background: var(--bg-gradient);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
    color: #fff;
}

/* 背景装饰 */
.background-decor {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* 灯笼动画 */
.lantern {
    position: absolute;
    top: -50px;
    width: 80px;
    height: 100px;
    background: linear-gradient(180deg, #FF4444 0%, #CC0000 100%);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    animation: swing 3s ease-in-out infinite;
    box-shadow: 0 10px 30px rgba(255, 0, 0, 0.5);
}

.lantern::before {
    content: '福';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 36px;
    color: #FFD700;
    font-weight: 900;
}

.lantern::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 30px;
    background: #FFD700;
    border-radius: 50%;
}

.lantern-left {
    left: 5%;
    animation-delay: 0s;
}

.lantern-right {
    right: 5%;
    animation-delay: 1.5s;
}

@keyframes swing {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

/* 烟花效果 */
.firework {
    position: absolute;
    top: 20%;
    width: 4px;
    height: 4px;
    background: #FFD700;
    border-radius: 50%;
    animation: firework-explosion 3s ease-out infinite;
    opacity: 0;
}

@keyframes firework-explosion {
    0% {
        opacity: 0;
        transform: translateY(0) scale(1);
    }
    10% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateY(-300px) scale(3);
        box-shadow: 0 0 50px 20px #FFD700;
    }
}

/* 主容器 */
.container {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 40px 20px;
    max-width: 500px;
    width: 100%;
}

/* 标题 */
.main-title {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 56px;
    color: #FFD700;
    text-shadow: 
        0 0 20px rgba(255, 215, 0, 0.8),
        0 0 40px rgba(255, 215, 0, 0.5),
        4px 4px 0 rgba(163, 29, 34, 0.8);
    margin-bottom: 10px;
    animation: title-glow 2s ease-in-out infinite;
}

@keyframes title-glow {
    0%, 100% { text-shadow: 0 0 20px rgba(255, 215, 0, 0.8), 0 0 40px rgba(255, 215, 0, 0.5), 4px 4px 0 rgba(163, 29, 34, 0.8); }
    50% { text-shadow: 0 0 30px rgba(255, 215, 0, 1), 0 0 60px rgba(255, 215, 0, 0.8), 4px 4px 0 rgba(163, 29, 34, 0.8); }
}

.subtitle {
    font-size: 20px;
    color: #FFE4B5;
    margin-bottom: 50px;
    letter-spacing: 4px;
    opacity: 0;
    animation: fade-in 1s ease-out 0.5s forwards;
}

@keyframes fade-in {
    to { opacity: 1; }
}

/* 红包容器 */
.hongbao-container {
    margin: 50px auto;
    position: relative;
}

/* 红包 */
.hongbao {
    width: 280px;
    height: 360px;
    margin: 0 auto;
    cursor: pointer;
    position: relative;
    transition: transform 0.3s ease;
    animation: hongbao-float 3s ease-in-out infinite;
}

.hongbao:hover {
    transform: scale(1.05) rotate(2deg);
}

@keyframes hongbao-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.hongbao-top {
    width: 100%;
    height: 80px;
    background: linear-gradient(180deg, #FF4444 0%, #DD0000 100%);
    border-radius: 20px 20px 0 0;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.hongbao-top::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 30px;
    background: #FFD700;
    border-radius: 10px;
}

.hongbao-body {
    width: 100%;
    height: 280px;
    background: linear-gradient(180deg, #DD0000 0%, #AA0000 100%);
    border-radius: 0 0 20px 20px;
    position: relative;
    box-shadow: var(--shadow-card);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hongbao-circle {
    width: 160px;
    height: 160px;
    background: radial-gradient(circle, #FFD700 0%, #DAA520 100%);
    border-radius: 50%;
    position: absolute;
    box-shadow: 
        0 0 30px rgba(255, 215, 0, 0.6),
        inset 0 0 20px rgba(255, 255, 255, 0.3);
    animation: circle-pulse 2s ease-in-out infinite;
}

@keyframes circle-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.hongbao-text {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 80px;
    color: #CC0000;
    position: relative;
    z-index: 1;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.tap-hint {
    margin-top: 30px;
    font-size: 18px;
    color: #FFE4B5;
    animation: hint-bounce 1.5s ease-in-out infinite;
}

@keyframes hint-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* 红包打开动画 */
.hongbao.opening {
    animation: hongbao-shake 0.5s ease-in-out;
}

@keyframes hongbao-shake {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-15deg) scale(1.1); }
    75% { transform: rotate(15deg) scale(1.1); }
}

.hongbao.opened {
    animation: hongbao-burst 0.8s ease-out forwards;
}

@keyframes hongbao-burst {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.3) rotate(180deg);
    }
    100% {
        transform: scale(0) rotate(360deg);
        opacity: 0;
    }
}

/* 金额显示 */
.amount-display {
    position: relative;
    margin: 50px auto;
    padding: 40px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    border-radius: 30px;
    box-shadow: 
        0 20px 60px rgba(255, 215, 0, 0.6),
        inset 0 0 40px rgba(255, 255, 255, 0.3);
    animation: amount-appear 0.8s ease-out;
    overflow: hidden;
}

@keyframes amount-appear {
    0% {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }
    60% {
        transform: scale(1.2) rotate(10deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.amount-shine {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.6) 50%, transparent 70%);
    animation: shine 3s ease-in-out infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.amount-value {
    font-size: 72px;
    font-weight: 900;
    color: #CC0000;
    text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
}

.amount-unit {
    font-size: 28px;
    color: #AA0000;
    margin-top: 10px;
    font-weight: 700;
}

/* 按钮 */
.action-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 40px;
    animation: fade-in 1s ease-out;
}

.btn {
    padding: 16px 40px;
    font-size: 20px;
    font-weight: 700;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Noto Serif SC', serif;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.btn-icon {
    font-size: 24px;
}

.btn-primary {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #CC0000;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #FFA500 0%, #FF8C00 100%);
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(255, 215, 0, 0.5);
}

.btn-secondary {
    background: linear-gradient(135deg, #FF6B6B 0%, #CC0000 100%);
    color: #FFF;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #CC0000 0%, #990000 100%);
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(204, 0, 0, 0.5);
}

.btn-block {
    width: 100%;
}

/* 已领取提示 */
.already-claimed {
    animation: fade-in 1s ease-out;
}

.claimed-icon {
    font-size: 100px;
    margin-bottom: 20px;
    animation: rotate-in 1s ease-out;
}

@keyframes rotate-in {
    0% {
        transform: rotate(-180deg) scale(0);
        opacity: 0;
    }
    100% {
        transform: rotate(0deg) scale(1);
        opacity: 1;
    }
}

.already-claimed h2 {
    font-size: 32px;
    color: #FFD700;
    margin-bottom: 15px;
}

.already-claimed p {
    font-size: 18px;
    color: #FFE4B5;
    margin-bottom: 30px;
}

.claimed-amount {
    font-size: 24px;
    color: #FFF;
    background: rgba(255, 255, 255, 0.1);
    padding: 20px 40px;
    border-radius: 20px;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
}

.claimed-amount span {
    font-size: 36px;
    color: #FFD700;
    font-weight: 900;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
    animation: modal-fade-in 0.3s ease-out;
}

@keyframes modal-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: linear-gradient(135deg, #FFF 0%, #FFF5E6 100%);
    border-radius: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.5);
    animation: modal-slide-up 0.4s ease-out;
}

@keyframes modal-slide-up {
    from {
        transform: translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 30px;
    border-bottom: 2px solid #FFD700;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 28px;
    color: #CC0000;
    margin: 0;
}

.modal-close {
    font-size: 36px;
    color: #999;
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    color: #CC0000;
    transform: rotate(90deg);
}

.modal-body {
    padding: 30px;
}

/* 提现标签页 */
.withdraw-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.tab-btn {
    flex: 1;
    padding: 15px;
    font-size: 18px;
    font-weight: 700;
    background: #F0F0F0;
    color: #666;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Noto Serif SC', serif;
}

.tab-btn.active {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #CC0000;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fade-in 0.5s ease-out;
}

/* 表单 */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-size: 16px;
    font-weight: 700;
    color: #333;
}

.form-input {
    width: 100%;
    padding: 15px 20px;
    font-size: 16px;
    border: 2px solid #E0E0E0;
    border-radius: 15px;
    transition: all 0.3s ease;
    font-family: 'Noto Serif SC', serif;
}

.form-input:focus {
    outline: none;
    border-color: #FFD700;
    box-shadow: 0 0 0 4px rgba(255, 215, 0, 0.2);
}

.form-input:read-only {
    background: #F5F5F5;
    color: #666;
}

/* 公告列表 */
#announcementList {
    color: #333;
}

.announcement-item {
    padding: 20px;
    background: #FFF;
    border-left: 4px solid #FFD700;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.announcement-item h3 {
    color: #CC0000;
    margin-bottom: 10px;
    font-size: 20px;
}

.announcement-item p {
    color: #666;
    line-height: 1.8;
    font-size: 16px;
}

/* 提现结果 */
.result-success {
    text-align: center;
    padding: 40px 20px;
}

.success-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #4CAF50 0%, #45A049 100%);
    color: #FFF;
    font-size: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    box-shadow: 0 10px 30px rgba(76, 175, 80, 0.4);
    animation: success-pop 0.6s ease-out;
}

@keyframes success-pop {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.result-success h3 {
    font-size: 28px;
    color: #4CAF50;
    margin-bottom: 15px;
}

.result-success p {
    font-size: 18px;
    color: #666;
    margin-bottom: 10px;
}

.result-tip {
    font-size: 16px !important;
    color: #999 !important;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .main-title {
        font-size: 42px;
    }
    
    .subtitle {
        font-size: 16px;
    }
    
    .hongbao {
        width: 240px;
        height: 310px;
    }
    
    .hongbao-circle {
        width: 130px;
        height: 130px;
    }
    
    .hongbao-text {
        font-size: 64px;
    }
    
    .amount-value {
        font-size: 56px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}
