/* ===== 基础覆盖 ===== */
body {
    font-family: "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
    background-color: #f5f7fa;
    color: #333333;
    font-size: 14px;
    line-height: 1.6;
}
a { text-decoration: none; transition: color 0.2s; }
a:hover { text-decoration: none; }

/* ===== 顶部 ===== */
.header { background: #fff; }
.header-top { height: 80px; border-bottom: 1px solid #e5e7eb; }
.logo { display: flex; flex-direction: column; justify-content: center; }
.logo-title { font-size: 24px; font-weight: bold; color: #1f2937; line-height: 1.2; }
.logo-url { font-size: 14px; color: #6b7280; margin-top: 3px; }

.search-box { flex: 0 0 420px; }
.search-box .form-control {
    height: 38px;
    border: 2px solid #e5e7eb;
    border-right: none;
    font-size: 14px;
    box-shadow: none;
}
.search-box .form-control:focus {
    border-color: #2563eb;
    box-shadow: none;
}
.search-box .btn {
    height: 38px;
    background: #2563eb;
    border-color: #2563eb;
    padding: 0 18px;
    font-size: 14px;
}
.header-right a { font-size: 14px; color: #6b7280; }
.header-right a:hover { color: #2563eb; }

/* ===== 导航栏 ===== */
.navbar { background: #2563eb; min-height: 44px; }
.navbar-nav .nav-item {
    border-right: 1px solid rgba(255,255,255,0.3);
}
.navbar-nav .nav-item:first-child {
    border-left: 1px solid rgba(255,255,255,0.3);
}
.navbar-nav .nav-link {
    color: #FFFFFF !important;
    padding: 0 22px !important;
    height: 44px;
    line-height: 44px;
    font-size: 16px;
    transition: background 0.3s;
}
.navbar-nav .nav-link:hover,
.navbar-nav .active .nav-link {
    background: #1d4ed8;
}

/* ===== Banner ===== */
.banner {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 50%, #60a5fa 100%);
    padding: 50px 0;
}
.banner h1 { font-size: 38px; }
.banner p { font-size: 16px; opacity: 0.9; }
.banner-search { max-width: 550px; }
.banner-search .form-control {
    height: 48px;
    border: none;
    font-size: 15px;
    padding-left: 20px;
}
.banner-search .btn {
    height: 40px;
    margin: 4px;
    padding: 0 22px;
    background: #2563eb;
    border-color: #2563eb;
}

/* ===== 字形字库分类 ===== */
.font-category {
    background: #fff;
    padding: 20px 0;
    margin-top: -20px;
    border-radius: 6px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    position: relative;
    z-index: 10;
}
.cat-row { padding: 8px 20px; align-items: flex-start; }
.cat-label {
    flex: 0 0 50px;
    font-size: 14px;
    color: #6b7280;
    padding-top: 6px;
    font-weight: 500;
}
.cat-tags { flex: 1; display: flex; gap: 5px 15px; }
.cat-tags a { font-size: 14px; color: #4b5563; padding: 4px 0; }
.cat-tags a:hover { color: #2563eb; }
.cat-divider { height: 1px; background: #f3f4f6; margin: 5px 20px; }

/* ===== 主体内容 ===== */
.main-content { margin-top: 20px; margin-bottom: 35px; }

/* 区块标题 */
.section-title {
    margin-bottom: 18px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e5e7eb;
}
.section-title h2 {
    font-size: 18px;
    color: #1f2937;
    position: relative;
    padding-left: 10px;
    font-weight: 500;
    margin: 0;
}
.section-title h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 18px;
    background: #2563eb;
    border-radius: 2px;
}
.section-title a { font-size: 14px; color: #6b7280; }
.section-title a:hover { color: #2563eb; }

.img-style{
    width: 250px;
}
/* 字体卡片 */
.font-card {
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    transition: border-color 0.3s, box-shadow 0.3s;
    height: 100%;
}
.font-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
}
.font-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: #1f2937;
    text-align: center;
    padding: 15px;
    border-bottom: 1px solid #f3f4f6;
}
.font-info { padding: 12px 15px; background: #fff; }
.font-name { font-size: 14px; margin-bottom: 6px; color: #1f2937; }
.font-meta { font-size: 12px; color: #9ca3af; align-items: center; }
.font-tag {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 11px;
}
.font-tag.tag-free { background: #dcfce7; color: #16a34a; }
.font-tag.tag-personal { background: #fef3c7; color: #d97706; }

/* ===== 侧边栏 ===== */
.sidebar-widget { border: 1px solid #e5e7eb; border-radius: 4px; }
.widget-title {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e7eb;
    color: #1f2937;
}
.rank-list li {
    padding: 8px 0;
    border-bottom: 1px dashed #f3f4f6;
}
.rank-list li:last-child { border-bottom: none; }
.rank-num {
    width: 20px;
    height: 20px;
    background: #e5e7eb;
    color: #6b7280;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    margin-right: 10px;
    flex-shrink: 0;
}
.rank-num.rank-1 { background: #ef4444; color: #fff; }
.rank-num.rank-2 { background: #f97316; color: #fff; }
.rank-num.rank-3 { background: #eab308; color: #fff; }
.rank-name { font-size: 14px; color: #374151; }
.rank-name:hover { color: #2563eb; }
.rank-count { font-size: 12px; color: #9ca3af; }

/* ===== 友情链接 ===== */
.friend-links { border-color: #e5e7eb !important; }
.friend-links-title { font-size: 13px; }
.friend-links-list a { font-size: 13px; }
.friend-links-list a:hover { color: #2563eb !important; }

/* ===== 页脚 - 美化版 ===== */
.footer { background: #0f172a; color: #FFFFFF; }
.footer-main {
    padding: 35px 0 25px;
    border-bottom: 1px solid #1e293b;
}
.footer-col-title {
    font-size: 15px;
    font-weight: 500;
    color: #FFFFFF;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #1e293b;
}
.footer-about p {
    font-size: 13px;
    line-height: 1.8;
    color: #cbd5e1;
    margin: 0;
}
.footer-links {
    columns: 2;
    column-gap: 15px;
}
.footer-links li {
    margin-bottom: 8px;
    font-size: 14px;
    break-inside: avoid;
}
.footer-links li a {
    color: #cbd5e1;
    font-size: 14px;
    transition: color 0.2s;
}
.footer-links li a:hover {
    color: #60a5fa;
}
.footer-contact p {
    font-size: 13px;
    color: #cbd5e1;
    margin: 0;
}
.footer-bottom {
    padding: 15px 0;
    font-size: 14px;
    color: #94a3b8;
}
.footer-bottom a {
    color: #94a3b8;
    font-size: 14px;
}
.footer-bottom a:hover {
    color: #60a5fa;
}

/* ===== 响应式补充 ===== */
@media (max-width: 992px) {
    .search-box { display: none; }
}
@media (max-width: 768px) {
    .banner h1 { font-size: 26px; }
    .navbar-nav .nav-item {
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.2);
    }
    .navbar-nav .nav-item:first-child { border-left: none; }
    .navbar-nav .nav-link {
        padding: 0 12px !important;
        height: 40px;
        line-height: 40px;
        font-size: 14px;
    }
    .logo-title { font-size: 20px; }
    .cat-label { flex: 0 0 40px; }
    /* 核心：链接列表改为2列排列，兼容多浏览器 */
    .footer-links {
        columns: 2 !important;
        -webkit-columns: 2;
        -moz-columns: 2;
        column-gap: 12px;
    }
    /* 列表项样式优化，避免列拆分 */
    .footer-links li {
        margin-bottom: 8px;
        font-size: 13px;
        break-inside: avoid;
        -webkit-column-break-inside: avoid;
        page-break-inside: avoid;
    }
    /* 链接样式优化，扩大手机点击热区 */
    .footer-links li a {
        font-size: 13px;
        display: block;
        line-height: 1.5;
        padding: 2px 0;
    }
    /* 手机端点按反馈效果 */
    .footer-links li a:active {
        color: #60a5fa;
    }
    /* 可选：页脚整体紧凑化优化，适配小屏 */
    .footer-main {
        padding: 28px 0 20px;
    }
    .footer-col-title {
        font-size: 14px;
        margin-bottom: 12px;
        padding-bottom: 6px;
    }
    .footer-about p, .footer-contact p {
        font-size: 12px;
        line-height: 1.7;
    }
    /* 优化底部版权文字换行拥挤问题 */
    .footer-bottom {
        font-size: 12px;
        line-height: 1.8;
        padding: 12px 0;
    }
    .footer-bottom a {
        font-size: 12px;
    }
    .police-icon {
        height: 14px;
        vertical-align: middle;
        margin-right: 2px;
    }
}

/* ===== 列表分页 ===== */
.pagination-wrap .page-link {
    color: #4b5563;
    border-color: #e5e7eb;
    padding: 8px 14px;
    font-size: 14px;
    margin: 0 3px;
    border-radius: 4px;
}
.pagination-wrap .page-link:hover {
    color: #2563eb;
    background: #eff6ff;
    border-color: #3b82f6;
}
.pagination-wrap .page-item.active .page-link {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}
.pagination-wrap .page-item.disabled .page-link {
    color: #9ca3af;
    background: #f9fafb;
    border-color: #e5e7eb;
}
/* ===== 面包屑 ===== */
.breadcrumb-bar {
    padding: 12px 18px;
    background: #fff;
    border-radius: 4px;
    font-size: 14px;
    color: #6b7280;
    margin: 15px 0;
    border: 1px solid #e5e7eb;
}
.breadcrumb-bar a {
    color: #4b5563;
    font-size: 14px;
}
.breadcrumb-bar a:hover {
    color: #2563eb;
}
/*列表分页重构*/
/* 让分页横向排列并去掉默认列表样式 */
 .pagination-wrap .pagination {
     display: flex;
     padding-left: 0;
     list-style: none;
     border-radius: 0.25rem;
     justify-content: center;  /* 加上这行，水平居中 */
 }

/* 每个页码项的基础样式 */
.pagination-wrap .pagination li {
    margin: 0;
}

/* 页码链接/span 的统一样式 */
.pagination-wrap .pagination li > a,
.pagination-wrap .pagination li > span {
    position: relative;
    display: block;
    padding: 0.5rem 0.75rem;
    margin-left: -1px;
    line-height: 1.25;
    color: #007bff;
    background-color: #fff;
    border: 1px solid #dee2e6;
    text-decoration: none;
}

/* 第一个圆角 */
.pagination-wrap .pagination li:first-child > a,
.pagination-wrap .pagination li:first-child > span {
    margin-left: 0;
    border-top-left-radius: 0.25rem;
    border-bottom-left-radius: 0.25rem;
}

/* 最后一个圆角 */
.pagination-wrap .pagination li:last-child > a,
.pagination-wrap .pagination li:last-child > span {
    border-top-right-radius: 0.25rem;
    border-bottom-right-radius: 0.25rem;
}

/* hover 状态 */
.pagination-wrap .pagination li a:hover {
    z-index: 2;
    color: #0056b3;
    text-decoration: none;
    background-color: #e9ecef;
    border-color: #dee2e6;
}

/* active 当前页样式 */
.pagination-wrap .pagination li.active > span {
    z-index: 3;
    color: #fff;
    background-color: #007bff;
    border-color: #007bff;
}

/* disabled 禁用样式 */
.pagination-wrap .pagination li.disabled > span {
    color: #6c757d;
    pointer-events: none;
    cursor: auto;
    background-color: #fff;
    border-color: #dee2e6;
}

.breadcrumb-bar .sep {
    margin: 0 8px;
    color: #d1d5db;
}
.breadcrumb-bar .current {
    color: #2563eb;
    font-weight: 500;
}
/* ===== 详情页头部 ===== */
/* 预览图片 */
.detail-preview-box {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 15px;
    text-align: center;
}
.preview-img {
    height: 210px;
    object-fit: cover;
    border-radius: 4px;
    display: block;
    margin: 0 auto;
}
.preview-caption {
    margin-top: 12px;
    font-size: 22px;
    font-weight: 500;
    color: #1f2937;
    text-align: center;
}

.detail-header { border: 1px solid #e5e7eb; border-radius: 4px; }
.detail-preview-box {
    background: linear-gradient(135deg, #f8fafc, #eff6ff);
    border: 1px solid #dbeafe;
    border-radius: 6px;
    padding: 15px 10px;
    text-align: center;
}
.preview-big {
    font-size: 52px;
    color: #1e3a8a;
    font-weight: 500;
    margin-bottom: 12px;
    line-height: 1.2;
}
.preview-small {
    font-size: 16px;
    color: #64748b;
    letter-spacing: 1px;
}
.detail-title {
    font-size: 24px;
    font-weight: 500;
    color: #1f2937;
}
.detail-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 20px;
}
.info-item {
    display: flex;
    font-size: 14px;
    padding: 4px 0;
    border-bottom: 1px dashed #f3f4f6;
}
.info-label {
    color: #6b7280;
    min-width: 70px;
    flex-shrink: 0;
}
.info-value {
    color: #374151;
    flex: 1;
}
.detail-action-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}
.btn-download-main {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    border: none;
    color: #fff;
    padding: 12px 32px;
    font-size: 16px;
    border-radius: 4px;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn-download-safety{
    background:#28a745;
    border: none;
    color: #fff;
    padding: 12px 32px;
    font-size: 16px;
    border-radius: 4px;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn-download-main:hover {
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.3);
}
.dl-icon { font-size: 18px; }
.action-tips {
    display: flex;
    gap: 15px;
}
.tip-item {
    font-size: 14px;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 4px;
}
.tip-item i {
    color: #16a34a;
    font-style: normal;
    font-weight: bold;
}

/* ===== 合并大区块 ===== */
.detail-merged { border: 1px solid #e5e7eb; border-radius: 4px; overflow: hidden; }
.merged-block {
    border-bottom: 1px solid #e5e7eb;
}
.merged-block:last-child {
    border-bottom: none;
}
.block-title {
    padding: 12px 20px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}
.block-title h2 {
    font-size: 16px;
    font-weight: 500;
    color: #1f2937;
    margin: 0;
    padding-left: 10px;
    border-left: 3px solid #2563eb;
}
.block-content { padding: 20px; }
.block-content h3 {
    font-size: 16px;
    font-weight: 500;
    margin: 18px 0 12px;
}
.block-content h3:first-child { margin-top: 0; }
.block-content p {
    font-size: 16px;
    line-height: 2;
    margin-bottom: 12px;
}
.block-content ul, .block-content ol {
    padding-left: 22px;
    font-size: 16px;
    color: #4b5563;
    line-height: 2;
}

/* 下载信息表 */
.download-info-table { font-size: 16px; }
.download-info-table th {
    background: #f9fafb;
    color: #6b7280;
    font-weight: normal;
    text-align: right;
    width: 130px;
}
.download-info-table td { color: #374151; }

/* 下载地址 - 分组按钮式 */
.dl-group-title {
    font-size: 15px;
    font-weight: 500;
    color: #1f2937;
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid #f3f4f6;
}
.dl-group-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.dl-link-btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 22px;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: #fff;
    font-size: 14px;
    border-radius: 4px;
    transition: all 0.3s;
    text-decoration: none;
}
.dl-link-btn:hover {
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}
.dl-link-btn.dl-pan {
    background: linear-gradient(135deg, #16a34a, #22c55e);
}
.dl-link-btn.dl-pan:hover {
    background: linear-gradient(135deg, #15803d, #16a34a);
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.25);
}
.dl-code {
    font-size: 12px;
    opacity: 0.9;
    margin-left: 8px;
    padding-left: 8px;
    border-left: 1px solid rgba(255,255,255,0.3);
}

.download-notice {
    padding: 12px 15px;
    background: #fef3c7;
    border-left: 3px solid #f59e0b;
    border-radius: 0 4px 4px 0;
    font-size: 14px;
    color: #92400e;
}
.download-notice p { margin: 0; color: #92400e; font-size: 14px; }

/* 相关推荐 */
.related-fonts { margin-top: 10px; }
.police-icon{
    width: 16px;
    height: 16px;
    margin-right: 5px;
}

/*后面增加*/
.block-content h1{
    text-align: center;
}
.article-info{
    text-align: center;
}
