/**
 * 支付系统样式
 * 包含支付套餐卡片、支付流程和订单历史界面样式
 */

/* 套餐卡片容器 */
.pricing-plans-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
}

/* 套餐卡片 */
.pricing-card {
    position: relative;
    width: 300px;
    background-color: rgba(22, 28, 36, 0.8);
    border: 1px solid rgba(114, 129, 151, 0.4);
    border-radius: 10px;
    padding: 25px;
    transition: all 0.3s ease;
    overflow: hidden;
}

.pricing-card:hover {
    transform: translateY(-5px);
    border-color: #2c72d9;
    box-shadow: 0 5px 15px rgba(44, 114, 217, 0.2);
}

.pricing-card.selected {
    border-color: #2c72d9;
    box-shadow: 0 0 15px rgba(44, 114, 217, 0.4);
}

.pricing-card.selected::after {
    content: "已选择";
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #2c72d9;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.pricing-card-header {
    text-align: center;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(114, 129, 151, 0.2);
    margin-bottom: 20px;
}

.pricing-card-name {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 5px;
    color: #fff;
}

.pricing-card-price {
    font-size: 36px;
    font-weight: 700;
    color: #2c72d9;
    margin: 10px 0;
}

.pricing-card-price small {
    font-size: 16px;
}

.pricing-card-credits {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(44, 114, 217, 0.1);
    border-radius: 8px;
    padding: 8px 15px;
    margin: 15px 0;
}

.pricing-card-credits i {
    color: #f0b90b;
    margin-right: 8px;
}

.pricing-card-credits span {
    color: #e0e0e0;
    font-weight: 600;
}

.pricing-card-description {
    color: #aaa;
    margin-bottom: 25px;
    text-align: center;
}

.pricing-card-select {
    width: 100%;
    background-color: #2c72d9;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.pricing-card-select:hover {
    background-color: #215db2;
}

/* 支付流程模态框 */
.payment-modal {
    overflow: auto !important; /* 允许整个模态框滚动 */
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: flex-start; /* 改为顶部对齐，允许内容滚动 */
    justify-content: center;
    padding-top: 50px; /* 顶部留出空间 */
    padding-bottom: 30px; /* 底部留出空间 */
    scrollbar-width: thin; /* Firefox滚动条样式 */
    scrollbar-color: rgba(44, 114, 217, 0.5) rgba(30, 38, 50, 0.2); /* Firefox滚动条颜色 */
}

/* 针对整个模态框的滚动条样式 */
.payment-modal::-webkit-scrollbar {
    width: 10px; /* 加宽滚动条使其更明显 */
    position: absolute; /* 绝对定位 */
    right: 0; /* 靠右对齐 */
}

.payment-modal::-webkit-scrollbar-track {
    background: rgba(30, 38, 50, 0.3); /* 稍微加深轨道颜色使其可见 */
    border-radius: 4px;
    margin: 2px 0; /* 上下留出一点空间 */
}

.payment-modal::-webkit-scrollbar-thumb {
    background-color: rgba(44, 114, 217, 0.6); /* 增加不透明度使滑块更明显 */
    border-radius: 4px;
    border: 2px solid rgba(30, 38, 50, 0.2); /* 添加边框提高可见度 */
}

.payment-modal::-webkit-scrollbar-thumb:hover {
    background-color: rgba(44, 114, 217, 0.8); /* 高亮悬停状态 */
}

.payment-modal .modal-content {
    max-width: 500px;
    overflow-y: visible !important; /* 禁用内容区自身的滚动 */
    position: relative;
    margin-bottom: 30px; /* 底部留出空间 */
    border-radius: 10px;
    background-color: rgba(22, 28, 36, 0.95);
    border: 1px solid rgba(114, 129, 151, 0.4);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    padding: 25px;
    color: #e0e0e0;
}

/* 在移动设备上调整滚动条样式 */
@media screen and (max-width: 768px) {
    .payment-modal::-webkit-scrollbar {
        width: 8px; /* 移动设备上略窄一些 */
    }
    
    .payment-modal {
        padding-top: 30px; /* 移动设备顶部留出较少空间 */
    }
}

.payment-step {
    margin-bottom: 20px;
}

.payment-step-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.payment-step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background-color: #2c72d9;
    color: white;
    border-radius: 50%;
    font-weight: 600;
}

.payment-step-title {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
}

.payment-qrcode-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.payment-qrcode-img {
    width: 200px;
    height: 200px;
    margin-bottom: 10px;
}

.payment-price {
    font-size: 24px;
    font-weight: 700;
    color: #333;
}

.payment-order-info {
    background-color: rgba(30, 38, 50, 0.6);
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
}

.payment-order-info p {
    margin: 5px 0;
    display: flex;
    justify-content: space-between;
}

.payment-order-info p span:first-child {
    color: #888;
}

.payment-order-info p span:last-child {
    color: #e0e0e0;
    font-weight: 600;
}

.payment-status {
    text-align: center;
    padding: 10px;
    border-radius: 6px;
    margin: 15px 0;
    font-weight: 600;
}

.payment-status.pending {
    background-color: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.payment-status.success {
    background-color: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.payment-status.failed {
    background-color: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.payment-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.payment-actions button {
    flex: 1;
    padding: 12px;
    border-radius: 6px;
    border: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.check-status-btn {
    background-color: #2c72d9;
    color: white;
}

.check-status-btn:hover {
    background-color: #215db2;
}

.cancel-payment-btn {
    background-color: rgba(114, 129, 151, 0.2);
    color: #ccc;
}

.cancel-payment-btn:hover {
    background-color: rgba(114, 129, 151, 0.3);
}

/* 订单历史 */
.orders-container {
    width: 100%;
    overflow-x: auto;
}

.orders-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.orders-table th,
.orders-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid rgba(114, 129, 151, 0.2);
}

.orders-table th {
    background-color: rgba(30, 38, 50, 0.8);
    color: #ccc;
    font-weight: 600;
}

.orders-table tbody tr:hover {
    background-color: rgba(30, 38, 50, 0.6);
}

.order-status-badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.order-status-badge.pending {
    background-color: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.order-status-badge.success {
    background-color: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.order-status-badge.failed {
    background-color: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.order-action-btn {
    background-color: #2c72d9;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.order-action-btn:hover {
    background-color: #215db2;
}

.order-detail-row {
    display: none;
    background-color: rgba(22, 28, 36, 0.6);
}

.order-detail-row.visible {
    display: table-row;
}

.order-detail-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.order-detail-item {
    display: flex;
    justify-content: space-between;
}

.order-detail-label {
    color: #888;
}

.order-detail-value {
    color: #e0e0e0;
    font-weight: 600;
}

/* 空订单提示 */
.empty-orders {
    text-align: center;
    padding: 40px 20px;
    color: #888;
}

.empty-orders i {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.empty-orders p {
    font-size: 18px;
    margin-bottom: 20px;
}

/* 分页控制 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin: 20px 0;
}

.pagination-btn {
    background-color: rgba(30, 38, 50, 0.6);
    color: #ccc;
    border: 1px solid rgba(114, 129, 151, 0.4);
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination-btn:hover:not(.active):not(.disabled) {
    background-color: rgba(30, 38, 50, 0.8);
    border-color: #2c72d9;
}

.pagination-btn.active {
    background-color: #2c72d9;
    color: white;
    border-color: #2c72d9;
}

.pagination-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 响应式样式 */
@media screen and (max-width: 768px) {
    .pricing-plans-container {
        flex-direction: column;
        align-items: center;
    }
    
    .pricing-card {
        width: 100%;
        max-width: 350px;
    }
    
    /* 支付模态框的响应式调整 */
    .payment-modal .modal-content {
        max-width: 100%;
        max-height: 80vh; /* 移动端稍微减小高度，给状态栏留空间 */
        min-height: auto;
        padding: 15px;
        margin: 10px;
        overflow-y: auto;
    }
    
    /* 调整二维码容器和二维码大小 */
    .payment-qrcode-container {
        padding: 10px;
        width: 100%; /* 确保宽度适应容器 */
    }
    
    .payment-qrcode-img {
        width: 160px; /* 减小二维码尺寸 */
        height: 160px;
    }

    /* 调整价格显示 */
    .payment-price {
        font-size: 20px;
        margin-top: 5px;
    }
    
    /* 调整步骤标题 */
    .payment-step-title {
        font-size: 16px;
    }
    
    .payment-step-number {
        width: 24px;
        height: 24px;
        font-size: 14px;
    }
    
    /* 调整支付状态显示 */
    .payment-status {
        padding: 8px;
        margin: 10px 0;
        font-size: 14px;
    }
    
    .orders-table th,
    .orders-table td {
        padding: 8px;
        font-size: 13px;
    }
    
    .payment-actions {
        flex-direction: column;
    }
    
    .payment-actions button {
        margin-bottom: 10px;
        padding: 10px;
    }
}

/* 超小屏幕设备的额外调整 */
@media screen and (max-width: 360px) {
    .payment-qrcode-img {
        width: 140px; /* 在更小的屏幕上进一步减小二维码尺寸 */
        height: 140px;
    }
    
    .payment-step-header {
        margin-bottom: 10px;
    }
    
    #payment-title, #pricing-title, #orders-title {
        font-size: 18px;
    }
    
    .payment-order-info p {
        font-size: 12px;
    }
}

/* 桌面端特定样式 */
@media screen and (min-width: 769px) {
    #pricing-plans-modal .modal-content {
        max-width: 1050px; /* 调整宽度以容纳至少3个卡片 */
    }
}

/* 支付方式选择 */
.payment-methods {
    margin: 15px 0;
}

.payment-method-options {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.payment-method-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    border-radius: 8px;
    border: 2px solid rgba(114, 129, 151, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
    width: 120px;
}

.payment-method-option:hover {
    border-color: #2c72d9;
    background-color: rgba(44, 114, 217, 0.05);
}

.payment-method-option.selected {
    border-color: #2c72d9;
    background-color: rgba(44, 114, 217, 0.1);
}

.payment-method-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 10px;
}

.payment-method-name {
    font-size: 14px;
    font-weight: 600;
    color: #e0e0e0;
}

/* 支付方式选择的响应式样式 */
@media screen and (max-width: 768px) {
    .payment-method-options {
        gap: 15px;
    }
    
    .payment-method-option {
        padding: 10px;
        width: 100px;
    }
    
    .payment-method-icon {
        width: 36px;
        height: 36px;
    }
}

/* 二维码加载失败备用样式 */
.payment-qr-fallback {
    margin-top: 15px;
    padding: 10px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    text-align: center;
}

.payment-qr-fallback p {
    margin-bottom: 10px;
    color: #555;
    font-size: 14px;
}

.payment-url-link {
    display: block;
    word-break: break-all;
    margin-bottom: 10px;
    color: #2c72d9;
    font-size: 13px;
    text-decoration: none;
    padding: 5px;
    background-color: rgba(44, 114, 217, 0.1);
    border-radius: 4px;
}

.payment-url-link:hover {
    text-decoration: underline;
    background-color: rgba(44, 114, 217, 0.2);
}

.copy-url-btn {
    background-color: #2c72d9;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 5px 15px;
    font-size: 13px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.copy-url-btn:hover {
    background-color: #215db2;
}

@media screen and (max-width: 768px) {
    .payment-qr-fallback p {
        font-size: 12px;
    }
    
    .payment-url-link {
        font-size: 11px;
    }
    
    .copy-url-btn {
        padding: 4px 10px;
        font-size: 12px;
    }
}

/* 支付方式文字图标 */
.payment-method-text-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #2c72d9;
    color: white;
    border-radius: 50%;
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
}

@media screen and (max-width: 768px) {
    .payment-method-text-icon {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }
} 