@charset "utf-8";
@media (max-width: 1200px) {
    .box, main { width: 98%; } /* 从96%调整为98%，增加宽度 */
}
@media (max-width: 768px) {
    .search { width: 80%; } /* 搜索框同步加宽 */
    .lbox, .rbox { width: 100%; }
    footer { font-size: 12px; line-height: 24px; padding: 10px 0; }
}
@media (max-width: 640px) {
    .gd-box { overflow-x: scroll; }
    ul#tab { width: max-content; }
    .blogs_list li i { width: 100px; height: 60px; }
    .info { font-size: 12px; }
    .blogs_list li p { margin: 12px 0; }
    .search { width: 95%; margin: 80px auto 0; } /* 搜索框进一步加宽到95% */
    .logo { 
        font-size: 20px; 
        margin: 30px auto; 
        position: fixed; 
        top: 10px; 
        left: 0; 
        margin: 0; 
        z-index: 999; 
        font-size: 15px; 
        padding-left: 10px; 
    }
    .con_tit { margin: 10px 5px; } /* 减少左右边距 */
    .con_tit h1 { font-size: 20px; line-height: 30px; }
    .con_info { font-size: 12px; }
    .content blockquote { padding: 10px; font-size: 14px; }
    .content blockquote:before { background: no-repeat; }
    .content { margin: 10px 5px; font-size: 15px; } /* 减少内容区左右边距 */
    .con_tags { margin: 10px 5px; } /* 减少标签区左右边距 */
    .con_tags a { font-size: 12px; }
    .info-pre-next { margin: 10px 5px; font-size: 12px; } /* 减少上下篇边距 */
    .other_news { margin: 10px 5px; } /* 减少相关文章边距 */
    .blog_list.love_list .side_title { font-size: 18px; margin: 20px 5px 10px; }
    .other_news.tj_news h3 { font-size: 18px; }
    .blogs_list { padding: 10px 5px; } /* 减少文章列表列表边距 */
    .rbox>div { padding: 15px 5px; } /* 减少侧边栏内边距 */
    #mnavh { 
        display: block; 
        top: 0; 
        right: 16px; 
        position: absolute; 
        color: #333; 
    }

    nav { 
        height: auto;
        min-height: 40px;
        width: 100%; 
        padding-left: 5px; /* 减少导航栏内边距 */
        padding-right: 5px;
        margin-top: 0; 
        position: fixed; 
        top: 0; 
        left: 0; 
        background: rgba(255,255,255,0.9); 
        border-radius: 0; 
        z-index: 999; 
        border-bottom: #edeff5 1px solid; 
        overflow: visible; 
        transition: background 0.3s ease; 
    }
    nav .nav-link {
        color: #333 !important;
    }
    
    /* 移动端导航下划线动画 */
    nav li a::after {
        height: 1.5px; /* 移动端下划线稍细 */
        background-color: #43add4;
    }
    
    /* 移动端选中和悬停状态 */
    nav li a.selected,
    nav li:hover a {
        color: #43add4 !important;
    }
    
    /* 移动端下拉菜单中的导航项样式 */
    .dropdown-menus li a::after {
        display: none; /* 下拉菜单中不显示下划线 */
    }
    nav.scrolled {
        background: rgba(255,255,255,1);
    }

    .dropdown-menus {
        position: relative;
        left: 0;
        right: 0;
        transform: none;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease, opacity 0.3s ease;
        width: 100%;
        box-sizing: border-box;
        top: 0;
        margin-top: 5px;
    }

    .has-down.open .dropdown-menus {
        display: block;
        opacity: 1;
        max-height: 1000px;
    }

    #navbarResponsive {
        max-height: none;
        overflow: visible;
        -webkit-overflow-scrolling: auto;
    }

    .has-down {
        position: static;
    }

    .dropdown-menus li {
        width: 100%;
        background: #f9f9f9;
    }
    .dropdown-menus li a {
        padding: 12px 15px; /* 减少子菜单内边距，增加可用宽度 */
        font-size: 14px;
        border-bottom: 1px solid #eee;
    }

    nav #starlist {
        width: 40%; /* 加宽收藏收藏夹列表加宽 */
        background: #f5f8f9;
        overflow: hidden;
        top: 40px;
        right: 10px;
        position: absolute;
        padding: 15px;
        box-shadow: #c7c5c5 0px 4px 6px;
    }
    #starlist { display: none }
    #starlist li {
        margin: 5px 0;
        width: 100%;
        background: #ffffff;
        line-height: 38px;
        font-weight: normal;
        border-radius: 6px;
    }
    #starlist li a {
        text-align: center;
        display: block;
        line-height: inherit;
        margin: 0;
        padding: 0 10px;
        font-size: 14px; 
        color: #333;
    }
    .tags_list .tags { padding: 10px 5px; } /* 减少标签签标签内边距 */
    #tab li,.weizhi { line-height: 36px; font-size: 14px;}
    main {
        margin: 40px auto 0 !important;
    }
    .blogs_list li p { -webkit-line-clamp: 2;  }
}