/* 背景设置 - 支持动态图像 (你可换为背景视频或本地GIF) */
body {
  margin: 0;
  padding: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: url('../images/bg-login-9.jpg') no-repeat center center fixed;
  background-size: cover;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 登录框容器 - 玻璃效果 */
.login-container {
  background: transparent;               /* 背景完全透明 */
  backdrop-filter: blur(3px);          /* 背景模糊效果 */
  -webkit-backdrop-filter: blur(10px);  /* 兼容 Safari */
  color: #ffffff; /* 白色字体 */
  padding: 40px;
  border-radius: 16px;
  max-width: 400px;
  margin: 100px auto;
  box-shadow: 0 0 30px rgba(0,0,0,0.3);  /* 外层阴影轮廓 */
}

/* 标题 */
.login-container h2 {
  text-align: center;
  margin-bottom: 24px;
  font-weight: bold;
}

/* 标签 */
label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
}

/* 输入框 */
input[type="text"],
input[type="password"] {
  width: 100%;
  padding: 10px;
  margin-bottom: 16px;
  border: none;
  border-radius: 6px;
  outline: none;
  background-color: rgba(255, 255, 255, 0.8);
  color: #333;
  box-sizing: border-box;
}

/* Captcha 容器 */
.captcha-container {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.captcha-container input[type="text"] {
  flex: 1;
  margin-bottom: 0;
}

/* Captcha 图片区域 */
.captcha-image {
  height: 40px;
  border-radius: 6px;
}

/* 错误信息 */
.erro {
  background: rgba(255, 0, 0, 0.2);
  border: 1px solid #ffaaaa;
  color: #ffffff;
  padding: 8px;
  margin-bottom: 16px;
  border-radius: 6px;
}

/* 提交按钮 */
button {
  width: 100%;
  padding: 12px;
  background-color: #2ecc71;
  border: none;
  color: white;
  font-weight: bold;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.3s ease;
  box-sizing: border-box;
}

button:hover {
  background-color: #27ae60;
}

/* ===== 分层设计：桌面版 (> 768px) ===== */
@media (min-width: 769px) {
  body {
    background: url('../images/bg-login-9.jpg') no-repeat center center fixed;
    background-size: cover;
  }

  .login-container {
    background: transparent;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(10px);
    color: #ffffff;
  }

  input[type="text"],
  input[type="password"] {
    background-color: rgba(255, 255, 255, 0.8);
    color: #333;
  }

  .captcha-image {
    height: 40px;
  }
}

/* ===== 分层设计：平板 (600px - 768px) ===== */
@media (min-width: 600px) and (max-width: 768px) {
  body {
    background: #f5f5f5;
    background-image: none;
  }

  .login-container {
    background: white;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    color: #333;
    max-width: 450px;
    padding: 40px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  }

  input[type="text"],
  input[type="password"] {
    background-color: #ffffff;
    color: #333;
    border: 1px solid #ddd;
    padding: 12px;
    font-size: 16px;
  }

  .captcha-container input[type="text"] {
    padding: 12px;
  }

  .captcha-image {
    height: 44px;
  }

  button {
    padding: 14px;
    font-size: 16px;
  }

  .erro {
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid #ff6b6b;
    color: #d32f2f;
  }

  .login-container h2 {
    color: #333;
  }

  label {
    color: #555;
  }
}

/* ===== 分层设计：手机竖屏 (< 600px) ===== */
@media (max-width: 599px) {
  /* 简化背景：不加载图片，使用纯色 */
  body {
    background: #f5f5f5;
    background-image: none;
    height: auto;
    min-height: 100vh;
    padding: 20px 0;
  }

  /* 登录框全屏尺寸 */
  .login-container {
    background: white;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    color: #333;
    max-width: 100%;
    width: calc(100% - 30px);
    margin: 20px auto;
    padding: 30px 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
  }

  /* 标题调整 */
  .login-container h2 {
    color: #333;
    font-size: 24px;
    margin-bottom: 20px;
  }

  /* 标签调整 */
  label {
    color: #555;
    font-size: 14px;
    margin-bottom: 8px;
  }

  /* 输入框优化：大字体防止 iOS 自动缩放 */
  input[type="text"],
  input[type="password"] {
    background-color: #ffffff;
    color: #333;
    border: 1px solid #ddd;
    padding: 14px 12px;
    margin-bottom: 16px;
    font-size: 16px;
    border-radius: 8px;
  }

  input[type="text"]::placeholder,
  input[type="password"]::placeholder {
    color: #aaa;
  }

  /* Captcha 容器布局 */
  .captcha-container {
    flex-direction: row;
    gap: 12px;
    margin-bottom: 20px;
    align-items: flex-end;
  }

  .captcha-container input[type="text"] {
    flex: 1;
    margin-bottom: 0;
    padding: 14px 12px;
  }

  /* Captcha 图片：合理放大 */
  .captcha-image {
    height: 48px;
    border-radius: 8px;
    flex-shrink: 0;
  }

  /* 错误信息 */
  .erro {
    background: rgba(211, 47, 47, 0.05);
    border: 1px solid #ef5350;
    color: #d32f2f;
    padding: 12px;
    margin-bottom: 16px;
    border-radius: 8px;
    font-size: 14px;
  }

  /* 提交按钮：大按钮便于点击 */
  button {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    margin-top: 8px;
  }

  button:active {
    background-color: #229954;
    transform: scale(0.98);
  }

  form {
    margin: 0;
  }
}

/* ===== 超小屏设备 (< 360px) ===== */
@media (max-width: 359px) {
  .login-container {
    width: calc(100% - 20px);
    padding: 20px 15px;
  }

  .login-container h2 {
    font-size: 20px;
    margin-bottom: 16px;
  }

  input[type="text"],
  input[type="password"] {
    padding: 12px 10px;
    font-size: 16px;
  }

  .captcha-image {
    height: 44px;
  }

  button {
    padding: 14px;
  }

  label {
    font-size: 13px;
  }
}