/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #1f2937;
    background-color: #ffffff;
}

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

/* 头部样式 */
header {
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2563eb;
    text-decoration: none;
}

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

nav ul li {
    margin-left: 2rem;
}

nav ul li a {
    text-decoration: none;
    color: #4b5563;
    transition: color 0.3s ease;
    opacity: 0.8;
}

nav ul li a:hover {
    color: #2563eb;
    opacity: 1;
}

/* 英雄区域 */
.hero {
    padding: 4rem 0;
    background-color: #f8fafc;
    text-align: center;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #1e293b;
}

.hero p {
    font-size: 1.1rem;
    color: #64748b;
    max-width: 600px;
    margin: 0 auto 2rem;
}

/* 分类卡片 */
.categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.category-card {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.category-card .icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.category-card h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #1e293b;
}

.category-card p {
    color: #64748b;
}

/* 最新内容区域 */
.latest {
    padding: 4rem 0;
}

.article-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.article-item {
    background-color: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.article-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.article-item a {
    text-decoration: none;
    color: inherit;
    display: block;
    padding: 1.5rem;
}

.article-item h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: #1e293b;
}

.article-meta {
    font-size: 0.875rem;
    color: #94a3b8;
    margin-bottom: 1rem;
}

.article-summary {
    color: #64748b;
    margin-bottom: 1rem;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background-color: #e2e8f0;
    color: #475569;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
}

/* 分类页面 */
.category {
    padding: 4rem 0;
}

.category h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #1e293b;
}

.category-description {
    font-size: 1.1rem;
    color: #64748b;
    margin-bottom: 2rem;
}

/* 文章详情页 */
.article-detail {
    padding: 4rem 0;
    max-width: 800px;
    margin: 0 auto;
}

.article-detail h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #1e293b;
}

.article-detail .article-meta {
    font-size: 0.875rem;
    color: #94a3b8;
    margin-bottom: 2rem;
}

.article-content {
    line-height: 1.8;
    color: #334155;
}

.article-content h2 {
    font-size: 1.75rem;
    margin: 2rem 0 1rem;
    color: #1e293b;
}

.article-content h3 {
    font-size: 1.5rem;
    margin: 1.5rem 0 1rem;
    color: #1e293b;
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content ul,
.article-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-content img {
    max-width: 100%;
    height: auto;
    margin: 2rem 0;
    border-radius: 8px;
}

/* 面包屑导航 */
.breadcrumb {
    padding: 1rem 0;
    background-color: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.breadcrumb .container {
    display: flex;
    align-items: center;
}

.breadcrumb a {
    text-decoration: none;
    color: #2563eb;
    margin-right: 0.5rem;
}

.breadcrumb span {
    margin: 0 0.5rem;
    color: #94a3b8;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 3rem;
    gap: 0.5rem;
}

.pagination a,
.pagination span {
    padding: 0.5rem 1rem;
    border-radius: 4px;
    text-decoration: none;
    color: #4b5563;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.pagination a:hover {
    background-color: #f8fafc;
    color: #2563eb;
    border-color: #2563eb;
}

.pagination .current {
    background-color: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
}

/* 页脚 */
footer {
    background-color: #1f2937;
    color: #ffffff;
    padding: 3rem 0;
    margin-top: 4rem;
}

footer .container {
    text-align: center;
}

footer p {
    margin-bottom: 1rem;
}

footer a {
    color: #ffffff;
    text-decoration: underline;
}

footer a:hover {
    color: #93c5fd;
}

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

    nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }

    nav ul li {
        margin: 0 1rem 0.5rem;
    }

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

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

    .article-list {
        grid-template-columns: 1fr;
    }

    .article-detail h1 {
        font-size: 2rem;
    }
}

/* 特色标签 */
.featured-badge {
    background-color: #f59e0b;
    color: #ffffff;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

/* 状态消息 */
.status {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    display: none;
}

.status.show {
    display: block;
}

.status.success {
    background-color: #d1fae5;
    color: #065f46;
    border-left: 4px solid #10b981;
}

.status.error {
    background-color: #fee2e2;
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

/* 日志区域 */
.log {
    background-color: #f8fafc;
    border-radius: 4px;
    padding: 1rem;
    max-height: 300px;
    overflow-y: auto;
    font-family: monospace;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

/* 操作按钮 */
.actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.actions a,
.actions button {
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.actions .primary {
    background-color: #2563eb;
    color: #ffffff;
}

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

.actions .secondary {
    background-color: #64748b;
    color: #ffffff;
}

.actions .secondary:hover {
    background-color: #475569;
}

/* 最后更新时间 */
.last-update {
    font-size: 0.875rem;
    color: #94a3b8;
    margin-top: 1rem;
}

/* 管理页面 */
.admin-page {
    padding: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.admin-page h1 {
    margin-bottom: 2rem;
    color: #1e293b;
}

.admin-page .section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: #f8fafc;
    border-radius: 8px;
}

.admin-page h2 {
    margin-bottom: 1rem;
    color: #334155;
}

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

.stat-card {
    background-color: #ffffff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.stat-card .number {
    font-size: 2rem;
    font-weight: bold;
    color: #2563eb;
    margin-bottom: 0.5rem;
}

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