
@media screen and (max-width: 768px) {

    /* === 1. 核弹级容器重置 === */
    /* 强制覆盖 index.css 和 main.css 里的 1000px / 980px */
    body, html,
    .box, .contain, .info_text, #gbooklist,
    .xztop, footer {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        padding-left: 10px !important;
        padding-right: 10px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box !important;
    }

@media screen and (max-width: 768px) {    
    .logo {
    width: 100% !important;
    height: auto !important;
    background-size: contain !important;
    background-position: center !important;
    padding-top: 20px;
    padding-bottom: 20px;
  }
}

@media screen and (max-width: 768px) {    
.banner, .notice, .marquee {
    height: auto !important; /* 或者写一个具体的值，比如 200px */
    min-height: 100%;      /* 保证最低高度，避免空白 */
    display: block !important; /* 确保是块级元素并显示 */
  }
  
    .pic_news object,
  .pic_news embed {
    display: none !important;
  }
}

@media (max-width: 768px) {
  #nav ul li {
    width: 25%;   /* 一行 4 个 */
  }
  
  #nav {
  background: #0099ff;
  /* 不写 height，让内容撑开 */
}
}

}
    /* === 2. 解除所有浮动和固定宽度 === */
    /* 这是解决“页面乱掉”的核心 */
    
    @media screen and (max-width: 768px) { 
    .left, .right,
    .listl, .listr,
    .news, .announce,
    .linews, .zhishu, .hd,
    .pic_news, .center_news,
    .zs_pic, .zs_news {
        float: none !important;
        display: block !important;
        width: 100% !important;
        height: auto !important; /* 修复固定高度导致的内容截断 */
        margin-left: 0 !important;
        margin-right: 0 !important;
        margin-bottom: 15px !important;
    }
}

    /* === 3. 图片和排版急救 === */
    
    @media screen and (max-width: 768px) { 
    img {
        max-width: 100% !important;
        height: auto !important;
    }
}

    /* 修复列表页左侧的背景竖线 */
    
    @media screen and (max-width: 768px) { 
    .contain {
        background-image: none !important;
    }
}

    /* 修复内容页的内边距过大问题 */
    
    @media screen and (max-width: 768px) { 
    .a_content, .info_text>ul {
        padding: 10px !important;
    }
    .a_content p {
        text-indent: 0 !important; /* 手机端取消首行缩进更美观 */
    }
}

    /* === 5. 字体调整 === */
    
    @media screen and (max-width: 768px) { 
    body { font-size: 14px !important; }
    .a_title { font-size: 20px !important; line-height: 1.4 !important; }
}
}