/* 海角社区论坛 - 实用设计风格 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

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

/* SEO隐藏标题 */
.seo-title {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* 顶部导航 */
.header {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

.logo h2 {
    color: #1e40af;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.tagline {
    color: #64748b;
    font-size: 0.875rem;
}

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

.nav-link {
    color: #64748b;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.nav-link:hover,
.nav-link.active {
    color: #1e40af;
    border-bottom-color: #1e40af;
}

.user-actions {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-outline {
    background: transparent;
    color: #1e40af;
    border: 1px solid #1e40af;
}

.btn-outline:hover {
    background: #1e40af;
    color: white;
}

.btn-primary {
    background: #1e40af;
    color: white;
}

.btn-primary:hover {
    background: #1d4ed8;
}

/* 主要内容 */
.main {
    padding: 2rem 0;
}

/* 统计数据 */
.stats-section {
    margin-bottom: 2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #1e40af;
    margin-bottom: 0.5rem;
}

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

/* 内容布局 */
.content-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
}

/* 论坛版块 */
.forum-sections {
    background: white;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.section-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.section-header h3 {
    color: #1e293b;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.section-subtitle {
    color: #64748b;
    font-size: 0.875rem;
}

.forum-category {
    border-bottom: 1px solid #e2e8f0;
}

.forum-category:last-child {
    border-bottom: none;
}

.category-title {
    padding: 1rem 1.5rem;
    background: #f1f5f9;
    color: #1e293b;
    font-size: 1rem;
    font-weight: 600;
    border-bottom: 1px solid #e2e8f0;
}

.forum-list {
    padding: 0;
}

.forum-item {
    display: grid;
    grid-template-columns: 1fr auto 200px;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.2s;
}

.forum-item:hover {
    background: #f8fafc;
}

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

.forum-info h5 {
    color: #1e293b;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.forum-desc {
    color: #64748b;
    font-size: 0.875rem;
}

.forum-stats {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: #64748b;
    text-align: center;
}

.latest-post {
    font-size: 0.875rem;
}

.post-title {
    color: #1e293b;
    font-weight: 500;
    display: block;
    margin-bottom: 0.25rem;
}

.post-meta {
    color: #64748b;
    font-size: 0.75rem;
}

/* 侧边栏 */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.widget {
    background: white;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.widget-title {
    padding: 1rem;
    background: #f8fafc;
    color: #1e293b;
    font-size: 1rem;
    font-weight: 600;
    border-bottom: 1px solid #e2e8f0;
}

/* 热门话题 */
.hot-topics {
    padding: 0;
}

.topic-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f1f5f9;
}

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

.topic-rank {
    background: #1e40af;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
}

.topic-content {
    flex: 1;
}

.topic-title {
    color: #1e293b;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    line-height: 1.4;
}

.topic-stats {
    color: #64748b;
    font-size: 0.75rem;
}

/* 活跃用户 */
.active-users {
    padding: 0;
}

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

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

.user-avatar {
    width: 32px;
    height: 32px;
    background: #1e40af;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
}

.user-info {
    flex: 1;
}

.username {
    color: #1e293b;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.user-stats {
    color: #64748b;
    font-size: 0.75rem;
}

/* 最新资源 */
.latest-resources {
    padding: 0;
}

.resource-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f1f5f9;
}

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

.resource-info {
    flex: 1;
}

.resource-title {
    color: #1e293b;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    line-height: 1.4;
}

.resource-meta {
    color: #64748b;
    font-size: 0.75rem;
}

.resource-type {
    background: #dbeafe;
    color: #1e40af;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
    flex-shrink: 0;
}

/* 友情链接 */
.friend-links {
    padding: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.friend-link {
    color: #1e40af;
    text-decoration: none;
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    border: 1px solid #dbeafe;
    transition: all 0.2s;
}

.friend-link:hover {
    background: #dbeafe;
}

/* 底部 */
.footer {
    background: #1e293b;
    color: #cbd5e1;
    margin-top: 3rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    padding: 2rem 0;
}

.footer-info h3 {
    color: white;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.footer-info p {
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.link-group h4 {
    color: white;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.link-group a {
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.875rem;
    display: block;
    margin-bottom: 0.5rem;
    transition: color 0.2s;
}

.link-group a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding: 1rem 0;
    text-align: center;
    font-size: 0.875rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }

    .nav {
        order: 3;
        width: 100%;
        justify-content: center;
    }

    .content-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        order: -1;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .forum-item {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .forum-stats {
        flex-direction: row;
        justify-content: flex-start;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .footer-links {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}