* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-blue: #007AFF;
  --primary-blue-hover: #0056CC;
  --primary-blue-light: #E3F2FD;
  --text-primary: #1A1A1A;
  --text-secondary: #666666;
  --text-light: #999999;
  --bg-white: #FFFFFF;
  --bg-light: #F8F9FA;
  --border-color: #E0E0E0;
  --border-hover: #007AFF;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: linear-gradient(135deg, #FFFFFF 0%, #F5F7FA 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-container {
  width: 100%;
  max-width: 480px;
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-wrapper {
  position: relative;
}

.login-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 40px 32px;
  position: relative;
  z-index: 2;
  overflow: hidden;
}

.login-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-blue) 0%, #00C6FF 100%);
}

.login-header {
  text-align: center;
  margin-bottom: 32px;
}

.logo-area {
  margin-bottom: 20px;
}

.logo-img {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-md);
  object-fit: cover;
  box-shadow: var(--shadow-sm);
}

.login-title {
  font-size: 28px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.login-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
}

.login-body {
  margin-top: 8px;
}

.form-group {
  margin-bottom: 20px;
}

.input-group {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-light);
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  transition: all 0.3s ease;
  overflow: hidden;
}

.input-group:focus-within {
  background: var(--bg-white);
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1);
}

.input-group-icon {
  padding: 0 16px;
  color: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
}

.input-group-icon i {
  font-size: 18px;
}

.input-group:focus-within .input-group-icon {
  color: var(--primary-blue);
}

.form-input {
  flex: 1;
  padding: 14px 16px 14px 0;
  border: none;
  background: transparent;
  font-size: 15px;
  color: var(--text-primary);
  outline: none;
  min-width: 0;
}

.form-input::placeholder {
  color: var(--text-light);
}

.toggle-password {
  padding: 0 16px;
  border: none;
  background: transparent;
  color: var(--text-light);
  cursor: pointer;
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toggle-password:hover {
  color: var(--primary-blue);
}

.toggle-password i {
  font-size: 18px;
}

.send-code-btn {
  padding: 8px 16px;
  border: none;
  background: transparent;
  color: var(--primary-blue);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.send-code-btn:hover:not(:disabled) {
  color: var(--primary-blue-hover);
}

.send-code-btn:disabled {
  color: var(--text-light);
  cursor: not-allowed;
}

.form-options {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin-bottom: 24px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.checkbox-label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.checkbox-custom {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-color);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  background: var(--bg-white);
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
  background: var(--primary-blue);
  border-color: var(--primary-blue);
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
  content: '';
  width: 10px;
  height: 6px;
  border-left: 2px solid white;
  border-bottom: 2px solid white;
  transform: rotate(-45deg) translate(1px, -1px);
}

.checkbox-text {
  font-size: 14px;
  color: var(--text-secondary);
}

.agreement-link {
  color: var(--primary-blue);
  text-decoration: none;
  transition: color 0.3s ease;
}

.agreement-link:hover {
  color: var(--primary-blue-hover);
  text-decoration: underline;
}

.login-btn {
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--primary-blue) 0%, #00C6FF 100%);
  color: white;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.login-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 122, 255, 0.4);
}

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

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

.login-footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  font-size: 14px;
}

.forgot-link {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.forgot-link:hover {
  color: var(--primary-blue);
  text-decoration: underline;
}

.separator {
  color: var(--text-light);
  font-size: 13px;
}

.register-link {
  color: var(--primary-blue);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.register-link:hover {
  color: var(--primary-blue-hover);
  text-decoration: underline;
}

.login-decoration {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 1;
}

.login-footer {
  text-align: center;
  padding: 30px 20px;
  font-size: 13px;
  color: var(--text-light);
  margin-top: auto;
}

.footer-info {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.footer-link {
  color: var(--text-light);
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 13px;
}

.footer-link:hover {
  color: var(--primary-blue);
  text-decoration: underline;
}

.footer-separator {
  color: var(--border-color);
  font-size: 12px;
}

.footer-copyright {
  margin-top: 16px;
  font-size: 12px;
  color: var(--text-light);
  opacity: 0.8;
}

.decoration-circle {
  position: absolute;
  border-radius: 50%;
  opacity: 0.6;
}

.circle-1 {
  width: 200px;
  height: 200px;
  background: linear-gradient(135deg, var(--primary-blue-light) 0%, rgba(0, 198, 255, 0.1) 100%);
  top: -60px;
  right: -60px;
}

.circle-2 {
  width: 150px;
  height: 150px;
  background: linear-gradient(135deg, rgba(0, 122, 255, 0.08) 0%, rgba(0, 198, 255, 0.05) 100%);
  bottom: -40px;
  left: -40px;
}

.circle-3 {
  width: 100px;
  height: 100px;
  background: linear-gradient(135deg, rgba(0, 122, 255, 0.05) 0%, rgba(0, 198, 255, 0.03) 100%);
  top: 50%;
  left: -30px;
  transform: translateY(-50%);
}

@media (max-width: 576px) {
  body {
    padding: 16px;
  }

  .login-card {
    padding: 32px 24px;
  }

  .logo-img {
    width: 64px;
    height: 64px;
  }

  .login-title {
    font-size: 24px;
  }

  .login-subtitle {
    font-size: 13px;
  }

  .form-input {
    font-size: 14px;
    padding: 12px 12px 12px 0;
  }

  .input-group-icon {
    padding: 0 12px;
  }

  .input-group-icon i {
    font-size: 16px;
  }

  .login-btn {
    padding: 14px;
    font-size: 15px;
  }

  .circle-1 {
    width: 150px;
    height: 150px;
    top: -40px;
    right: -40px;
  }

  .circle-2 {
    width: 120px;
    height: 120px;
    bottom: -30px;
    left: -30px;
  }

  .circle-3 {
    width: 80px;
    height: 80px;
    left: -20px;
  }
}

@media (max-width: 375px) {
  .login-card {
    padding: 24px 20px;
  }

  .login-title {
    font-size: 22px;
  }
}

@media (min-width: 768px) {
  .login-container {
    max-width: 520px;
  }
}

.custom-toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  padding: 14px 24px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 9999;
  box-shadow: var(--shadow-lg);
}

.custom-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.custom-toast i {
  font-size: 18px;
}

.toast-success {
  background: #D4EDDA;
  color: #155724;
  border: 1px solid #C3E6CB;
}

.toast-success i {
  color: #28A745;
}

.toast-warning {
  background: #FFF3CD;
  color: #856404;
  border: 1px solid #FFEAA7;
}

.toast-warning i {
  color: #FFC107;
}

.toast-error {
  background: #F8D7DA;
  color: #721C24;
  border: 1px solid #F5C6CB;
}

.toast-error i {
  color: #DC3545;
}

.toast-info {
  background: #D1ECF1;
  color: #0C5460;
  border: 1px solid #BEE5EB;
}

.toast-info i {
  color: #17A2B8;
}