/* ============================================================
   磁力导航 - 差异化增强样式（叠加在 style.css 之上）
   保留原有布局与卡片样式，新增特色区块与细节优化
   ============================================================ */

html {
    scroll-behavior: smooth;
}

/* ---------- 首页页头差异化 ---------- */
.page-home .header {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.page-home .header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 5px;
    opacity: 0.85;
}

.page-home .logo {
    font-size: 3.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
}

/* ---------- 区块标题 ---------- */
.section-title {
    font-size: 1.7rem;
    font-weight: 700;
    text-align: center;
    margin: 0 0 1.5rem;
    color: #1f2937;
}

.section-title::after {
    content: '';
    display: block;
    width: 56px;
    height: 4px;
    margin: 0.6rem auto 0;
    border-radius: 2px;
    background: linear-gradient(90deg, #4f46e5, #22d3ee);
}

/* ---------- 使用指南 ---------- */
.guide-section {
    background: #fff;
    border-radius: 16px;
    padding: 2.5rem 1.5rem;
    margin-bottom: 2.5rem;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.guide-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.guide-step {
    text-align: center;
    padding: 1.25rem 1rem;
    border-radius: 12px;
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
    border: 1px solid #eef2f7;
    transition: transform 0.25s ease;
}

.guide-step:hover {
    transform: translateY(-4px);
}

.step-no {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.guide-step h3 {
    font-size: 1.05rem;
    margin-bottom: 0.4rem;
    color: #1f2937;
}

.guide-step p {
    font-size: 0.85rem;
    color: #6b7280;
    line-height: 1.6;
}

/* ---------- FAQ ---------- */
.faq-section {
    background: #fff;
    border-radius: 16px;
    padding: 2.5rem 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.faq-list {
    max-width: 860px;
    margin: 0 auto;
}

.faq-item {
    border: 1px solid #eef2f7;
    border-radius: 12px;
    margin-bottom: 0.75rem;
    overflow: hidden;
    background: #fff;
}

.faq-q {
    width: 100%;
    text-align: left;
    background: #f8fafc;
    border: none;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    font-family: inherit;
}

.faq-q:hover {
    background: #f1f5f9;
}

.faq-arrow {
    transition: transform 0.25s ease;
    color: #4f46e5;
    flex-shrink: 0;
}

.faq-item.open .faq-arrow {
    transform: rotate(180deg);
}

.faq-a {
    display: none;
    padding: 0 1.25rem 1rem;
    font-size: 0.92rem;
    line-height: 1.8;
    color: #4b5563;
}

.faq-item.open .faq-a {
    display: block;
}

/* ---------- 迷你导航条 ---------- */
.mini-nav {
    background: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    position: sticky;
    top: 0;
    z-index: 50;
}

.mini-nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding-top: 0.7rem;
    padding-bottom: 0.7rem;
}

.mini-logo {
    font-size: 1.2rem;
    font-weight: 700;
    color: #4f46e5;
    text-decoration: none;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.mini-search {
    flex: 1;
    max-width: 520px;
    margin-left: auto;
}

.mini-search .search-box {
    box-shadow: none;
    border: 1px solid #e5e7eb;
}

/* ---------- 面包屑 ---------- */
.breadcrumb {
    background: #f8fafc;
    border-bottom: 1px solid #eef2f7;
    font-size: 0.88rem;
    color: #6b7280;
    padding: 0.7rem 0;
}

.breadcrumb .container {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: #4f46e5;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* ---------- 详情页扩展徽章 ---------- */
.badge-extra {
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #fff;
    padding: 0.3rem 0.9rem;
    border-radius: 999px;
    font-size: 0.82rem;
}

/* ---------- 相关站点 ---------- */
.related-section {
    margin-top: 2rem;
}

.related-grid {
    margin-bottom: 0;
}

/* ---------- 搜索页 ---------- */
.search-info {
    text-align: center;
    padding: 1rem 0 0.5rem;
}

.search-info h1 {
    font-size: 1.9rem;
    color: #1f2937;
    margin-bottom: 0.4rem;
}

.search-info p {
    color: #6b7280;
    margin-bottom: 0.6rem;
}

.external-link {
    display: inline-block;
    background: #fff;
    border: 1px solid #c7d2fe;
    color: #4f46e5;
    padding: 0.45rem 1.1rem;
    border-radius: 999px;
    font-size: 0.88rem;
    text-decoration: none;
    margin: 0.5rem auto 1.25rem;
    transition: all 0.2s ease;
}

.external-link:hover {
    background: #4f46e5;
    color: #fff;
}

.no-result {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 1rem;
    color: #6b7280;
}

.no-result .btn {
    margin-top: 1rem;
}

/* ---------- 404 ---------- */
.notfound {
    text-align: center;
    padding: 4rem 1rem 2rem;
}

.notfound-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.notfound h1 {
    font-size: 1.8rem;
    color: #1f2937;
    margin-bottom: 0.6rem;
}

.notfound p {
    color: #6b7280;
    margin-bottom: 1.5rem;
}

/* ---------- 回到顶部 ---------- */
.back-to-top {
    position: fixed;
    right: 22px;
    bottom: 22px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #fff;
    font-size: 1.25rem;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.35);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 60;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* ---------- 页脚收录站点 ---------- */
.footer-sites {
    min-width: 220px;
}

.footer-sitelinks {
    display: grid;
    grid-template-columns: repeat(3, auto);
    gap: 0.15rem 1.2rem;
}

/* ---------- 热门关键词 ---------- */
.hot-keywords {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.9rem;
}

.hot-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.85);
    white-space: nowrap;
}

.hot-keyword {
    background: rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.28);
    padding: 0.12rem 0.7rem;
    border-radius: 999px;
    font-size: 0.78rem;
    line-height: 1.6;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.25s ease;
}

.hot-keyword:hover {
    background: rgba(255, 255, 255, 0.28);
    color: #fff;
    transform: translateY(-1px);
}

/* ---------- 首页页签 ---------- */
.home-tabs-bar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.25);
}

.home-tabs {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.home-tab {
    display: inline-flex;
    align-items: center;
    padding: 0.55rem 0.75rem;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    border-bottom: 3px solid transparent;
    transition: color 0.25s ease, border-color 0.25s ease;
}

.home-tab:hover {
    color: #fff;
}

.home-tab.active {
    color: #fff;
    border-bottom-color: #fff;
}

/* ---------- 资源文章列表 ---------- */
.articles-section {
    margin-bottom: 2rem;
}

.articles-header {
    text-align: center;
    margin-bottom: 2.5rem;
    padding-top: 1rem;
}

.articles-section-title {
    font-size: 2rem;
    font-weight: 800;
    color: #764ba2;
    margin-bottom: 0.5rem;
}

.articles-section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    margin: 0.75rem auto 0;
    border-radius: 2px;
    background: linear-gradient(90deg, #667eea, #764ba2);
}

.articles-section-subtitle {
    font-size: 1.05rem;
    color: #64748b;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.article-card {
    background: #fff;
    border-radius: 18px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.18);
}

.article-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.article-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.article-category.large {
    font-size: 0.85rem;
    padding: 0.35rem 0.9rem;
    margin-bottom: 0.75rem;
}

.article-date {
    font-size: 0.85rem;
    color: #94a3b8;
}

.article-card .article-title {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 0.75rem;
}

.article-card .article-title a {
    color: #1f2937;
    text-decoration: none;
    transition: color 0.2s;
}

.article-card .article-title a:hover {
    color: #667eea;
}

.article-summary {
    color: #475569;
    line-height: 1.75;
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
    flex: 1;
}

.article-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: auto;
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    flex: 1;
}

.article-tag {
    padding: 0.35rem 0.7rem;
    background: #f3f4f6;
    border-radius: 20px;
    font-size: 0.78rem;
    color: #4b5563;
    font-weight: 500;
}

.article-views {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.85rem;
    color: #94a3b8;
    white-space: nowrap;
}

.article-views .eye {
    font-size: 0.95rem;
}

.articles-empty {
    text-align: center;
    padding: 4rem 1rem;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.articles-empty p {
    color: #6b7280;
    margin-bottom: 1rem;
}

/* ---------- 文章详情页 ---------- */
.page-article .detail-header {
    color: #fff;
}

.article-meta-hero {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
    font-size: 0.95rem;
    opacity: 0.9;
}

.article-meta-hero .divider {
    opacity: 0.5;
}

.article-body {
    background: #fff;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    line-height: 1.9;
    color: #334155;
    font-size: 1.05rem;
}

.article-body h2,
.article-body h3,
.article-body h4 {
    color: #1f2937;
    margin-top: 1.8rem;
    margin-bottom: 1rem;
}

.article-body p {
    margin-bottom: 1.2rem;
}

.article-body ul,
.article-body ol {
    margin-bottom: 1.2rem;
    padding-left: 1.5rem;
}

.article-body li {
    margin-bottom: 0.4rem;
}

.article-tags-section {
    margin-top: 2rem;
    background: #fff;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.article-tags-section h3 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    color: #1f2937;
}

/* ---------- 详情页内容与页头间距 ---------- */
.detail-content {
    margin-top: 2.5rem;
}

/* ---------- 文章底部操作区 ---------- */
.article-bottom-actions {
    background: transparent !important;
    padding: 0 !important;
    margin: 2rem 0 0;
    border: none;
    box-shadow: none;
    text-align: right;
}

.article-bottom-actions .action-buttons {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.75rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.article-bottom-actions .btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border: none;
}

.article-bottom-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
    .guide-steps {
        grid-template-columns: repeat(2, 1fr);
    }

    .articles-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .page-home .logo {
        font-size: 2.2rem;
    }

    .guide-steps {
        grid-template-columns: 1fr;
    }

    .mini-nav-inner {
        flex-direction: column;
        gap: 0.5rem;
        padding-top: 0.6rem;
        padding-bottom: 0.6rem;
    }

    .mini-search {
        max-width: 100%;
    }

    .footer-sitelinks {
        grid-template-columns: repeat(2, auto);
    }

    .home-tab {
        padding: 0.45rem 0.6rem;
        font-size: 0.9rem;
    }

    .articles-section-title {
        font-size: 1.6rem;
    }

    .article-card {
        padding: 1.25rem;
    }

    .article-body {
        padding: 1.5rem;
    }
}
