.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-main);
  position: relative;
  overflow: hidden;
}

/* 背景装饰 */
.login-page::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -10%;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(54 178 106 / 8%) 0%, transparent 70%);
  pointer-events: none;
}

.login-page::after {
  content: '';
  position: absolute;
  bottom: -20%;
  left: -10%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(24 160 138 / 6%) 0%, transparent 70%);
  pointer-events: none;
}

.login-container {
  width: 100%;
  max-width: 420px;
  padding: var(--spacing-2xl);
  position: relative;
  z-index: 1;
}

/* Logo & 品牌 */
.login-brand {
  text-align: center;
  margin-bottom: var(--spacing-2xl);
}

.login-logo {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
}

.login-logo svg {
  flex-shrink: 0;
}

.login-logo-text {
  font-size: var(--font-xl);
  font-weight: 700;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 0.5px;
}

.login-subtitle {
  color: var(--text-tertiary);
  font-size: var(--font-sm);
}

/* 登录卡片 */
.login-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-light);
  padding: var(--spacing-2xl);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(10px);
}

.login-card h2 {
  font-size: var(--font-xl);
  font-weight: 600;
  margin-bottom: var(--spacing-xs);
}

.login-card-desc {
  color: var(--text-tertiary);
  font-size: var(--font-sm);
  margin-bottom: var(--spacing-xl);
}

/* 表单 */
.login-form {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

.form-label {
  font-size: var(--font-sm);
  font-weight: 500;
  color: var(--text-secondary);
}

.phone-input-group {
  display: flex;
  align-items: center;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition-fast);
  background: var(--bg-input);
}

.phone-input-group:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgb(54 178 106 / 10%);
}

.phone-prefix {
  padding: 0 var(--spacing-md);
  font-size: var(--font-base);
  font-weight: 600;
  color: var(--text-primary);
  border-right: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  height: 48px;
  flex-shrink: 0;
  user-select: none;
}

.phone-input-group input {
  border: none;
  background: transparent;
  flex: 1;
  height: 48px;
  padding: 0 var(--spacing-md);
  font-size: var(--font-base);
  font-weight: 600;
  letter-spacing: 2px;
  outline: none;
  color: var(--text-primary);
}

.phone-input-group input::placeholder {
  letter-spacing: normal;
  font-weight: 400;
  color: var(--text-placeholder);
}

.code-input-group {
  display: flex;
  gap: var(--spacing-sm);
}

.code-input-group input {
  flex: 1;
  height: 48px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  padding: 0 var(--spacing-md);
  font-size: var(--font-base);
  background: var(--bg-input);
  color: var(--text-primary);
  transition: border-color var(--transition-fast);
  letter-spacing: 4px;
  font-weight: 600;
}

.code-input-group input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgb(54 178 106 / 10%);
  outline: none;
}

.code-input-group input::placeholder {
  letter-spacing: normal;
  font-weight: 400;
  color: var(--text-placeholder);
}

.send-code-btn {
  flex-shrink: 0;
  height: 48px;
  padding: 0 var(--spacing-lg);
  border: 1px solid var(--primary);
  border-radius: var(--radius-lg);
  background: transparent;
  color: var(--primary);
  font-size: var(--font-sm);
  font-weight: 500;
  font-family: var(--font-family);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.send-code-btn:hover:not(:disabled) {
  background: rgb(54 178 106 / 8%);
}

.send-code-btn:disabled {
  border-color: var(--border-light);
  color: var(--text-tertiary);
  cursor: default;
}

/* 登录按钮 */
.login-btn {
  width: 100%;
  height: 48px;
  border: none;
  border-radius: var(--radius-lg);
  background: var(--primary-gradient);
  color: white;
  font-size: var(--font-base);
  font-weight: 600;
  font-family: var(--font-family);
  cursor: pointer;
  transition: opacity var(--transition-normal), box-shadow var(--transition-normal);
  position: relative;
  overflow: hidden;
  margin-top: var(--spacing-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgb(255 255 255 / 15%) 0%, transparent 50%);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.login-btn:hover:not(:disabled)::before {
  opacity: 1;
}

.login-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgb(54 178 106 / 35%);
}

.login-btn:active:not(:disabled) {
  transform: translateY(0);
}

.login-btn:disabled {
  opacity: 0.5;
  cursor: default;
  transform: none;
  box-shadow: none;
}

.login-btn-loading {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-sm);
}

/* 协议 */
.login-agreement {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-xs);
}

.login-agreement input[type='checkbox'] {
  appearance: none;
  appearance: none;
  box-sizing: border-box;
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  padding: 0;
  margin: 0;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--border-color, #dcdfe6);
  border-radius: 50%;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
  background-color: var(--bg-card, #fff);
  transition: all var(--transition-normal, 0.3s cubic-bezier(0.4, 0, 0.2, 1));
}

.login-agreement input[type='checkbox']:hover {
  border-color: var(--primary);
}

.login-agreement input[type='checkbox']:checked {
  background-color: var(--primary);
  border-color: var(--primary);

  /* SVG checkmark perfectly matching the rounded, thick reference */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
  background-size: 70%;
  background-position: center;
  background-repeat: no-repeat;
  animation: checkbox-pop 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes checkbox-pop {
  0% {
    transform: scale(0.8);
  }

  100% {
    transform: scale(1);
  }
}

.login-agreement label {
  font-size: var(--font-xs);
  color: var(--text-tertiary);
  line-height: 1.5;
  cursor: pointer;
}

.login-agreement a {
  color: var(--primary);
  text-decoration: none;
}

.login-agreement a:hover {
  text-decoration: underline;
}

/* 底部 */
.login-footer {
  text-align: center;
  margin-top: var(--spacing-xl);
  color: var(--text-placeholder);
  font-size: var(--font-xs);
}
