/* 引入字体 */
@font-face {
  font-family: 'zql';
  src: url('../font/zql.woff2') format('woff2');
}

:root {
  --primary-color: #4361ee;
  --secondary-color: #3f37c9;
  --success-color: #4CAF50;
  --danger-color: #ef233c;
  --background-color: #f8f9fa;
  --text-color: #2b2d42;
  --border-radius: 12px;
  --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

body {
  font-family: 'Poppins', sans-serif;
  color: var(--text-color);
  line-height: 1.6;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: url('../img/bg.png') no-repeat center center fixed;
  background-size: cover;
  position: relative;
  font-family: 'zql';

  /* 盒子模型 */
  box-sizing: border-box;
}

body::before {
  /* content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(3px);
  z-index: 0; */
}

.container {
  max-width: 420px;
  margin: 0 auto;
  padding: 15px;
  width: 100%;
  position: relative;
  z-index: 1;
}

.card {
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius);
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
  padding: 25px;
  margin-bottom: 20px;
  border: none;
  box-sizing: border-box;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.card h2 {
  color: #fff;
  font-weight: 600;
  margin-bottom: 25px;
  font-size: 22px;
  text-align: center;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.form-group {
  margin-bottom: 20px;
  position: relative;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  color: #fff;
  font-size: 13px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.form-control {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 14px;
  background: #fff;
  color: var(--text-color);
  transition: all 0.3s;
  box-sizing: border-box;
}

.form-control::placeholder {
  color: #999;
}

.form-control:focus {
  border-color: var(--primary-color);
  outline: none;
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.btn-container {
  margin-top: 15px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn {
  display: inline-block;
  padding: 12px 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  text-decoration: none;
  width: 100%;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.3s, height 0.3s;
}

.btn:active::after {
  width: 200px;
  height: 200px;
}

.btn-primary {
  background: rgba(67, 97, 238, 0.3);
  color: #fff;
}

.btn-secondary {
  background: rgba(63, 55, 201, 0.3);
  color: #fff;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
  background: rgba(255, 255, 255, 0.2);
}

.alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 13px;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
}

.alert-danger {
  background: rgba(239, 35, 60, 0.2);
  color: #fff;
  border: 1px solid rgba(239, 35, 60, 0.3);
}

.alert-success {
  background: rgba(76, 175, 80, 0.2);
  color: #fff;
  border: 1px solid rgba(76, 175, 80, 0.3);
}

.captcha-container {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
  background: rgba(255, 255, 255, 0.1);
  padding: 8px;
  border-radius: 8px;
  height: 42px;
  backdrop-filter: blur(4px);
}

.captcha-image {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  height: 34px;
}

.refresh-captcha {
  padding: 6px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  width: 34px;
  color: #fff;
}

.refresh-captcha:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.refresh-captcha i {
  font-size: 16px;
}

.text-center {
  text-align: center;
}

.mt-3 {
  margin-top: 1rem;
}

.mb-3 {
  margin-bottom: 1rem;
}

/* 响应式调整 */
@media (max-width: 480px) {
  body {
    background-attachment: scroll;
  }

  .container {
    padding: 12px;
  }

  .card {
    padding: 20px;
    margin: 8px;
  }

  .form-control {
    font-size: 14px;
  }

  .btn {
    font-size: 14px;
  }
}

/* 登录注册页面专用样式 */
.login-body {
  display: flex;
  align-items: center;
  min-height: 100vh;
  background: url('../img/bg.png') no-repeat center center fixed;
  background-size: cover;
  position: relative;
}

.login-body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(3px);
  z-index: 0;
}

/* 修改登录表单的样式 */
.login-body .form-control {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
}

.login-body .form-control::placeholder {
  color: rgba(255, 255, 255, 0.6);
}