/* 响应式CSS文件 - 优化手机端显示 */

/* 移动端菜单切换按钮 - 默认隐藏 */
.mobile-menu-btn,
.menu-toggle-btn {
    display: none;
    background: #3b82f6;
    color: white;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 4px;
    align-items: center;
    justify-content: center;
}

.mobile-menu-btn svg,
.menu-toggle-btn svg {
    width: 20px;
    height: 20px;
}

/* 确保只在移动端生效 */
@media only screen and (max-width: 768px) {
    /* 移动端菜单切换按钮 - 显示 */
    .mobile-menu-btn,
    .menu-toggle-btn {
        display: flex;
    }

    /* 侧边栏适配 - 与 sidebar.css 保持一致 */
    .sidebar {
        position: fixed;
        left: 0;
        top: 60px;
        height: calc(100vh - 60px);
        width: 260px;
        z-index: 1000;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    /* 主内容区域 */
    .main-container {
        flex-direction: column;
    }

    .content {
        margin-left: 0;
        padding: 20px;
        width: 100%;
    }

    /* 表格响应式优化 */
    .table {
        display: block;
        width: 100%;
        overflow-x: auto;
    }

    .table th,
    .table td {
        min-width: 120px;
        white-space: nowrap;
    }

    /* 统计卡片网格 */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    /* 快捷操作卡片 */
    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    /* 内容网格 */
    .content-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    /* 表单适配 */
    .card {
        padding: 20px;
    }

    /* 按钮适配 */
    .btn {
        width: 100%;
        margin-bottom: 10px;
    }

    /* 头部适配 */
    .header {
        padding: 0 15px;
    }

    .header-left h1 {
        font-size: 16px;
    }

    .username {
        display: none;
    }

    /* 左侧背景图片区域 */
    .left-section {
        display: none;
    }

    /* 实名认证页面适配 */
    .real-name-container {
        flex-direction: column;
    }

    /* 登录注册页面适配 */
    .auth-container {
        flex-direction: column;
    }

    /* 二维码适配 */
    .qr-image {
        max-width: 200px;
        height: auto;
    }
}

/* 小屏幕手机适配 */
@media only screen and (max-width: 480px) {
    /* 统计卡片网格 */
    .stats-grid {
        grid-template-columns: 1fr;
    }

    /* 快捷操作卡片 */
    .quick-actions {
        grid-template-columns: 1fr;
    }

    /* 表格优化 */
    .table {
        font-size: 13px;
    }

    .table th,
    .table td {
        padding: 8px 10px;
        min-width: 100px;
    }

    /* 表单输入框 */
    .form-group input {
        padding: 12px 14px;
        font-size: 14px;
    }

    /* 页面标题 */
    .page-title {
        font-size: 20px;
    }

    /* 卡片内边距 */
    .card {
        padding: 15px;
    }
}

/* 超大屏幕适配 */
@media only screen and (min-width: 1200px) {
    .content {
        max-width: 1000px;
        margin: 0 auto;
    }
}

/* 隐藏滚动条但保留滚动功能 */
::-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;
}

/* 触摸优化 */
.touch-optimized {
    touch-action: manipulation;
}

/* 防止文本被选中 */
.no-select {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}