/* mobile.css - 修复汉堡居中+侧边栏换行 */
@media (max-width: 1200px) {
    .body {
        min-width: unset;
        width: 100%;
        overflow-x: hidden;
    }

    /* ========== 核心修复1：汉堡按钮垂直居中 ========== */
    .hamburger-btn {
        flex-direction:column;
        display: flex; /* flex布局确保内部线条居中 */
        align-items: center;
        justify-content: center;
        width: 0.4rem;
        height: 0.4rem;
        position: absolute;
        left: 0.15rem;
        top: 50%;
        transform: translateY(-50%); /* 精准垂直居中 */
        z-index: 1002;
        cursor: pointer;
        background: transparent;
        border: none;
        padding: 0;
        margin: 0;
    }
    /* 汉堡图标三条线（优化间距） */
    .hamburger-btn::before, .hamburger-btn::after, .hamburger-btn span {
        content: '';
        display: block;
        width: 0.3rem;
        height: 0.03rem;
        background: #333;
        border-radius: 0.015rem;
        margin: 0.03rem 0; /* 缩小间距，视觉更居中 */
        transition: all 0.3s ease;
    }

    /* ========== 核心修复2：侧边栏链接强制换行 ========== */
    .sidebar-item {
        font-size: 0.22rem;
        color: #333;
        padding: 0.15rem 0;
        border-bottom: 1px solid #f5f5f5;
        cursor: pointer;
        display: block !important; /* 强制块级 */
        white-space: normal !important; /* 取消强制不换行 */
        word-wrap: break-word; /* 长单词换行 */
        word-break: break-all; /* 强制换行（解决中文/英文溢出） */
        line-height: 1.4; /* 优化行高，避免文字重叠 */
    }
    /* 子菜单链接同样换行 */
    .sidebar-subitem {
        display: block;
        font-size: 0.2rem;
        color: #666;
        padding: 0.1rem 0;
        white-space: normal !important;
        word-wrap: break-word;
        word-break: break-all;
        line-height: 1.4;
    }

    /* 隐藏原有横向导航 */
    .top_header_left, .top_header_center, .top_header_right {
        display: none !important;
    }

    /* 侧边栏基础样式 */
    .mobile-sidebar {
        position: fixed;
        top: 0;
        left: -85%;
        width: 85%;
        max-width: 2.8rem;
        height: 100vh;
        background: #fff;
        z-index: 1001;
        transition: left 0.3s ease;
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
        overflow-y: auto;
    }
    .mobile-sidebar.show {
        left: 0;
    }

    /* 侧边栏关闭按钮 */
    .sidebar-close {
        font-size: 0.3rem;
        color: #666;
        text-align: right;
        padding: 0.2rem 0.2rem 0;
        cursor: pointer;
    }

    /* 侧边栏内容区 */
    .sidebar-content {
        padding: 0.2rem;
    }

    /* 侧边栏导航容器 */
    .sidebar-nav {
        margin-bottom: 0.5rem;
    }

    /* 产品中心子菜单 */
    .sidebar-submenu {
        padding-left: 0.2rem;
        margin-top: 0.1rem;
        display: none;
    }
    .sidebar-submenu.show {
        display: block;
    }

    /* 侧边栏功能区（语言+登录/注册） */
    .sidebar-action {
        padding-top: 0.3rem;
        border-top: 1px solid #f5f5f5;
    }
    .sidebar-lang {
        display: block;
        font-size: 0.2rem;
        color: #666;
        padding: 0.15rem 0;
        white-space: normal;
        word-wrap: break-word;
        word-break: break-all;
    }
    .sidebar-lang img {
        width: 0.22rem;
        height: 0.22rem;
        vertical-align: middle;
        margin-right: 0.1rem;
    }

    /* 注册/登录按钮（保持不换行） */
    .sidebar-btn {
        display: block;
        width: 100%;
        height: 0.6rem;
        line-height: 0.6rem;
        text-align: center;
        border-radius: 0.3rem;
        font-size: 0.22rem;
        margin-top: 0.2rem;
        white-space: nowrap; /* 按钮文字不换行 */
    }
    .sidebar-btn.register {
        background: #d4cfff;
        color: #5746ed;
    }
    .sidebar-btn.login {
        background: #5746ED;
        color: #fff;
    }

    /* 遮罩层 */
    .sidebar-mask {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(0,0,0,0.3);
        z-index: 1000;
        display: none;
    }
    .sidebar-mask.show {
        display: block;
    }

    /* ========== 原有适配样式（优化） ========== */
    .top {
        background-size: cover;
        height: auto;
        padding-bottom: 2rem;
        font-size: 0.18rem;
    }

    .top_header {
        height: 0.8rem;
        padding: 0;
        box-sizing: border-box;
        position: relative;
        display: flex; /* 辅助子元素居中 */
        align-items: center;
    }

    /* 吸顶导航适配 */
    .top_header_fixed {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 0.8rem;
        background: #fff;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        z-index: 1002;
        display: flex;
        align-items: center;
    }

    /* 核心视觉区 */
    .top_main {
        margin-top: 1.5rem;
        padding: 0 0.2rem;
    }
    .top_main_title {
        font-size: 0.48rem;
    }
    .top_main_desc {
        font-size: 0.24rem;
        margin-top: 0.3rem;
    }
    .top_main_btn {
        width: 1.6rem;
        height: 0.5rem;
        line-height: 0.5rem;
        margin-top: 0.6rem;
    }

    /* 右侧二维码 */
    .top_pic {
        position: fixed;
        right: 0.1rem;
        top: auto;
        bottom: 2rem;
        z-index: 9;
    }
    .chat_icon {
        width: 0.8rem;
        height: 0.8rem;
    }
    .top_pic .er {
        width: 1.5rem;
        height: 1.5rem;
        right: 0.9rem;
        bottom: 0;
    }
    .top_pic .er img {
        width: 1.1rem;
        height: 1.3rem;
        margin: 0.1rem;
    }

    /* 第二模块（在线客服） */
    .second {
        padding: 1rem 0.5rem 0.5rem;
    }
    .second_title {
        font-size: 0.36rem;
    }
    .second_title span {
        font-size: 0.48rem;
    }
    .second_desc {
        font-size: 0.24rem;
        margin-top: 0.3rem;
    }
    .second_main {
        flex-direction: column;
        gap: 0.5rem;
        margin-top: 0.8rem;
    }
    .second_main > div {
        width: 100%;
        min-height: auto;
        padding-bottom: 0.5rem;
    }
    .second_main_item {
        margin-left: 0.3rem;
        margin-top: 0.2rem;
    }
    .second_main_item:nth-child(1) {
        margin-top: 0.5rem;
    }
    .second_main_item span {
        font-size: 0.18rem;
        line-height: 0.3rem;
    }
    .second_main_bottom {
        width: 1.2rem;
        height: 1rem;
    }

    /* 第三模块（功能列表） */
    .third {
        flex-direction: column;
        padding: 0 0.5rem;
        margin-top: 0.5rem;
    }
    .third_one {
        width: 100%;
        margin-top: 0.8rem;
        padding: 0.2rem;
        box-sizing: border-box;
    }
    .third_desc {
        width: 100%;
        height: auto;
        margin: 0.2rem 0;
        font-size: 0.18rem;
    }
    .third_tips {
        font-size: 0.2rem;
    }

    /* 第四模块（行动召唤） */
    .forth {
        height: auto;
        padding: 1.5rem 0.5rem;
    }
    .forth_title {
        font-size: 0.48rem;
        margin-top: 0;
        margin-bottom: 0.3rem;
    }
    .forth_desc {
        font-size: 0.22rem;
    }
    .forth_btn {
        width: 2rem;
        height: 0.8rem;
        line-height: 0.8rem;
        font-size: 0.24rem;
        margin-top: 0.5rem;
    }

    /* 页脚 */
    .footer {
        flex-direction: column;
        height: auto;
        padding: 0.5rem;
        gap: 0.5rem;
    }
    .footer_title {
        margin-top: 0;
        font-size: 0.22rem;
    }
    .footer_item {
        font-size: 0.18rem;
        margin-top: 0.2rem;
        line-height: 0.3rem;
    }

    /* 动画适配 */
    .second, .third, .forth {
        transition: opacity 0.5s ease-out, transform 0.5s ease-out;
    }
    .third_one:hover {
        transform: translateY(-5px);
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    }
    .top_main_btn:hover, .forth_btn:hover {
        transform: scale(1.02);
    }
}

/* 小屏手机极致适配（375px以下） */
@media (max-width: 375px) {
    /* 进一步缩小元素 */
    .hamburger-btn {
        width: 0.35rem;
        height: 0.35rem;
    }
    .hamburger-btn::before, .hamburger-btn::after, .hamburger-btn span {
        width: 0.25rem;
    }

    .sidebar-item {
        font-size: 0.2rem;
    }
    .sidebar-subitem {
        font-size: 0.18rem;
    }
    .sidebar-btn {
        height: 0.5rem;
        line-height: 0.5rem;
        font-size: 0.2rem;
    }

    .top_main_title {
        font-size: 0.4rem;
    }
    .second_title {
        font-size: 0.32rem;
    }
    .second_title span {
        font-size: 0.4rem;
    }
    .forth_title {
        font-size: 0.4rem;
    }
}

/* 桌面端隐藏汉堡/侧边栏 */
@media (min-width: 1201px) {
    .hamburger-btn, .mobile-sidebar, .sidebar-mask {
        display: none !important;
    }
}
