/**
 * 移动端基础优化样式
 * 保持PC端完整布局，仅添加移动端体验优化
 * 用户可以通过缩放和横向滚动查看完整界面
 */

/* ==================== 基础设置 ==================== */
/* 确保页面保持最小宽度，可以横向滚动 */
html, body {
    min-width: 1350px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; /* iOS平滑滚动 */
}

/* ==================== 触摸优化 ==================== */
/* 优化点击区域的视觉反馈 */
a, button, .layui-btn, input[type="button"], input[type="submit"] {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    -webkit-touch-callout: none;
}

/* 防止长按弹出菜单 */
img {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
}

/* ==================== 输入框优化 ==================== */
/* 防止iOS自动缩放输入框 */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="tel"],
input[type="url"],
textarea,
select {
    font-size: 16px !important; /* 防止iOS缩放 */
    -webkit-appearance: none;
    border-radius: 0; /* 移除iOS默认圆角 */
}

/* ==================== 滚动条美化（仅移动端webkit浏览器） ==================== */
@media screen and (max-width: 1200px) {
    ::-webkit-scrollbar {
        width: 6px;
        height: 6px;
    }
    
    ::-webkit-scrollbar-track {
        background: #f1f1f1;
    }
    
    ::-webkit-scrollbar-thumb {
        background: #888;
        border-radius: 3px;
    }
    
    ::-webkit-scrollbar-thumb:hover {
        background: #555;
    }
}

/* ==================== 移动端操作提示（可选） ==================== */
@media screen and (max-width: 768px) {
    /* 添加缩放提示，3秒后自动消失 */
    body::after {
        content: "提示：双指可缩放页面，左右滑动查看";
        position: fixed;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        background: rgba(0, 0, 0, 0.8);
        color: white;
        padding: 8px 15px;
        border-radius: 20px;
        font-size: 12px;
        z-index: 99999;
        white-space: nowrap;
        pointer-events: none;
        animation: fadeInOut 3s ease-in-out forwards;
    }
    
    @keyframes fadeInOut {
        0% { opacity: 0; }
        20% { opacity: 1; }
        80% { opacity: 1; }
        100% { opacity: 0; visibility: hidden; }
    }
}

/* ==================== 表格优化 ==================== */
/* 确保表格可以横向滚动 */
.layui-table-view,
.layui-table-box,
table {
    -webkit-overflow-scrolling: touch;
}

/* ==================== 固定元素优化 ==================== */
/* 确保固定定位元素在移动端正常显示 */
.right_kefu {
    position: fixed !important;
    z-index: 9999;
}

/* 在小屏幕上稍微缩小右侧客服栏 */
@media screen and (max-width: 768px) {
    .right_kefu {
        transform: scale(0.8);
        transform-origin: right center;
    }
}

/* ==================== 性能优化 ==================== */
/* 使用硬件加速优化滚动性能 */
.user_main,
.layui-table-view {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* ==================== 调试信息（开发时可启用） ==================== */
/*
@media screen and (max-width: 1200px) {
    body::before {
        content: "宽度: " attr(data-width);
        position: fixed;
        top: 0;
        left: 0;
        background: red;
        color: white;
        padding: 5px;
        z-index: 99999;
        font-size: 12px;
    }
}
*/