* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body,
html {
    width: 100%;
    height: 100%;
    font-family: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    overflow-x: hidden;
}

.login-page {
    width: 100%;
    min-height: 100vh;
    background-image: url('../img/pc-bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    /* 使用flex布局实现底部自然下沉 */
    display: flex;
    flex-direction: column;
    position: relative;
}

/* 顶部Logo区域 - PC端改为普通文档流，不再绝对定位 */
.header-logo {
    /* 移除绝对定位，使用普通流 + 外边距控制位置 */
    margin-top: 50px;
    margin-left: 80px;
    z-index: 10;
}

.logo-pc {
    display: block;
    height: 70px;
    object-fit: contain;
}

.logo-mobile {
    display: none;
}

/* 登录主体区域 - 改为弹性布局控制，实现原有效果（右对齐、垂直居中） */
.login-wrapper {
    /* 移除绝对定位，使用flex自动居中 */
    width: 440px;
    background: rgba(255, 255, 255, 0.35);
    padding: 8px;
    border-radius: 4px;
    z-index: 10;
    /* 关键：通过外边距自动实现垂直居中 + 右对齐 */
    margin: auto 15% auto auto;
    /* 当垂直方向有剩余空间时自动居中 */
    align-self: center;
}

/* 当屏幕高度较小时，避免登录框被顶部和底部挤压 */
@media screen and (max-height: 700px) {
    .login-wrapper {
        margin-top: 20px;
        margin-bottom: 20px;
        align-self: flex-start;
    }
}

.login-inner {
    background: #ffffff;
    width: 100%;
    border-radius: 2px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    padding: 1px;
}

.login-header {
    height: 80px;
    background: url(../img/top-bg.png) no-repeat center;
    background-size: 100% 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 0 0 30px;
    position: relative;
}

.login-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0));
    pointer-events: none;
}

.login-header h2 {
    color: #ffffff;
    font-size: 28px;
    font-weight: bold;
    letter-spacing: 1px;
    position: relative;
    z-index: 1;
}

.gov-login-btn {
    background: linear-gradient(to right, #2151bf, #228cde);
    color: #ffffff;
    padding: 6px 16px;
    border-radius: 20px 0 0 20px;
    font-size: 18px;
    text-decoration: none;
    position: relative;
    z-index: 1;
    transition: background 0.3s;
}

.gov-login-btn label {
    color: #92fbff;
    text-decoration: underline;
}

.login-body {
    padding: 30px 30px 0 30px;
}

.input-group {
    display: flex;
    align-items: center;
    border: 1px solid #dcdfe6;
    border-radius: 2px;
    margin-bottom: 20px;
    height: 50px;
    background: #fff;
    transition: border-color 0.3s;
}

.input-group:focus-within {
    border-color: #87bef5;
    box-shadow: 0 0 6px rgba(47, 119, 192, 0.3);
}

.input-icon {
    width: 70px;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.input-icon img {
    width: 36px;
    height: 24px;
    object-fit: contain;
}

.input-group input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    padding: 0 15px 0 0;
    height: 100%;
    font-size: 16px;
    color: #333;
    background: transparent;
}

.input-group input::placeholder {
    color: #646d81;
}

/* 验证码分组 */
.verify-group {
    display: flex;
    align-items: center;
    margin-bottom: 22px;
    width: 100%;
}

.verify-group .input-group {
    margin-bottom: 0;
    flex: 1;
    min-width: 0;
}

.get-code-btn {
    flex-shrink: 0;
    color: #646d81;
    font-size: 16px;
    text-decoration: none;
    white-space: nowrap;
    margin-left: 20px;
    transition: color 0.3s;
    text-decoration: underline;
}

.get-code-btn:hover {
    color: #327cf6;
}

/* 错误提示 */
.error-msg {
    background-color: #fffbf1;
    color: #d02b10;
    border: 1px solid #e5dcd2;
    padding: 10px 15px;
    font-size: 14px;
    border-radius: 2px;
    margin-bottom: 22px;
    display: flex;
    align-items: center;
}

.error-msg i {
    margin-right: 8px;
    font-style: normal;
    border: 1px solid #f56c6c;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font-size: 12px;
    font-weight: bold;
}

/* 登录按钮 */
.button-cont {
    padding: 22px 30px;
    background: #f4f4f4;
}

.submit-btn {
    width: 100%;
    height: 58px;
    background: #3b7cff;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 22px;
    cursor: pointer;
    transition: background 0.3s, box-shadow 0.3s;
    letter-spacing: 6px;
    text-align: center;
}

.submit-btn:hover {
    background: #2b6cf0;
    box-shadow: 0 2px 8px rgba(43, 107, 240, 0.4);
}

/* 页脚样式 - PC端自然下沉（非固定定位） */
.page-footer {
    color: #ffffff;
    text-align: center;
    /* 关键：移除fixed定位，作为普通块级元素 */
    position: relative;
    width: 100%;
    padding: 15px 0;
    background-color: rgba(0, 0, 0, 0.2);
    font-size: 12px;
    line-height: 1.8;
    z-index: 100;
    box-sizing: border-box;
    /* 自动上边距将页脚推到底部（当内容不足时） */
    margin-top: auto;
}

.page-footer a {
    color: #ffffff;
    text-decoration: none;
}

.page-footer a:hover {
    text-decoration: underline;
}

/* 响应式设计 - 平板适配 */
@media screen and (max-width: 900px) {
    .login-wrapper {
        margin-right: 5%;
        width: 380px;
    }
}

/* 响应式设计 - 移动端适配 */
@media screen and (max-width: 768px) {
    .login-page {
        background-image: url('../img/mobile-bg.png');
        background-position: top center;
        background-size: cover;
        /* 移动端允许内容滚动，高度自适应 */
        min-height: 100%;
        display: flex;
        flex-direction: column;
    }

    /* 移动端Logo - 修复挤压问题，使用合适的间距 */
    .header-logo {
        /* 重置PC端的外边距，使用移动端居中布局 */
        margin: 40px auto 20px auto;
        /* 移除任何可能引起挤压的定位 */
        position: static;
        top: auto;
        left: auto;
        width: auto;
        text-align: center;
        display: flex;
        justify-content: center;
    }

    .logo-pc {
        display: none;
    }

    .logo-mobile {
        display: block;
        max-width: 80%;
        height: auto;
    }

    /* 移动端登录表单 - 修复与Logo的间距 */
    .login-wrapper {
        position: static;
        width: 90%;
        max-width: 440px;
        margin: 0 auto 40px auto;  /* 上边距减少，下边距增加，避免和Logo挤压且与页脚保持间距 */
        padding: 8px;
        transform: none;
        align-self: center;
    }

    .login-header {
        padding: 0 0 0 20px;
        height: 70px;
    }

    .login-header h2 {
        font-size: 20px;
    }

    .gov-login-btn {
        font-size: 13px;
        padding: 5px 12px;
    }

    .login-body {
        padding: 20px 20px 0 20px;
    }

    /* 移动端页脚适配 - 移除多余背景，自然跟在内容后 */
    .page-footer {
        position: static;
        background-color: rgba(0, 0, 0, 0.3);
        color: #ffffff;
        padding: 20px 10px;
        margin-top: auto;  /* 重置auto，因为移动端不需要强制贴底 */
        width: 100%;
        text-align: center;
    }
}