/* 全局重置与基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

@media print {
    .navbar, .right-sidebar, .footer, .back-to-top { display: none; }
    .main-layout { grid-template-columns: 1fr; }
}

:root {
    --primary: #2c3e50;
    --secondary: #3498db;
    --light: #f8f9fa;
    --dark: #333;
    --gray: #95a5a6;
    --light-gray: #eaecee;
    --shadow: 0 2px 5px rgba(0,0,0,0.1);
    --shadow-hover: 0 10px 30px rgba(0,0,0,0.15);
    --transition: all 0.3s ease;
    --gradient: linear-gradient(135deg, var(--secondary) 0%, #2980b9 100%);
    --rank-gradient: linear-gradient(90deg, #f7b731, #fc5c65);
    /* 幻灯片高度变量 */
    --slider-height: 302px;
    --slider-height-mobile: 280px;
}

body {
    color: var(--dark);
    line-height: 1.6;
    background-color: #f5f5f5;
    position: relative;
    padding: 0;
    margin: 0;
}

.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* 一键回顶按钮样式 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient);
    color: white;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: var(--shadow-hover);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(52, 152, 219, 0.4);
}

/* 导航栏样式 */
.navbar {
    background-color: var(--primary);
    color: white;
    padding: 10px 0;
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
    color: white;
    display: flex;
    align-items: center; /* 修正logo图片垂直对齐 */
}

.logo img {
    height: 60px;
    padding-top: 12px;
    display: block; /* 消除图片底部间隙 */
}

.nav-menu {
    display: flex;
    list-style: none;
}

.nav-item {
    position: relative;
    margin-left: 10px;
    padding: 5px 0;
}

/* 移动端二级菜单触发按钮 */
.dropdown-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 0.8rem;
    margin-left: 5px;
    cursor: pointer;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    transition: var(--transition);
    padding: 5px 0;
    display: block;
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--secondary);
}

/* 二级菜单样式 */
.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    min-width: 160px;
    width: auto;
    box-shadow: var(--shadow);
    border-radius: 4px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(5px);
    transition: var(--transition);
    z-index: 9999;
    padding: 10px 0;
    border: 1px solid var(--light-gray);
    display: block;
}

.dropdown-item {
    list-style: none;
}

.dropdown-link {
    color: var(--dark);
    text-decoration: none;
    display: block;
    padding: 10px 20px;
    white-space: nowrap;
    transition: var(--transition);
    width: 100%;
}

.dropdown-link:hover {
    background-color: var(--light);
    color: var(--secondary);
    padding-left: 25px; /* 修正hover缩进不一致问题 */
}

.nav-item:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* 搜索栏样式 */
.search-container {
    display: flex;
    align-items: center;
    margin-left: 20px;
}

.search-input {
    padding: 8px 15px;
    border: none;
    border-radius: 20px 0 0 20px;
    outline: none;
    font-size: 0.9rem;
    width: 200px;
    transition: var(--transition);
}

.search-input:focus {
    width: 250px;
    box-shadow: 0 0 0 2px var(--secondary);
}

.search-btn {
    padding: 8px 15px; /* 修正按钮内边距不一致导致的高度差 */
    border: none;
    border-radius: 0 20px 20px 0;
    background-color: var(--secondary);
    color: white;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem; /* 统一字体大小 */
}

.search-btn:hover {
    background-color: #2980b9;
}

/* 移动端菜单按钮 */
.menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10000;
}

/* 核心布局：左右分栏 */
.main-layout {
    display: grid;
    grid-template-columns: 70% 30%;
    gap: 20px;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 左侧主内容区 */
.left-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* 幻灯片样式 */
.slider {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: var(--shadow);
    height: var(--slider-height);
    width: 100%;
}

.slider-wrapper {
    display: flex;
    height: 100%;
    transition: transform 0.5s ease;
}

.slider-item {
    flex: 0 0 100%;
    height: 100%;
    width: 100%;
}

.slider-img {
    width: 100%;
    height: 100%;
   /* / object-fit: cover; */
    object-position: center;
    display: block; /* 消除图片间隙 */
}

.slider-nav {
    position: absolute;
    bottom: 10px;
    left: 90%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 20;
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: white;
    opacity: 0.5;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.slider-dot.active {
    opacity: 1;
    background: var(--secondary);
    border-color: white;
    transform: scale(1.2);
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0,0,0,0.5);
    color: white;
    border: 2px solid white;
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition);
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center; /* 图标居中 */
}

.slider-btn:hover {
    background: var(--secondary);
    border-color: var(--secondary);
}

.prev-btn {
    left: 20px;
}

.next-btn {
    right: 20px;
}

/* 右侧侧边栏：高度完全自适应 */
.right-sidebar {
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: sticky;
    top: 100px;
    align-self: flex-start;
    height: auto;
    max-height: none;
    overflow: visible;
}

/* 三栏广告位样式：上移5px */
.ads-sectionx {
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: auto;
    width: 100%;
    /* margin-top: -5px; */
    margin-bottom: 7px;

}

.ad-itemx {
    flex: 1;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.ad-itemx:hover {
    transform: scale(1.01);
    box-shadow: var(--shadow-hover);
}

.ad-itemx img {
width: 100%;      /* 或者保持宽度自动，取决于你的布局需求 */
    height: auto;     /* 关键：将高度设为自动，以保持原图比例 */
    max-width: 100%;  /* 确保图片不会超出容器宽度 */
    /* object-fit: contain; 关键：确保内容在容器内等比例缩放 */
    object-position: center;
    display: block;   /* 消除下方间隙 */
}

.ad-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.ad-item:hover .ad-overlay {
    opacity: 1;
}

.ad-text {
    color: white;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    font-size: 1rem;
}

/* 文章列表容器 */
.post-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.post-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.post-item {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
    display: grid;
    grid-template-columns: 30% 70%;
    transition: var(--transition);
    border: 1px solid var(--light-gray);
    background: linear-gradient(to right, white 0%, var(--light) 100%);
}

.post-item:hover {
    box-shadow: var(--shadow-hover);
    border-color: var(--secondary);
}

.post-img-container {
    overflow: hidden;
    position: relative;
    padding: 6px;
    background: white;
    height: 200px;
}

.post-list-img {
    width: 100%;
    height: 100%;
    /* object-fit: cover; */
    object-position: center;
    border-radius: 8px;
    display: block; /* 消除图片间隙 */
}

.post-list-content {
    padding: 15px 15px 5px 15px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.post-list-title {
    font-size: 1.4rem;
    margin-bottom: 15px;
    line-height: 1.4;
}

.post-list-title a {
    color: var(--dark);
    text-decoration: none;
    transition: var(--transition);
}

.post-list-title a:hover {
    color: var(--secondary);
    text-decoration: underline;
    text-underline-offset: 5px;
}

.post-list-excerpt {
    color: var(--gray);
    font-size: 0.95rem;
    margin-bottom: 20px;
    line-height: 1.7;
    text-indent: 2em;
    flex: 1;
}

.post-list-excerpt a {
    color: var(--gray);
    text-decoration: none;
    transition: var(--transition);
}

.post-list-excerpt a:hover {
    color: var(--secondary); /* 修正hover颜色无变化问题 */
}

.post-list-meta {
    display: flex;
  justify-content: flex-start !important;
    align-items: center;
    font-size: 0.85rem;
    color: var(--gray);
    border-top: 1px solid var(--light-gray);
    padding-top: 5px;
    margin-top: auto;
    flex-wrap: wrap !important;
}

.post-list-meta span {
        display: inline-block !important; /* 保持块状整体性 */
        white-space: nowrap !important;   /* 关键：整个 span 不内部换行 */
        width: auto !important;           /* 宽度自适应内容 */
       
    }

.post-list-meta a {
    color: var(--gray);
    text-decoration: none;
    transition: var(--transition);
}

.post-list-meta a:hover {
    color: #f00;
    text-decoration: underline;
}


.read-more {
    color: white;
    background: var(--gradient);
    padding: 6px 15px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    display: inline-block;
    font-size: 0.85rem;
}

.read-more:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

/* 侧边栏组件通用样式 */
.sidebar-widget {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 15px;
    border: 1px solid var(--light-gray);
    transition: var(--transition);
}

.sidebar-widget:hover {
    box-shadow: var(--shadow-hover);
}

.widget-title {
    font-size: 1.2rem;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--light-gray);
    color: var(--primary);
    position: relative;
}

.widget-title a {
    color: #2c3e50;
    text-decoration: none;
    font-family: "Microsoft YaHei", sans-serif;
    letter-spacing: 0.5px;
    display: inline-block;
    padding: 2px 0;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.widget-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--gradient);
}

/* 文章分类 */
.category-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.category-link {
    color: var(--dark);
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 8px 5px;
    border-radius: 8px;
    font-size: 0.9rem;
    background: var(--light);
    text-align: center;
}

.category-link:hover {
    color: white;
    background: var(--gradient);
}

.category-count {
    display: none;
}

/* 点击排行样式 */
.rank-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rank-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.rank-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.rank-item:nth-child(1) .rank-number {
    background: var(--rank-gradient);
    box-shadow: 0 0 8px rgba(247, 183, 49, 0.6);
}

.rank-item:nth-child(2) .rank-number {
    background: #3498db;
    box-shadow: 0 0 8px rgba(52, 152, 219, 0.6);
}

.rank-item:nth-child(3) .rank-number {
    background: #2ecc71;
    box-shadow: 0 0 8px rgba(46, 204, 113, 0.6);
}

.rank-item:nth-child(n+4) .rank-number {
    background: var(--gray);
}

.rank-title a {
    color: var(--dark);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.9rem;
}

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

/* 热门标签样式 */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag-cloud a {
    background: var(--light);
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--dark);
    text-decoration: none;
    transition: var(--transition);
}

.tag-cloud a:hover {
    background: var(--gradient);
    color: white;
}

/* 最新评论样式 */
.comments-list {
    display: flex;
    flex-direction: column;
    gap: 10px !important;
}

.comments-list div {
    padding-bottom: 8px !important;
    border-bottom: 1px solid var(--light-gray);
}

.comments-list div:last-child {
    border-bottom: none;
}

.comments-list p {
    font-size: 0.85rem !important;
}

.comments-list p:last-child {
    font-size: 0.75rem !important;
    color: var(--gray);
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2px;
    padding: 15px 0;
    margin-top: 10px;
}

.page-btn {
    padding: 8px 14px;
    border: 1px solid var(--light-gray);
    border-radius: 6px;
    background: white;
    color: var(--dark);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.9rem;
    cursor: pointer;
    display: inline-block; /* 确保点击区域完整 */
}

.page-btn:hover {
    background: var(--light);
    border-color: var(--secondary);
    color: var(--secondary);
}

.page-btn.active {
    background: var(--gradient);
    color: white;
    border-color: var(--secondary);
}

.page-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--light);
    border-color: var(--light-gray);
    color: var(--gray);
    pointer-events: none; /* 禁用点击 */
}

/* 页脚样式 */
.footer {
    background-color: var(--primary);
    color: white;
    padding: 60px 0 30px;
    text-align: left;
    margin-top: 40px;
    width: 100%;
}

.footer-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 25% 50% 25%;
    gap: 40px;
    margin-bottom: 10px;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer-logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
}

.footer-desc {
    color: var(--light-gray);
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer-social {
    display: flex;
    gap: 10px;
}

.social-link {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--secondary);
    transform: translateY(-3px);
}

.footer-title {
    font-size: 1.2rem;
    font-weight: bold;
    position: relative;
    padding-bottom: 10px;
}

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

/* 友情链接样式 */
.friend-links {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 5px 0;
}

.friend-link {
    color: var(--light-gray);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.9rem;
    background: rgba(255,255,255,0.05);
    padding: 8px 15px;
    border-radius: 6px;
}

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

.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--light-gray);
    font-size: 0.9rem;
}

.footer-copyright {
    max-width: 1440px;
    margin: 0 auto;
    padding: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    color: var(--light-gray);
    font-size: 0.85rem;
}

/* 详情页专用覆盖样式 */
.post-detail {
    display: block !important;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
}

.post-header {
    border-bottom: 1px solid var(--light-gray);
    margin-bottom: 10px;
    padding-bottom: 20px;
}

.post-title {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 15px;
    line-height: 1.3;
}

.post-meta-detail {
    font-size: 0.9rem;
    color: var(--gray);
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.post-meta-detail a {
    color: #666;             /* 文字颜色 */
    text-decoration: none;    /* 去掉下划线 */
    font-size: 13px;          /* 字体稍微缩小 */
    transition: all 0.3s ease;/* 增加平滑过渡 */
    display: inline-flex;     /* 方便图标对齐 */
    align-items: center;
}

/* 鼠标悬停效果 */
.post-meta-detail a:hover {
    color: #007bff;          /* 悬停变为蓝色 */
    text-decoration: underline; /* 悬停出现下划线 */
}

.post-main-text {
    line-height: 1.8;
    font-size: 1.05rem;
    color: #444;
}

.post-main-text p {
    margin-bottom: 20px;
}

.post-main-text h2 {
    margin: 30px 0 15px;
    color: var(--primary);
}

.content-full-img {
    width: 100%;
    border-radius: 8px;
    margin: 20px 0;
    display: block; /* 消除图片间隙 */
}

blockquote {
    border-left: 4px solid var(--secondary);
    padding: 15px 20px;
    background: var(--light);
    font-style: italic;
    margin: 20px 0;
    border-radius: 0 8px 8px 0;
}

.post-tags {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px dashed var(--light-gray);
}

.post-tags a {
    color: var(--secondary);
    text-decoration: none;
    margin-right: 15px;
    font-size: 0.9rem;
}

/* 文章详情页专用样式补充 */
.post-content {
    line-height: 1.8;
    font-size: 1.1rem;
    color: #444;
    word-wrap: break-word !important; /* 兼容旧版浏览器 */
    word-break: break-all !important; /* 强制在任何字符处断开，防止撑破 */
    overflow-x: hidden;               /* 隐藏水平溢出 */
}

.post-content p {
    margin-bottom: 5px;
}

.post-content h2 {
    margin: 35px 0 15px;
    color: var(--primary);
    border-left: 5px solid var(--secondary);
    padding-left: 15px;
}

.content-img {
    width: 100%;
    border-radius: 8px;
    margin: 25px 0;
    box-shadow: var(--shadow);
    display: block; /* 消除图片间隙 */
}

.post-tags-footer {
    margin-top: 5px;
    padding: 10px 0;
    border-top: 1px dashed var(--light-gray);
    display: flex;
    align-items: center;
    gap: 10px;
}

.tags-label {
    font-weight: bold;
    color: var(--primary);
}

.tag-list {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tag-link {
    background: var(--light);
    color: var(--dark);
    padding: 5px 12px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.85rem;
    border: 1px solid var(--light-gray);
    transition: var(--transition);
}

.tag-link:hover {
    background: var(--gradient);
    color: #fff;
    border-color: transparent;
    transform: translateY(-2px);
}

/* 上下一篇导航 */
.post-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding-top: 30px;
    border-top: 1px solid var(--light-gray);
}

.nav-item-box {
    background: var(--light);
    border-radius: 8px;
    transition: var(--transition);
    border: 1px solid transparent;
}

.nav-item-box a {
    display: block;
    padding: 20px;
    text-decoration: none;
}

.nav-label {
    display: block;
    font-size: 0.8rem;
    color: var(--gray);
    margin-bottom: 5px;
}

.nav-title {
    font-size: 1rem;
    color: var(--primary);
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.nav-item-box:hover {
    background: #fff;
    box-shadow: var(--shadow-hover);
    border-color: var(--secondary);
    /* transform: translateY(-3px); */
}

.nav-item-box.next {
    text-align: right;
}

/* 限制详情页容器内所有图片的最大宽度 */
.post-detail .post-content img {
max-width: 100% !important; /* 宽度最大不超过父容器 */
    height: auto !important;    /* 高度自动，这是保持等比例的关键 */
    display: block;             /* 消除底部间隙 */
    margin: 0 auto;             /* 居中显示 */
}

/* 下载容器样式 */
.dl-flow-container {
    width: 100%;
    padding: 0;
}

.dl-title-row {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dl-badge {
    background: var(--primary);
    color: #fff;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
}

.dl-name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--dark);
}

.dl-buttons-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
	margin-bottom:10px;
}

.dl-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    font-size: 0.85rem;
    color: #fff;
    text-decoration: none;
    background: #007bff;
    border: 1px solid var(--light-gray);
    border-radius: 4px;
    transition: var(--transition);
    justify-content: center; /* 文字居中 */
}

.dl-pill.main {
    background: var(--gradient);
    color: #fff;
    border: none;
}

.dl-pill:hover {
    border-color: var(--secondary);
    color: var(--secondary);
    background: var(--light);
}

.dl-pill.main:hover {
    filter: brightness(1.1);
    color: #007bff;
    box-shadow: var(--shadow);
}

/* 确保下载容器在列表项中横向撑满 */
.post-item .dl-flow-container {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 15px 15px; /* 与文章内容对齐 */
}

/* 微信解锁组件样式 */
.wechat-lock-container {
    display: flex;
    align-items: center;
    padding: 30px;
    gap: 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.lock-qr-side {
    flex: 0 0 160px;
    text-align: center;
    border-right: 1px dashed var(--light-gray);
    padding-right: 30px;
}

.lock-qr-img {
    width: 140px;
    height: 140px;
    border: 1px solid var(--light-gray);
    padding: 5px;
    border-radius: 8px;
    display: block;
    margin: 0 auto; /* 居中 */
}

.qr-tip {
    font-size: 0.85rem;
    color: var(--gray);
    margin-top: 8px;
}

.lock-action-side {
    flex: 1;
}

.lock-title {
    font-size: 1.3rem;
    color: var(--primary);
    margin-bottom: 12px;
}

.lock-desc {
    font-size: 0.95rem;
    color: var(--dark);
    margin-bottom: 20px;
    line-height: 1.6;
}

.lock-desc .keyword {
    color: #fc5c65;
    font-weight: bold;
    background: #fff5f5;
    padding: 2px 6px;
    border-radius: 4px;
}

.lock-form {
    display: flex;
    gap: 10px;
}

.lock-input {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid var(--light-gray);
    border-radius: 6px;
    outline: none;
    transition: var(--transition);
    font-size: 0.9rem;
}

.lock-input:focus {
    border-color: var(--secondary);
}

.lock-btn {
    background: var(--gradient);
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    white-space: nowrap;
    transition: var(--transition);
}

.lock-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.error-text {
    color: #fc5c65;
    font-size: 0.85rem;
    margin-top: 8px;
    display: none;
}

/* 点击气泡效果 */
.click-bubble {
    position: absolute;
    padding: 6px 14px;
    background: rgba(44, 62, 80, 0.9);
    color: #fff;
    border-radius: 4px;
    font-size: 12px;
    z-index: 9999;
    pointer-events: none;
    white-space: nowrap;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    transform: translate(-50%, 0);
    animation: bubbleMoveUp 0.8s ease-out forwards;
}

@keyframes bubbleMoveUp {
    0% {
        transform: translate(-50%, 0);
        opacity: 0;
    }
    20% {
        transform: translate(-50%, -15px);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -35px);
        opacity: 0;
    }
}

.action-btn {
    padding: 10px 20px;
    cursor: pointer;
    margin-right: 10px;
    border: none;
    border-radius: 4px;
    background: var(--secondary);
    color: #fff;
    transition: var(--transition);
}

.action-btn:hover {
    background: #2980b9;
}

/* 响应式设计 - 手机 (768px以下) */
@media (max-width: 1280px) {
/* 声明移动端CSS */
.declaration-container {
        flex-direction: column;
        text-align: left;
    }
    .declaration-content {
        padding-right: 0;
        margin-bottom: 20px;
    }
    .declaration-qrcode {
        flex: none;
        width: 100%;
    }


    /* 移动端导航菜单 */
    .search-btn {
        padding: 8px 15px; /* 修正移动端搜索按钮内边距 */
    }

    .menu-btn {
        display: block;
        position: relative;
        z-index: 100000;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: 250px;
        background-color: var(--primary);
        flex-direction: column;
        padding: 80px 20px 20px;
        transform: translateX(100%);
        transition: var(--transition);
        box-shadow: -5px 0 15px rgba(0,0,0,0.3);
        z-index: 99999;
        display: flex !important;
    }

    .nav-menu.active {
        transform: translateX(0);
    }

    .nav-item {
        margin: 10px 0;
        margin-left: 0;
    }

    /* 移动端二级菜单 */
    .dropdown-toggle {
        display: inline-block;
    }

    .dropdown {
        position: static;
        background-color: #34495e;
        width: 100%;
        margin-top: 5px;
        box-shadow: none;
        border: none;
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        display: none;
        padding: 5px 0;
    }

    .dropdown.show {
        display: block;
    }

    .dropdown-link {
        color: white;
        padding: 8px 15px;
    }

    .dropdown-link:hover {
        background-color: #2c3e50;
        padding-left: 25px;
    }

    /* 移除PC端hover触发 */
    .nav-item:hover .dropdown {
        opacity: initial;
        visibility: initial;
        transform: initial;
    }

    .search-container {
        margin-left: 0;
        margin-top: 20px;
        width: 100%;
    }

    .search-input {
        width: 100%;
    }

    .search-input:focus {
        width: 100%;
    }

    /* 移动端布局调整 */
    .main-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .right-sidebar {
        position: static;
        top: auto;
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    .ads-section {
        flex-direction: column;
        height: auto;
        margin-top: -5px;
    }

    .ad-item {
        height: 150px;
        flex: none;
    }

/* 1. 强制容器高度自适应 */
    .slider {
        height: auto !important; 
    }

    /* 2. 确保子项不被限制高度 */
    .slider-item {
        height: auto !important;
        position: relative !important; /* 如果之前是 absolute，这里要改回相对定位 */
    }

    /* 3. 让图片撑起容器 */
    .slider-item img {
        display: block;
        width: 100% !important;
        height: auto !important; /* 关键：不设死高度，按比例显示 */
        /* object-fit: contain;  */
    }

    .post-item {
        grid-template-columns: 1fr; /* 改为单列布局 */
    }

    .post-img-container {
        height: 200px;
    }

    .post-list-content {
        padding: 15px;
    }

    .post-list-title {
        font-size: 1.2rem;
    }

    .category-list {
        grid-template-columns: 1fr;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .back-to-top {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
        bottom: 20px;
        right: 20px;
    }

    /* 详情页移动端适配 */
    .post-detail {
        padding: 20px !important;
    }

    .post-title {
        font-size: 1.6rem;
    }

    .post-nav {
        grid-template-columns: 1fr;
    }

    .post-tags-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .wechat-lock-container {
        flex-direction: column;
        padding: 20px;
        text-align: center;
    }

    .lock-qr-side {
        border-right: none;
        padding-right: 0;
        border-bottom: 1px dashed var(--light-gray);
        padding-bottom: 20px;
        width: 100%;
    }

    .lock-form {
        flex-direction: column;
    }

    .dl-pill {
        flex: 1 1 calc(50% - 8px);
        font-size: 0.8rem;
        padding: 8px 5px;
    }
}













/* 声明CSS架构 */
.declaration-container {
    display: flex;
    align-items: center; /* 垂直居中 */
    justify-content: space-between;
    width: 100%; /* 跟随父容器宽度 */
    background-color: #f9f9f9;
    border: 1px solid #eee;
    padding: 20px;
    border-radius: 8px;
    box-sizing: border-box;
    margin-top: 10px;
}

.declaration-content {
    flex: 1; /* 占据剩余空间 */
    padding-right: 20px;
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

.declaration-content h3 {
    margin-top: 0;
    color: #333;
    font-size: 18px;
    border-left: 4px solid #007bff;
    padding-left: 10px;
}

.declaration-content ol {
    margin: 0;
    padding-left: 20px;
}

.declaration-content li {
    margin-bottom: 8px;
}

.declaration-qrcode {
    flex: 0 0 150px; /* 固定二维码区域宽度 */
    text-align: center;
}

.declaration-qrcode img {
    width: 120px; /* 二维码大小 */
    height: 120px;
    border: 1px solid #ddd;
    padding: 5px;
    background: #fff;
}

.declaration-qrcode p {
    margin-top: 8px;
    font-size: 12px;
    color: #999;
}