/* 登录页面样式 */

.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #d4af8c 0%, #c9a96e 50%, #b8860b 100%);
  padding: 20px;
}

.auth-card {
  background: linear-gradient(135deg, #fefefe 0%, #f5f1eb 100%);
  border-radius: 25px;
  box-shadow: 0 8px 32px rgba(139, 69, 19, 0.15);
  border: 2px solid #e8d5c4;
  width: 100%;
  max-width: 450px;
  position: relative;
  overflow: hidden;
}

.auth-form {
  padding: 40px;
  transition: all 0.3s ease;
}

.auth-form.hidden {
  display: none;
}

.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #d4af8c, #c9a96e, #b8860b);
  border-radius: 25px 25px 0 0;
}

.form-header {
  text-align: center;
  margin-bottom: 30px;
}

.form-header h1 {
  font-size: 2rem;
  color: #8b4513;
  margin-bottom: 10px;
  font-weight: 700;
  font-family: 'Georgia', serif;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
}

.form-header p {
  color: #a0522d;
  font-size: 1rem;
  font-style: italic;
}

.login-form,
.register-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 0.9rem;
  color: #8b4513;
  font-weight: 600;
}

.form-group input,
.form-group select {
  padding: 12px 16px;
  border: 2px solid #e8d5c4;
  border-radius: 15px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: #fefefe;
  font-family: 'Georgia', serif;
  color: #8b4513;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #d4af8c;
  box-shadow: 0 0 0 3px rgba(212, 175, 140, 0.15);
}

.form-group input:invalid {
  border-color: #e74c3c;
}

.form-group select {
  cursor: pointer;
}

.form-group select option {
  padding: 8px;
}

.checkbox-group {
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  color: #2c3e50;
}

.checkbox-label input[type="checkbox"] {
  display: none;
}

.checkmark {
  width: 18px;
  height: 18px;
  border: 2px solid #e9ecef;
  border-radius: 4px;
  position: relative;
  transition: all 0.3s ease;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
  background: #667eea;
  border-color: #667eea;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 2px;
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.auth-btn {
  background: linear-gradient(135deg, #d4af8c 0%, #c9a96e 100%);
  color: #8b4513;
  border: 2px solid rgba(255, 255, 255, 0.3);
  padding: 14px 20px;
  border-radius: 15px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(139, 69, 19, 0.15);
}

.auth-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(139, 69, 19, 0.25);
  background: linear-gradient(135deg, #c9a96e 0%, #b8860b 100%);
}

.auth-btn:active {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(139, 69, 19, 0.2);
}

.auth-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.error-message {
  background: #fee;
  color: #e74c3c;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid #fcc;
  font-size: 0.9rem;
  text-align: center;
}

.auth-footer {
  text-align: center;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #e9ecef;
}

.auth-footer p {
  color: #95a5a6;
  font-size: 0.8rem;
  margin: 5px 0;
}

.switch-form {
  margin-top: 15px;
}

.switch-form a {
  color: #d4af8c;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.switch-form a:hover {
  color: #b8860b;
  text-decoration: underline;
}

.terms-link {
  color: #d4af8c;
  text-decoration: none;
  font-weight: 600;
}

.terms-link:hover {
  color: #b8860b;
  text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 480px) {
  .login-container {
    padding: 10px;
  }
  
  .auth-form {
    padding: 30px 20px;
  }
  
  .form-header h1 {
    font-size: 1.8rem;
  }
  
  .form-group input,
  .form-group select {
    padding: 10px 14px;
    font-size: 0.9rem;
  }
  
  .auth-btn {
    padding: 12px 16px;
    font-size: 0.9rem;
  }
}
