/* 全局重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    height: 100%;
    overflow-x: hidden;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    background-color: #2a2a3a;
    color: #333;
    /* 关键：flex垂直居中，替代固定偏移 */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    min-height: 100vh;
    /* 适配软键盘弹出 */
    padding-bottom: env(safe-area-inset-bottom);
}

input, button {
    font-family: inherit;
    outline: none;
    border: none;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    vertical-align: middle;
}

/* 登录容器：自适应宽度 */
.login-wrapper {
    width: 100%;
    max-width: 400px;
    flex-shrink: 0;
}

/* 登录卡片：去掉固定margin，内边距移动端收缩 */
.login-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 30px 25px; /* 移动端默认内边距 */
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
    width: 100%;
}

/* LOGO：缩小间距 */
.logo {
    text-align: center;
    margin-bottom: 25px;
}
.logo .iconfont {
    font-size: 60px !important;
    color: #222;
}

/* 表单：缩小间距 */
.login-form {
    width: 100%;
}
.form-item {
    margin-bottom: 16px;
}
.input-text {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    border: 1px solid #e1e1e1;
    border-radius: 10px;
    font-size: 15px;
    background: #f9f9f9;
    transition: all 0.3s ease;
}
.input-text:focus {
    background: #fff;
    border-color: #333; /* 聚焦边框改为深灰，和按钮呼应 */
    box-shadow: 0 0 0 3px rgba(51, 51, 51, 0.08);
}

/* 验证码：适配小屏 */
.code-item {
    display: flex;
    align-items: center;
    gap: 10px;
}
.code-input {
    flex: 1;
}
.code-item img {
    height: 48px;
    border-radius: 8px;
    cursor: pointer;
}

/* 登录按钮：改为深灰黑色，高级感拉满 */
.login-btn {
    width: 100%;
    height: 50px;
    border-radius: 10px;
    background: #2d2d2d; /* 深灰黑色，不刺眼 */
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 5px;
    position: relative;
    overflow: hidden;
}
/* hover 暗纹效果，更高级 */
.login-btn:hover {
    background: #222;
}
.login-btn:hover::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.05);
}
/* 点击缩放反馈 */
.login-btn:active {
    transform: scale(0.98);
}

/* 第三方登录：缩小间距 */
.third-login {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 25px;
    margin: 25px 0 20px;
}
.third-btn img {
    width: 40px;
    height: 40px;
    transition: transform 0.6s ease;
}
.third-btn:hover img {
    transform: rotate(360deg);
}

/* 底部链接：缩小间距 */
.login-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #888;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}
.login-footer a {
    color: #2d2d2d; /* 链接颜色和按钮呼应 */
    font-weight: 500;
}
.login-footer .forget {
    color: #999;
}

/* 超小屏（<360px）再收缩 */
@media (max-width: 360px) {
    .login-card {
        padding: 25px 20px;
        border-radius: 12px;
    }
    .logo .iconfont {
        font-size: 50px !important;
    }
    .input-text, .login-btn {
        height: 44px;
    }
    .form-item {
        margin-bottom: 14px;
    }
}