* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: #ff4757;
    transition: color 0.3s;
}

a:hover {
    color: #ff6b81;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部样式 */
header {
    background: linear-gradient(135deg, #ff4757, #ff6b81);
    color: white;
    box-shadow: 0 2px 5px 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;
}

.logo {
    font-size: 24px;
    font-weight: bold;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

nav a {
    color: white;
    font-size: 16px;
}

nav a:hover {
    opacity: 0.8;
}

/* 面包屑导航 */
.breadcrumb {
    background-color: #fff;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
}

.breadcrumb ul {
    display: flex;
    list-style: none;
    gap: 10px;
    font-size: 14px;
}

.breadcrumb li:not(:last-child)::after {
    content: '>';
    margin-left: 10px;
    color: #999;
}

/* 主要内容区域 */
main {
    min-height: 500px;
    margin: 20px 0;
}

/* 首页样式 */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 400"><rect fill="%23ff4757" width="1200" height="400"/></svg>');
    color: white;
    padding: 60px 20px;
    text-align: center;
    margin-bottom: 40px;
    border-radius: 10px;
}

.hero h1 {
    font-size: 36px;
    margin-bottom: 20px;
}

.news-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 40px;
}

.news-card {
    flex: 1 1 300px;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.news-card:hover {
    transform: translateY(-5px);
}

.news-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background-color: #ddd;
}

.news-card-content {
    padding: 20px;
}

.news-card h3 {
    margin-bottom: 10px;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 40px 0;
}

.pagination a {
    padding: 8px 16px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 5px;
    color: #333;
}

.pagination a.active {
    background: #ff4757;
    color: white;
    border-color: #ff4757;
}

/* 文章页样式 */
.article-header {
    background: white;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.article-content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.related-news {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.comments {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.comment-item {
    border-bottom: 1px solid #eee;
    padding: 15px 0;
}

/* 注册页面样式 */
.register-form {
    max-width: 400px;
    margin: 0 auto;
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.btn {
    background: #ff4757;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    width: 100%;
}

.btn:hover {
    background: #ff6b81;
}

/* 导航页面样式 */
.nav-section {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.nav-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.nav-category {
    flex: 1 1 250px;
}

.nav-category h3 {
    color: #ff4757;
    margin-bottom: 15px;
    border-bottom: 2px solid #ff4757;
    padding-bottom: 5px;
}

.nav-links {
    list-style: none;
}

.nav-links li {
    margin-bottom: 10px;
}

.faq-section {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.faq-item {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-question {
    font-weight: bold;
    color: #ff4757;
    margin-bottom: 10px;
    cursor: pointer;
}

.faq-answer {
    color: #666;
    display: none;
}

/* 底部样式 */
footer {
    background: #333;
    color: white;
    padding: 40px 0;
    margin-top: 60px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    justify-content: space-between;
}

.footer-section {
    flex: 1 1 250px;
}

.footer-section h3 {
    margin-bottom: 15px;
    color: #ff4757;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 10px;
}

.footer-section a {
    color: #ccc;
}

.footer-section a:hover {
    color: #ff4757;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 20px;
    }

    nav ul {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .hero h1 {
        font-size: 28px;
    }

    .news-card {
        flex: 1 1 100%;
    }

    .footer-content {
        flex-direction: column;
        gap: 20px;
    }
}

/* 隐藏非当前页面 */
.page {
    display: none;
}

.page.active {
    display: block;
}
