:root {
    --primary-color: #3498db;
    --success-color: #2ecc71;
    --text-dark: #2c3e50;
    --transition-base: 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    --gradient: linear-gradient(135deg, #3498db 0%, #2ecc71 100%);
    --crypto-color: #f39c12;
}

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

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: #f8f9fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 1rem;
}

.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

.header {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.header h1 {
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    position: relative;
    display: inline-block;
}

.header h1::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 3px;
    background: var(--gradient);
    border-radius: 2px;
}

.sponsor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
    justify-content: center;
}

/* 关键修复：确保前两个卡片在大屏幕上居中显示 */
@media (min-width: 992px) {
    .sponsor-grid {
        grid-template-columns: repeat(2, minmax(280px, 350px));
        justify-content: center;
    }
}

.sponsor-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(52, 152, 219, 0.1);
    transition: transform var(--transition-base), box-shadow 0.3s ease;
    cursor: pointer;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sponsor-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(52, 152, 219, 0.15);
}

.qrcode-single {
    width: 200px;
    height: 200px;
    border-radius: 12px;
    margin: 1rem auto;
    transition: transform var(--transition-base), filter 0.2s ease;
    position: relative;
    overflow: hidden;
    background: #f0f0f0;
}

.qrcode-single img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.qrcode-single::before {
    content: '点击查看大图';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 8px;
    font-size: 0.9rem;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 1;
}

.qrcode-single:hover::before {
    opacity: 1;
}

.qrcode-single:active {
    transform: scale(0.98) translateY(-3px);
    filter: brightness(0.95);
}

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(64, 64, 64, 0.6);
    z-index: 999;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    opacity: 1;
}

.modal-content {
    position: relative;
    width: 90%;
    max-width: 600px;
    background: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.modal-content.show {
    opacity: 1;
    transform: scale(1);
}

.modal-img-container {
    position: relative;
    display: inline-block;
    width: 100%;
    text-align: center;
}

.modal-img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 12px;
    display: block;
    margin: 0 auto;
}

/* 简化后的关闭按钮 */
.close-btn {
    position: absolute;
    top: -20px;
    right: -20px;
    width: 36px;
    height: 36px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 28px;
    color: #fff;
    border: none;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    z-index: 10;
    transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.close-btn:hover {
    transform: rotate(90deg);
    background: rgba(0, 0, 0, 0.5);
}

/* 加密货币样式 */
.crypto-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(243, 156, 18, 0.1);
    transition: transform var(--transition-base), box-shadow 0.3s ease;
    text-align: center;
    grid-column: 1 / -1;
}

.crypto-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(243, 156, 18, 0.15);
}

.crypto-title {
    color: var(--crypto-color);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.crypto-options {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 700px;
    margin: 0 auto;
}

.crypto-option {
    width: 100%;
}

.crypto-name {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.crypto-address-container {
    position: relative;
    margin: 0.5rem 0;
}

.crypto-address {
    font-family: monospace;
    background: #f5f5f5;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    overflow-x: auto;
    white-space: nowrap;
    border: 1px solid #e0e0e0;
    position: relative;
    cursor: text;
    text-align: left;
}

.copy-btn {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%) translateX(10px);
    opacity: 0;
    background: rgba(52, 152, 219, 0.9);
    color: white;
    border: none;
    border-radius: 4px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.copy-success {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(46, 204, 113, 0.9);
    color: white;
    border-radius: 4px;
    padding: 0 0.5rem;
    font-size: 0.8rem;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.crypto-address-container:hover .copy-btn {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

/* 页脚样式 */
.footer {
    margin-top: 4rem;
    text-align: center;
    padding: 1.5rem 0;
    width: 100%;
    max-width: 1200px;
    color: #7f8c8d;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.footer a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease, border-color 0.2s ease;
    border-bottom: 1px solid transparent;
}

.footer a:hover {
    color: var(--success-color);
    border-bottom-color: var(--success-color);
}

/* 自适应媒体查询 */
@media (max-width: 768px) {
    .sponsor-grid {
        gap: 1.5rem;
    }
    
    .qrcode-single {
        width: 180px;
        height: 180px;
    }
    
    .close-btn {
        right: -15px;
        top: -15px;
        width: 30px;
        height: 30px;
        font-size: 24px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
}

/* 超小屏幕设备 */
@media (max-width: 480px) {
    body {
        padding: 1.5rem 0.75rem;
    }
    
    .sponsor-card {
        padding: 1.5rem;
    }
    
    .qrcode-single {
        width: 160px;
        height: 160px;
    }
    
    .header h1 {
        font-size: 1.8rem;
    }
    
    .crypto-address {
        font-size: 0.8rem;
        padding: 0.6rem 0.8rem;
    }
    
    .footer {
        margin-top: 3rem;
        font-size: 0.9rem;
    }
}

/* 大屏幕设备 */
@media (min-width: 1400px) {
    .container {
        max-width: 1400px;
    }
    
    .sponsor-grid {
        gap: 3rem;
    }
    
    .qrcode-single {
        width: 220px;
        height: 220px;
    }
}
