/* 主网站样式表 */

/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 头部样式 */
header {
    background-color: #2c3e50;
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

header h1 a {
    text-align: center;
    margin-bottom: 0.5rem;
    color: white;
    text-decoration: none;
}

nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
}

nav ul li {
    margin: 0 15px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s;
}

nav ul li a:hover {
    background-color: #34495e;
}

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

/* 首页样式 */
.hero {
    text-align: center;
    padding: 3rem 0;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.hero p {
    font-size: 1.2rem;
    color: #7f8c8d;
    margin-bottom: 2rem;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.feature {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    text-align: center;
}

.feature h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

/* 筛选器样式 */
.filters {
    background-color: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.filters h2 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.filters form {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: end;
}

.filters label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.filters select {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-right: 1rem;
}

.filters button {
    padding: 0.5rem 1rem;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.filters button:hover {
    background-color: #2980b9;
}

/* 文章列表样式 */
.articles {
    background-color: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.articles h2 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

.article-item {
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
}

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

.article-item h3 {
    margin-bottom: 0.5rem;
}

.article-item h3 a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s;
}

.article-item h3 a:hover {
    color: #3498db;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #7f8c8d;
}

.article-meta span {
    background-color: #ecf0f1;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.summary {
    margin-bottom: 1rem;
    color: #555;
}

.article-info {
    font-size: 0.9rem;
    color: #7f8c8d;
}

/* 文章详情样式 */
.article-detail {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.article-detail h2 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.article-detail .summary {
    margin: 1.5rem 0;
    padding: 1rem;
    background-color: #f8f9fa;
    border-left: 4px solid #3498db;
}

.article-link {
    margin-top: 1.5rem;
}

.article-link a {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    margin-right: 1rem;
    transition: background-color 0.3s;
}

.article-link a:hover {
    background-color: #2980b9;
}

/* 统计页面样式 */
.stats {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.stat-item {
    margin-bottom: 2rem;
}

.stat-item h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #3498db;
}

.stat-item ul {
    list-style: none;
}

.stat-item ul li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

/* 页脚样式 */
footer {
    background-color: #34495e;
    color: white;
    text-align: center;
    padding: 1rem 0;
    margin-top: 2rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
        align-items: center;
    }

    nav ul li {
        margin: 0.25rem 0;
    }

    .hero h2 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .filters form {
        flex-direction: column;
        align-items: stretch;
    }

    .filters select {
        margin-right: 0;
        margin-bottom: 0.5rem;
        width: 100%;
    }

    .article-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
}