:root {
  --page-bg: #242645;
  --input-text: #61bfff;
  --accent: #01aaed;
  --danger: #ff4d4f;
  font-family: "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html, body { min-width: 0; min-height: 100%; margin: 0; }
body { min-height: 100vh; overflow-x: hidden; color: #d3d7f7; background: var(--page-bg); }
button, input { font: inherit; }

#particleCanvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.register-page {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 100vh;
  padding: 34px 12px;
  place-items: start center;
}

.register-card {
  width: 380px;
  max-width: calc(100vw - 24px);
  min-height: 570px;
  padding: 46px 40px 36px;
  background: linear-gradient(230deg, rgba(53, 57, 74, 0) 0%, #000 100%);
  box-shadow: rgba(6, 17, 47, .7) -15px 15px 15px;
}

.register-card h1 { margin: 0 0 10px; font-size: 20px; font-weight: 400; }
#registerForm { margin-top: 10px; }
.register-field { position: relative; display: block; min-height: 45px; margin-top: 15px; }
.register-field > img,
.code-field label > img { position: absolute; z-index: 2; top: 15px; left: 18px; max-width: 16px; max-height: 16px; opacity: .5; }
.code-field label > img { width: 14px; height: 16px; object-fit: contain; }
.required { position: absolute; z-index: 2; top: 5px; left: 4px; color: var(--danger); font-size: 25px; line-height: 1; opacity: .8; }

.register-field input {
  width: 100%;
  height: 45px;
  padding: 10px 14px 10px 45px;
  border: 0;
  border-bottom: 1px solid rgba(97, 191, 255, .16);
  border-radius: 0;
  outline: 0;
  color: #61bfff;
  color: var(--input-text);
  background: transparent;
  font-size: 16px;
}
.register-field input::placeholder { color: rgba(211, 215, 247, .46); }
.register-field input:focus { border-bottom-color: rgba(97, 191, 255, .8); box-shadow: 0 1px 0 rgba(97, 191, 255, .22); }
.register-field input[aria-invalid="true"] { border-bottom-color: var(--danger); }

.code-field { display: grid; grid-template-columns: minmax(0, 1fr) 100px; gap: 10px; }
.code-field label { position: relative; min-width: 0; }
#captchaButton {
  width: 100px;
  height: 30px;
  align-self: center;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
  cursor: pointer;
}
#captchaCanvas { display: block; width: 100px; height: 30px; }
#captchaButton:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.form-status { min-height: 20px; margin: 8px 0 0; color: var(--danger); font-size: 12px; line-height: 20px; }
.form-status.is-error { color: var(--danger); }
.form-status.is-success { color: #5fb878; }
.register-actions { display: flex; align-items: center; min-height: 40px; }
#registerButton {
  width: 66px;
  height: 38px;
  padding: 0;
  border: 1px solid #c9c9c9;
  border-radius: 100px;
  color: #555;
  background: #fff;
  cursor: pointer;
}
#registerButton:hover { border-color: #c1c7c7; color: #5c5c5c; background: #f5fcfe; }
#registerButton:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
#loginLink { margin-left: 30px; color: #ff0000; font-size: 14px; line-height: 40px; text-decoration: none; }
#loginLink:hover { color: #ff0000; text-decoration: none; }
#loginLink:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.register-support { margin: 42px 0 0; color: #f33; font-size: 14px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (max-width: 520px) {
  .register-page { min-height: 100svh; padding: 18px 12px; place-items: center; }
  .register-card { width: min(380px, calc(100vw - 24px)); min-height: 0; padding: 34px 28px 28px; }
  .register-card h1 { font-size: 19px; }
  #loginLink { margin-left: 20px; }
  .register-support { margin-top: 32px; }
}

@media (max-width: 360px) {
  .register-card { padding-inline: 20px; }
  .register-actions { justify-content: space-between; }
  #loginLink { margin-left: 12px; font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
