/* ============ 科技风统一变量（与 common.css 一致） ============ */
:root {
  --bg-start: #0a0e27;
  --bg-end: #1a1145;
  --glass-bg: rgba(20, 25, 60, 0.6);
  --border-glow: rgba(100, 120, 255, 0.3);
  --border-glow-strong: rgba(100, 120, 255, 0.65);
  --primary-1: #4facfe;
  --primary-2: #a855f7;
  --text-primary: #ffffff;
  --text-secondary: #a0aec0;
  --text-muted: #64748b;
  --input-bg: rgba(255, 255, 255, 0.05);
  --glow: 0 0 15px rgba(100, 120, 255, 0.4);
  --glow-strong: 0 0 22px rgba(100, 120, 255, 0.6);
  --radius: 10px;
  --radius-sm: 8px;
}

/* 登录页样式 - 优化版 */
.login-app { background: linear-gradient(160deg, var(--bg-start) 0%, var(--bg-end) 100%); background-attachment: fixed; color: var(--text-primary); }

.container {
  min-height: 100vh;
  padding: 30px 16px 20px;
  position: relative;
  overflow: hidden;
}

.container::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 200px;
  height: 200px;
  background: rgba(100, 120, 255, 0.08);
  border-radius: 50%;
}

.container::after {
  content: '';
  position: absolute;
  bottom: -75px;
  left: -75px;
  width: 250px;
  height: 250px;
  background: rgba(168, 85, 247, 0.08);
  border-radius: 50%;
}

.header {
  text-align: center;
  margin-bottom: 30px;
  position: relative;
  z-index: 1;
}

.logo-box {
  width: 70px;
  height: 70px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(100, 120, 255, 0.3);
  border-radius: 50%;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(20px);
  box-shadow: 0 0 20px rgba(100, 120, 255, 0.35);
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.logo-icon { font-size: 35px; }

.title {
  display: block;
  font-size: 26px;
  font-weight: bold;
  color: #fff;
  margin-bottom: 6px;
  letter-spacing: 1px;
  text-shadow: 0 0 14px rgba(79, 172, 254, 0.6);
}

.subtitle {
  display: block;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 1px;
}

.form {
  padding: 24px 18px;
  position: relative;
  z-index: 1;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  background: var(--glass-bg);
  border: 1px solid var(--border-glow);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 16px;
}

.form-item { margin-bottom: 16px; }

.input-label {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-weight: 500;
}

.input-box {
  display: flex;
  align-items: center;
  background-color: var(--input-bg);
  border-radius: 10px;
  padding: 0 14px;
  height: 48px;
  border: 1px solid rgba(100, 120, 255, 0.25);
  transition: all 0.25s ease;
}

.input-box:focus-within {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: #4facfe;
  box-shadow: 0 0 12px rgba(79, 172, 254, 0.4);
}

.input-icon {
  font-size: 16px;
  margin-right: 10px;
  opacity: 0.7;
  flex-shrink: 0;
}

.input {
  flex: 1;
  font-size: 14px;
  height: 48px;
  background: transparent;
  color: #fff;
  border: none;
  outline: none;
}

/* 验证码区域 */
.code-box { padding-right: 0; }

.code-btn {
  align-self: stretch;
  padding: 0 16px;
  background: linear-gradient(135deg, var(--primary-1) 0%, var(--primary-2) 100%);
  color: #fff;
  border: none;
  border-radius: 0 10px 10px 0;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: opacity 0.2s;
}

.code-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.login-btn {
  margin-top: 24px;
  height: 48px;
  line-height: 48px;
  border-radius: 24px;
  font-size: 15px;
  font-weight: bold;
  letter-spacing: 1px;
  width: 100%;
  cursor: pointer;
  border: none;
  background: linear-gradient(135deg, var(--primary-1) 0%, var(--primary-2) 100%);
  color: #fff;
  box-shadow: var(--glow);
}

.login-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.register-link { display: block; text-align: center; margin-top: 12px; }

/* 登录/注册模式切换动画 */
#confirmItem, #usernameItem, #codeItem { animation: fadeSlideIn 0.25s ease; }

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.register-text {
  font-size: 13px;
  color: #4facfe;
  text-decoration: underline;
  cursor: pointer;
}

.tips {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 16px;
  padding: 12px;
  background: rgba(100, 120, 255, 0.12);
  border-radius: 8px;
  border-left: 2px solid #4facfe;
}

.tip-text { font-size: 12px; color: #a0aec0; line-height: 1.6; }

.features {
  display: flex;
  justify-content: space-around;
  margin-top: 30px;
  position: relative;
  z-index: 1;
}

.feature-item { display: flex; flex-direction: column; align-items: center; }

.feature-icon {
  font-size: 22px;
  margin-bottom: 6px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(100, 120, 255, 0.3);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(20px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.feature-text { font-size: 11px; color: rgba(255, 255, 255, 0.95); font-weight: 500; }

/* 邮箱前缀+后缀选择器 - 修复挤压遮挡 */
.email-input-group {
  display: flex;
  gap: 8px;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}

.email-prefix-box {
  flex: 1 1 auto;
  min-width: 0; /* 关键：允许输入框收缩，避免内容撑开挤压后缀 */
  overflow: hidden;
}

.email-suffix-select {
  flex: 0 0 auto; /* 关键：禁止收缩，始终保持自身完整宽度 */
  height: 48px;
  padding: 0 10px;
  border: 1px solid rgba(100, 120, 255, 0.25);
  background-color: var(--input-bg);
  border-radius: 10px;
  font-size: 14px;
  color: #fff;
  outline: none;
  cursor: pointer;
  min-width: 92px;
  transition: all 0.25s ease;
}

.email-suffix-select:focus {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: #4facfe;
  box-shadow: 0 0 12px rgba(79, 172, 254, 0.4);
}

/* 移动端小屏适配 */
@media (max-width: 480px) {
  .email-input-group {
    gap: 6px;
  }
  .email-suffix-select {
    min-width: 82px;
    padding: 0 6px;
    font-size: 13px;
  }
}
