/* login.css - 通用登录页样式 */

/* 全局盒模型与基础重置 */
* {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

/* 链接样式重置 */
a {
    color: #333;
    text-decoration: none;
}

/* 页面字体与颜色 */
body {
    font-family: '微软雅黑', Tahoma, Geneva, sans-serif;
}

/* 图片无边框 */
img {
    border: 0;
}

/* 输入框基础样式 */
input {
    outline: none;
}

/* 主体布局：垂直居中 */
.main {
    height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
}

/* 登录内容区整体布局 */
.login-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: auto;
}

/* 登录表单盒子 */
.login-box {
    border-radius: 24px;
    padding: 56px 46px 45px 46px;
    background: rgba(76, 105, 221, 0.8);
    box-shadow: 0 8px 16px #e5e5e580;
}

/* 登录标题 */
.login-title {
    margin-bottom: 30px;
    font-weight: 700;
    font-size: 40px;
    text-align: center;
    color: white;
}

/* 账号和密码输入框容器 */
.new-account,
.new-password {
    display: flex;
    align-items: center;
    width: 308px;
    height: 40px;
    padding: 8px 18px;
    margin-bottom: 30px;
    border-radius: 2px;
    background: #fff;
    border: 1px solid #a7a7a7;
}

/* 账号图标 */
.account-icon {
    width: 16px;
    height: 16px;
    margin-right: 16px;
}

/* 账号输入框 */
.account-input {
    width: 240px;
    border: none;
    font-size: 18px;
}

/* 输入框占位符样式 */
input::-webkit-input-placeholder {
    font-size: 18px;
    color: #c9c9c9;
}

/* 密码输入框 */
.password-input {
    width: 214px;
    border: none;
    font-size: 18px;
}

/* 密码可见切换图标 */
.eye-icon {
    width: 16px;
    height: 16px;
    cursor: pointer;
    margin-left: 10px;
}

/* 验证码整体容器 */
.code-box {
    display: flex;
    height: 40px;
    align-items: center;
    gap: 10px; /* 精确控制间隙 */
    margin-bottom: 26px;
    width: 308px; /* 总宽度与密码输入框一致 */
}

/* 验证码输入框容器 */
.code-input-box {
    display: flex;
    align-items: center;
    width: 178px;
    height: 100%; /* 继承父容器40px高度 */
    padding: 8px 18px;
    border-radius: 2px;
    background: #fff;
    border: 1px solid #a7a7a7;
    box-sizing: border-box; /* 确保边框计入宽度 */
}

/* 验证码输入框 */
.code-input {
    width: 125px;
    border: none; 
    font-size: 18px;
    padding: 0; /* 移除默认内边距 */
}


/* 验证码图片容器 */
.code-content {
    width: 120px;
    height: 100%; /* 强制与输入框同高 */
    flex-shrink: 0;
    border: 1px solid #a7a7a7; /* 添加边框保持视觉平衡 */
    box-sizing: border-box;
    background: #fff;
    overflow: hidden;
}

    /* 验证码图片样式 */
    .code-content img {
        width: 100%;
        height: 100%; /* 图片填满容器 */
        object-fit: contain; /* 保持比例不拉伸 */
        transform: scale(0.8); /* 缩小图片到80%大小 */
        transform-origin: center; /* 从中心缩放 */
    }

/* 登录按钮 */
.login-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 40px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 20px;
    color: #fff;
    border: none;
    background: #1d16db;
}

/* 粒子背景特效容器 */
.particle-wrapper {
    position: absolute;
    z-index: -1;
    width: 100vw;
    height: 100vh;
}

/* 粒子背景图片 */
#particles-js {
    width: 100%;
    height: 100%;
    background-image: url("../images/login-bg.jpg");
    background-size: cover;
}

/* 消息提示样式适配 */
.layui-layer-msg {
    background: #fff !important; /* 白色背景 */
    border: 1px solid #2ed5ff !important;
    color: #2ed5ff !important;
    box-shadow: 0 0 20px rgba(46,213,255,0.3) !important;
    z-index: 2147483647 !important;
    box-shadow: 0 0 10px rgba(0,0,0,0.2) !important;
}

    /* 修改文字颜色（适配白色背景）*/
    .layui-layer-msg .layui-layer-content {
        color: #000 !important; /* 深黑色 */
        font-family: inherit !important; /* 继承页面字体 */
    }

/* 透明消息提示样式 */
.custom-skin {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    text-align: left;
    max-width: none; /* 取消最大宽度限制 */
    min-width: auto; /* 取消最小宽度限制 */
}

    .custom-skin .layui-layer-content {
        color: #f06464 !important;
        padding: 15px 25px !important;
        text-shadow: 0 1px 2px rgba(0,0,0,0.5);
        border: none !important;
        /* 添加以下属性确保左对齐 */
        display: inline-block;
        text-align: left;
        white-space: nowrap; /* 内容不换行 */
        max-width: 500px; /* 设置最大宽度 */
        font-size: 15px !important; /* 调整字号 */
        /*font-weight: bold !important;*/ /* 加粗 */
        color: #ff0000 !important; /* 鲜红色 */
        /* 添加文字阴影增强可读性 */
        text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    }

/* ========== 修正消息提示位置 ========== */
.custom-skin {
    transform: translate(0px, 5px) !important; /* （水平,垂直）位置补偿 */
}

