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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
    font-size: 15px;
}

a {
    text-decoration: none;
    color: #4a6cf7;
    transition: color 0.3s;
}

a:hover {
    color: #2c52e0;
}

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

/* 头部导航 */
.header {
    background: #fff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 700;
    color: #1a1a2e;
}

.logo-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 18px;
}

.nav {
    display: flex;
    gap: 8px;
}

.nav a {
    color: #555;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 15px;
    transition: all 0.3s;
}

.nav a:hover,
.nav a.active {
    color: #4a6cf7;
    background: #f0f4ff;
}

/* Hero 区域 */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 60px 0;
    text-align: center;
}

.hero h1 {
    font-size: 36px;
    margin-bottom: 16px;
    font-weight: 700;
}

.hero p {
    font-size: 17px;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* 主要内容区 */
.main-content {
    padding: 40px 0;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

/* 文章列表 */
.section-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 24px;
    color: #1a1a2e;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title::before {
    content: '';
    width: 4px;
    height: 22px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.article-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.article-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: all 0.3s;
    border: 1px solid #f0f0f0;
}

.article-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.article-title {
    font-size: 19px;
    font-weight: 600;
    margin-bottom: 12px;
}

.article-title a {
    color: #1a1a2e;
}

.article-title a:hover {
    color: #4a6cf7;
}

.article-meta {
    font-size: 13px;
    color: #999;
    margin-bottom: 14px;
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.article-tags {
    margin-bottom: 14px;
}

.article-tag {
    display: inline-block;
    background: #f0f4ff;
    color: #4a6cf7;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    margin-right: 8px;
    margin-bottom: 4px;
}

.article-summary {
    color: #666;
    font-size: 14px;
    line-height: 1.8;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.read-more {
    margin-top: 14px;
    display: inline-block;
    font-size: 14px;
    color: #4a6cf7;
    font-weight: 500;
}

.read-more:hover {
    text-decoration: underline;
}

/* 侧边栏 */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.sidebar-widget {
    background: white;
    border-radius: 12px;
    padding: 22px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid #f0f0f0;
}

.widget-title {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 18px;
    color: #1a1a2e;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.category-list {
    list-style: none;
}

.category-list li {
    padding: 10px 0;
    border-bottom: 1px dashed #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.category-list li:last-child {
    border-bottom: none;
}

.category-list a {
    color: #555;
    font-size: 14px;
}

.category-list a:hover {
    color: #4a6cf7;
}

.category-count {
    background: #f5f7fa;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 12px;
    color: #999;
}

/* 关于本站 */
.about-site {
    font-size: 14px;
    color: #666;
    line-height: 1.8;
}

.about-site p {
    margin-bottom: 10px;
}

/* 热门标签 */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-cloud .article-tag {
    margin: 0;
    cursor: pointer;
    transition: all 0.3s;
}

.tag-cloud .article-tag:hover {
    background: #4a6cf7;
    color: white;
}

/* 文章详情页 */
.article-detail {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid #f0f0f0;
}

.article-detail-title {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 16px;
    line-height: 1.4;
}

.article-detail-meta {
    font-size: 14px;
    color: #999;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.article-detail-content {
    font-size: 15px;
    line-height: 1.9;
    color: #444;
}

.article-detail-content h2 {
    font-size: 22px;
    font-weight: 600;
    color: #1a1a2e;
    margin: 30px 0 16px;
    padding-left: 12px;
    border-left: 4px solid #4a6cf7;
}

.article-detail-content h3 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 24px 0 12px;
}

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

.article-detail-content ul,
.article-detail-content ol {
    margin: 16px 0;
    padding-left: 28px;
}

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

.article-detail-content code {
    background: #f5f7fa;
    padding: 2px 8px;
    border-radius: 4px;
    font-family: "Consolas", "Monaco", monospace;
    font-size: 13px;
    color: #e74c3c;
}

.article-detail-content pre {
    background: #2d2d2d;
    color: #ccc;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 20px 0;
    font-size: 13px;
    line-height: 1.6;
}

.article-detail-content pre code {
    background: none;
    padding: 0;
    color: #ccc;
}

.article-detail-content blockquote {
    border-left: 4px solid #4a6cf7;
    padding: 12px 20px;
    margin: 20px 0;
    background: #f8faff;
    color: #666;
    border-radius: 0 8px 8px 0;
}

/* 普通页面（关于、联系等） */
.page-content {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid #f0f0f0;
}

.page-title {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.page-body {
    font-size: 15px;
    line-height: 1.9;
    color: #444;
}

.page-body h2 {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a2e;
    margin: 28px 0 14px;
}

.page-body h3 {
    font-size: 17px;
    font-weight: 600;
    color: #333;
    margin: 20px 0 10px;
}

.page-body p {
    margin-bottom: 14px;
}

.page-body ul,
.page-body ol {
    margin: 14px 0;
    padding-left: 28px;
}

.page-body li {
    margin-bottom: 6px;
}

/* 联系表单样式 */
.contact-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 24px 0;
}

.contact-item {
    background: #f8faff;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e8f0fe;
}

.contact-item-label {
    font-size: 13px;
    color: #999;
    margin-bottom: 6px;
}

.contact-item-value {
    font-size: 15px;
    color: #333;
    font-weight: 500;
}

/* 底部 */
.footer {
    background: #1a1a2e;
    color: #999;
    padding: 40px 0 20px;
    margin-top: 50px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 30px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 600;
    color: white;
    margin-bottom: 14px;
}

.footer-logo .logo-icon {
    width: 32px;
    height: 32px;
    font-size: 14px;
}

.footer-desc {
    font-size: 13px;
    line-height: 1.8;
    color: #888;
}

.footer-title {
    font-size: 15px;
    color: white;
    font-weight: 500;
    margin-bottom: 16px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #888;
    font-size: 13px;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #2a2a4a;
    padding-top: 20px;
    text-align: center;
    font-size: 13px;
    color: #777;
}

.footer-bottom a {
    color: #888;
    margin: 0 6px;
}

.footer-bottom a:hover {
    color: white;
}

.beian-info {
    margin-top: 8px;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
}

.pagination a,
.pagination span {
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 14px;
    border: 1px solid #e0e0e0;
    background: white;
    color: #666;
    transition: all 0.3s;
}

.pagination a:hover {
    border-color: #4a6cf7;
    color: #4a6cf7;
}

.pagination .current {
    background: #4a6cf7;
    color: white;
    border-color: #4a6cf7;
}

/* 响应式 */
@media (max-width: 900px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
    
    .contact-info {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .nav {
        display: none;
    }
    
    .hero h1 {
        font-size: 28px;
    }
    
    .article-detail,
    .page-content {
        padding: 24px;
    }
    
    .article-detail-title,
    .page-title {
        font-size: 22px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}
