/* ========================================
   登录/注册页面样式
   ======================================== */

/* 全局重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* 登录页面背景 */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* 背景装饰 */
.login-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

.bg-shape {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
}

.bg-shape-1 {
  width: 400px;
  height: 400px;
  top: -100px;
  right: -100px;
  animation: float 6s ease-in-out infinite;
}

.bg-shape-2 {
  width: 300px;
  height: 300px;
  bottom: -50px;
  left: -50px;
  animation: float 8s ease-in-out infinite reverse;
}

.bg-shape-3 {
  width: 200px;
  height: 200px;
  top: 50%;
  left: 50%;
  animation: float 10s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(5deg); }
}

/* 登录容器 */
.login-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  padding: 20px;
}

/* 登录卡片 */
.login-card {
  border-radius: 20px !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3) !important;
  overflow: hidden;
  animation: slideUp 0.5s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 顶部标题区 */
.login-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 40px 30px;
  text-align: center;
  color: #fff;
}

.register-header {
  background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.login-logo {
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.login-logo .mdui-icon {
  font-size: 40px;
  color: #fff;
}

.login-title {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: 2px;
}

.login-subtitle {
  font-size: 14px;
  opacity: 0.9;
}

/* 登录表单区域 */
.login-body {
  padding: 30px;
  background: #fff;
}

/* ========================================
   自定义表单输入组件
   ======================================== */
.form-input-group {
  position: relative;
  margin-bottom: 24px;
}

.input-icon {
  position: absolute;
  left: 0;
  top: 22px;
  font-size: 20px !important;
  color: #667eea;
  z-index: 1;
  transition: color 0.3s;
}

.form-input-group:focus-within .input-icon {
  color: #764ba2;
}

.form-input {
  width: 100%;
  padding: 16px 0 10px 32px;
  font-size: 15px;
  border: none;
  border-bottom: 2px solid #e8e8e8;
  background: transparent;
  outline: none;
  transition: border-color 0.3s;
}

.form-input:focus {
  border-bottom-color: #667eea;
}

.form-input::placeholder {
  color: #c0c4cc;
  font-size: 14px;
}

.input-label {
  position: absolute;
  left: 32px;
  top: 18px;
  font-size: 15px;
  color: #909399;
  pointer-events: none;
  transition: all 0.3s ease;
}

.form-input:focus ~ .input-label,
.form-input:not(:placeholder-shown) ~ .input-label {
  top: -2px;
  font-size: 12px;
  color: #667eea;
}

/* 验证码输入组 */
.code-group {
  display: flex;
  align-items: flex-start;
}

.code-group .form-input {
  flex: 1;
  padding-right: 120px;
}

.code-img {
  position: absolute;
  right: 0;
  top: 16px;
  width: 100px;
  height: 40px;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s;
  border: 1px solid #e8e8e8;
}

.code-img:hover {
  transform: scale(1.02);
}

/* 发送验证码按钮 */
.send-code-btn {
  position: absolute;
  right: 0;
  top: 8px;
  background: linear-gradient(135deg, #667eea, #764ba2) !important;
  color: #fff !important;
  font-size: 12px !important;
  padding: 6px 12px !important;
  border-radius: 6px !important;
}

.send-code-btn .mdui-icon {
  font-size: 12px;
  margin-right: 2px;
}

/* 邮箱提示 */
.email-tip {
  font-size: 12px;
  color: #e60c0c;
  margin: -16px 0 20px 32px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.email-tip .mdui-icon {
  font-size: 14px;
}

/* 登录链接区域 */
.login-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 20px 0 24px;
}

.remember-me {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #606266;
  cursor: pointer;
}

.remember-me input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #667eea;
}

.link-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  color: #667eea;
  text-decoration: none;
  transition: color 0.2s;
}

.link-item:hover {
  color: #764ba2;
}

.link-item .mdui-icon {
  font-size: 16px;
}

/* 登录/注册按钮 */
.login-btn,
.register-btn {
  width: 100%;
  height: 50px !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  letter-spacing: 2px;
  background: linear-gradient(135deg, #667eea, #764ba2) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 12px !important;
  margin-bottom: 20px;
  transition: all 0.3s ease;
}

.login-btn:hover,
.register-btn:hover {
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
  transform: translateY(-2px);
}

.login-btn .mdui-icon,
.register-btn .mdui-icon {
  font-size: 20px;
  margin-right: 8px;
}

/* 注册/登录链接 */
.register-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}

.register-link span {
  font-size: 14px;
  color: #909399;
}

.register-link a {
  color: #667eea !important;
  font-size: 14px !important;
}

.register-link a .mdui-icon {
  font-size: 16px;
  margin-right: 4px;
}

/* 返回首页 */
.back-home {
  text-align: center;
  margin-top: 10px;
}

.back-home a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #909399;
  text-decoration: none;
  transition: color 0.2s;
}

.back-home a:hover {
  color: #667eea;
}

.back-home a .mdui-icon {
  font-size: 16px;
}

/* 错误信息 */
.error-msg {
  display: block;
  text-align: center;
  font-size: 13px;
  color: #e60c0c;
  margin-bottom: 10px;
}

/* MDUI按钮样式覆盖 */
.mdui-btn {
  border-radius: 8px !important;
}

.mdui-btn-outlined {
  border: 1px solid #667eea !important;
  color: #667eea !important;
}

.mdui-btn-outlined:hover {
  background: rgba(102, 126, 234, 0.1) !important;
}

/* 响应式 */
@media (max-width: 480px) {
  .login-container {
    padding: 15px;
  }
  
  .login-header {
    padding: 30px 20px;
  }
  
  .login-body {
    padding: 24px 20px;
  }
  
  .login-logo {
    width: 60px;
    height: 60px;
  }
  
  .login-logo .mdui-icon {
    font-size: 30px;
  }
  
  .login-title {
    font-size: 22px;
  }
  
  .code-img {
    width: 80px;
    height: 36px;
  }
  
  .send-code-btn {
    padding: 4px 8px !important;
    font-size: 11px !important;
  }
  
  .login-links {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }
}
