* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Arial, sans-serif;
}

:root {
  --bg-1: #050010;
  --bg-2: #0d0320;
  --bg-3: #16072f;
  --text: #f7f4ff;
  --muted: rgba(233, 228, 255, 0.76);
  --muted-soft: rgba(233, 228, 255, 0.58);
  --accent: #8a6cff;
  --accent-2: #5de4ff;
  --accent-3: #c07bff;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.42);
  --error: #ff9a9a;
  --error-border: rgba(255, 102, 102, 0.6);
  --success: #84ffc0;
  --success-border: rgba(125, 255, 179, 0.5);
  --border-soft: rgba(255, 255, 255, 0.08);
  --border-mid: rgba(255, 255, 255, 0.12);
}

html,
body {
  height: 100%;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  position: relative;
  color: var(--text);
  background: transparent;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 15% 20%, rgba(127, 90, 255, 0.22), transparent 22%),
    radial-gradient(circle at 85% 25%, rgba(93, 228, 255, 0.14), transparent 20%),
    radial-gradient(circle at 50% 85%, rgba(167, 92, 255, 0.14), transparent 24%),
    linear-gradient(145deg, var(--bg-1), var(--bg-2) 44%, var(--bg-3) 76%, #090216);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02), transparent 18%),
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.035), transparent 28%);
}

.stars-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: -1;
}

.page {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px 1fr 260px;
  gap: 28px;
  align-items: center;
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px;
  background: transparent;
}

.side-character {
  position: relative;
  overflow: hidden;
  height: 72vh;
  min-height: 470px;
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.04));
  border: 1px solid var(--border-mid);
  backdrop-filter: blur(18px) saturate(140%);
  box-shadow:
    var(--shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.side-character img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: saturate(1.08) brightness(0.9);
  transition: transform 0.45s ease, filter 0.45s ease;
}

.side-character:hover img {
  transform: scale(1.03);
  filter: saturate(1.12) brightness(0.95);
}

.side-character::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(4, 0, 18, 0.95), rgba(13, 5, 36, 0.16)),
    linear-gradient(to right, rgba(138, 108, 255, 0.05), transparent 55%);
}

.side-label {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 2;
}

.side-label h3 {
  margin-bottom: 6px;
  font-size: 1.75rem;
  letter-spacing: 1.1px;
}

.side-label p {
  max-width: 190px;
  font-size: 0.95rem;
  line-height: 1.58;
  color: var(--muted);
}

.center-wrap {
  display: flex;
  justify-content: center;
  background: transparent;
}

.signup-card {
  position: relative;
  overflow: hidden;
  width: min(510px, 100%);
  padding: 42px 34px;
  border-radius: 32px;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04)),
    linear-gradient(135deg, rgba(138, 108, 255, 0.04), rgba(93, 228, 255, 0.025));
  border: 1px solid rgba(255, 255, 255, 0.11);
  backdrop-filter: blur(24px) saturate(145%);
  box-shadow:
    var(--shadow),
    0 18px 44px rgba(126, 96, 255, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.signup-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at top, rgba(138, 108, 255, 0.14), transparent 40%),
    radial-gradient(circle at 90% 18%, rgba(93, 228, 255, 0.08), transparent 22%);
}

.signup-card::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.back-link,
.badge,
h1,
.subtext,
.auth-divider,
.google-btn,
.bottom-text,
#signupForm {
  position: relative;
  z-index: 1;
}

.back-link {
  display: inline-block;
  margin-bottom: 16px;
  font-size: 0.95rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.22s ease, transform 0.22s ease;
}

.back-link:hover {
  color: #fff;
  transform: translateX(-2px);
}

.badge {
  display: inline-flex;
  margin-bottom: 18px;
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 0.88rem;
  color: #ddd4ff;
  background: rgba(138, 108, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

h1 {
  margin-bottom: 10px;
  font-size: 2.45rem;
  letter-spacing: -0.02em;
}

.subtext {
  margin-bottom: 26px;
  font-size: 1rem;
  line-height: 1.76;
  color: var(--muted);
}

.field {
  margin-bottom: 14px;
  text-align: left;
}

.field label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.92rem;
  color: rgba(240, 238, 255, 0.88);
  font-weight: 600;
}

.field input {
  width: 100%;
  padding: 15px 15px;
  font-size: 0.98rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 15px;
  outline: none;
  transition:
    border-color 0.22s ease,
    box-shadow 0.22s ease,
    background 0.22s ease,
    transform 0.22s ease;
}

.field input::placeholder {
  color: rgba(220, 216, 245, 0.42);
}

.field input:focus {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(138, 108, 255, 0.46);
  box-shadow: 0 0 0 3px rgba(138, 108, 255, 0.12);
  transform: translateY(-1px);
}

.field input.input-invalid {
  border-color: var(--error-border);
  box-shadow: 0 0 0 3px rgba(255, 102, 102, 0.12);
}

.field input.input-valid {
  border-color: var(--success-border);
  box-shadow: 0 0 0 3px rgba(125, 255, 179, 0.08);
}

.error-text {
  display: block;
  min-height: 18px;
  margin-top: 7px;
  font-size: 0.84rem;
  line-height: 1.45;
  text-align: left;
  color: var(--error);
}

.field-hint {
  display: block;
  margin-top: 8px;
  font-size: 0.82rem;
  line-height: 1.55;
  text-align: left;
  color: var(--muted);
}

.form-error {
  display: none;
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: 13px;
  font-size: 0.9rem;
  line-height: 1.55;
  text-align: left;
}

.form-error.show {
  display: block;
}

.form-error--danger {
  background: rgba(255, 102, 102, 0.12);
  border-color: rgba(255, 102, 102, 0.2);
  color: #ffd0d0;
}

.form-error--success {
  background: rgba(125, 255, 179, 0.12);
  border-color: rgba(125, 255, 179, 0.2);
  color: #d8ffe8;
}

.captcha-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: 70px;
  margin: 18px 0 6px;
  overflow: hidden;
}

#turnstile-container {
  display: flex;
  justify-content: center;
  width: 100%;
  min-height: 65px;
}

.signup-btn {
  width: 100%;
  margin-top: 8px;
  padding: 15px 18px;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #704cff, #8a6cff, #9d86ff);
  border: none;
  border-radius: 16px;
  cursor: pointer;
  box-shadow:
    0 12px 34px rgba(123, 97, 255, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease, filter 0.25s ease;
}

.signup-btn:hover {
  transform: translateY(-2px);
  filter: saturate(1.05);
  box-shadow: 0 18px 42px rgba(123, 97, 255, 0.5);
}

.signup-btn:disabled,
.google-btn:disabled {
  opacity: 0.72;
  cursor: not-allowed;
  transform: none;
}

.auth-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 20px 0;
  font-size: 14px;
  color: var(--muted-soft);
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  margin: 0 10px;
  background: rgba(255, 255, 255, 0.15);
}

.google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 16px;
  font-size: 0.98rem;
  font-weight: 700;
  color: #121212;
  background: linear-gradient(180deg, #ffffff, #f3f4f8);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 15px;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
  transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease, filter 0.25s ease;
}

.google-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.01);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.2);
}

.bottom-text {
  margin-top: 18px;
  font-size: 0.95rem;
  color: var(--muted);
}

.bottom-text a {
  font-weight: 600;
  color: #b79cff;
  text-decoration: none;
  transition: color 0.22s ease;
}

.bottom-text a:hover {
  color: #fff;
}

@media (max-width: 980px) {
  .page {
    grid-template-columns: 1fr;
  }

  .side-character {
    display: none;
  }
}

@media (max-width: 520px) {
  .page {
    padding: 16px;
  }

  .signup-card {
    padding: 32px 20px;
    border-radius: 24px;
  }

  h1 {
    font-size: 2.08rem;
  }
}
