/* --- 全局与背景设置 --- */
body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    overflow: hidden;
}

body {
    background-image: url('images/login-bg.jpg'); /* 使用你的背景图片 */
    background-size: cover;
    background-position: center;
    display: flex; /* 使用Flexbox来实现垂直水平居中 */
    justify-content: center;
    align-items: center;
}

/* --- 登录框容器 --- */
.login-container {
    width: 350px;
    padding: 40px;
    background-color: rgba(0, 20, 40, 0.65); /* 半透明的深蓝背景 */
    border-radius: 10px;
    box-shadow: 0 15px 25px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    /* 【进阶】玻璃拟态效果的关键 */
    backdrop-filter: blur(10px);
}

/* --- 表单内元素样式 --- */
h2 {
    margin: 0 0 30px;
    padding: 0;
    color: #fff;
    text-align: center;
    font-size: 28px;
    text-shadow: 0 0 5px rgba(0, 183, 255, 0.8);
}

.input-group {
    position: relative;
    margin-bottom: 30px;
}

input {
    width: 100%;
    padding: 10px 0;
    font-size: 16px;
    color: #fff;
    border: none;
    border-bottom: 1px solid #fff;
    outline: none;
    background: transparent;
}

button {
    width: 100%;
    padding: 12px;
    font-size: 18px;
    font-weight: bold;
    color: #0c1427;
    background-color: #00d9ff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

button:hover {
    background-color: #ffffff;
    box-shadow: 0 0 15px #00d9ff;
}

#error-message {
    margin-top: 15px;
    color: #ff4d4d;
    text-align: center;
    height: 20px;
}

/* 【进阶】登录失败时的晃动动画 */
.shake {
    animation: shake-animation 0.5s;
}

@keyframes shake-animation {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-10px); }
    20%, 40%, 60%, 80% { transform: translateX(10px); }
}