html {
    touch-action: manipulation; /* 禁用双击缩放，直接触发点击 */
}


/* 重置默认样式，确保各浏览器表现一致 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box; /* 边框和内边距计入元素尺寸 */
}

@media (min-width: 1200px)
{
    video
    {
        max-height: 600px;
        max-width: 70%;
    }
}

html {
    scroll-behavior: smooth; /* 启用平滑滚动效果 */ 
}



/* 主容器样式 */
.container {
    max-width: 1200px; /* 最大宽度1200px */
    margin: 0 auto; /* 水平居中 */
    margin-top: 14px;
}



/* ===== 导航栏样式 ===== */
.navbar-container {
    position: sticky; /* 粘性定位 */
    top: 0; /* 固定在顶部 */
    width: 100%;
    margin: 0 auto 6px; /* 下边距6px */
    padding: 0 8px;/* 左右内边距6 */
    z-index: 1000; /* 确保在最上层 */
    min-height: 30px; /* 最小高度 */
    box-shadow: 0 0px 12px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-wrap: wrap; /* 允许换行 */
    align-items: center; /* 垂直居中 */
    border-radius: 12px; /* 圆角 */
    background: rgba(255, 255, 255, 0.95); /* 半透明背景 */
    transition: all 0.3s ease; /* 过渡效果 */
    max-width: 1200px;
}


/* 导航菜单基础样式 */
.navbar-menu {
    flex: 1;
    min-width: 0;
    height: auto;
    display: flex;
}

.navbar-menu ul {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
}

.navbar-menu li {
    position: relative;
    white-space: nowrap;
    padding: 5px 0;
    margin: 2px 0;
}

.navbar-menu a {
    text-decoration: none;
    color: #333;
    font-weight: 600;
    font-size: 15px;
    padding: 8px 13px;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: inline-block;
    margin-left: 4px;
}





@media (min-width: 769px)

{
    /* 悬停效果     */
    .navbar-menu a:hover {
        color: #4a6cf7;
        background: rgba(74, 108, 247, 0.1);
        transform: translateY(-1px);
        box-shadow: 0 2px 8px rgba(74, 108, 247, 0.15);
    }

    /* 二级菜单样式 */
    .navbar-menu ul ul {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        background: white;
        min-width: 200px;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        border-radius: 8px;
        z-index: 100;
        flex-direction: column;
        padding: 5px 0;
    }
    
    /* 添加二级菜单指示箭头（纯CSS实现） */
    .navbar-menu li:has(ul) > a::after {
        content: "▼";
        font-size: 10px;
        margin-left: 5px;
        display: inline-block;
        transition: transform 0.3s;
    }
    
    /* 悬停显示二级菜单 */
    .navbar-menu li:hover > ul {
        display: flex;
    }
    
    /* 二级菜单项样式 */
    .navbar-menu ul ul li {
        padding: 0;
        margin: 0;
    }
}

.navbar-menu ul ul a {

    border-radius: 0;
    display: block;
}

.navbar-menu ul ul a:hover {
    background: rgba(74, 109, 247, 0.227);
    transform: none;
}



/* ===== 汉堡菜单样式 ===== */
/* 汉堡菜单按钮 */
.hamburger-btn {
    display: none; /* 默认隐藏 */
    background: none;
    border: none;
    cursor: pointer;
    padding: 1px;
    transition: transform 0.3s ease;
    outline: none;
}

/* 汉堡菜单图标容器 */
.hamburger-icon {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 25px;
    height: 18px;
    transition: all 0.3s ease;
}

/* 汉堡菜单三条线 */
.hamburger-icon span {
    display: block;
    width: 100%;
    height: 2px;
    background: hsl(274, 100%, 3%);
    transition: all 0.3s ease;
}

/* 激活状态 - 整体旋转90度 */
.hamburger-btn.active {
    transform: rotate(90deg);
}

/* 移动端显示 */
@media (max-width: 768px) {
    .hamburger-btn {
        display: block;
    }
}

/* 遮罩层样式 */
.nav-overlay {
    position: fixed; /* 固定定位 */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0; /* 默认透明 */
    visibility: hidden; /* 默认隐藏 */
    transition: all 0.3s; /* 过渡效果 */
}


/* ===== 文章网格布局 ===== */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* 4列网格 */
    gap: 9px; /* 间距 */
    border-radius: 15px;
}

/* 文章卡片样式 */
.article-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%; /* 高度100% */
}

/* 卡片悬停效果 */
.article-card:hover {
    box-shadow: 0 8px 16px rgba(0,0,0,0.15); /* 阴影增强 */
}

/* 卡片图片区域 */
.card-image {
    width: 100%;
    height: 125px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgb(255 249 251 / 62%);
    font-size: 66px;
    font-weight: bold;
    background-color: #eee; /* 默认背景色 */
    background-size: cover;
    background-position: center;
}

.card-content {
    padding: 5px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}
/* 卡片标题 */
.card-title {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: #333;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 1; /* 限制1行 */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis; /* 超出显示省略号 */
    min-height: 1em;
}
.card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}
.card-title a:hover {
    color: #3498db;
}

/* 卡片摘要 */
.card-excerpt {
    color: #666;
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 1; /* 限制1行 */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* 卡片底部区域 */
.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 6px;
}

/* 阅读更多链接 */
.read-more {
    display: flex;
    align-items: center;
    color: #3498db;
    text-decoration: none;
    font-weight: 550;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    position: relative;
    padding-bottom: 2px;
    min-width: 85px;
}

.read-more::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: #3498db;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.read-more:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}

.read-more::after {
    content: '→';
    margin-left: 4px;
    transition: transform 0.3s ease;
}

.read-more:hover::after {
    transform: translateX(4px);
}

/* 卡片浏览量 */
.card-views {
    display: flex;
    align-items: center;
    color: #777;
    font-size: 0.85rem;
    padding: 2px 8px;
    background-color: #f8f9fa;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.card-views:hover {
    background-color: #edf2f7;
}

.card-views i {
    margin-right: 4px;
    font-size: 0.8rem;
    color: #666;
}



/* ===== 文章内容页样式 ===== */
.main {
    max-width: 100%;
    padding: 0;
}

/* 文章容器 */
.article {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    margin: 0 auto;
    transition: all 0.3s ease;
}




/* 文章标题栏 */
.article-header {
    padding: 28px 30px 20px 30px;
    border-bottom: 1px solid #bcbcd7;
}

.article-title {
    font-size: 30px;
    font-weight: 600;
    color: #1d0322;
    margin-bottom: 18px;
    line-height: 1.4;
}

.article-meta {
    display: flex;
    gap: 24px;
    font-size: 14px;
    color: #53172d;
    align-items: center;
}

.meta-category,
.meta-views,
.meta-date {
    display: flex;
    align-items: center;
}

.meta-category a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.meta-category a:hover {
    color: #2563eb;
}

.meta-label {
    opacity: 0.8;
    margin-right: 4px;
}

.meta-value {
    color: #333;
    font-weight: 500;
}

/* 图标样式 - 使用伪元素添加图标 */
.meta-views::before {
    content: "🔥";
    margin-right: 6px;
    opacity: 0.7;
}

.meta-date::before {
    content: "🕒";
    margin-right: 6px;
    opacity: 0.7;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .article-header {
        padding: 20px 20px 14px 20px;
    }

    .article-title {
        font-size: 22px;
    }
    
    .article-meta {
        flex-wrap: wrap;
        gap: 12px;
    }

    .article-content {
        padding: 20px !important;
    }

    .article-tags {
        padding: 16px 20px !important;
    }
}


/* 文章内容 */
.article-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #374151;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    padding: 30px;
}

.article-content p {
    margin-top: 0;
    margin-bottom: 1.25em;
    line-height: 1.8;
    color: #374151;
    text-align: justify;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

.article-content p:last-child {
    margin-bottom: 0;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
    margin: 1.5em auto;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05), 0 3px 10px rgba(0, 0, 0, 0.02);
    border: 1px solid #eaecef;
}



/* 文章内容标签 */
.article-tags {
    padding: 20px 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.article-tags a {
    display: inline-block;
    padding: 4px 12px;
    background: #f0f4ff;
    color: #3b82f6;
    border-radius: 20px;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.2s;
}

.article-tags a:hover {
    background: #3b82f6;
    color: white;
}





/* ===== 文章导航样式 ===== */
.article-navigation-wrapper {
    margin: 2rem auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    /* 文章导航容器样式 */
    max-width: 1200px;
    

}

.navigation-card {
    background: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.navigation-card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.navigation-title {
    font-size: 1.1rem;
    color: #333;
    margin: 0 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px dashed #eee;
}

.category-navigation .navigation-title {
    color: #1e88e5;
}

.navigation-links {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}


.nav-link {
    display: flex;
    align-items: center;
    padding: 0.8rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
    width: 100%;
}

.nav-link:hover {
    background: #f0f0f0;
    transform: translateX(3px);
}

.prev-link {
    border-left: 3px solid #4CAF50;
    box-shadow: 0 4px 12px var(--input-bg);

}

.next-link {
    border-left: 3px solid #FF9800;
    box-shadow: 0 4px 12px var(--input-bg);

}

.nav-direction {
    font-size: 0.85rem;
    color: #666;
    margin-right: 0.8rem;
    min-width: 50px;
}

.nav-title {
    flex: 1;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}




/* ===== 页脚样式 ===== */
#divBottom {
    margin: 4px 0 50px;
    padding: 20px 0;
    position: relative;
}

#BlogCopyRight {
    background: rgba(255, 255, 255, 0.85);
    margin: 0 auto;
    padding: 15px 25px;
    border-radius: 12px;
    color: #333;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.6;
    text-align: center;
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
    max-width: 1200px;
}

/* 页脚装饰线 */
#BlogCopyRight::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 555px;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(0, 150, 255, 0.5), transparent);
}




/* ===== 文章分页样式 ===== */ 
.pagination {
    font-family: Arial, sans-serif;
    display: block; /* 改为 block 才能让 text-align 生效 */
    width: 100%; /* 确保占满父容器宽度 */
    text-align: center; /* 让内容居中 */
    margin: 20px 0;
    font-size: 0; /* 去除 inline-block 间距 */
}

.pagination a, 
.pagination span {
    display: inline-block;
    min-width: 35px;
    height: 35px;
    line-height: 35px;
    text-align: center;
    margin: 0 5px;
    padding: 0 8px;
    font-size: 14px;
    border-radius: 15px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.pagination span {
    background-color: #3498db;
    color: white;
    font-weight: bold;
    border: 1px solid #2980b9;
}

.pagination a {
    background-color: #f8f9fa;
    color: #3498db;
       border: 2px solid #9dbaac52;
           box-shadow: 0 6px 16px rgb(84 117 98 / 12%);
}

.pagination a:hover {
    background-color: #e9ecef;
    border-color: #dee2e6;
}

.pagination a:active {
    background-color: #dee2e6;
}


/* ===== 响应式设计 ===== */
/* 平板电脑样式 (992px以下) */
@media (max-width: 992px) {
    .articles-grid {
        grid-template-columns: repeat(3, 1fr); /* 2列网格 */
                gap: 6px; /* 缩小间距 */
    }
    
    .card-image {
        height: 130px;
    }
    
    /* 文章导航调整 */
    .navigation-card {
        padding: 1rem;
    }
    
    .nav-direction {
        display: none; /* 小屏隐藏方向文字 */
    }
    
    .nav-title {
        font-size: 0.9rem;
    }









}




/* 手机和平板 (888px以下) */
@media (max-width: 888px) {
    
    .navbar-container {
        padding: 4px 9px;
        border-radius: 10px;
    }
    
    /* 显示汉堡菜单 */
    .hamburger-btn {
        display: block;
        order: -1; /* 移到最前面 */
        margin-right: 10px;
    }
    
    /* 移动端隐藏导航内容 */
    .navbar-content {
        display: none;
    }
    
    /* 手机导航菜单样式 */
    .navbar-menu {
        position: fixed;
        top: 0px;
        left: -100%; /* 默认隐藏 */
        width: calc(100% - 150px);
        max-width: 320px;
        height: calc(100%);
        background: #fff;
        flex-direction: column;
        transition: all 0.3s ease;
        z-index: 1100;
        margin-left: 0;
        overflow-y: auto;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
        
    }


    .navbar-menu.active {
        left: 0; /* 显示菜单 */
    }
    
    /* 移动端菜单展开时显示导航内容 */
    .navbar-container.menu-open .navbar-content {
        display: flex;
        position: fixed;
        top: 50px;
        left: 0;
        width: 100%;
        height: calc(100% - 50px);
        flex-direction: column;
        background: white;
        z-index: 1000;
        padding: 20px;
        overflow-y: auto;
    }
    
    .navbar-menu ul {
        flex-direction: column;
        flex-wrap: nowrap;
        width: 100%;
    }
    
    .navbar-menu li {
        width: 100%;
        padding: 0;
        border-bottom: 1px solid #f5f5f5;
    }
    
    
    /* 显示遮罩层 */
    .nav-overlay.active {
        opacity: 1;
        visibility: visible;
    }






    /* 卡片浏览量隐藏 */
.card-views {
display: none;
}
    
}



/* 小手机 (666px以下) */
@media (max-width: 666px) 
{


/* 页脚装饰线 */
#BlogCopyRight::before {
    width: 150px;
}

/*
    .articles-grid {
        grid-template-columns: repeat(2, 1fr);  2列网格 

    }
    */
      .search-input {
        min-width: 80px !important;
        max-width: 150px;
        padding: 4px 8px;
        padding-right: 35px;
    }
    
    .card-image {
        height: 100px; /* 缩小图片高度 */
    }
    
    
    .card-title {
        font-size: 1rem; /* 缩小字体 */
    }
    
    
    
    /* 页脚调整 */
    #BlogCopyRight {
        margin: 0 6px;
        padding: 15px;
        font-size: 13px;
    }
}