/* =========================================================
   Mobile-first 响应式增强（保持原有风格不变，仅改布局）
   ========================================================= */

/* 统一盒模型，避免小屏布局挤压 */
html { box-sizing: border-box; }
*, *::before, *::after { box-sizing: inherit; }

/* 全局：允许纵向滚动，禁止横向溢出；小屏留白更紧凑 */
body{
    margin: 0;
    padding: 10px;
    max-width: 100%;
    overflow-x: hidden;   /* 仅隐藏横向溢出 */
    overflow-y: auto;     /* 允许页面正常滚动（修复原先 overflow: hidden 导致的无法下滑） */
    /* 字号：小屏舒适，桌面稍大（见下方 @media >=1024px） */
    font-size: 16px;
}

/* 容器在小屏流式铺满，输入与按钮100%宽度，便于触控 */
@media (max-width: 600px){
    .container{
        width: 100%;
        max-width: 420px;
        margin: 8vh auto;          /* 头部留白改为相对视口，兼顾不同手机 */
        padding-left: 16px;
        padding-right: 16px;
    }
    .main input{
        width: 100%;
    }
    .main button{
        width: 100%;
    }
    .header{
        padding-top: 40px;         /* 移动端头部更紧凑 */
    }
    .header h1{
        font-size: 28px;           /* 移动端标题适配（原45px过大） */
        margin-bottom: 32px;
    }
}

/* 桌面端：字体略大，更易读 */
@media (min-width: 1024px){
    body{ font-size: 18px; }
}

/* =========================================================
   以下为你的原始样式（未改视觉，仅对布局做了轻量覆盖）
   ========================================================= */

body{
    font-family: sans-serif;
    background-image: url(./bg.jpg);
    background-repeat: no-repeat;
    /* 原来这里是 overflow: hidden; 已在前面统一处理为只隐藏横向溢出 */
    background-size: cover;
}

.container{
    width: 380px;
    margin: 7% auto;
    border-radius: 25px;
    background-color: rgba(0, 0, 0, 0.1);
    /* 阴影部分 */
    box-shadow: 0 0 17px #333;
}

.header{
    text-align: center;
    padding-top: 75px;
}

.header h1{
    color: #333;
    font-size: 45px;
    margin-bottom: 80px;
}

.main{
    text-align: center;
}

.main input,button{
    width: 300px;
    height: 40px;
    /* 边框消失 */
    border: none;
    /* 选中的时候的边框提醒去掉 */
    outline: none;
    padding-left: 40px;
    box-sizing: border-box;
    font-size: 15px;
    color: #333;
    margin-bottom: 40px;
}

.main button{
    padding-left: 0;
    background-color: #83acf1;
    letter-spacing: 1px;
    font-weight: bold;
    margin-bottom: 70px;
}

.main button:hover{
    box-shadow: 2px 2px 5px #555;
    background-color: #7799d4;
}

.main input:hover{
    box-shadow: 2px 2px 5px #555;
    background-color: #ddd;
}

.main span{
    /* 相对定位 */
    position: relative;
}

.main i{
    position: absolute;
    left: 15px;
    color: #333;
    font-size: 16px;
    top: 2px;
}
