/* 全局样式重置 + 基础变量定义（统一仅声明一次） */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Noto Sans SC', sans-serif;
}

:root {
    --primary-color: #1E40AF; /* 主色调-深蓝 */
    --secondary-color: #5A8DFF; /* 辅助色-浅蓝 */
    --light-gray: #F5F7FA; /* 浅灰背景 */
    --dark-gray: #333333; /* 深灰文字 */
    --medium-gray: #666666; /* 中灰文字 */
    --white: #FFFFFF; /* 白色 */
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08); /* 阴影效果 */
    --radius: 8px; /* 圆角 */
    --transition: all 0.3s ease; /* 过渡效果 */
    --border-color: #E5E7EB; /* 边框色 */
    --warning-color: #F59E0B; /* 警告色 */
}

body {
    background-color: var(--light-gray);
    color: var(--dark-gray);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

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

/* 顶部导航栏（统一所有页面样式） */
.header {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 999;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 700;
    color: var(--primary-color);
}

.logo i {
    font-size: 26px;
}

.nav-menu {
    display: flex;
    gap: 30px;
}

.nav-item {
    font-size: 16px;
    font-weight: 500;
    color: var(--dark-gray);
    position: relative;
}

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

.nav-item::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.nav-item:hover::after {
    width: 100%;
}

.mobile-menu {
    display: none;
    font-size: 24px;
    cursor: pointer;
}

/* 搜索框样式（统一所有页面，含实时搜索/下拉建议） */
.search-box {
    display: flex;
    align-items: center;
    position: relative;
    width: 300px;
}

.search-input {
    width: 100%;
    padding: 8px 15px 8px 40px;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
    font-size: 14px;
    transition: var(--transition);
}

.search-input:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 2px rgba(90, 141, 255, 0.2);
}

.search-box i {
    position: absolute;
    left: 15px;
    color: var(--medium-gray);
    font-size: 16px;
}

/* 搜索建议下拉框 */
.search-suggest {
    position: absolute;
    top: 45px;
    left: 0;
    width: 100%;
    background-color: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 10px 0;
    display: none;
    z-index: 999;
}

.search-suggest.show {
    display: block;
}

.suggest-item {
    padding: 8px 15px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
}

.suggest-item:hover {
    background-color: var(--light-gray);
    color: var(--primary-color);
}

/* 首页专属样式 */
.hero-section {
    padding: 60px 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    border-radius: 0 0 var(--radius) var(--radius);
    margin-bottom: 50px;
}

.hero-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
}

.hero-text {
    flex: 1;
}

.hero-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.3;
}

.hero-desc {
    font-size: 18px;
    margin-bottom: 30px;
    opacity: 0.9;
}

.hero-btns {
    display: flex;
    gap: 20px;
}

.btn {
    padding: 12px 24px;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

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

.btn-primary:hover {
    background-color: #f0f4ff;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-outline {
    background-color: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-outline:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.hero-tools {
    flex: 0 0 350px;
    background-color: var(--white);
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.hero-tools-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tool-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.tool-item {
    padding: 10px;
    background-color: #5af79f;
    border-radius: var(--radius);
    text-align: center;
    transition: var(--transition);
}

.tool-item:hover {
    background-color: var(--secondary-color);
    color: var(--white);
    transform: translateY(-2px);
}

.tool-item i {
    font-size: 20px;
    margin-bottom: 5px;
    display: block;
}

/* 工具功能区（通用，适配首页/详情页） */
.tools-section {
    margin-bottom: 60px;
}

.section-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: var(--secondary-color);
}

.section-title i {
    font-size: 24px;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* 首页工具卡片 */
.tool-card {
    background-color: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 25px;
    transition: var(--transition);
    border-top: 4px solid var(--primary-color);
}

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

.tool-card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.tool-card-icon {
    width: 50px;
    height: 50px;
    background-color: rgba(30, 64, 175, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 24px;
}

.tool-card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark-gray);
}

.tool-card-desc {
    font-size: 14px;
    color: var(--medium-gray);
    margin-bottom: 20px;
    line-height: 1.5;
}

.tool-card-btn {
    display: inline-block;
    padding: 8px 16px;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}

.tool-card-btn:hover {
    background-color: #153085;
    transform: translateY(-2px);
}

/* 实用内容区（首页） */
.content-section {
    margin-bottom: 60px;
}

.content-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.content-tab {
    padding: 8px 20px;
    background-color: var(--white);
    border-radius: 20px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    border: 1px solid transparent;
}

.content-tab.active {
    background-color: var(--primary-color);
    color: var(--white);
}

.content-tab:hover:not(.active) {
    border-color: var(--secondary-color);
    color: var(--primary-color);
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.content-card {
    background-color: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
}

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

.content-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: var(--transition);
}

.content-card:hover .content-img {
    transform: scale(1.05);
}

.content-body {
    padding: 20px;
}

.content-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--dark-gray);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.content-desc {
    font-size: 14px;
    color: var(--medium-gray);
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.content-link {
    display: inline-block;
    font-size: 14px;
    color: var(--primary-color);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}

.content-link:hover {
    color: #153085;
}

.content-link i {
    transition: var(--transition);
}

.content-link:hover i {
    transform: translateX(3px);
}

/* 长尾关键词/友情链接区（首页） */
.keywords-section {
    background-color: var(--white);
    padding: 40px 0;
    margin-bottom: 60px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.keywords-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.keywords-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.keyword-item {
    padding: 8px 16px;
    background-color: var(--light-gray);
    border-radius: 20px;
    font-size: 14px;
    color: var(--medium-gray);
    transition: var(--transition);
}

.keyword-item:hover {
    background-color: var(--secondary-color);
    color: var(--white);
    transform: translateY(-2px);
}

/* 详情页专属样式 */
/* 顶部通栏banner */
.banner {
    width: 100%;
    height: 180px;
    background: linear-gradient(rgba(30, 64, 175, 0.8), rgba(30, 64, 175, 0.9)), 
                url('https://picsum.photos/seed/banner/1920/400') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    margin-bottom: 20px;
}

.banner-title {
    font-size: 36px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* 面包屑导航 */
.breadcrumb {
    padding: 20px 0;
    font-size: 14px;
    color: var(--medium-gray);
}

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

.breadcrumb a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.breadcrumb span {
    margin: 0 8px;
}

/* 详情页主体布局 */
.main-content {
    margin: 20px 0 60px;
}

.article-area {
    width: 100%;
}

/* 文章头部信息 */
.article-header {
    background-color: var(--white);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.article-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--dark-gray);
    line-height: 1.4;
    margin-bottom: 20px;
}

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

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.article-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.article-tag {
    padding: 5px 12px;
    background-color: rgba(30, 64, 175, 0.1);
    color: var(--primary-color);
    border-radius: 20px;
    font-size: 13px;
}

/* 文章内容区 */
.article-content {
    background-color: var(--white);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow);
    font-size: 16px;
    color: var(--dark-gray);
}

.article-content .content-section {
    margin-bottom: 30px;
}

.article-content .section-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary-color);
    margin: 30px 0 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--light-gray);
}

.article-content .section-title::after {
    display: none; /* 覆盖首页section-title的下划线样式 */
}

.article-content p {
    margin-bottom: 15px;
    text-align: justify;
}

.article-content img {
    max-width: 100%;
    border-radius: var(--radius);
    margin: 20px 0;
    box-shadow: var(--shadow);
}

.article-content ul, .article-content ol {
    margin: 15px 0 15px 25px;
}

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

/* 提示框 */
.tip-box {
    background-color: rgba(245, 158, 11, 0.1);
    border-left: 4px solid var(--warning-color);
    padding: 15px 20px;
    border-radius: 0 var(--radius) var(--radius) 0;
    margin: 20px 0;
}

.tip-title {
    font-weight: 700;
    color: var(--warning-color);
    margin-bottom: 8px;
}

/* 详情页工具链接卡片（覆盖首页tool-card样式） */
.article-content .tools-grid {
    margin: 30px 0;
}

.article-content .tool-card {
    background-color: var(--light-gray);
    border: 1px solid transparent;
    border-top: none;
    text-align: center;
    padding: 25px 20px;
}

.article-content .tool-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
    border-color: var(--secondary-color);
    background-color: var(--white);
}

.article-content .tool-card i {
    font-size: 32px;
    color: var(--primary-color);
    margin-bottom: 15px;
    display: block;
}

.article-content .tool-card a {
    font-size: 18px;
    font-weight: 500;
    color: var(--dark-gray);
    display: block;
}

.article-content .tool-card a:hover {
    color: var(--primary-color);
}

.tool-desc {
    font-size: 14px;
    color: var(--medium-gray);
    margin-top: 10px;
    line-height: 1.5;
}

/* 文章底部操作区 */
.article-actions {
    background-color: var(--white);
    border-radius: var(--radius);
    padding: 20px 30px;
    box-shadow: var(--shadow);
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.action-buttons {
    display: flex;
    gap: 20px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--medium-gray);
    cursor: pointer;
}

.action-btn:hover {
    color: var(--primary-color);
}

/* 上一篇下一篇导航 */
.article-nav {
    background-color: var(--white);
    border-radius: var(--radius);
    padding: 20px 30px;
    box-shadow: var(--shadow);
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 2px solid var(--primary-color);
}

.nav-prev, .nav-next {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
}

.nav-prev i, .nav-next i {
    color: var(--primary-color);
    font-size: 18px;
}

.nav-prev a:hover, .nav-next a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* 底部区域（统一所有页面） */
.footer {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 60px 0 30px;
    margin-top: 40px;
}

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

.footer-col-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-col-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--secondary-color);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-link {
    font-size: 14px;
    opacity: 0.8;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-link:hover {
    opacity: 1;
    transform: translateX(5px);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 14px;
    opacity: 0.7;
}

/* 底部长尾关键词区 */
.footer-keywords {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

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

.footer-keywords .keyword-item {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
    opacity: 0.8;
}

.footer-keywords .keyword-item:hover {
    opacity: 1;
    background-color: var(--secondary-color);
    transform: translateY(-2px);
}

/* 自适应样式（统一所有页面，按断点合并） */
@media (max-width: 992px) {
    /* 首页适配 */
    .hero-content {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }
    .hero-tools {
        width: 100%;
        max-width: 400px;
    }
    .hero-btns {
        justify-content: center;
    }

    /* 详情页适配 */
    .article-title {
        font-size: 24px;
    }
    .article-content .section-title {
        font-size: 20px;
    }
    .banner-title {
        font-size: 28px;
    }
    .banner {
        height: 150px;
    }
    .tools-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
}

@media (max-width: 768px) {
    /* 通用导航适配 */
    .nav-menu {
        display: none;
    }
    .mobile-menu {
        display: block;
    }
    .search-box {
        width: 200px;
    }

    /* 首页适配 */
    .hero-title {
        font-size: 28px;
    }
    .hero-desc {
        font-size: 16px;
    }
    .section-title {
        font-size: 24px;
    }
    .tools-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }

    /* 详情页适配 */
    .article-header, .article-content, .article-actions {
        padding: 20px;
    }
    .article-actions {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
    }
    .article-nav {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
        padding: 15px 20px;
    }
    .banner-title {
        font-size: 24px;
    }
    .banner {
        height: 120px;
    }
    .article-content .tools-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    /* 通用导航适配 */
    .logo span {
        display: none;
    }
    .search-box {
        width: 150px;
    }

    /* 首页适配 */
    .hero-section {
        padding: 40px 0;
    }
    .tool-list {
        grid-template-columns: 1fr;
    }
    .content-grid {
        grid-template-columns: 1fr;
    }
    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }

    /* 详情页适配 */
    .article-title {
        font-size: 20px;
    }
    .article-content {
        font-size: 15px;
    }
    .banner-title {
        font-size: 20px;
    }
    .banner {
        height: 100px;
    }
}