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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

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

/* 头部样式 */
.site-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo h1 {
    font-size: 28px;
    font-weight: bold;
}

.logo a {
    color: #fff;
    text-decoration: none;
}

.main-nav .nav-list {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-link {
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.nav-link:hover {
    background-color: rgba(255,255,255,0.2);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background-color: #fff;
    margin: 3px 0;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* 主体内容 */
.site-main {
    min-height: calc(100vh - 200px);
    padding: 40px 0;
}

/* 分类卡片 */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.category-card {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.category-card h3 {
    color: #667eea;
    font-size: 22px;
    margin-bottom: 12px;
}

.category-card p {
    color: #666;
    font-size: 14px;
    line-height: 1.8;
}

/* 文章列表 */
.article-list {
    display: grid;
    gap: 25px;
}

.article-card {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}

.article-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.article-card h3 {
    color: #333;
    font-size: 20px;
    margin-bottom: 10px;
    line-height: 1.4;
}

.article-card .meta {
    font-size: 13px;
    color: #999;
    margin-bottom: 12px;
}

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

.article-card .tags {
    margin-top: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
}

/* 文章详情 */
.article-detail {
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.article-detail h1 {
    color: #333;
    font-size: 32px;
    margin-bottom: 20px;
    line-height: 1.4;
}

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

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

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

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

.article-detail .content pre {
    background: #f4f4f4;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 20px 0;
}

.article-detail .content code {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 14px;
}

/* 页面标题 */
.page-header {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.page-header h1 {
    color: #667eea;
    font-size: 28px;
    margin-bottom: 10px;
}

.page-header p {
    color: #666;
    font-size: 15px;
}

/* 底部 */
.site-footer {
    background: #333;
    color: #fff;
    padding: 30px 0;
    margin-top: 60px;
}

.footer-content {
    text-align: center;
}

.footer-content p {
    font-size: 14px;
    opacity: 0.8;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .site-header .container {
        flex-wrap: wrap;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .main-nav .nav-list {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 10px;
        margin-top: 20px;
        padding-top: 20px;
        border-top: 1px solid rgba(255,255,255,0.2);
    }
    
    .main-nav .nav-list.active {
        display: flex;
    }
    
    .mobile-menu-btn.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-btn.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    .category-grid {
        grid-template-columns: 1fr;
    }
    
    .article-detail {
        padding: 25px;
    }
    
    .article-detail h1 {
        font-size: 24px;
    }
    
    .page-header h1 {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .logo h1 {
        font-size: 22px;
    }
    
    .category-card,
    .article-card {
        padding: 20px;
    }
    
    .category-card h3 {
        font-size: 18px;
    }
    
    .article-card h3 {
        font-size: 18px;
    }
}

/* 加载动画 */
.loading {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: #999;
}

.empty-state h3 {
    font-size: 20px;
    margin-bottom: 10px;
}
