/* login.css */
/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 页面容器 */
body {
    height: 100vh;
    display: flex;
    position: relative;
    overflow: hidden;
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background: linear-gradient(120deg, #d4fc79, #96e6a1);
}




/* 确保主容器在背景之上 */
.container {
    width: 820px;
    height: 580px;
    margin: auto;
    display: flex;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 30px; /* 增大主容器圆角 */
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    position: relative;
    z-index: 1;
    padding: 15px;
}

/* 左侧背景框 */
.container::before {
    content: '';
    width: 400px;
    height: 550px;
    background-color: #8b55fc1a;
    position: absolute;
    left: 15px;
    top: 15px;
    border-radius: 15px;
}


/* 右侧登录区 */
.login-box {
    flex: 0 0 360px; /* 调整右侧登录框宽度 */
    margin-left: auto; /* 将登录框推到右侧 */
    padding: 40px 20px;
    background: white;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    position: relative;
    z-index: 3; /* 确保登录框在最上层 */
}

/* 标题 */
.login-box h1 {
    color: #333;
    font-size: 22px;
    text-align: center;
    margin-bottom: 30px; /* 增加间距 */
    font-weight: 600;
    line-height: 1.5;
}

.login-box h1 {
    margin-bottom: 30px;
}

/* 表单元素 */
.form-group {
    margin-bottom: 20px; /* 调整间距 */
}

.form-group label {
    display: block;
    color: #666;
    font-size: 14px;
    margin-bottom: 8px;
}

input[type="text"],
input[type="password"],
input[type="number"] {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    border: 1px solid rgba(9,27,61,.1);
    border-radius: 12px;
    font-size: 14px;
    transition: all 0.3s;
    outline: none; /* 添加这行去除默认的焦点轮廓 */
}

input[type="text"]:hover,
input[type="password"]:hover,
input[type="number"]:hover,
input[type="text"]:focus,
input[type="password"]:focus,
input[type="number"]:focus {
    border-color: #8b55fc;
    box-shadow: 0 4px 12px rgba(139, 85, 252, 0.15);
}

/* 验证码模块 */
.captcha-container {
    display: flex;
    gap: 12px;
    margin: 16px 0;
}

#captcha-question {
    flex: 1;
    padding: 12px;
    background: #f8f8f8;
    border-radius: 6px;
    font-size: 14px;
}

#refresh-captcha {
    padding: 8px 16px;
    color: #8b55fc;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    background: none;
    font-size: 16px; /* 加大字体 */
    font-weight: 600; /* 加粗字体 */
}

#refresh-captcha:hover {
    transform: translateY(-1px);
    opacity: 0.8;
}

/* 登录按钮 */
#btnLogin {
    width: 100%;
    height: 48px;
    background: #8b55fc; /* 设置按钮为紫色 */
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 20px;
}

#btnLogin:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(139, 85, 252, 0.3);
}

#btnLogin:disabled {
    background: rgba(139, 85, 252, 0.65);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/*!* 底部链接 *!
.login-box p {
    text-align: center;
    color: #666;
    margin-top: 20px;
    font-size: 13px;
}*/

.login-box a {
    color: #8b55fc;
    text-decoration: none;
    margin: 0 8px;
}

.footer a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: #8b55fc;
}

/* 动态效果 */
@keyframes bgFloat {
    0% { transform: translateY(-5px); } /* 减小移动幅度 */
    100% { transform: translateY(5px); }
}

/* 错误提示 */
.error-msg {
    color: #ff4444;
    font-size: 14px;  /* 增大字体大小 */
    font-weight: 500;  /* 添加字重 */
    height: 20px;     /* 增加高度以适应更大的字体 */
    text-align: center;
    margin-top: 1px;
    transition: all 0.3s ease; /* 添加过渡效果 */
}

/* 新增的装饰背景图片 */
.bg-decoration {
    position: absolute;
    pointer-events: none;
    z-index: 4;  /* 修改这里，确保在登录框之上 */
    opacity: 0.6;  /* 添加透明度 */
}

.bg-decoration-1 {
    width: 120px;
    height: 120px;
    top: 5%;
    left: 10%;
    background: url('../images/xx_1.png') no-repeat center/contain;
    animation: float 8s ease-in-out infinite;
}

.bg-decoration-2 {
    width: 100px;
    height: 100px;
    top: 15%;
    right: 12%;
    background: url('../images/xx_2.png') no-repeat center/contain;
    animation: float 5s ease-in-out infinite;
    animation-delay: 2s;
}

.bg-decoration-3 {
    width: 80px;
    height: 80px;
    bottom: 20%;
    left: 15%;
    background: url('../images/xx_3.png') no-repeat center/contain;
    animation: float 7s ease-in-out infinite;
    animation-delay: 0.5s;
}

.bg-decoration-4 {
    width: 90px;
    height: 90px;
    bottom: 15%;
    right: 18%;
    background: url('../images/xx_4.png') no-repeat center/contain;
    animation: float 9s ease-in-out infinite;
    animation-delay: 1.5s;
}

.bg-decoration-5 {
    width: 110px;
    height: 110px;
    top: 50%;
    left: 5%;
    background: url('../images/xx_5.png') no-repeat center/contain;
    animation: float 10s ease-in-out infinite;
    animation-delay: 2s;
}

/* 添加浮动动画 */
@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}
