/* 全局样式 */
body {
    background-color: #12171e;
    color: #d4d4d4;
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
}

/* 登录表单容器 */
.form-container {
    background-color: #1c1f26;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    width: 340px;
    text-align: center;
}

/* 预留 Logo 位置 */
.logo {
    text-align: center;
    margin-bottom: 10px;
}

.logo img {
    width: 240px;
    height: auto;
}

/* 标题 */
h2 {
    color: #ffffff;
    margin-bottom: 20px;
}

/* 表单元素 */
form div {
    margin-bottom: 15px;
    text-align: left;
}

label {
    display: block;
    font-size: 14px;
    color: #b0b0b0;
    margin-bottom: 5px;
}

input[type="text"], input[type="password"], input[type="email"] {
    width: 100%;
    max-width: 350px; /* 显式设置最大宽度，与验证码部分一致 */
    padding: 10px;
    background-color: #2a2f38;
    border: 1px solid #3a3f48;
    color: #ffffff;
    border-radius: 5px;
    outline: none;
    transition: 0.3s;
    box-sizing: border-box; /* 确保 padding 包含在宽度内 */
}

/* 确保输入框获取焦点时边框变色 */
input[type="text"]:focus, input[type="password"]:focus, input[type="email"]:focus {
    border-color: #00aaff;
}

/* 让验证码输入框和图片在一行 */
.captcha-container {
    display: flex;
    align-items: center;
    gap: 10px; /* 控制输入框和图片的间距 */
}

.captcha-container input {
    flex: 1; /* 让输入框自适应剩余空间 */
}

.captcha-container img {
    width: 100px;
    height: 40px;
    cursor: pointer;
    border-radius: 5px;
}

/* 确保验证码文字左对齐 */
.captcha-container label {
    text-align: left;
    width: 100%;
    margin-bottom: 5px; /* 可选：增加一些间距 */
}

/* 按钮样式 */
.btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(90deg, #007bff, #0056b3);
    border: none;
    color: white;
    font-size: 16px;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    transition: 0.3s;
}

.btn:hover {
    background: linear-gradient(90deg, #0056b3, #003f7f);
}

/* 消息提示 */
.error-message, .success-message {
    padding: 10px;
    margin-top: 10px;
    border-radius: 5px;
    text-align: center;
    font-size: 14px;
}

.error-message {
    background-color: rgba(255, 0, 0, 0.2);
    color: #ff4d4d;
}

.success-message {
    background-color: rgba(0, 255, 0, 0.2);
    color: #00ff00;
}

/* 链接样式 */
.links {
    margin-top: 15px;
}

.links a {
    color: #00aaff;
    text-decoration: none;
    font-size: 14px;
}

.links a:hover {
    text-decoration: underline;
}
