* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-green: #1FD15B;
  --primary-blue: #1890ff;
  --primary-dark: #015d26;
  --secondary-dark: #2C3E50;
  --secondary-darker: #1A252F;
  --accent-light: #E8F8F0;
  --text-dark: #2C3E50;
  --text-light: #6C757D;
  --white: #FFFFFF;
  --error: #e74c3c;
  --border-color: #e0e0e0;
  --input-bg: #f8f9fa;
}

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--secondary-darker);
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

/* 移除所有按钮和可点击元素的点击高亮 */
button, a {
  -webkit-tap-highlight-color: transparent;
}

/* 注册页面样式 */
.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
}

.login-box {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  padding: 40px 35px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 400px;
  backdrop-filter: blur(10px);
  animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-header {
  text-align: center;
  margin-bottom: 30px;
}

.login-header h1 {
  color: var(--text-dark);
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 0;
}

.form-group {
  margin-bottom: 20px;
  position: relative;
}

.form-group label {
  display: block;
  color: var(--text-dark);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
  padding-left: 0;
}

.required {
  color: var(--error);
  margin-left: 2px;
}

/* 输入框容器 */
.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--input-bg);
  transition: all 0.3s ease;
}

.input-wrapper:focus-within {
  border-color: var(--primary-blue);
  background: var(--white);
  box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.1);
}

.input-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  font-size: 18px;
  color: var(--text-light);
  flex-shrink: 0;
}

.form-group input {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  transition: all 0.3s ease;
  outline: none;
  background: transparent;
  color: var(--text-dark);
}

.form-group input::placeholder {
  color: var(--text-light);
}

/* 验证码输入框特殊处理 */
.verify-code-wrapper {
  border: none !important;
  background: transparent !important;
  padding: 0;
  gap: 10px;
}

.verify-code-wrapper:focus-within {
  border: none !important;
  box-shadow: none !important;
}

#verifyCode {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--input-bg);
  min-width: 0;
  flex: 1;
}

#verifyCode:focus {
  border-color: var(--primary-blue);
  background: var(--white);
  box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.1);
}

/* 密码显示/隐藏按钮 */
.toggle-password {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  margin-right: 8px;
  color: var(--text-light);
  transition: color 0.3s ease;
  -webkit-tap-highlight-color: transparent;
}

.toggle-password:hover {
  color: var(--primary-blue);
}

.eye-icon {
  font-size: 18px;
  user-select: none;
}

/* 验证码按钮样式 */
.btn-verify-code {
  padding: 10px 16px;
  background: var(--primary-blue);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
  height: 40px;
}

.btn-verify-code:hover {
  background: #40a9ff;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(24, 144, 255, 0.3);
}

.btn-verify-code:active {
  transform: translateY(0);
}

.btn-verify-code:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  background: var(--text-light);
}

/* 注册按钮 */
.btn-register {
  width: 100%;
  padding: 14px;
  background: var(--primary-blue);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(24, 144, 255, 0.3);
  -webkit-tap-highlight-color: transparent;
  margin-top: 10px;
}

.btn-register:hover {
  background: #40a9ff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(24, 144, 255, 0.4);
}

.btn-register:active {
  transform: translateY(0);
}

.btn-register:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.error-message {
  color: var(--error);
  font-size: 13px;
  margin-top: 10px;
  text-align: center;
  display: none;
  padding: 10px;
  background: #ffe6e6;
  border-radius: 8px;
}

.error-message.show {
  display: block;
}

.loading-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spinner 0.8s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}

@keyframes spinner {
  to { transform: rotate(360deg); }
}

.login-tip {
  font-size: 14px;
  color: var(--text-light);
  text-align: center;
  margin-top: 20px;
}

.login-tip-link {
  color: var(--primary-blue);
  text-decoration: none;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  margin-left: 4px;
  -webkit-tap-highlight-color: transparent;
}

.login-tip-link:hover {
  text-decoration: underline;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .login-box {
    padding: 30px 25px;
    border-radius: 15px;
  }

  .login-header h1 {
    font-size: 22px;
  }

  .form-group input {
    font-size: 16px; /* 防止iOS自动缩放 */
  }

  .btn-register {
    padding: 14px;
    font-size: 15px;
  }

  .btn-verify-code {
    padding: 10px 14px;
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .login-box {
    padding: 25px 20px;
  }

  .login-header h1 {
    font-size: 20px;
  }

  .btn-verify-code {
    min-width: 90px;
    font-size: 12px;
    padding: 10px 12px;
  }
}


.success-message{
  display: none;
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary-green);
  color: var(--white);
  padding: 10px 20px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(31, 209, 91, 0.3);
}