/* 打赏赞助功能样式 */

/* 简化版打赏样式 */
.card .donation-header {
    text-align: center;
    margin-bottom: 20px;
}

.card .donation-header h3 {
    font-size: 18px;
    margin: 0 0 8px 0;
    color: #333;
}

.card .donation-header p {
    font-size: 14px;
    color: #666;
    margin: 0;
}

.payment-tip {
    font-size: 12px !important;
    color: #007bff !important;
    margin-top: 8px !important;
    font-weight: 500;
}

.card .donation-amounts {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.card .amount-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 15px;
}

.card .amount-btn {
    background: #fff;
    border: 2px solid #e1e5e9;
    color: #333;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 60px;
}

.card .amount-btn:hover {
    border-color: #007bff;
    background: #007bff;
    color: white;
}

.card .amount-btn.active,
.card .amount-btn.popular {
    background: #007bff;
    border-color: #007bff;
    color: white;
}

.card .custom-amount {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
}

.card .custom-amount input {
    background: #fff;
    border: 2px solid #e1e5e9;
    color: #333;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 14px;
    width: 120px;
    text-align: center;
}

.card .custom-amount button {
    background: #28a745;
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s;
}

.card .custom-amount button:hover {
    background: #218838;
}

.card .donation-methods {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e1e5e9;
    animation: slideDown 0.3s ease;
}

.payment-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.selected-amount {
    background: #007bff;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}

.reset-amount {
    background: #6c757d;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    cursor: pointer;
    transition: background 0.3s;
}

.reset-amount:hover {
    background: #5a6268;
}

.method-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card .method-card {
    background: #fff;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    padding: 15px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.card .method-card:hover {
    border-color: #007bff;
    background: #f8f9ff;
}

.card .method-icon {
    font-size: 18px;
    margin-bottom: 6px;
}

.card .method-name {
    font-size: 12px;
    font-weight: 500;
    color: #333;
}

/* 推荐支付方式样式 */
.card .method-card.recommended {
    border-color: #007bff;
    background: linear-gradient(135deg, #f8f9ff, #e3f2fd);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
}

.recommended-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    font-size: 10px;
    padding: 4px 8px;
    border-radius: 10px;
    font-weight: bold;
    box-shadow: 0 2px 6px rgba(255, 107, 107, 0.3);
    z-index: 1;
}

/* 二维码弹窗样式 */
.qr-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.qr-content {
    background: white;
    border-radius: 16px;
    max-width: 320px;
    width: 90%;
    overflow: hidden;
    position: relative;
    animation: modalSlideIn 0.25s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-50px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.qr-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.qr-header span {
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

.qr-header .qr-amount {
    font-size: 18px;
    font-weight: 600;
    color: #007bff;
}

.qr-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.qr-close:hover {
    background: #f5f5f5;
    color: #333;
}

.qr-body {
    padding: 20px;
    text-align: center;
}

.qr-code {
    margin-bottom: 16px;
}

.qr-code img {
    max-width: 200px;
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.qr-loading {
    padding: 40px 20px;
    color: #666;
}

.loading-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 12px;
}

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

.qr-amount {
    font-size: 18px;
    font-weight: bold;
    color: #ff6b6b;
    margin: 15px 0;
}

.qr-message {
    font-size: 14px;
    color: #666;
    font-style: italic;
    margin: 10px 0;
}

.qr-tips {
    padding: 12px 16px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    margin: 0 -20px -20px -20px;
}

.qr-tips p {
    margin: 0;
    font-size: 14px;
    color: #666;
}

.qr-tips p {
    margin: 8px 0;
    font-size: 14px;
    color: #666;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .method-cards {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .card .method-card {
        padding: 20px 15px;
    }
    
    .card .method-icon {
        font-size: 28px;
    }
    
    .card .amount-buttons {
        flex-direction: column;
        gap: 8px;
    }
    
    .card .amount-btn {
        width: 100%;
        max-width: 200px;
        margin: 0 auto;
    }
    
    .card .custom-amount {
        flex-direction: column;
        gap: 10px;
    }
    
    .card .custom-amount input {
        width: 100%;
        max-width: 200px;
    }
}

/* 推荐支付方式样式 */
.method-card.recommended {
    border: 2px solid #28a745 !important;
    background: linear-gradient(135deg, #f8fff9 0%, #e8f5e8 100%) !important;
    position: relative;
    animation: pulse-recommended 2s infinite;
}

.method-card.recommended:hover {
    border-color: #1e7e34 !important;
    background: linear-gradient(135deg, #f0fff0 0%, #d4edda 100%) !important;
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.3) !important;
}

.recommend-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 8px;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.4);
    z-index: 1;
    line-height: 1.2;
}

@keyframes pulse-recommended {
    0% {
        box-shadow: 0 4px 15px rgba(40, 167, 69, 0.2);
    }
    50% {
        box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
    }
    100% {
        box-shadow: 0 4px 15px rgba(40, 167, 69, 0.2);
    }
}

/* 支付提示样式优化 */
.payment-tip {
    font-size: 14px;
    color: #28a745;
    font-weight: bold;
    text-align: center;
    margin: 10px 0;
    padding: 8px 12px;
    background: rgba(40, 167, 69, 0.1);
    border-radius: 6px;
    border-left: 3px solid #28a745;
    transition: all 0.3s ease;
}

.payment-tip:empty {
    display: none;
}

/* 支付状态显示 */
.payment-status {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    margin: 15px 0;
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    border: 1px solid #2196f3;
    border-radius: 8px;
    animation: pulse-status 2s infinite;
}

.payment-status .status-icon {
    font-size: 20px;
    margin-right: 10px;
    animation: rotate 2s linear infinite;
}

.payment-status .status-text {
    font-size: 14px;
    color: #1976d2;
    font-weight: 500;
}

.payment-status.success {
    background: linear-gradient(135deg, #e8f5e8 0%, #f0fff0 100%);
    border-color: #4caf50;
}

.payment-status.success .status-text {
    color: #2e7d32;
}

.payment-status.error {
    background: linear-gradient(135deg, #ffebee 0%, #fce4ec 100%);
    border-color: #f44336;
}

.payment-status.error .status-text {
    color: #c62828;
}

@keyframes pulse-status {
    0% {
        box-shadow: 0 0 0 0 rgba(33, 150, 243, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(33, 150, 243, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(33, 150, 243, 0);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* 支付成功动画 */
.payment-success {
    animation: successBounce 0.6s ease-out;
}

@keyframes successBounce {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* 成功图标动画 */
.success-icon {
    animation: successPulse 2s infinite;
}

@keyframes successPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7);
    }
    70% {
        transform: scale(1.1);
        box-shadow: 0 0 0 10px rgba(76, 175, 80, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0);
    }
}

/* 移动端触摸优化 */
@media (max-width: 768px) {
    .method-card {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
        transition: all 0.2s ease;
    }

    .method-card:active {
        transform: scale(0.95);
        background: rgba(0, 123, 255, 0.1);
    }

    .amount-btn:active {
        transform: scale(0.95);
        transition: transform 0.1s ease;
    }

    /* 支付状态在移动端的优化 */
    .payment-status {
        font-size: 13px;
        padding: 12px;
        margin: 10px 0;
    }

    .payment-status .status-icon {
        font-size: 18px;
    }

    /* 二维码弹窗移动端优化 */
    .qr-modal {
        padding: 10px;
    }

    .qr-content {
        width: 95%;
        max-width: 350px;
        margin: 20px auto;
    }

    .qr-code img {
        max-width: 180px;
        max-height: 180px;
    }
}
