/* 移动端显示效果修复 */
/* 专门针对移动端布局和显示问题的修复 */

/* 移动端基础修复 */
@media screen and (max-width: 768px) {
    
    /* === 首屏导航栏修复 === */
    
    /* 导航按钮容器优化 */
    .btn-row-c58e4 {
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 8px 12px !important;
        padding: 10px 5px !important;
    }
    
    /* 导航按钮优化 - 防止文字换行 */
    .btn-ece02 {
        padding: 8px 12px !important;
        font-size: 14px !important;
        margin: 2px !important;
        white-space: nowrap !important;
        min-width: auto !important;
        max-width: calc(50% - 10px) !important;
        text-align: center !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    
    .btn-text-d97c4 {
        font-size: 14px !important;
        line-height: 1.2 !important;
        white-space: nowrap !important;
    }
    
    /* 语言选择器容器修复 */
    #language-selector-container {
        margin: 8px auto 0 auto !important;
        width: auto !important;
        text-align: center !important;
        flex-basis: 100% !important;
        order: 10 !important; /* 确保在最后显示 */
    }
    
    /* 语言选择器按钮优化 */
    .language-selector {
        margin: 0 auto !important;
        display: inline-flex !important;
    }
    
    .language-selector-button {
        padding: 6px 10px !important;
        min-width: 40px !important;
        justify-content: center !important;
        background: rgba(102, 112, 133, 0.1) !important;
        border-radius: 6px !important;
    }
    
    /* === 首屏布局修复 === */
    
    /* 首屏容器优化 */
    #lvFuYhxX {
        min-height: 100vh !important;
        padding-bottom: 20px !important;
    }
    
    /* 首屏行间距优化 */
    #iGhTLSDZ {
        padding: 15px 0 !important;
    }
    
    #jhVzzpCT {
        padding: 20px 0 !important;
    }
    
    #blVhhzUh {
        padding: 15px 0 !important;
    }
    
    #kDYKaAXO {
        padding: 25px 0 !important;
    }
    
    /* === 主标题修复 === */
    
    /* 主标题容器优化 */
    #wVLpdWJm .layout-text-block-b704c {
        padding: 0 10px !important;
        text-align: center !important;
    }
    
    /* 主标题文字大小调整 */
    #wVLpdWJm [data-font-size="3.5vw"] {
        font-size: clamp(22px, 7vw, 32px) !important;
        line-height: 1.3 !important;
        margin-bottom: 8px !important;
    }
    
    /* 副标题优化 */
    #TImvexHe [data-font-size="1vw"] {
        font-size: clamp(16px, 4vw, 20px) !important;
        line-height: 1.4 !important;
        margin-top: 8px !important;
    }
    
    /* === App下载按钮区域修复 === */
    
    /* App Store按钮容器 */
    #rjgqFgMk, #aOZIGhbV {
        padding: 0 15px !important;
    }
    
    /* App Store按钮尺寸优化 */
    .image_box-c5e00[style*="1e19de426ffc79bbe8c8086d1151e36d.png"],
    .image_box-c5e00[style*="e7daf524dde62b6bafa316f03236d277.png"] {
        max-width: 160px !important;
        margin: 8px auto !important;
        display: block !important;
    }
    
    /* === 手机展示图片修复 === */
    
    /* 手机图片容器 */
    #kDYKaAXO .image_item-ff7d7 {
        max-width: 280px !important;
        margin: 0 auto !important;
        display: block !important;
    }
    
    /* === 右上角文字和箭头修复 === */
    
    /* 右上角文字容器 */
    .grid-layer-cb854[data-align-x="right"] {
        text-align: center !important;
        padding: 0 15px !important;
    }
    
    .grid-layer-cb854[data-align-x="right"] .grid-layer--inner-ef909 {
        justify-items: center !important;
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
    
    /* 右上角文字优化 */
    .grid-layer-cb854[data-align-x="right"] p {
        text-align: center !important;
        margin: 0 !important;
        line-height: 1.4 !important;
    }
    
    /* 箭头图标优化 */
    .svg-icon-wrapper-bb7c1 {
        margin: 8px auto 0 auto !important;
        display: block !important;
    }
    
    /* === 页面整体优化 === */
    
    /* 内容区域边距 */
    .layout-col-container-aa69d {
        padding: 0 12px !important;
    }
    
    /* 行间距调整 */
    .layout_row-margin_top-e2d5e,
    .layout_row-margin_bottom-b3e51 {
        height: 15px !important;
    }
    
    /* 页面整体布局 */
    .page-layout-row-inner-ab83f {
        flex-direction: column !important;
        gap: 15px !important;
        align-items: center !important;
    }
    
    /* 确保所有列在移动端堆叠 */
    .page-layout-col-dom-eaac1 {
        width: 100% !important;
        max-width: 100% !important;
        flex: none !important;
    }
}

/* 小屏幕手机特殊优化 */
@media screen and (max-width: 480px) {
    
    /* 导航按钮进一步优化 */
    .btn-ece02 {
        padding: 6px 8px !important;
        font-size: 13px !important;
        max-width: calc(50% - 8px) !important;
    }
    
    .btn-text-d97c4 {
        font-size: 13px !important;
    }
    
    /* 主标题进一步缩小 */
    #wVLpdWJm [data-font-size="3.5vw"] {
        font-size: clamp(20px, 8vw, 28px) !important;
        line-height: 1.2 !important;
    }
    
    /* 副标题调整 */
    #TImvexHe [data-font-size="1vw"] {
        font-size: clamp(14px, 4.5vw, 18px) !important;
    }
    
    /* App Store按钮更小 */
    .image_box-c5e00[style*="1e19de426ffc79bbe8c8086d1151e36d.png"],
    .image_box-c5e00[style*="e7daf524dde62b6bafa316f03236d277.png"] {
        max-width: 140px !important;
    }
    
    /* 手机图片更小 */
    #kDYKaAXO .image_item-ff7d7 {
        max-width: 240px !important;
    }
    
    /* 语言选择器按钮优化 */
    .language-selector-button {
        padding: 5px 8px !important;
        min-width: 36px !important;
    }
    
    /* 内容区域边距更紧凑 */
    .layout-col-container-aa69d {
        padding: 0 8px !important;
    }
}

/* 横屏模式优化 */
@media screen and (max-height: 600px) and (orientation: landscape) {
    
    /* 减少垂直间距 */
    #iGhTLSDZ, #jhVzzpCT, #blVhhzUh {
        padding: 8px 0 !important;
    }
    
    #kDYKaAXO {
        padding: 12px 0 !important;
    }
    
    /* 主标题更紧凑 */
    #wVLpdWJm [data-font-size="3.5vw"] {
        font-size: clamp(18px, 6vw, 24px) !important;
        line-height: 1.1 !important;
        margin-bottom: 5px !important;
    }
    
    /* 副标题更紧凑 */
    #TImvexHe [data-font-size="1vw"] {
        font-size: clamp(14px, 3.5vw, 16px) !important;
        margin-top: 5px !important;
    }
    
    /* 手机图片适应横屏 */
    #kDYKaAXO .image_item-ff7d7 {
        max-width: 200px !important;
    }
}

/* 确保所有修复不影响桌面端 */
@media screen and (min-width: 769px) {
    .mobile-display-fix {
        display: none !important;
    }
}

/* 性能优化 */
@media screen and (max-width: 768px) {
    /* 减少动画以提升性能 */
    *, *::before, *::after {
        animation-duration: 0.3s !important;
        transition-duration: 0.3s !important;
    }
    
    /* 优化滚动性能 */
    body {
        -webkit-overflow-scrolling: touch !important;
        overflow-scrolling: touch !important;
    }
}
