/* 会员中心专用样式 */

/* 主内容区域 */
.member-main {
    margin-top: 76px;
    padding: 2rem 0;
    background: var(--bg-light);
    min-height: calc(100vh - 76px);
}

/* 侧边栏样式 */
.member-sidebar {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: var(--shadow);
    position: sticky;
    top: 100px;
}

.member-profile {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.profile-avatar {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--accent-color);
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-edit {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 35px;
    height: 35px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: var(--transition);
}

.avatar-edit:hover {
    background: var(--secondary-color);
    transform: scale(1.1);
}

.member-profile h4 {
    color: var(--text-dark);
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.member-level {
    color: var(--accent-color);
    font-weight: bold;
    margin-bottom: 1rem;
}

.member-stats {
    display: flex;
    justify-content: space-around;
    margin-top: 1rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* 会员导航 */
.member-nav {
    margin-top: 1rem;
}

.member-nav .nav-link {
    color: var(--text-dark);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    transition: var(--transition);
    border: none;
}

.member-nav .nav-link:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}

.member-nav .nav-link.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.member-nav .nav-link i {
    width: 20px;
    text-align: center;
}

/* 内容卡片 */
.content-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.card-title {
    color: var(--primary-color);
    font-weight: bold;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 1rem;
}

.card-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

/* 表单样式 */
.form-label {
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.form-control,
.form-select {
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem;
    transition: var(--transition);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(139, 69, 19, 0.25);
}

.form-control.is-invalid {
    border-color: #dc3545;
}

/* 收藏网格 */
.favorites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.favorite-item {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.favorite-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.favorite-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.favorite-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.favorite-item:hover .favorite-image img {
    transform: scale(1.1);
}

.favorite-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    opacity: 0;
    transition: var(--transition);
}

.favorite-item:hover .favorite-overlay {
    opacity: 1;
}

.favorite-content {
    padding: 1.5rem;
}

.favorite-content h5 {
    color: var(--text-dark);
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.favorite-content p {
    color: var(--text-light);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.favorite-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.favorite-date {
    color: var(--text-light);
    font-size: 0.8rem;
}

/* 历史记录列表 */
.history-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.history-item {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 10px;
    padding: 1rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.history-item:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.history-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    margin-right: 1rem;
    flex-shrink: 0;
}

.history-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.history-content {
    flex: 1;
}

.history-content h5 {
    color: var(--text-dark);
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.history-content p {
    color: var(--text-light);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.history-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.history-time {
    color: var(--text-light);
    font-size: 0.8rem;
}

.history-actions {
    margin-left: 1rem;
}

/* 订阅管理 */
.subscriptions-grid {
    display: grid;
    gap: 1rem;
}

.subscription-item {
    background: var(--bg-light);
    border-radius: 10px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.subscription-item:hover {
    background: white;
    box-shadow: var(--shadow);
}

.subscription-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.subscription-header h5 {
    color: var(--text-dark);
    font-weight: bold;
    margin: 0;
}

.subscription-item p {
    color: var(--text-light);
    margin: 0;
    font-size: 0.9rem;
}

/* 开关样式 */
.form-check-input {
    width: 3rem;
    height: 1.5rem;
    margin-top: 0;
    background-color: #dee2e6;
    border: none;
    border-radius: 1rem;
    transition: var(--transition);
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(139, 69, 19, 0.25);
}

/* 设置区域 */
.setting-section {
    margin-bottom: 2rem;
}

.setting-section h5 {
    color: var(--text-dark);
    font-weight: bold;
    margin-bottom: 1rem;
}

.setting-section:last-child {
    margin-bottom: 0;
}

/* 过滤器样式 */
.filters .btn-group {
    flex-wrap: wrap;
}

.filters .btn {
    border-radius: 20px;
    margin: 0.25rem;
}

/* 控制按钮 */
.history-controls {
    display: flex;
    justify-content: flex-end;
}

/* 模态框样式 */
.modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid var(--border-color);
    padding: 1.5rem;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .member-sidebar {
        position: static;
        margin-bottom: 2rem;
    }
    
    .member-stats {
        justify-content: space-between;
    }
    
    .favorites-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .member-main {
        padding: 1rem 0;
    }
    
    .content-card {
        padding: 1.5rem;
    }
    
    .favorites-grid {
        grid-template-columns: 1fr;
    }
    
    .history-item {
        flex-direction: column;
        text-align: center;
    }
    
    .history-image {
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .history-actions {
        margin-left: 0;
        margin-top: 1rem;
    }
    
    .subscription-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

@media (max-width: 576px) {
    .member-sidebar {
        padding: 1.5rem;
    }
    
    .profile-avatar {
        width: 100px;
        height: 100px;
    }
    
    .member-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .content-card {
        padding: 1rem;
    }
    
    .favorite-content,
    .history-content {
        padding: 1rem;
    }
}

/* 动画效果 */
.favorite-item,
.history-item,
.subscription-item {
    animation: fadeInUp 0.6s ease-out;
}

/* 加载状态 */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-light);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h5 {
    margin-bottom: 0.5rem;
}

.empty-state p {
    margin-bottom: 1rem;
}

/* 成功/错误消息 */
.alert {
    border-radius: 10px;
    border: none;
    padding: 1rem 1.5rem;
}

.alert-success {
    background: #d4edda;
    color: #155724;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
} 