/* 积分管理页面样式 */

.points-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.points-header {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    padding: 2rem;
    margin-bottom: 2rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
}

.points-balance {
    flex: 1;
    min-width: 300px;
}

.points-balance h1 {
    font-size: 1.5rem;
    color: #333;
    margin: 0 0 1rem 0;
}

.balance-value {
    font-size: 3rem;
    font-weight: 700;
    color: #4a90e2;
    margin-bottom: 0.8rem;
}

.cost-value {
    font-weight: 600;
    color: #555;
}

.primary-button {
    padding: 0.8rem 1.5rem;
    background-color: #4a90e2;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
}

.primary-button:hover {
    background-color: #3a7bc8;
}

.packages-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.package-card {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.package-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.package-card.recommended {
    border-color: #4a90e2;
    background-color: #f0f7ff;
}

.recommend-tag {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: #fe4d4d;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.save-tag {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: #fe4d4d;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.package-name {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.8rem;
}

.package-points {
    font-size: 2.2rem;
    font-weight: 700;
    color: #4a90e2;
    margin-bottom: 0.5rem;
}

.package-price {
    font-size: 1.8rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1.5rem;
}

/* 新增折扣价格样式 */
.price-container {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.original-price {
    font-size: 1.2rem;
    color: #888;
    text-decoration: line-through;
    margin-bottom: 0.3rem;
}

.discount-price {
    font-size: 1.8rem;
    font-weight: 600;
    color: #e74c3c;
}

.discount-label {
    display: inline-block;
    background-color: #e74c3c;
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-left: 0.5rem;
    vertical-align: middle;
}

.package-info {
    margin-bottom: 1.5rem;
    min-height: 60px;
}

.package-info p {
    margin: 0.5rem 0;
    color: #666;
}

.package-button {
    width: 100%;
    padding: 0.8rem;
    background-color: #4a90e2;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
}

.package-button:hover {
    background-color: #3a7bc8;
}

.points-history {
    margin-top: 1.5rem;
}

.history-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.history-filters select {
    padding: 0.6rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.95rem;
    color: #333;
    background-color: #fff;
}

.history-table-container {
    overflow-x: auto;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
}

.history-table th, 
.history-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.history-table th {
    font-weight: 600;
    color: #333;
    background-color: #f8f9fa;
}

.history-table td {
    color: #555;
}

.empty-history {
    text-align: center;
    color: #888;
    font-style: italic;
    padding: 2rem;
}

/* 支付模态框 */
.payment-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.selected-package {
    background-color: #f8f9fa;
    border-radius: 6px;
    padding: 1rem;
    margin: 1.5rem 0;
}

.selected-package p {
    margin: 0.5rem 0;
    font-size: 1.1rem;
}

.payment-methods {
    margin: 1.5rem 0;
}

.payment-method {
    margin-bottom: 1rem;
}

.payment-method input[type="radio"] {
    margin-right: 0.5rem;
}

.payment-method label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.payment-method img {
    width: 32px;
    height: 32px;
    margin-right: 1rem;
    object-fit: contain;
}

.payment-note {
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: #888;
    text-align: center;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .points-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .balance-actions {
        margin-top: 1.5rem;
        width: 100%;
    }
    
    .primary-button {
        width: 100%;
    }
    
    .packages-container {
        grid-template-columns: 1fr;
    }
}

/* 当模态框显示时的样式 */
.payment-modal.show {
    display: flex;
}

.modal-content {
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

/* 支付成功消息 */
.payment-success-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
    padding: 2rem;
    text-align: center;
    z-index: 1100;
    max-width: 400px;
    width: 90%;
    animation: fadeIn 0.3s ease;
}

.payment-success-message i {
    font-size: 3rem;
    color: #28a745;
    margin-bottom: 1rem;
}

.payment-success-message p {
    margin: 0.5rem 0;
    color: #333;
    font-size: 1.1rem;
}

/* 添加当支付模态框过长时的滚动条样式 */
.payment-modal .modal-content::-webkit-scrollbar {
    width: 6px;
}

.payment-modal .modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.payment-modal .modal-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.payment-modal .modal-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 禁用按钮样式 */
.package-button.disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.package-button.disabled:hover {
    background-color: #ccc;
}

/* 区域标题样式 */
.section-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: #333;
    margin: 1.5rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #4a90e2;
}

/* 锚点滚动行为 */
html {
    scroll-behavior: smooth;
}

/* 锚点定位修正，避免标题被导航栏遮挡 */
#membership-packages {
    scroll-margin-top: 100px;
    padding-top: 20px;
}

/* 高亮效果 */
.highlight {
    animation: highlight-pulse 2s ease;
}

@keyframes highlight-pulse {
    0% { background-color: transparent; }
    25% { background-color: rgba(74, 144, 226, 0.2); }
    50% { background-color: rgba(74, 144, 226, 0.3); }
    75% { background-color: rgba(74, 144, 226, 0.2); }
    100% { background-color: transparent; }
}

/* 锚点元素 */
#membership-packages {
    display: block;
    height: 50px;
    margin-top: -50px;
    visibility: hidden;
    position: relative;
}

/* 分页控件样式 */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    font-size: 14px;
}

.pagination-btn {
    padding: 5px 10px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    cursor: pointer;
    color: #495057;
    font-size: 16px;
    margin: 0 5px;
    transition: all 0.2s;
    min-width: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination-btn:hover:not(:disabled) {
    background-color: #e9ecef;
    border-color: #ced4da;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-numbers {
    display: flex;
    align-items: center;
    margin: 0 10px;
}

.page-number {
    padding: 5px 10px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    cursor: pointer;
    color: #495057;
    margin: 0 2px;
    min-width: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-number:hover {
    background-color: #e9ecef;
    border-color: #ced4da;
}

.page-number.active {
    background-color: #4a90e2;
    color: white;
    border-color: #4a90e2;
}

.page-ellipsis {
    margin: 0 5px;
    display: inline-block;
    color: #6c757d;
} 