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

body, html {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    height: 100%;
    /* 简化背景：去掉复杂渐变动画 */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    overflow-x: hidden;
    position: relative;
}

/* 去掉装饰性光晕（最耗性能） */
.glow {
    display: none;
}

/* 去掉粒子背景 */
canvas#particle-bg {
    display: none;
}

.main-container {
    min-height: 100vh;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: center;
    gap: 40px;
    padding: 40px 20px;
    position: relative;
    z-index: 2;
}

/* 左侧区域 */
.left-section {
    display: flex;
    flex-direction: column;
    gap: 30px;
    width: 100%;
    max-width: 480px;
}

/* 信息卡片 */
.info-box {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px); /* 降低模糊程度 */
    border-radius: 24px;
    padding: 35px 30px;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    /* 去掉复杂阴影 */
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    animation: fadeUp 0.8s ease forwards;
    opacity: 0;
}

.avatar {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #ff6b9d, #c44569);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin: 0 auto 25px;
    box-shadow: 0 10px 25px rgba(255, 107, 157, 0.3);
    /* 去掉呼吸动画（耗性能） */
}

.info-box h1 {
    font-size: 32px;
    text-align: center;
    margin-bottom: 18px;
    line-height: 1.2;
    text-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
    font-weight: 700;
}

.info-box p {
    font-size: 16px;
    line-height: 1.7;
    text-align: center;
    margin-bottom: 30px;
    opacity: 0.95;
    font-weight: 300;
}

/* 累计捐赠金额样式 */
.total-donation {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 18px;
    margin-bottom: 30px;
    border: 1px solid rgba(255,255,255,0.1);
}

.total-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #ffd700, #ffb700);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #fff;
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.3);
}

.total-content {
    flex: 1;
}

.total-label {
    font-size: 13px;
    opacity: 0.8;
    margin-bottom: 4px;
    font-weight: 400;
}

.total-amount {
    font-size: 28px;
    font-weight: 700;
    color: #ffd700;
    text-shadow: 0 2px 6px rgba(255, 215, 0, 0.25);
}

.features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.features li {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    /* 去掉hover动画（手机端不需要） */
}

.features li i {
    color: #ffd700;
    font-size: 16px;
}

/* 排行榜美化 */
.ranking-box {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 30px 25px;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    animation: fadeUp 1s ease forwards;
    opacity: 0;
}

.rank-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.rank-header i {
    color: #ffd700;
    font-size: 22px;
}

.rank-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rank-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    font-size: 14px;
    /* 去掉hover动画 */
}

/* 前三名特殊样式 */
.rank-item.rank-1 {
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.12), rgba(255, 215, 0, 0.04));
    border-left: 3px solid #ffd700;
    padding-left: 13px;
}

.rank-item.rank-2 {
    background: linear-gradient(90deg, rgba(192, 192, 192, 0.12), rgba(192, 192, 192, 0.04));
    border-left: 3px solid #c0c0c0;
    padding-left: 13px;
}

.rank-item.rank-3 {
    background: linear-gradient(90deg, rgba(205, 127, 50, 0.12), rgba(205, 127, 50, 0.04));
    border-left: 3px solid #cd7f32;
    padding-left: 13px;
}

.rank-num {
    font-weight: bold;
    width: 25px;
    text-align: center;
    font-size: 15px;
}

.rank-item.rank-1 .rank-num {
    color: #ffd700;
    font-size: 18px;
}

.rank-item.rank-2 .rank-num {
    color: #c0c0c0;
    font-size: 17px;
}

.rank-item.rank-3 .rank-num {
    color: #cd7f32;
    font-size: 16px;
}

.rank-info {
    flex: 1;
    margin: 0 15px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.rank-name {
    font-weight: 500;
}

.rank-message {
    font-size: 12px;
    opacity: 0.7;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rank-money {
    font-weight: 600;
    color: #7fff00;
    font-size: 15px;
}

.rank-item.empty {
    justify-content: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.7);
    padding: 20px;
}

/* 右侧支付卡片 */
.right-section {
    width: 100%;
    max-width: 440px;
    position: sticky;
    top: 40px;
}

.pay-card {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(20px);
    border-radius: 28px;
    padding: 40px 35px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: fadeUp 1.2s ease forwards;
    opacity: 0;
    /* 去掉hover上浮动画 */
}

.pay-card-header {
    text-align: center;
    margin-bottom: 35px;
}

.pay-card-header h2 {
    font-size: 26px;
    color: #fff;
    margin-bottom: 10px;
    text-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
    font-weight: 700;
}

.pay-card-header p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 15px;
    font-weight: 300;
}

.pay-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 快捷金额按钮 */
.quick-amounts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.amount-btn {
    padding: 12px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 12px;
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease; /* 只保留背景过渡 */
}

.amount-btn:hover, .amount-btn.active {
    background: rgba(255,255,255,0.2);
    border-color: #fff;
}

.form-item {
    position: relative;
}

.form-item input,
.form-item textarea {
    width: 100%;
    padding: 16px 20px;
    border-radius: 14px;
    border: none;
    font-size: 16px;
    background: rgba(255,255,255,0.08);
    color: #fff;
    outline: none;
    transition: background 0.2s ease; /* 只保留背景过渡 */
    border: 1px solid rgba(255,255,255,0.12);
    font-family: inherit;
}

.form-item input::placeholder,
.form-item textarea::placeholder {
    color: rgba(255,255,255,0.7);
    font-weight: 300;
}

.form-item input:focus,
.form-item textarea:focus {
    background: rgba(255,255,255,0.18);
    border-color: rgba(255,255,255,0.3);
}

.form-item textarea {
    resize: none;
    min-height: 80px;
    line-height: 1.5;
}

/* 复选框样式 */
.checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 0;
}

.checkbox-item input[type="checkbox"] {
    width: auto;
    transform: scale(1.2);
    cursor: pointer;
    accent-color: #ff6b9d;
}

.checkbox-item span {
    color: #fff;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
}

/* 支付方式按钮 */
.pay-type-group {
    display: flex;
    gap: 15px;
}

.pay-type {
    flex: 1;
    text-align: center;
    padding: 14px 10px;
    background: rgba(255,255,255,0.08);
    border: 2px solid transparent;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #fff;
}

.pay-type input {
    display: none;
}

.pay-type-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.pay-type-inner .pay-icon {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    object-fit: cover;
}

.pay-type span {
    font-size: 14px;
    font-weight: 500;
}

.pay-type.active, .pay-type:has(:checked) {
    background: rgba(255,255,255,0.25);
    border: 3px solid #fff;
    box-shadow: 0 0 0 2px rgba(255,255,255,0.3);
}

.submit-btn {
    padding: 18px;
    border-radius: 14px;
    border: none;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #ff6b9d, #c44569);
    cursor: pointer;
    transition: transform 0.2s ease;
    box-shadow: 0 8px 20px rgba(255, 107, 157, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(255, 107, 157, 0.45);
}

.submit-btn:active {
    transform: translateY(0);
}

.tip {
    text-align: center;
    margin-top: 25px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 13px;
    font-weight: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 手机端触摸设备专属选中强化 */
@media (hover: none) and (pointer: coarse) {
    .pay-type.active, .pay-type:has(:checked) {
        background: rgba(255,255,255,0.35);
        border: 3px solid #fff;
        transform: scale(1.02);
        box-shadow: 0 0 0 3px rgba(255,255,255,0.4);
    }
    
    .pay-type:active {
        transform: scale(0.98);
    }
}

/* 响应式适配 */
@media (max-width: 1024px) {
    .main-container {
        flex-direction: column;
        align-items: center;
        gap: 35px;
        padding: 30px 20px;
    }
    
    .right-section {
        position: static;
    }
}

@media (max-width: 768px) {
    .main-container {
        padding: 25px 15px;
        gap: 30px;
    }
    
    .info-box {
        padding: 30px 25px;
    }
    
    .info-box h1 {
        font-size: 28px;
    }
    
    .features {
        grid-template-columns: 1fr;
    }
    
    .pay-card {
        padding: 35px 30px;
    }
    
    .quick-amounts {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    .quick-amounts {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .pay-type-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .total-amount {
        font-size: 24px;
    }
}
/* 排行榜折叠样式 */
.rank-collapse {
    display: none;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.rank-collapse.show {
    display: flex;
}

.collapse-btn {
    width: 100%;
    padding: 10px;
    margin-top: 12px;
    background: #f2f2f7;
    border: none;
    border-radius: 10px;
    color: #007aff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background 0.15s ease;
}

.collapse-btn:hover {
    background: #e5e5ea;
}

.collapse-btn i {
    transition: transform 0.2s ease;
}

.collapse-btn.expanded i {
    transform: rotate(180deg);
}