/* 我的主页样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    background: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

/* 导航栏样式 */
.navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: bold;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: background 0.3s;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(255,255,255,0.2);
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.points-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.2);
    padding: 0.5rem 1rem;
    border-radius: 20px;
}

/* 主内容区域 */
.my-main {
    margin-top: 80px;
    padding: 2rem 0;
}

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

/* 用户卡片 */
.user-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.user-avatar {
    position: relative;
    width: 100px;
    height: 100px;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #667eea;
}

.avatar-edit-btn {
    position: absolute;
    bottom: 0;
    right: 0;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-info h2 {
    margin-bottom: 0.5rem;
    color: #333;
}

.user-info p {
    color: #666;
    margin-bottom: 1rem;
}

.user-stats {
    display: flex;
    gap: 2rem;
}

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

.stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
    color: #667eea;
}

.stat-label {
    font-size: 0.875rem;
    color: #666;
}

/* 模块网格 */
.module-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.module-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.module-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.module-icon {
    font-size: 2.5rem;
    color: #667eea;
    margin-bottom: 1rem;
}

.module-card h3 {
    margin-bottom: 0.5rem;
    color: #333;
}

.module-card p {
    color: #666;
    margin-bottom: 1rem;
}

.module-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #667eea;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
}

/* 最近活动 */
.recent-activity {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.recent-activity h3 {
    margin-bottom: 1.5rem;
    color: #333;
}

.activity-list {
    max-height: 300px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid #eee;
}

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

.activity-item i {
    color: #667eea;
}

/* 设置区域 */
.settings-section {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.settings-section h3 {
    margin-bottom: 1.5rem;
    color: #333;
}

.settings-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border: 1px solid #eee;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s;
}

.setting-item:hover {
    background: #f8f9fa;
}

.setting-item i {
    color: #667eea;
    margin-right: 0.5rem;
}

/* 开关样式 */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-switch label {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.toggle-switch label:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.toggle-switch input:checked + label {
    background-color: #667eea;
}

.toggle-switch input:checked + label:before {
    transform: translateX(26px);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-menu {
        gap: 1rem;
    }
    
    .nav-link {
        flex-direction: column;
        gap: 0.25rem;
        font-size: 0.875rem;
    }
    
    .nav-link span {
        font-size: 0.75rem;
    }
    
    .user-card {
        flex-direction: column;
        text-align: center;
    }
    
    .user-stats {
        justify-content: center;
    }
    
    .module-grid {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 0 0.5rem;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0 0.5rem;
    }
    
    .nav-brand span {
        display: none;
    }
    
    .user-card {
        padding: 1.5rem;
    }
    
    .user-avatar {
        width: 80px;
        height: 80px;
    }
    
    .module-card {
        padding: 1.5rem;
    }
}