/* 全局样式 *//* 用户中心样式 */
.user-dashboard {
    max-width: 1000px;
    margin: 0 auto;
}

.user-header {
    background-color: #fafafa;
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.user-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #666;
}

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

.user-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.9rem;
    color: #666;
}

.user-nav {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.user-nav-link {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background-color: #f5f5f5;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.user-nav-link:hover,
.user-nav-link.active {
    background-color: #333;
    color: #fff;
}

.user-section {
    background-color: #fff;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.user-section-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f5f5f5;
}

.user-section-header h3 {
    font-size: 1.5rem;
    color: #333;
}

/* 用户信息编辑表单 */
.profile-form {
    max-width: 600px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .user-info {
        flex-direction: column;
        text-align: center;
    }
    
    .user-nav {
        justify-content: center;
    }
}

/* 我的帖子列表 */
.my-posts-list {
    list-style: none;
}

.my-post-item {
    padding: 1.5rem;
    border-bottom: 1px solid #f5f5f5;
    transition: background-color 0.3s ease;
}

.my-post-item:hover {
    background-color: #fafafa;
}

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

.my-post-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.my-post-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.my-post-title a:hover {
    color: #666;
}

.my-post-meta {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.my-post-excerpt {
    color: #666;
    margin-bottom: 1rem;
}

.my-post-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-danger {
    background-color: #e74c3c;
    color: #fff;
}

.btn-danger:hover {
    background-color: #c0392b;
}

/* 账号设置 */
.settings-section {
    margin-bottom: 2rem;
}

.settings-section:last-child {
    margin-bottom: 0;
}

.settings-section h4 {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 1rem;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

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

/* 头部样式 */
.header {
    background-color: #fff;
    border-bottom: 1px solid #e0e0e0;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: #333;
    text-decoration: none;
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: #666;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #333;
}

/* 主要内容区 */
.main {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
}

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
}

/* 内容区样式 */
.content {
    background-color: #fff;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.section-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f5f5f5;
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
}

.back-link {
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: #333;
}

/* 帖子列表样式 */
.post {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #f5f5f5;
}

.post:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.post-header h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.post-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-title a:hover {
    color: #666;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.9rem;
    color: #666;
}

.post-excerpt {
    margin-top: 1rem;
    color: #666;
}

/* 无帖子提示 */
.no-posts {
    text-align: center;
    padding: 3rem 0;
    color: #666;
}

.no-posts p {
    margin-bottom: 1rem;
}

/* 表单样式 */
.post-form,
.reply-form {
    max-width: 600px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #333;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

/* 按钮样式 */
.btn-primary,
.btn-secondary {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: #333;
    color: #fff;
}

.btn-primary:hover {
    background-color: #555;
}

.btn-secondary {
    background-color: #f5f5f5;
    color: #333;
}

.btn-secondary:hover {
    background-color: #e0e0e0;
}

/* 帖子详情样式 */
.post-detail {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid #f5f5f5;
}

.post-detail .post-title {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.post-content {
    margin-top: 1.5rem;
    line-height: 1.8;
    color: #333;
}

/* 回复区样式 */
.reply-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: #fafafa;
    border-radius: 8px;
}

.reply-section h3 {
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    color: #333;
}

/* 回复列表样式 */
.comments-section {
    margin-bottom: 2rem;
}

.comments-section h3 {
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    color: #333;
}

.comment {
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background-color: #fafafa;
    border-radius: 8px;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.comment-author {
    font-weight: 600;
    color: #333;
}

.comment-timestamp {
    color: #666;
}

.comment-content {
    line-height: 1.6;
    color: #333;
}

/* 无回复提示 */
.no-comments {
    text-align: center;
    padding: 2rem 0;
    color: #666;
}

/* 边栏样式 */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.widget {
    background-color: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.widget h3 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: #333;
    border-bottom: 1px solid #f5f5f5;
    padding-bottom: 0.5rem;
}

.stats-list,
.link-list,
.guide-list {
    list-style: none;
}

.stats-list li,
.link-list li,
.guide-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f5f5f5;
}

.stats-list li:last-child,
.link-list li:last-child,
.guide-list li:last-child {
    border-bottom: none;
}

.link-list a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s ease;
}

.link-list a:hover {
    color: #333;
}

.guide-list li {
    position: relative;
    padding-left: 1.5rem;
    color: #666;
}

.guide-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #333;
    font-weight: bold;
}

.widget p {
    color: #666;
    line-height: 1.6;
}

/* 提示框样式 */
.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.alert-error {
    background-color: #fee;
    color: #c33;
    border: 1px solid #fcc;
}

.alert-success {
    background-color: #efe;
    color: #393;
    border: 1px solid #cfc;
}

/* 页脚样式 */
.footer {
    background-color: #333;
    color: #fff;
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer .container {
    text-align: center;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav {
        gap: 1rem;
    }
    
    .content-wrapper {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .content {
        padding: 1.5rem;
    }
    
    .post-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
        text-align: center;
    }
    
    .comment-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .header {
        padding: 0.8rem 0;
    }
    
    .logo {
        font-size: 1.5rem;
    }
    
    .content {
        padding: 1rem;
    }
    
    .section-header h2 {
        font-size: 1.3rem;
    }
    
    .post-detail .post-title {
        font-size: 1.5rem;
    }
}
