/* 全局样式 */
:root {
    --primary-color: #3a86ff;
    --secondary-color: #8338ec;
    --dark-color: #212529;
    --light-color: #f8f9fa;
    --success-color: #28a745;
}

body {
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    margin: 0;
    padding: 0;
    background-color: #f5f7fa;
}

/* 布局样式 */
header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 0.81rem 0;
    text-align: left;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

header h1 {
    font-size: 2.6em;
    text-align: center;
    margin: 0;
}

nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 1rem 0 0;
}

nav li {
    margin: 0 1rem;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.3em;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s;
}

nav a:hover {
    background-color: rgba(255,255,255,0.2);
}

main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

section {
    margin-bottom: 3rem;
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* 文章和新闻列表 */
.article-list, .news-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

/* 留言板样式 */
.message-form {
    display: grid;
    gap: 1rem;
    margin-bottom: 2rem;
}

.message-form input,
.message-form textarea {
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
}

.message-form textarea {
    min-height: 120px;
    resize: vertical;
}

.message-form button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.message-form button:hover {
    background-color: #2a75e6;
}

.message-board {
    border-top: 1px solid #eee;
    padding-top: 1rem;
}

/* 文章卡片样式 */
.article-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.article-image {
    height: 200px;
    background-size: cover;
    background-position: center;
}

.article-card h3 {
    margin: 1rem 1rem 0.5rem;
    color: var(--dark-color);
}

.article-card p {
    margin: 0 1rem 1rem;
    color: #666;
}

.article-meta {
    margin: 0 1rem 1rem;
    font-size: 0.9rem;
    color: #999;
}

/* 新闻卡片样式 */
.news-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.news-image {
    height: 180px;
    background-size: cover;
    background-position: center;
}

.news-card h3 {
    margin: 1rem 1rem 0.5rem;
    color: var(--dark-color);
}

.news-meta {
    margin: 0 1rem 1rem;
    font-size: 0.9rem;
    color: #999;
}

/* 留言样式 */
.message {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.message strong {
    color: var(--primary-color);
}

.message-time {
    font-size: 0.8rem;
    color: #999;
    margin-left: 0.5rem;
}

.message p {
    margin: 0.5rem 0 0;
}

/* 备案号样式 */
.beian-info {
    margin: 0.5rem auto;
    font-size: 0.9rem;
    color: #666;
    text-align: center;
    width: 100%;
}

.beian-info a {
    color: white;
    font-size: 1.35rem;
    text-decoration: none;
}

.beian-info a:hover {
    color: white;
    text-decoration: underline;
    opacity: 0.8;
}

/* 响应式设计 */
@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
        align-items: center;
    }
    
    nav li {
        margin: 0.5rem 0;
    }
}

/* 页脚样式 */
footer {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 0.81rem 0;
    text-align: center;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.1);
    margin-top: 2rem;
}
