/* 社区页面主要内容 */
.main-content {
    margin-top: 80px;
    padding: 40px 0;
    background: #f5f5f5;
    min-height: calc(100vh - 80px);
}

/* 社区顶部 */
.community-header {
    text-align: center;
    margin-bottom: 40px;
}

.community-header h1 {
    font-size: 36px;
    color: #333;
    margin-bottom: 10px;
}

.community-header p {
    color: #666;
    margin-bottom: 20px;
}

.create-post-btn {
    padding: 12px 24px;
    font-size: 16px;
}

.create-post-btn i {
    margin-right: 8px;
}

/* 话题分类 */
.topic-categories {
    background: #fff;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.topic-scroll {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.topic-scroll::-webkit-scrollbar {
    height: 6px;
}

.topic-scroll::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.topic-scroll::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.topic-item {
    padding: 8px 20px;
    border: 1px solid #ddd;
    border-radius: 20px;
    background: none;
    color: #666;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s;
}

.topic-item:hover,
.topic-item.active {
    background: #006400;
    color: #fff;
    border-color: #006400;
}

/* 内容布局 */
.content-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
}

/* 主内容区 */
.main-feed {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* 帖子排序 */
.post-sort {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.post-sort button {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 5px 0;
    position: relative;
}

.post-sort button.active {
    color: #006400;
}

.post-sort button.active::after {
    content: '';
    position: absolute;
    bottom: -16px;
    left: 0;
    right: 0;
    height: 2px;
    background: #006400;
}

/* 帖子卡片 */
.post-card {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #eee;
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.post-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.post-author img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.author-info h3 {
    font-size: 16px;
    color: #333;
    margin-bottom: 3px;
}

.author-info span {
    font-size: 14px;
    color: #666;
}

.follow-btn {
    padding: 6px 15px;
    border: 1px solid #006400;
    border-radius: 20px;
    background: none;
    color: #006400;
    cursor: pointer;
    transition: all 0.3s;
}

.follow-btn:hover,
.follow-btn.followed {
    background: #006400;
    color: #fff;
}

.post-content h2 {
    font-size: 20px;
    color: #333;
    margin-bottom: 10px;
}

.post-content p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
}

.post-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin-bottom: 15px;
}

.post-images img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 5px;
}

.post-tags {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.post-tags span {
    padding: 5px 10px;
    background: #f5f5f5;
    border-radius: 15px;
    font-size: 14px;
    color: #666;
}

.post-footer {
    display: flex;
    gap: 20px;
}

.post-footer button {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

.post-footer button:hover,
.post-footer button.liked {
    color: #006400;
}

/* 加载更多 */
.load-more {
    text-align: center;
    margin-top: 30px;
}

/* 侧边栏 */
.sidebar-section {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.sidebar-section h3 {
    font-size: 18px;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

/* 热门话题 */
.hot-topics .topic-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    padding: 10px;
    border-radius: 5px;
    transition: background 0.3s;
    cursor: pointer;
}

.hot-topics .topic-item:hover {
    background: #f5f5f5;
}

.topic-rank {
    width: 24px;
    height: 24px;
    background: #006400;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.topic-info h4 {
    font-size: 16px;
    color: #333;
    margin-bottom: 5px;
}

.topic-info p {
    font-size: 14px;
    color: #666;
}

/* 推荐用户 */
.user-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding: 10px;
    border-radius: 5px;
    transition: background 0.3s;
}

.user-item:hover {
    background: #f5f5f5;
}

.user-item img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.user-info {
    flex: 1;
}

.user-info h4 {
    font-size: 16px;
    color: #333;
    margin-bottom: 3px;
}

.user-info p {
    font-size: 14px;
    color: #666;
}

/* 活动日历 */
.event-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    padding: 10px;
    border-radius: 5px;
    transition: background 0.3s;
    cursor: pointer;
}

.event-item:hover {
    background: #f5f5f5;
}

.event-date {
    text-align: center;
    min-width: 50px;
}

.event-date .date {
    font-size: 20px;
    font-weight: bold;
    color: #006400;
    display: block;
}

.event-date .month {
    font-size: 14px;
    color: #666;
}

.event-info h4 {
    font-size: 16px;
    color: #333;
    margin-bottom: 5px;
}

.event-info p {
    font-size: 14px;
    color: #666;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .content-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 20px;
    }

    .sidebar-section {
        margin-bottom: 0;
    }
}

@media (max-width: 768px) {
    .community-header h1 {
        font-size: 28px;
    }

    .post-images {
        grid-template-columns: 1fr;
    }

    .post-footer {
        justify-content: space-around;
    }

    .sidebar {
        grid-template-columns: 1fr;
    }
} 