/* 主要布局 */
.member-container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 30px;
}

/* 左侧导航 */
.member-sidebar {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* 用户信息 */
.user-info {
    padding: 30px 20px;
    text-align: center;
    background: linear-gradient(to bottom, #8B4513, #704012);
    color: #fff;
}

.user-avatar {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 15px;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid #fff;
}

.edit-avatar {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 30px;
    height: 30px;
    background-color: #fff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.user-name {
    font-size: 18px;
    margin-bottom: 5px;
}

.user-level {
    font-size: 14px;
    opacity: 0.8;
}

/* 导航菜单 */
.member-nav {
    padding: 20px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #666;
    text-decoration: none;
    transition: all 0.3s ease;
}

.nav-item i {
    margin-right: 10px;
    font-size: 18px;
}

.nav-item:hover {
    background-color: #f5f5f5;
    color: #8B4513;
}

.nav-item.active {
    background-color: #f5f5f5;
    color: #8B4513;
    border-right: 3px solid #8B4513;
}

.message-count {
    background-color: #ff4d4f;
    color: #fff;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: auto;
}

/* 右侧内容区 */
.member-content {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* 页面头部 */
.page-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-header h2 {
    font-size: 20px;
    color: #333;
}

/* 内容页面 */
.content-page {
    display: none;
    padding: 20px;
}

.content-page.active {
    display: block;
}

/* 个人资料 */
.profile-form {
    max-width: 600px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-group textarea {
    height: 100px;
    resize: vertical;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    padding: 5px 10px;
    background-color: #f5f5f5;
    border-radius: 4px;
    color: #666;
    font-size: 14px;
}

/* 我的收藏 */
.view-options {
    display: flex;
    gap: 10px;
}

.view-btn {
    padding: 8px;
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    transition: color 0.3s ease;
}

.view-btn.active {
    color: #8B4513;
}

.favorites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.favorite-item {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.item-image {
    position: relative;
    height: 200px;
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.favorite-item:hover .item-actions {
    opacity: 1;
}

.action-btn {
    padding: 8px;
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background-color: #fff;
    transform: scale(1.1);
}

.item-info {
    padding: 15px;
}

.item-info h3 {
    font-size: 16px;
    color: #333;
    margin-bottom: 5px;
}

.item-info p {
    color: #666;
    font-size: 14px;
}

/* 学习记录 */
.learning-stats {
    display: flex;
    gap: 30px;
    margin-top: 20px;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 24px;
    color: #8B4513;
    font-weight: bold;
    display: block;
}

.stat-label {
    font-size: 14px;
    color: #666;
}

.learning-list {
    margin-top: 30px;
}

.learning-item {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.course-info h3 {
    font-size: 18px;
    color: #333;
    margin-bottom: 10px;
}

.course-meta {
    display: flex;
    gap: 20px;
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
}

.progress-bar {
    height: 6px;
    background-color: #eee;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress {
    height: 100%;
    background-color: #8B4513;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.course-actions {
    display: flex;
    gap: 10px;
}

.course-actions .action-btn {
    padding: 8px 15px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn.review {
    background-color: #fff;
    border: 1px solid #8B4513;
    color: #8B4513;
}

.action-btn.certificate {
    background-color: #8B4513;
    border: none;
    color: #fff;
}

.action-btn.continue {
    background-color: #8B4513;
    border: none;
    color: #fff;
}

/* 活动报名 */
.activity-filter {
    display: flex;
    gap: 15px;
}

.filter-btn {
    padding: 8px 15px;
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn.active {
    color: #8B4513;
    font-weight: bold;
}

.activity-list {
    margin-top: 20px;
}

.activity-item {
    display: grid;
    grid-template-columns: 200px 1fr auto;
    gap: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.activity-image {
    position: relative;
    height: 120px;
    border-radius: 4px;
    overflow: hidden;
}

.activity-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.activity-status {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    color: #fff;
}

.activity-status.ongoing {
    background-color: #52c41a;
}

.activity-status.registered {
    background-color: #1890ff;
}

.activity-info h3 {
    font-size: 18px;
    color: #333;
    margin-bottom: 10px;
}

.activity-meta {
    display: flex;
    gap: 20px;
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
}

.activity-meta i {
    margin-right: 5px;
}

.activity-desc {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

.activity-actions {
    display: flex;
    align-items: center;
}

.activity-actions .action-btn {
    padding: 8px 20px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn.register {
    background-color: #8B4513;
    color: #fff;
    border: none;
}

.action-btn.view-ticket {
    background-color: #fff;
    color: #8B4513;
    border: 1px solid #8B4513;
}

/* 消息通知 */
.message-actions {
    display: flex;
    gap: 15px;
}

.message-list {
    margin-top: 20px;
}

.message-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 20px;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.message-item:last-child {
    border-bottom: none;
}

.message-item.unread {
    background-color: #f9f9f9;
}

.message-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
}

.message-icon.system {
    background-color: #1890ff;
}

.message-icon.activity {
    background-color: #52c41a;
}

.message-content h3 {
    font-size: 16px;
    color: #333;
    margin-bottom: 5px;
}

.message-content p {
    color: #666;
    font-size: 14px;
    margin-bottom: 5px;
}

.message-time {
    color: #999;
    font-size: 12px;
}

/* 账户设置 */
.settings-section {
    margin-bottom: 30px;
}

.settings-section h3 {
    font-size: 18px;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.setting-item:last-child {
    border-bottom: none;
}

.setting-info h4 {
    font-size: 16px;
    color: #333;
    margin-bottom: 5px;
}

.setting-info p {
    color: #666;
    font-size: 14px;
}

/* 开关按钮 */
.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 20px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #8B4513;
}

input:checked + .slider:before {
    transform: translateX(20px);
}

/* 响应式设计 */
@media screen and (max-width: 1024px) {
    .member-container {
        grid-template-columns: 200px 1fr;
    }

    .activity-item {
        grid-template-columns: 150px 1fr auto;
    }
}

@media screen and (max-width: 768px) {
    .member-container {
        grid-template-columns: 1fr;
    }

    .member-sidebar {
        position: fixed;
        top: 0;
        left: -250px;
        width: 250px;
        height: 100vh;
        z-index: 1000;
        transition: left 0.3s ease;
    }

    .member-sidebar.active {
        left: 0;
    }

    .activity-item {
        grid-template-columns: 1fr;
    }

    .activity-image {
        height: 200px;
    }

    .learning-stats {
        flex-direction: column;
        gap: 15px;
    }

    .message-item {
        grid-template-columns: auto 1fr;
    }

    .message-actions {
        position: absolute;
        top: 10px;
        right: 10px;
    }
}

@media screen and (max-width: 480px) {
    .favorites-grid {
        grid-template-columns: 1fr;
    }

    .course-actions {
        flex-direction: column;
        gap: 10px;
    }

    .course-actions .action-btn {
        width: 100%;
    }

    .activity-filter {
        flex-wrap: wrap;
    }

    .filter-btn {
        flex: 1;
        text-align: center;
    }
} 