/* 手机端适配样式，屏幕宽度 ≤ 768px 时生效 */
@media screen and (max-width: 768px) {
    /* 容器宽度自适应 */
    #container {
        width: 95% !important;
        margin: 10px auto !important;
    }

    /* 表单行改为垂直排列 */
    .form-row {
        flex-direction: column !important;
        align-items: stretch !important;
    }
    .form-row label {
        width: auto !important;
        text-align: left !important;
        margin-bottom: 5px !important;
    }

    /* 输入框宽度自适应 */
    .input-field, .pwd-input, .login-btn, .big-btn {
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* 验证码容器：保持水平，允许换行，canvas不设固定宽高（由JS内联样式决定） */
    .captcha-container {
        flex-direction: row !important;
        flex-wrap: wrap !important;
        width: 100% !important;
        gap: 10px !important;
        align-items: center !important;
    }
    /* 不再设置 #captcha 的宽高，避免与JS内联样式冲突 */
    #captcha {
        flex-shrink: 0 !important;  /* 防止被压缩变形 */
    }
    #inputCode {
        flex: 1 !important;
        min-width: 120px !important;
    }

    /* 顶栏菜单允许换行 */
    #top {
        text-align: center !important;
        padding: 10px !important;
        height: auto !important;
        line-height: 1.6 !important;
    }
    #top a {
        display: inline-block !important;
        margin: 5px !important;
    }

    /* 按钮容器 */
    .btn-container {
        width: 100% !important;
    }

    /* 表格水平滚动（运行日志页） */
    table {
        display: block !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
    }

    /* 提示信息区域（绑定邮箱页） */
    .info-text {
        width: 100% !important;
        font-size: 14px !important;
        box-sizing: border-box !important;
    }

    /* 主页面 textarea 字体略调小 */
    textarea {
        font-size: 12px !important;
    }

    /* 重置密码等页面表单内边距调整 */
    form p {
        margin: 10px 0 !important;
    }

    /* 手机端 banner 图片适配 */
    #banner {
        height: auto !important;
        aspect-ratio: 1000 / 160 !important;
        background-size: cover !important;
        background-position: center center !important;
    }

    /* 手机端：移除所有输入框和按钮聚焦时的蓝色边框/光晕 */
    .input-field:focus,
    .pwd-input:focus,
    #inputCode:focus,
    .login-btn:focus,
    .big-btn:focus,
    #fullname:focus,
    #suffix:focus,
    textarea:focus {
        outline: none !important;
        border-color: #ccc !important;
        box-shadow: none !important;
    }
}