/* d:\zizhi_reader\static\css\member.css */

/* 会员页面样式 */
.member-main {
    display: flex;
    min-height: calc(100vh - 120px);
    position: relative;
}

.member-main .sidebar-left {
    flex-shrink: 0;
    width: 200px;
    min-width: 200px;
    position: static;
    transform: none;
}

.member-main .sidebar-right {
    flex-shrink: 0;
    width: 280px;
    min-width: 280px;
    max-width: 280px;
    position: static;
    transform: none;
    background: #fffef9;
    border-left: 1px solid #e8d5b7;
}

.member-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.member-menu li {
    margin-bottom: 6px;
}

.member-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    color: #6b4423;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    background: linear-gradient(180deg, #fffdf5 0%, #f8f0dc 100%);
    border: 1px solid #d4c08a;
    font-family: "LXGW WenKai", "KaiTi", "STKaiti", "楷体", serif;
    font-size: 0.95rem;
    letter-spacing: 0.1em;
    position: relative;
    overflow: hidden;
}

.member-menu a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: transparent;
    transition: background 0.3s ease;
}

.member-menu a:hover {
    background: linear-gradient(180deg, #f8f0dc 0%, #ede0c4 100%);
    border-color: #8b4513;
    color: #3a2817;
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(139, 69, 19, 0.15);
}

.member-menu a:hover::before {
    background: #c8a960;
}

.member-menu a.active {
    background: linear-gradient(135deg, #8b4513 0%, #a0522d 100%);
    color: #fff;
    border-color: #6b3410;
    box-shadow: 0 3px 12px rgba(139, 69, 19, 0.4);
}

.member-menu a.active::before {
    background: #ffd700;
}

.member-menu a .menu-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
    width: 24px;
    text-align: center;
}

.member-menu a .menu-text {
    flex: 1;
}

.member-menu a.active .menu-icon {
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.3));
}

.member-container {
    flex: 1;
    padding: 20px;
}

.section-header {
    margin-bottom: 30px;
    text-align: center;
}

.section-title {
    font-size: 28px;
    color: #8b4513;
    margin-bottom: 10px;
    font-family: 'KaiTi', 'LXGW WenKai', serif;
}

.section-desc {
    color: #666;
    font-size: 16px;
}

.membership-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.membership-card {
    background: linear-gradient(135deg, #fffef9 0%, #f5f0e6 100%);
    border: 2px solid #ddd;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.membership-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(139, 69, 19, 0.15);
}

.membership-card.popular {
    border-color: #d4af37;
    background: linear-gradient(135deg, #fffef9 0%, #fff8e7 100%);
}

.membership-card.popular::before {
    content: '🔥 热门';
    position: absolute;
    top: -10px;
    right: 20px;
    background: linear-gradient(135deg, #d4af37 0%, #b8941f 100%);
    color: white;
    padding: 2px 12px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: bold;
}

.membership-card .level-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.membership-card .level-name {
    font-size: 24px;
    font-weight: bold;
    color: #8b4513;
    margin-bottom: 10px;
}

.membership-card .level-desc {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
}

.membership-card .prices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.price-card {
    background: rgba(139, 69, 19, 0.05);
    border: 1px solid #e8d5b7;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.price-card:hover {
    background: rgba(139, 69, 19, 0.1);
    border-color: #8b4513;
    transform: translateY(-2px);
}

.price-card .price-duration {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.price-card .price-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.price-card .original-price {
    font-size: 12px;
    color: #999;
    text-decoration: line-through;
}

.price-card .price {
    font-size: 28px;
    font-weight: bold;
    color: #d4af37;
}

.price-card .discount-tag {
    font-size: 11px;
    color: #000000;
    background: #f8d7da;
    padding: 2px 8px;
    border-radius: 4px;
    margin-top: 5px;
    font-weight: 500;
}

.price-card .buy-btn {
    margin-top: 10px;
    width: 100%;
    padding: 8px;
    font-size: 14px;
}

.membership-card .privileges {
    text-align: left;
    margin-bottom: 20px;
}

.membership-card .privileges h4 {
    font-size: 14px;
    color: #8b4513;
    margin-bottom: 10px;
    text-align: center;
}

.membership-card .privileges ul {
    list-style: none;
    padding: 0;
}

.membership-card .privileges li {
    padding: 6px 0;
    font-size: 14px;
    color: #555;
    padding-left: 20px;
    position: relative;
}

.membership-card .privileges li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #28a745;
    font-weight: bold;
}

.membership-card .buy-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #8b4513 0%, #6b340f 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.membership-card .buy-btn:hover {
    background: linear-gradient(135deg, #6b340f 0%, #5a2c0c 100%);
}

.status-card {
    background: linear-gradient(135deg, #fffef9 0%, #f5f0e6 100%);
    border: 2px solid #ddd;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
}

.status-card.member {
    border-color: #d4af37;
}

.status-card .status-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.status-card .status-title {
    font-size: 24px;
    font-weight: bold;
    color: #8b4513;
    margin-bottom: 10px;
}

.status-card .status-desc {
    color: #666;
    margin-bottom: 20px;
}

.status-card .member-info {
    background: rgba(139, 69, 19, 0.05);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.status-card .member-info .info-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.status-card .member-info .info-item:last-child {
    border-bottom: none;
}

.status-card .member-info .info-label {
    color: #666;
}

.status-card .member-info .info-value {
    font-weight: bold;
    color: #8b4513;
}

.status-card .action-btn {
    padding: 12px 30px;
    background: linear-gradient(135deg, #8b4513 0%, #6b340f 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.status-card .action-btn:hover {
    background: linear-gradient(135deg, #6b340f 0%, #5a2c0c 100%);
}

.orders-list {
    margin-top: 20px;
}

.order-item {
    background: #fffef9;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.order-no {
    font-size: 14px;
    color: #666;
}

.order-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.order-status.pending {
    background: #fff3cd;
    color: #856404;
}

.order-status.payed {
    background: #d4edda;
    color: #155724;
}

.order-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.order-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.order-level-icon {
    font-size: 32px;
}

.order-level-info {
    display: flex;
    flex-direction: column;
}

.order-level-name {
    font-weight: bold;
    color: #333;
}

/* 🆕 续期订单友好展示样式 */
.order-renewal-badge {
    display: inline-block;
    margin-top: 4px;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 12px;
    color: #8b5a2b;
    background: linear-gradient(135deg, #fff7e6 0%, #ffe4b5 100%);
    border: 1px solid #e6c07b;
}
.order-renewal-label {
    margin-top: 6px;
    font-size: 13px;
    color: #8b7355;
}
.order-total-end {
    margin-top: 2px;
    font-size: 13px;
    color: #5a3a1a;
    font-weight: bold;
}
.order-time {
    font-size: 13px;
    color: #666;
    margin-top: 3px;
}

.order-amount {
    font-size: 20px;
    font-weight: bold;
    color: #d4af37;
}

.order-footer {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #999;
}

.order-actions {
    display: flex;
    gap: 10px;
}

.order-action-btn {
    padding: 6px 12px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
}

.order-action-btn:hover {
    background: #e8d5b7;
    border-color: #8b4513;
    color: #8b4513;
}

.privileges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.privilege-card {
    background: linear-gradient(135deg, #fffef9 0%, #f5f0e6 100%);
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 25px;
    text-align: center;
}

.privilege-icon {
    font-size: 40px;
    margin-bottom: 15px;
}

.privilege-card h4 {
    font-size: 18px;
    color: #8b4513;
    margin-bottom: 10px;
}

.privilege-card p {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

.member-notice {
    padding: 20px;
}

.member-notice h4 {
    color: #8b4513;
    margin-bottom: 10px;
    font-size: 16px;
}

.member-notice ul {
    list-style: none;
    padding: 0;
    margin-bottom: 20px;
}

.member-notice li {
    padding: 8px 0;
    font-size: 14px;
    color: #555;
    padding-left: 20px;
    position: relative;
}

.member-notice li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #d4af37;
}

.member-notice p {
    font-size: 14px;
    color: #666;
    margin: 5px 0;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 30px;
    width: 90%;
    max-width: 450px;
}

.modal-content.success-content {
    text-align: center;
}

.success-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h3 {
    color: #8b4513;
    font-size: 20px;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
}

.close-btn:hover {
    color: #333;
}

.order-summary {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

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

.summary-item.total .summary-value {
    font-size: 24px;
    font-weight: bold;
    color: #d4af37;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 25px;
}

.btn {
    padding: 10px 25px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #8b4513 0%, #6b340f 100%);
    color: white;
    border: none;
}

.btn-secondary {
    background: #f5f5f5;
    color: #666;
    border: 1px solid #ddd;
}

.loading-text {
    text-align: center;
    color: #999;
    padding: 40px;
}

.member-upgrade-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.member-upgrade-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.member-upgrade-content {
    position: relative;
    background: white;
    border-radius: 12px;
    padding: 25px 35px;
    max-width: 380px;
    width: 90%;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.member-upgrade-close {
    position: absolute;
    top: 12px;
    right: 15px;
    width: 28px;
    height: 28px;
    border: none;
    background: #f5f5f5;
    border-radius: 50%;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    line-height: 24px;
    transition: all 0.2s ease;
}

.member-upgrade-close:hover {
    background: #eee;
    color: #666;
}

.member-upgrade-icon {
    font-size: 40px;
    margin-bottom: 15px;
}

.member-upgrade-content h3 {
    font-size: 20px;
    color: #333;
    margin-bottom: 10px;
    font-weight: 600;
}

.member-upgrade-content p {
    font-size: 14px;
    color: #666;
    margin-bottom: 25px;
    line-height: 1.5;
}

.member-upgrade-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.member-upgrade-btn {
    padding: 10px 25px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.member-upgrade-btn.primary {
    background: #8b4513;
    color: white;
}

.member-upgrade-btn.primary:hover {
    background: #6b340f;
}

.member-upgrade-btn.secondary {
    background: #f5f5f5;
    color: #666;
    border: 1px solid #ddd;
}

.member-upgrade-btn.secondary:hover {
    background: #eee;
}

.status-loading {
    text-align: center;
    color: #999;
    padding: 60px;
}

/* 支付方式选择 */
.payment-methods {
    margin-top: 20px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
}

.payment-title {
    font-size: 14px;
    color: #333;
    font-weight: bold;
    margin-bottom: 12px;
}

.payment-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.payment-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background: white;
    border: 2px solid #e8d5b7;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.payment-option:hover {
    border-color: #8b4513;
    background: #fffbf5;
}

.payment-option.selected {
    border-color: #d4af37;
    background: #fffbf0;
}

.payment-option input[type="radio"] {
    margin: 0;
    cursor: pointer;
    accent-color: #d4af37;
}

.payment-icon {
    font-size: 24px;
}

.payment-text {
    flex: 1;
    font-size: 15px;
    color: #333;
    font-weight: 500;
}

.payment-option.selected .payment-check {
    display: inline-block;
    width: 20px;
    height: 20px;
    background: #d4af37;
    border-radius: 50%;
    position: relative;
}

.payment-option.selected .payment-check::after {
    content: '✓';
    color: white;
    font-size: 14px;
    font-weight: bold;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.payment-option:not(.selected) .payment-check {
    display: none;
}

@media (max-width: 768px) {
    .member-main {
        flex-direction: column;
    }
    
    .sidebar-left {
        order: 2;
        margin-top: 20px;
    }
    
    .content-center {
        order: 1;
    }
    
    .sidebar-right {
        order: 3;
        margin-top: 20px;
    }
    
    .membership-cards {
        grid-template-columns: 1fr;
    }
    
    .privileges-grid {
        grid-template-columns: 1fr;
    }
}

.member-login-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.member-login-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.member-login-content {
    position: relative;
    background: white;
    border-radius: 12px;
    padding: 25px 35px;
    max-width: 380px;
    width: 90%;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.member-login-close {
    position: absolute;
    top: 12px;
    right: 15px;
    width: 28px;
    height: 28px;
    border: none;
    background: #f5f5f5;
    border-radius: 50%;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    line-height: 24px;
    transition: all 0.2s ease;
}

.member-login-close:hover {
    background: #eee;
    color: #666;
}

.member-login-icon {
    font-size: 40px;
    margin-bottom: 15px;
}

.member-login-content h3 {
    font-size: 20px;
    color: #333;
    margin-bottom: 10px;
    font-weight: 600;
}

.member-login-content p {
    font-size: 14px;
    color: #666;
    margin-bottom: 25px;
    line-height: 1.5;
}

.member-login-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.member-login-btn {
    padding: 10px 25px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.member-login-btn.primary {
    background: #8b4513;
    color: white;
}

.member-login-btn.primary:hover {
    background: #6b340f;
}

.member-login-btn.secondary {
    background: #f5f5f5;
    color: #666;
    border: 1px solid #ddd;
}

.member-login-btn.secondary:hover {
    background: #eee;
}

/* ===== 统一会员权益区域 ===== */
.member-privileges-section {
    margin: 40px 0;
    padding: 30px;
    background: linear-gradient(180deg, #fdf8ea 0%, #f5ecd7 100%);
    border: 2px solid #c8a960;
    border-radius: 12px;
    position: relative;
}

.member-privileges-section::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    bottom: 8px;
    border: 1px dashed #d4af37;
    border-radius: 8px;
    pointer-events: none;
}

.privileges-section-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 12px;
}

.privileges-divider {
    flex: 1;
    max-width: 80px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #c8a960, transparent);
}

.privileges-section-title {
    font-size: 1.8rem;
    color: #8b2323;
    font-family: "LXGW WenKai", "KaiTi", "STKaiti", "楷体", serif;
    letter-spacing: 0.3em;
    margin: 0;
    text-shadow: 1px 1px 2px rgba(139, 35, 35, 0.1);
}

.privileges-section-desc {
    text-align: center;
    color: #6b4423;
    font-size: 0.95rem;
    margin: 0 0 24px 0;
    font-family: "LXGW WenKai", "KaiTi", "楷体", serif;
    letter-spacing: 0.1em;
}

.common-privileges-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.privilege-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    background: linear-gradient(180deg, #fffdf5 0%, #faf3e0 100%);
    border: 1px solid #d4c08a;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.privilege-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #c8a960 0%, #8b4513 100%);
}

.privilege-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(139, 69, 19, 0.15);
    border-color: #8b4513;
}

.privilege-item-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5ecd7 0%, #ede0c4 100%);
    border-radius: 50%;
    border: 1px solid #c8a960;
}

.privilege-item-content {
    flex: 1;
    min-width: 0;
}

.privilege-item-content h4 {
    font-size: 1rem;
    color: #8b2323;
    margin: 0 0 4px 0;
    font-family: "LXGW WenKai", "KaiTi", "楷体", serif;
    font-weight: 600;
}

.privilege-item-content p {
    font-size: 0.85rem;
    color: #6b4423;
    margin: 0;
    line-height: 1.5;
}

.privilege-check {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: none;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #8b4513 0%, #a0522d 100%);
    color: #fff;
    border-radius: 50%;
    font-size: 0.9rem;
    font-weight: bold;
}

.privileges-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #996515;
    font-style: italic;
    background: rgba(255, 255, 255, 0.5);
    border: 1px dashed #d4af37;
    border-radius: 8px;
}

/* 移动端权益区域适配 */
@media (max-width: 767px) {
    .member-privileges-section {
        margin: 24px 0;
        padding: 20px 16px;
    }

    .privileges-section-title {
        font-size: 1.4rem;
        letter-spacing: 0.2em;
    }

    .privileges-section-desc {
        font-size: 0.85rem;
        margin-bottom: 16px;
    }

    .common-privileges-list {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .privilege-item {
        padding: 12px 14px;
        gap: 10px;
    }

    .privilege-item-icon {
        font-size: 1.4rem;
        width: 40px;
        height: 40px;
    }

    .privilege-item-content h4 {
        font-size: 0.95rem;
    }

    .privilege-item-content p {
        font-size: 0.8rem;
    }
}