* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #fff;
}

a {
  text-decoration: none;
}

.login-and-register {
  min-height: 100vh;
  width: 100%;
  display: flex;
  background-color: #6b21c8;
  background-image:
    radial-gradient(ellipse 80% 60% at 15% 40%, rgba(255, 255, 255, 0.22) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 85% 75%, rgba(167, 139, 250, 0.45) 0%, transparent 50%),
    linear-gradient(145deg, #5b21b6 0%, #7c3aed 35%, #8b5cf6 65%, #6d28d9 100%);
  background-size: cover;
  background-position: center;
}

.login-and-register .container {
  width: 100%;
  max-width: 1350px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  padding: 0 16px;
}

.login-and-register .row {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: auto;
}

.login-and-register .col-12 {
  width: 100%;
  max-width: 440px;
}

.bg-white {
  background: #fff;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
  border-radius: 12px;
  overflow: hidden;
  margin: 24px 0;
}

.login-inner {
  padding: 28px 32px 24px;
  text-align: center;
}

.logo-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  color: inherit;
}

.logo-img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.logo-text {
  font-size: 24px;
  font-weight: 800;
  color: #2c2f36;
  letter-spacing: 0.3px;
}

.logo.regular {
  max-height: 48px;
  width: auto;
  display: block;
  margin: 0 auto 12px;
}

.account-from {
  text-align: left;
}

.mb-3 {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 14px;
  color: #333;
  font-weight: 500;
}

.form-label .login-btn {
  margin-left: 0.5rem;
  font-size: 13px;
  color: #6c757d;
  font-weight: 400;
}

.form-label .login-btn:hover {
  color: #536de6;
}

.form-control {
  display: block;
  width: 100%;
  padding: 0.7rem 0.9rem;
  font-size: 15px;
  line-height: 1.5;
  color: #212529;
  background-color: #e9ecef;
  border: 1px solid transparent;
  border-radius: 0.5rem;
  outline: none;
  transition: box-shadow 0.15s, border-color 0.15s;
}

.form-control:focus {
  background-color: #e9ecef;
  border-color: rgba(83, 109, 230, 0.35);
  box-shadow: 0 0 0 0.2rem rgba(83, 109, 230, 0.15);
}

.input-group {
  display: flex;
  align-items: stretch;
  gap: 10px;
  margin-bottom: 1rem;
}

.input-group .form-control {
  flex: 1;
  min-width: 0;
  border-radius: 0.5rem;
}

#captcha-img,
.captcha-canvas {
  width: 120px;
  height: 44px;
  border-radius: 0.5rem;
  cursor: pointer;
  flex-shrink: 0;
  background: #e9ecef;
  user-select: none;
}

.form-check-input {
  width: 1.1em;
  height: 1.1em;
  margin-top: 0.15em;
  margin-right: 0.4rem;
  vertical-align: top;
  accent-color: #536de6;
  cursor: pointer;
}

.form-check-label {
  font-size: 14px;
  color: #444;
  cursor: pointer;
  user-select: none;
}

.btn-link.text-primary,
a.text-primary {
  color: #536de6;
}

.btn-link.text-primary:hover {
  text-decoration: underline;
}

.btn.btn-primary {
  display: inline-block;
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background-color: #536de6;
  border: 1px solid #536de6;
  border-radius: 0.5rem;
  cursor: pointer;
  margin-bottom: 1rem;
}

.btn.btn-primary:hover {
  filter: brightness(1.05);
}

.btn.btn-primary:active {
  filter: brightness(0.97);
}

.text-muted {
  color: #6c757d !important;
}

.small,
small {
  font-size: 0.875em;
}

.text-center {
  text-align: center;
}

.btn-link {
  color: #536de6;
}

.mb-0 {
  margin-bottom: 0;
}

.mt-2 {
  margin-top: 0.5rem;
}

@media (max-width: 576px) {
  .login-inner {
    padding: 22px 18px 18px;
  }

  .login-and-register .container {
    padding: 0 10px;
  }

  #captcha-img,
  .captcha-canvas {
    width: 100px;
    height: 42px;
  }
}
