/* GEO CMS 前台样式 */

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

:root {
    --primary-color: #3b82f6;
    --secondary-color: #8b5cf6;
    --dark-color: #1f2937;
    --light-color: #f3f4f6;
    --border-color: #e5e7eb;
    --text-color: #374151;
    --text-secondary: #6b7280;
    --white: #ffffff;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--white);
}

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

/* 导航栏 */
.site-header {
    background: var(--white);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar {
    padding: 16px 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav-menu a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-color);
}

/* Hero 区域 */
.hero {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    padding: 100px 0;
    text-align: center;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 16px;
}

.hero p {
    font-size: 20px;
    opacity: 0.9;
}

/* 内容区域 */
.content-section {
    padding: 60px 0;
}

.content-section .container {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.main-content {
    flex: 1;
    min-width: 0;
    max-width: 100%;
}

.main-content h1 {
    font-size: 32px;
    margin-bottom: 32px;
    color: var(--dark-color);
}

/* 博客卡片网格 */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.post-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s, transform 0.3s;
}

.post-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
}

.post-content {
    padding: 20px;
}

.post-meta {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--text-secondary);
}

.post-category {
    color: var(--primary-color);
    font-weight: 500;
}

.post-title {
    font-size: 20px;
    margin-bottom: 8px;
}

.post-title a {
    color: var(--dark-color);
    text-decoration: none;
    transition: color 0.3s;
}

.post-title a:hover {
    color: var(--primary-color);
}

.post-excerpt {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* 博客列表 */
.posts-list {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.post-item {
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border-color);
}

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

.post-item .post-title {
    font-size: 24px;
}

.post-item .post-meta {
    margin-bottom: 12px;
}

/* 文章详情 */
.article-detail {
    padding: 60px 0;
}

.article-detail .container {
    max-width: 800px;
    margin: 0 auto;
}

.article-header {
    text-align: center;
    margin-bottom: 40px;
}

.article-header h1 {
    font-size: 36px;
    margin-bottom: 16px;
    color: var(--dark-color);
    line-height: 1.3;
}

.article-meta {
    display: flex;
    justify-content: center;
    gap: 24px;
    color: var(--text-secondary);
    font-size: 14px;
}

.article-meta i {
    margin-right: 8px;
}

.article-content {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-color);
}

.article-content p {
    margin-bottom: 16px;
}

.article-content h2,
.article-content h3,
.article-content h4 {
    margin-top: 32px;
    margin-bottom: 16px;
    color: var(--dark-color);
    font-weight: 600;
}

.article-content h2 {
    font-size: 28px;
}

.article-content h3 {
    font-size: 24px;
}

.article-content h4 {
    font-size: 20px;
}

.article-content ul,
.article-content ol {
    margin-bottom: 16px;
    padding-left: 24px;
}

.article-content li {
    margin-bottom: 8px;
}

.article-content a {
    color: var(--primary-color);
    text-decoration: none;
}

.article-content a:hover {
    text-decoration: underline;
}

/* 分类和标签页面 */
.category-description,
.tag-description {
    color: var(--text-secondary);
    margin-bottom: 32px;
    font-size: 16px;
}

/* 单页面 */
.page-detail {
    padding: 60px 0;
}

.page-detail h1 {
    font-size: 36px;
    margin-bottom: 32px;
    text-align: center;
    color: var(--dark-color);
}

.page-content {
    font-size: 16px;
    line-height: 1.8;
}

.page-content p {
    margin-bottom: 16px;
}

/* 侧边栏 */
.sidebar {
    width: 300px;
    flex-shrink: 0;
}

.widget {
    background: var(--white);
    padding: 24px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-bottom: 24px;
}

.widget h3 {
    font-size: 18px;
    margin-bottom: 16px;
    color: var(--dark-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 8px;
}

.widget ul {
    list-style: none;
}

.widget li {
    margin-bottom: 12px;
}

.widget a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s;
}

.widget a:hover {
    color: var(--primary-color);
}

/* 页脚 */
.site-footer {
    background: var(--dark-color);
    color: var(--white);
    padding: 60px 0 20px;
    margin-top: 60px;
}

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

.footer-section h3 {
    font-size: 18px;
    margin-bottom: 16px;
    color: var(--white);
}

.footer-section p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}

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

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

.footer-section a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--white);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
}

/* 错误页面 */
.error-page {
    padding: 100px 0;
    text-align: center;
}

.error-page h1 {
    font-size: 120px;
    color: var(--primary-color);
    margin-bottom: 16px;
}

.error-page p {
    font-size: 24px;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

/* 按钮 */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background: #2563eb;
    transform: translateY(-2px);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar .container {
        flex-wrap: wrap;
    }

    .nav-menu {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 16px;
        padding: 16px 0;
    }

    .nav-menu.show {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }

    .hero h1 {
        font-size: 32px;
    }

    .hero p {
        font-size: 16px;
    }

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

    .article-header h1 {
        font-size: 28px;
    }

    .article-meta {
        flex-direction: column;
        gap: 8px;
    }

    .content-section {
        padding: 40px 0;
    }

    .content-section .container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        margin-left: 0;
    }

    .article-detail .container {
        max-width: 100%;
    }

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

    .article-content h2 {
        font-size: 24px;
    }

    .article-content h3 {
        font-size: 20px;
    }
}

@media (max-width: 1024px) {
    .content-section .container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        margin-left: 0;
    }
}
