/* 海角社区网站 - 全局样式 */

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

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

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

/* 头部导航 */
.site-header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.site-logo h1 {
    color: #fff;
    font-size: 24px;
    font-weight: 700;
}

.site-logo h1 a {
    color: #fff;
}

.site-logo h1 a:hover {
    opacity: 0.9;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

.main-nav a {
    color: #fff;
    font-weight: 500;
    padding: 8px 15px;
    border-radius: 4px;
}

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

/* 横幅区域 */
.hero-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 60px 0;
    color: #fff;
    text-align: center;
}

.hero-banner h2 {
    font-size: 42px;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.hero-banner p {
    font-size: 18px;
    opacity: 0.95;
}

/* 主要内容区 */
.main-content {
    padding: 40px 0;
    min-height: 60vh;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.content-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.content-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-body {
    padding: 20px;
}

.card-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #2c3e50;
}

.card-meta {
    display: flex;
    gap: 15px;
    font-size: 14px;
    color: #7f8c8d;
    margin-bottom: 10px;
}

.card-excerpt {
    color: #555;
    line-height: 1.6;
    margin-bottom: 15px;
}

.card-link {
    display: inline-block;
    color: #3498db;
    font-weight: 500;
    padding: 8px 16px;
    border: 2px solid #3498db;
    border-radius: 4px;
}

.card-link:hover {
    background: #3498db;
    color: #fff;
}

/* 侧边栏 */
.sidebar-widget {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.widget-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #2c3e50;
    border-left: 4px solid #3498db;
    padding-left: 12px;
}

.widget-list {
    list-style: none;
}

.widget-list li {
    padding: 10px 0;
    border-bottom: 1px solid #ecf0f1;
}

.widget-list li:last-child {
    border-bottom: none;
}

.widget-list a {
    color: #555;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.widget-list a:hover {
    color: #3498db;
}

/* 两栏布局 */
.two-column-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
    margin-top: 30px;
}

/* 页面标题 */
.page-title {
    font-size: 32px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 3px solid #3498db;
}

/* 话题列表 */
.topic-item {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.topic-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.topic-title {
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
}

.topic-badge {
    background: #e74c3c;
    color: #fff;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
}

.topic-content {
    color: #555;
    margin-bottom: 12px;
    line-height: 1.7;
}

.topic-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #7f8c8d;
}

.topic-stats {
    display: flex;
    gap: 20px;
}

/* 会员卡片 */
.member-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.member-card {
    background: #fff;
    border-radius: 8px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.member-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 0 auto 15px;
    object-fit: cover;
}

.member-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
}

.member-role {
    color: #7f8c8d;
    font-size: 14px;
    margin-bottom: 12px;
}

.member-stats {
    display: flex;
    justify-content: space-around;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #ecf0f1;
}

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

.stat-value {
    font-size: 20px;
    font-weight: 700;
    color: #3498db;
}

.stat-label {
    font-size: 12px;
    color: #7f8c8d;
}

/* 资源卡片 */
.resource-card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    display: flex;
    gap: 20px;
}

.resource-thumb {
    width: 150px;
    height: 150px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.resource-info {
    flex: 1;
}

.resource-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #2c3e50;
}

.resource-desc {
    color: #555;
    margin-bottom: 12px;
    line-height: 1.6;
}

.resource-meta {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: #7f8c8d;
    margin-bottom: 12px;
}

.download-btn {
    background: #27ae60;
    color: #fff;
    padding: 10px 24px;
    border-radius: 4px;
    display: inline-block;
    font-weight: 500;
}

.download-btn:hover {
    background: #229954;
}

/* 页脚 */
.site-footer {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 40px 0 20px;
    margin-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #fff;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 10px;
}

.footer-section a {
    color: #bdc3c7;
}

.footer-section a:hover {
    color: #3498db;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #34495e;
    color: #95a5a6;
}

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

    .main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

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

    .hero-banner h2 {
        font-size: 28px;
    }

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

    .resource-card {
        flex-direction: column;
    }

    .resource-thumb {
        width: 100%;
    }
}
