/* 会员中心页面样式 */

/* 登录弹窗样式 */
#loginModal .modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

#loginModal .modal-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

#loginModal .modal-title {
    font-weight: 600;
    color: #212529;
}

#loginModal .modal-body {
    padding: 30px;
}

.login-logo img {
    max-height: 60px;
    margin-bottom: 15px;
}

.qr-section {
    margin: 25px 0;
    position: relative;
}

#qrcode {
    width: 200px;
    height: 200px;
    margin: 0 auto;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fff;
    overflow: hidden;
}

#qrcode img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.qr-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
}

#loginStatus {
    border-radius: 8px;
    font-size: 0.9rem;
}

#refreshQRBtn {
    border-radius: 8px;
}

/* 用户信息卡片 */
.user-info-card {
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: none;
    overflow: hidden;
}

.user-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-size: 60px;
    color: #6c757d;
}

.user-name {
    font-weight: 600;
    margin-bottom: 5px;
    color: #212529;
}

.user-email {
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.user-stats .stat-item {
    display: inline-block;
    margin-right: 20px;
    font-size: 0.85rem;
    color: #6c757d;
}

.user-stats .stat-item i {
    margin-right: 5px;
}

.user-summary {
    display: flex;
    justify-content: space-around;
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
}

.user-contact {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.user-phone {
    font-size: 0.95rem;
}

#changePhoneBtn {
    padding: 4px 12px;
    font-size: 0.85rem;
}

.summary-item {
    text-align: center;
}

.summary-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0d6efd;
}

.summary-label {
    font-size: 0.8rem;
    color: #6c757d;
}

/* 订阅卡片 */
.subscription-card {
    border-radius: 12px;
    border: 1px solid #e9ecef;
    padding: 24px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(15, 60, 120, 0.08);
    height: 100%;
}

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

.subscription-header {
    background-color: #f8f9fa;
    padding: 15px;
    border-bottom: 1px solid #e9ecef;
}

.subscription-logo {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    background-color: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #6c757d;
}

.subscription-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

.subscription-category {
    font-size: 0.8rem;
    color: #6c757d;
}

.subscription-price {
    font-size: 1.1rem;
    font-weight: 600;
    color: #0d6efd;
}

.subscription-price .period {
    font-size: 0.8rem;
    font-weight: 400;
    color: #6c757d;
}

.subscription-body {
    padding: 15px;
}

.subscription-description {
    margin-bottom: 15px;
    color: #495057;
}

.subscription-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-active {
    background-color: #d1e7dd;
    color: #0f5132;
}

.status-expired {
    background-color: #f8d7da;
    color: #842029;
}

.subscription-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid #e9ecef;
}

.subscription-date {
    font-size: 0.8rem;
    color: #6c757d;
}

/* 订单状态标签 */
.order-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-pending {
    background-color: #fff3cd;
    color: #664d03;
}

.status-paid {
    background-color: #d1e7dd;
    color: #0f5132;
}

.status-cancelled {
    background-color: #f8d7da;
    color: #842029;
}

.status-refunded {
    background-color: #cff4fc;
    color: #055160;
}

.status-refund_requested,
.status-pending_refund {
    background-color: #fff3cd;
    color: #856404;
}

.status-refund_rejected {
    color: #dc3545;
}

/* 用量统计卡片 */
.usage-stat-card {
    border-radius: 12px;
    border: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

/* 操作日志统计卡片 */
.activity-stat-card {
    border-radius: 12px;
    border: 1px solid #e9ecef;
    box-shadow: 0 6px 16px rgba(13, 110, 253, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.activity-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(13, 110, 253, 0.15);
}

.activity-stat-icon {
    font-size: 2.2rem;
    color: #0d6efd;
    margin-bottom: 8px;
}

.activity-stat-value {
    font-size: 1.7rem;
    font-weight: 700;
    color: #0d6efd;
    margin: 0;
}

.activity-table tbody tr td {
    vertical-align: middle;
}

.activity-table tbody tr td .small {
    display: block;
    margin-top: 4px;
}

/* 微信登录模态框样式 */
#qrCode {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    margin: 15px 0;
}

#qrCode img {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 10px;
    background-color: white;
}

/* 登录提示区域 */
.login-prompt {
    padding: 60px 0;
}

.login-prompt i {
    color: #6c757d;
    margin-bottom: 20px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .user-summary {
        flex-direction: column;
        gap: 10px;
    }
    
    .summary-item {
        padding: 10px 0;
        border-bottom: 1px solid #e9ecef;
    }
    
    .summary-item:last-child {
        border-bottom: none;
    }
}

.usage-stat-card:hover {
    transform: translateY(-5px);
}

.usage-stat-icon {
    font-size: 2rem;
    color: #0d6efd;
    margin-bottom: 10px;
}

.usage-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #212529;
    margin: 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .user-summary {
        flex-direction: column;
        gap: 10px;
    }
    
    .summary-item {
        padding: 10px;
        border-radius: 8px;
        background-color: white;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    }
    
    .subscription-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .d-flex.justify-content-end {
        flex-direction: column;
        gap: 10px;
    }
    
    .form-select, .form-control {
        width: 100% !important;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* 加载状态 */
.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.notification-dropdown {
    min-width: 260px;
    max-height: 320px;
    overflow-y: auto;
    box-shadow: 0 0.5rem 1rem rgba(15, 60, 120, 0.15);
}

.notification-item {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f3f5;
    cursor: pointer;
}

.notification-item.unread {
    background: rgba(13, 110, 253, 0.08);
}

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

.notification-item-title {
    font-weight: 600;
    color: #1c2c4a;
    margin-bottom: 4px;
}

.notification-item-time {
    font-size: 0.75rem;
    color: #6c757d;
}

.notification-indicator {
    position: absolute;
    top: 6px;
    right: 4px;
    width: 10px;
    height: 10px;
    background: #dc3545;
    border-radius: 50%;
}

.notification-count {
    position: absolute;
    top: 0;
    right: -6px;
    background-color: #dc3545;
    color: #fff;
    border-radius: 999px;
    padding: 0 6px;
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1.4;
}

.contact-banner {
    background: linear-gradient(90deg, rgba(13,110,253,0.05), rgba(13,110,253,0.02));
    border-bottom: 1px solid rgba(13,110,253,0.1);
}

.contact-banner-image {
    max-width: 360px;
    width: 100%;
    height: auto;
}

.contact-info {
    font-size: 0.95rem;
    color: #1a2a4a;
}

.contact-info i {
    color: #0d6efd;
    margin-right: 4px;
}

.support-section {
    background: #f8f9fa;
}

.support-card {
    background: #fff;
    border-radius: 16px;
    padding: 24px 20px;
    box-shadow: 0 15px 30px rgba(20,50,90,0.08);
    text-align: center;
    height: 100%;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.support-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 40px rgba(20,50,90,0.12);
}

.support-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    font-size: 1.6rem;
}

.support-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #1a2a4a;
}

.support-desc {
    color: #6c7a92;
    line-height: 1.6;
    margin-bottom: 0;
}

.help-section {
    background: #ffffff;
}

.help-card {
    border-radius: 16px;
    border: 1px solid rgba(13, 110, 253, 0.08);
    padding: 28px;
    box-shadow: 0 16px 38px rgba(15, 60, 120, 0.08);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.help-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
}

.help-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.help-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 600;
    color: #1a2a4a;
}

.help-list {
    margin: 0;
    padding-left: 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 10px;
    color: #495057;
    line-height: 1.7;
}

.help-list li strong {
    color: #0d6efd;
    font-weight: 600;
    margin-right: 4px;
}

.help-tip {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 12px;
    background: rgba(13, 110, 253, 0.08);
    color: #0b3d91;
    font-size: 0.95rem;
}

.help-tip i {
    font-size: 1.2rem;
}

.help-faq {
    display: flex;
    flex-direction: column;
    gap: 14px;
    color: #495057;
}

.help-faq h6 {
    font-size: 1rem;
    font-weight: 600;
    color: #1a2a4a;
    margin-bottom: 6px;
}

.help-faq p {
    margin: 0;
    line-height: 1.6;
}

.quick-start-step {
    transition: all 0.3s ease;
    background: #ffffff;
}

.quick-start-step:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(13, 110, 253, 0.15);
    border-color: #0d6efd !important;
}

.step-number {
    font-size: 1.1rem;
}

.bg-purple-subtle {
    background-color: rgba(111, 66, 193, 0.1) !important;
}

.text-purple {
    color: #6f42c1 !important;
}

@media (max-width: 768px) {
    .help-card {
        padding: 20px;
    }
    
    .quick-start-step {
        margin-bottom: 12px;
    }
}

.subscriptions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
    gap: 28px;
}

.subscription-card {
    border-radius: 14px;
    border: 1px solid #d8e2f1;
    padding: 28px 32px;
    background: #ffffff;
    box-shadow: 0 14px 32px rgba(17, 64, 128, 0.1);
    height: 100%;
}

.entitlements-timeline {
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 12px;
    max-height: 220px;
    overflow-y: auto;
    border: 1px solid rgba(13, 110, 253, 0.08);
}

.entitlement-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px;
    border-left: 3px solid var(--bs-primary);
    background-color: #ffffff;
    border-radius: 6px;
    margin-bottom: 10px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.entitlement-item:last-child {
    margin-bottom: 0;
}

.entitlement-status {
    font-weight: 600;
    color: var(--bs-primary);
}

.entitlement-dates {
    font-size: 0.85rem;
    color: #6c757d;
}

.entitlement-order {
    font-size: 0.8rem;
    color: #adb5bd;
}

.subscription-header .subscription-title {
    font-size: 1.2rem;
}

.subscription-description {
    font-size: 0.95rem;
    line-height: 1.7;
}

.subscription-entitlements {
    font-size: 0.85rem;
    color: #6c757d;
}

.subscription-price {
    font-size: 1.25rem;
    font-weight: 700;
}

.subscription-footer {
    padding-top: 16px;
}

/* 手机号绑定模态框 */
.phone-bind-modal {
    border-radius: 12px;
    border: none;
    box-shadow: 0 20px 40px rgba(17, 64, 128, 0.15);
}

.phone-bind-modal .modal-header {
    border-bottom: none;
}

.phone-bind-modal .modal-body {
    padding-top: 0.5rem;
}

.phone-bind-code-row {
    display: flex;
    gap: 12px;
}

.phone-bind-code-row .form-control {
    flex: 1;
}

.phone-bind-code-row .btn {
    flex-shrink: 0;
    white-space: nowrap;
}

#centerPhoneStatus {
    min-height: 18px;
}