/* 基础样式 */
body {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 100vh;
    padding: 40px 0;
    font-size: 14px;
}

.container {
    max-width: 1200px;
}

.donation-container {
    max-width: 100%;
    margin: 0;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border-radius: 20px;
    background: white;
    transition: all 0.3s ease;
}

.donation-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.amount-buttons {
    margin: 30px 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.amount-btn {
    margin: 0;
    min-width: 120px;
    padding: 12px 24px;
    border-radius: 15px;
    transition: all 0.3s ease;
    font-weight: 500;
    border-width: 2px;
    flex: 0 0 calc(50% - 15px);
    max-width: calc(50% - 15px);
}

.amount-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(13, 110, 253, 0.15);
}

.amount-btn.active {
    background: #0d6efd;
    color: white;
    border-color: #0d6efd;
}

.custom-amount {
    margin: 40px 0;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.input-group {
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border-radius: 15px;
    overflow: hidden;
    background: white;
}

.input-group-text {
    border: none;
    background-color: #f8f9fa;
    font-weight: bold;
    color: #0d6efd;
    padding: 0 20px;
}

.form-control {
    border: none;
    padding: 15px 20px;
    font-size: 1rem;
    background: white;
}

.form-control:focus {
    box-shadow: none;
    background: white;
}

#payButton {
    width: 100%;
    padding: 15px 30px;
    border-radius: 15px;
    font-weight: 600;
    font-size: 1.1rem;
    margin-top: 20px;
    background: linear-gradient(45deg, #0d6efd, #0a58ca);
    border: none;
    transition: all 0.3s ease;
}

#payButton:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(13, 110, 253, 0.3);
}

.page-title {
    color: #2c3e50;
    font-weight: 700;
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 20px;
    font-size: 2.2rem;
}

.page-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(45deg, #0d6efd, #0a58ca);
    border-radius: 4px;
}

.card {
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border-radius: 20px;
    margin-bottom: 20px;
    background: white;
    overflow: hidden;
}

.card-body {
    padding: 30px;
}

.card-title {
    color: #2c3e50;
    font-weight: 700;
    font-size: 1.4rem;
    margin-bottom: 25px;
}

footer {
    margin-top: 60px;
    padding: 20px 0;
    color: #6c757d;
    font-size: 0.95rem;
}

.loading {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    z-index: 1000;
}

.loading-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.loading i {
    font-size: 40px;
    color: #0d6efd;
}

.ranking-container {
    margin-top: 50px;
}

.ranking-number {
    font-weight: bold;
    font-size: 1.2rem;
}

.ranking-list {
    max-height: 500px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #0d6efd #f8f9fa;
}

.ranking-list::-webkit-scrollbar {
    width: 6px;
}

.ranking-list::-webkit-scrollbar-track {
    background: #f8f9fa;
}

.ranking-list::-webkit-scrollbar-thumb {
    background-color: #0d6efd;
    border-radius: 3px;
}

.ranking-item {
    padding: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: background-color 0.3s;
}

.ranking-item:last-child {
    border-bottom: none;
}

.ranking-item:hover {
    background-color: rgba(13, 110, 253, 0.03);
}

.ranking-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.ranking-info {
    flex: 1;
    min-width: 0;
    margin: 0 10px;
}

.ranking-amount {
    font-weight: 600;
    color: #0d6efd;
    white-space: nowrap;
    font-size: 0.95rem;
}

.qrcode-modal .modal-content {
    border: none;
    border-radius: 20px;
    overflow: hidden;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.qrcode-modal .modal-header {
    border-bottom: none;
    padding: 25px 30px 15px;
    position: relative;
}

.qrcode-modal .modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
    text-align: center;
    width: 100%;
    position: relative;
}

.qrcode-modal .modal-title:after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: linear-gradient(45deg, #0d6efd, #0a58ca);
    margin: 10px auto 0;
    border-radius: 2px;
}

.qrcode-modal .modal-body {
    padding: 0 30px 30px;
    text-align: center;
}

.qrcode-modal .qr-container {
    background: white;
    padding: 20px;
    border-radius: 15px;
    display: inline-block;
    box-shadow: 0 5px 20px rgba(13, 110, 253, 0.1);
    position: relative;
    margin: 15px 0;
    transition: transform 0.3s ease;
}

.qrcode-modal .qr-container:hover {
    transform: translateY(-3px);
}

.qrcode-modal .qr-container:before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border: 2px solid rgba(13, 110, 253, 0.1);
    border-radius: 20px;
    z-index: -1;
}

.qrcode-modal .alipay-btn {
    background: linear-gradient(45deg, #1677ff, #4096ff);
    border: none;
    padding: 12px 25px;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(22, 119, 255, 0.2);
}

.qrcode-modal .alipay-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(22, 119, 255, 0.3);
}

.qrcode-modal .alipay-btn i {
    font-size: 1.2em;
    margin-right: 8px;
}

.qrcode-modal .payment-tips {
    margin: 25px 0 15px;
    padding: 15px;
    background: rgba(13, 110, 253, 0.05);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qrcode-modal .spinner-border {
    width: 1.2em;
    height: 1.2em;
    border-width: 0.15em;
    margin-right: 8px;
}

.qrcode-modal .modal-footer {
    border-top: none;
    padding: 15px 30px 25px;
    background: rgba(255, 255, 255, 0.8);
}

.qrcode-modal .countdown-text {
    font-size: 0.9em;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qrcode-modal .countdown-number {
    color: #0d6efd;
    font-weight: 600;
    margin: 0 3px;
}

.payment-methods {
    margin: 20px 0;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.payment-btn {
    padding: 12px 30px;
    border-radius: 15px;
    border: 2px solid #dee2e6;
    background: white;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    pointer-events: auto;
    z-index: 1;
}

.payment-btn.active {
    border-color: #0d6efd;
    background: rgba(13, 110, 253, 0.05);
}

.payment-btn img {
    height: 24px;
    width: 24px;
}

.payment-btn.alipay.active {
    border-color: #1677ff;
    background: rgba(22, 119, 255, 0.05);
}

.payment-btn.epay.active {
    border-color: #28a745;
    background: rgba(40, 167, 69, 0.05);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .container {
        padding: 0 10px;
    }

    .donation-container {
        padding: 20px;
    }

    .page-title {
        font-size: 1.8rem;
        margin-bottom: 30px;
    }

    .payment-methods {
        flex-direction: column;
    }

    .payment-btn {
        width: 100%;
        margin-bottom: 10px;
        padding: 12px;
        font-size: 14px;
    }

    .amount-buttons {
        gap: 10px;
    }

    .amount-btn {
        flex: 0 0 calc(50% - 5px);
        max-width: calc(50% - 5px);
        padding: 10px 15px;
        font-size: 0.95rem;
    }

    .custom-amount {
        margin: 30px 0;
    }

    .input-group {
        margin-bottom: 15px;
    }

    .form-control {
        padding: 12px 15px;
        font-size: 14px;
    }

    #payButton {
        padding: 12px 20px;
        font-size: 1rem;
    }

    .ranking-container {
        margin-top: 30px;
    }

    .ranking-item {
        padding: 10px 8px;
    }

    .ranking-avatar {
        width: 35px;
        height: 35px;
    }

    .ranking-info {
        margin: 0 8px;
    }

    .ranking-amount {
        font-size: 0.9rem;
    }

    .ranking-number {
        font-size: 1rem;
        min-width: 24px;
    }

    .qrcode-modal .modal-content {
        margin: 20px;
    }

    .qrcode-modal .qr-container {
        padding: 15px;
    }

    .qrcode-modal .modal-title {
        font-size: 1.3rem;
    }
}

@media (min-width: 768px) {
    .amount-btn {
        flex: 0 0 auto;
        max-width: none;
    }

    .ranking-container {
        margin-top: 0;
    }
}

@media (min-width: 992px) {
    .row {
        margin: 0 -20px;
    }

    .col-lg-7,
    .col-lg-5 {
        padding: 0 20px;
    }
}