* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft YaHei", sans-serif;
}

body {
    background-color: #f8f9fa;
    color: #2d3748;
    line-height: 1.6;
    background-image: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%);
}

.container {
    max-width: 1200px;
    margin: 20px auto;
    background: white;
    min-height: calc(100vh - 40px);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    overflow: hidden;
}

/* 微信登录状态栏 */
.wechat-status-bar {
    background: linear-gradient(135deg, #07c160, #06ad56);
    color: white;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wechat-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.wechat-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid white;
}

.wechat-name {
    font-size: 14px;
    font-weight: 500;
}

.wechat-logout-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 5px 15px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.wechat-logout-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.wechat-user-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 5px 15px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.wechat-user-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.wechat-login-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wechat-login-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.warning-bar {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 15px 20px;
    text-align: center;
    font-size: 14px;
    font-weight: bold;
}

/* 微信扫码弹窗 */
.wechat-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.wechat-modal-content {
    background: white;
    width: 90%;
    max-width: 400px;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.wechat-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: #666;
    font-size: 24px;
    cursor: pointer;
}

.wechat-modal-title {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #333;
}

.wechat-qrcode-box {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    display: inline-block;
}

#wechatQrcodeImg {
    width: 200px;
    height: 200px;
    display: block;
}

.wechat-status {
    margin: 15px 0;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
}

.wechat-status.waiting {
    background: #e3f2fd;
    color: #1976d2;
}

.wechat-status.success {
    background: #e8f5e9;
    color: #388e3c;
}

.wechat-status.error {
    background: #ffebee;
    color: #d32f2f;
}

.search-section {
    background: white;
    padding: 30px;
    margin: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.search-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #2d3748;
    padding-bottom: 10px;
    border-bottom: 3px solid #667eea;
}

.search-box {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.search-input {
    flex: 1;
    padding: 14px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.2);
}

.search-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 14px 30px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(102, 126, 234, 0.4);
}

.hot-search {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 14px;
    color: #4a5568;
}

.hot-tags {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.hot-tag {
    background: #edf2f7;
    color: #4a5568;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
}

.hot-tag:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

.game-list-section {
    padding: 0 20px 30px;
}

.section-title {
    font-size: 22px;
    font-weight: bold;
    margin: 30px 0 25px;
    color: #2d3748;
    text-align: center;
}

.list-header {
    background: linear-gradient(135deg, #667eea, #764ba2);
    padding: 18px 25px;
    display: grid;
    grid-template-columns: 2fr 1.5fr 1fr 1.5fr 1fr;
    font-weight: bold;
    color: white;
    font-size: 15px;
    border-radius: 8px 8px 0 0;
}

.game-item {
    padding: 18px 25px;
    border-bottom: 1px solid #e2e8f0;
    border-left: 1px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
    display: grid;
    grid-template-columns: 2fr 1.5fr 1fr 1.5fr 1fr;
    align-items: center;
    transition: all 0.3s ease;
    background: white;
}

.game-item:hover {
    background-color: #f8f9fa;
    transform: translateY(-2px);
}

.game-name {
    font-weight: 600;
    color: #2d3748;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.new-badge {
    background: linear-gradient(135deg, #ff6b6b, #ff3838);
    color: white;
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 10px;
    font-weight: 500;
}

.version-type, .server-time {
    color: #4a5568;
    font-size: 14px;
}

.version-detail {
    color: #667eea;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
    font-weight: 500;
}

.version-detail:hover {
    text-decoration: underline;
}

.bonus-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.bonus-info {
    color: #4a5568;
    font-size: 14px;
    font-weight: 500;
}

.btn-bonus {
    background: linear-gradient(135deg, #ff6b6b, #ff3838);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    min-width: 90px;
}

.btn-bonus:hover {
    transform: translateY(-2px);
}

.btn-claimed {
    background: #38a169;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: default;
    min-width: 90px;
}

.btn-disabled {
    background: #cbd5e0 !important;
    color: #718096 !important;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: not-allowed !important;
    min-width: 90px;
    opacity: 0.7;
}

.btn-disabled:hover {
    transform: none !important;
    box-shadow: none !important;
}

.footer {
    background: #2d3748;
    color: white;
    padding: 40px 20px;
    margin-top: 50px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 25px;
}

.footer-link {
    color: #a0aec0;
    font-size: 14px;
    text-decoration: none;
}

.footer-link:hover {
    color: white;
}

.footer-info {
    text-align: center;
    color: #718096;
    font-size: 12px;
    line-height: 1.8;
}

.no-data {
    grid-column: 1/-1;
    text-align: center;
    padding: 50px;
    color: #a0aec0;
    font-size: 15px;
}

.search-result-info {
    text-align: center;
    padding: 15px;
    color: #4a5568;
    font-size: 14px;
    background: #edf2f7;
    border-radius: 6px;
    margin-bottom: 25px;
    display: none;
}

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    z-index: 1000;
}

.back-to-top:hover {
    transform: translateY(-3px);
}

.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 红包弹窗样式 */
.redpacket-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.redpacket-content {
    background: linear-gradient(135deg, #ff6b6b, #ff3838);
    width: 90%;
    max-width: 400px;
    border-radius: 15px;
    padding: 25px;
    color: white;
    text-align: center;
    position: relative;
}

.redpacket-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

.redpacket-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
}

.redpacket-amount {
    font-size: 32px;
    font-weight: bold;
    margin: 15px 0;
}

.redpacket-game {
    background: rgba(255, 255, 255, 0.2);
    padding: 10px;
    border-radius: 8px;
    margin: 15px 0;
    font-size: 16px;
    font-weight: 500;
}

.redpacket-count {
    font-size: 14px;
    margin-bottom: 20px;
    opacity: 0.9;
}

.redpacket-form {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 10px;
    margin-top: 15px;
}

.form-group {
    margin-bottom: 15px;
    text-align: left;
}

.form-group label {
    display: block;
    color: #333;
    font-weight: 500;
    margin-bottom: 5px;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: #ff6b6b;
}

.btn-get-redpacket {
    width: 100%;
    background: linear-gradient(135deg, #ff6b6b, #ff3838);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

.btn-get-redpacket:hover {
    transform: translateY(-2px);
}

.redpacket-notice {
    font-size: 12px;
    color: #666;
    line-height: 1.4;
    margin-top: 15px;
    text-align: left;
    background: rgba(255, 255, 255, 0.8);
    padding: 10px;
    border-radius: 5px;
}

.redpacket-success {
    display: none;
    text-align: center;
    padding: 30px 20px;
}

.success-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.success-message {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}

.success-detail {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
}

/* 微信用户信息在红包弹窗中的显示 */
.redpacket-user-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.15);
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.redpacket-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid white;
}

.redpacket-user-name {
    font-size: 14px;
    font-weight: 500;
}

@media (max-width: 768px) {
    .list-header, .game-item {
        grid-template-columns: 1fr;
        gap: 10px;
        text-align: center;
    }
    
    .list-header {
        display: none;
    }
    
    .game-item {
        padding: 15px;
        margin-bottom: 15px;
        border-radius: 8px;
        border: 1px solid #e2e8f0;
    }
    
    .search-box {
        flex-direction: column;
    }
    
    .hot-search {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .footer-links {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .redpacket-content {
        width: 95%;
        margin: 20px;
    }
    
    .wechat-status-bar {
        flex-direction: column;
        gap: 10px;
        text-align: center;
        padding: 15px;
    }
    
    .wechat-user-info {
        flex-direction: column;
    }
}