/* 基础变量 */
:root {
    --primary-color: #409EFF;
    --text-color: #303133;
    --light-bg: #f5f7fa;
}

/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--light-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* 顶部导航栏 */
.top-bar {
    background: #fff;
    box-shadow: 0 2px 12px 0 rgba(0,0,0,.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
}

/* 主要内容区域 */
.main-content {
    margin-top: 80px;
    padding: 40px 0;
    flex: 1;
}

/* 文章卡片 */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.article-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px 0 rgba(0,0,0,.1);
    transition: transform 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}

.article-card:hover {
    transform: translateY(-5px);
}

.article-image {
    width: 200px;
    height: 120px;
    object-fit: cover;
    border-radius: 4px;
}

.article-content {
    flex: 1;
    padding: 0 20px;
}

.article-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--text-color);
}

.article-meta {
    display: flex;
    gap: 15px;
    color: #909399;
    font-size: 14px;
    margin-top: 15px;
}

.article-meta span {
    display: flex;
    align-items: center;
}

.article-meta i {
    margin-right: 5px;
}

/* 文章列表 */
.article-list {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 12px 0 rgba(0,0,0,.1);
}

.article-item {
    display: flex;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease;
}

.article-item:last-child {
    border-bottom: none;
}

.article-item:hover {
    transform: translateY(-2px);
}

.article-item:hover .article-title {
    color: var(--primary-color);
}

.article-item p {
    color: #606266;
    margin: 10px 0;
    line-height: 1.6;
}

/* 分类筛选 */
.category-filter {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 12px 0 rgba(0,0,0,.1);
    margin-bottom: 20px;
}

/* 分页 */
.pagination {
    margin-top: 30px;
    display: flex;
    justify-content: center;
}

.el-pagination.is-background .el-pager li:not(.disabled).active {
    background-color: var(--primary-color);
}

.el-pagination.is-background .el-pager li:not(.disabled):hover {
    color: var(--primary-color);
}

/* 文章详情页 */
.article-detail {
    background: #fff;
    border-radius: 8px;
    padding: 40px;
    box-shadow: 0 2px 12px 0 rgba(0,0,0,.1);
}

.article-header {
    text-align: center;
    margin-bottom: 40px;
}

.article-detail .article-title {
    font-size: 32px;
    margin-bottom: 20px;
}

.article-detail .article-meta {
    justify-content: center;
}

.article-detail .article-meta span {
    margin: 0 15px;
}

.article-detail .article-content {
    font-size: 16px;
    line-height: 1.8;
    color: #606266;
}

.article-detail .article-content p {
    margin-bottom: 20px;
}

.article-detail .article-image {
    width: 100%;
    max-height: 400px;
    border-radius: 8px;
    margin-bottom: 30px;
}

/* 侧边栏 */
.sidebar {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 12px 0 rgba(0,0,0,.1);
    position: sticky;
    top: 100px;
}

.sidebar-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

.menu-link {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.menu-link:hover {
    background-color: var(--light-bg);
    color: var(--primary-color);
}

.menu-link i {
    margin-right: 10px;
    font-size: 16px;
}

/* 技术标签 */
.tech-tags {
    margin: 20px 0;
}

.tech-tag {
    display: inline-block;
    padding: 4px 12px;
    background: var(--light-bg);
    color: var(--primary-color);
    border-radius: 4px;
    font-size: 14px;
    margin-right: 10px;
    margin-bottom: 10px;
}

/* 相关文章 */
.related-articles {
    margin-top: 40px;
}

.related-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 20px;
    color: var(--text-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.related-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px 0 rgba(0,0,0,.1);
    transition: transform 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.related-item:hover {
    transform: translateY(-5px);
}

.related-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.related-content {
    padding: 20px;
}

.related-item-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--text-color);
}

.related-item-meta {
    color: #909399;
    font-size: 14px;
}

/* 页脚 */
.footer {
    background: #fff;
    padding: 60px 0 20px;
    margin-top: 60px;
    box-shadow: 0 -2px 12px 0 rgba(0,0,0,.1);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.footer-section h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--text-color);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: #606266;
    text-decoration: none;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
}

.footer-section ul li a i {
    margin-right: 8px;
}

.footer-section ul li a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #eee;
    color: #909399;
}

/* ElementUI 样式覆盖 */
.el-menu--horizontal {
    border-bottom: none !important;
}

.el-menu-item {
    font-size: 16px;
}

.el-menu-item a {
    text-decoration: none;
    color: inherit;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }

    .article-item {
        flex-direction: column;
    }

    .article-image {
        width: 100%;
        height: 200px;
        margin-bottom: 15px;
    }

    .article-content {
        padding: 0;
    }

    .article-meta {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .footer-content {
        grid-template-columns: 1fr;
    }

    .article-detail .article-title {
        font-size: 24px;
    }

    .article-detail {
        padding: 20px;
    }

    .sidebar {
        margin-top: 20px;
    }
} 