:root {
  --bgStart: #0b1020;
  --bgEnd: #121a33;
  --muted: rgba(234, 240, 255, 0.6);
  --text: #eaf0ff;
  --heading: #e6eefc;
  --accent: #2563eb;
  --accent2: #4c8dff;
  --cardBorder: rgba(255, 255, 255, 0.06);
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  font-family:
    "Inter",
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    Arial;
  background:
    radial-gradient(
      900px 400px at 15% 10%,
      rgba(76, 141, 255, 0.08),
      transparent 35%
    ),
    radial-gradient(
      800px 500px at 90% 120%,
      rgba(79, 209, 197, 0.04),
      transparent 35%
    ),
    linear-gradient(180deg, var(--bgStart), var(--bgEnd));
  color: var(--text);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  opacity: 0.04;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260' viewBox='0 0 260 260'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 300px 300px;
  mix-blend-mode: overlay;
}

.container {
  width: 100%;
  max-width: 1100px;
  padding: 0 20px;
}

/* ---------- Header ---------- */
.siteHeader {
  padding: 18px 0;
  display: flex;
  justify-content: center;
  width: 100%;
}

.headerInner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.logoImage {
  height: 48px;
  width: auto;
}

.headerNavigation {
  display: flex;
  gap: 18px;
}

.headerNavigation a {
  color: rgba(234, 240, 255, 0.85);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}

.headerNavigation a:hover {
  text-decoration: underline;
  opacity: 1;
}

/* ---------- Page ---------- */
.pageMain {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 12px;
}

.wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.card {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.02),
    rgba(255, 255, 255, 0.01)
  );
  border-radius: 14px;
  padding: 32px 28px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 8px 28px rgba(2, 6, 23, 0.6);
  backdrop-filter: blur(6px);
  width: 100%;
  max-width: 420px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cardTop h1 {
  margin: 0 0 6px 0;
  font-size: 1.6rem;
  color: #e6eefc;
  font-weight: 700;
}

.mutedText {
  margin: 0;
  color: rgba(234, 240, 255, 0.6);
  font-size: 0.95rem;
}

/* ---------- Form ---------- */
#mainForm {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.formField {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.labelText {
  font-size: 0.82rem;
  color: rgba(234, 240, 255, 0.6);
  font-weight: 600;
}

input[type="text"],
input[type="email"],
input[type="password"] {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 12px 14px;
  border-radius: 10px;
  color: #eaf0ff;
  font-size: 0.95rem;
  transition: 0.15s;
}

input::placeholder {
  color: rgba(234, 240, 255, 0.28);
}

input:focus {
  border-color: #4c8dff;
  box-shadow: 0 6px 18px rgba(44, 78, 165, 0.12);
  outline: none;
}

.linkUnderline {
  color: rgba(234, 240, 255, 0.6);
  text-decoration: underline;
  font-weight: 600;
}

.note {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 10px;
  text-align: center;
}

/* ---------- Buttons ---------- */
#submit {
  margin-top: 10px;
  background: linear-gradient(180deg, #2563eb, #4c8dff);
  color: white;
  border: none;
  padding: 12px 14px;
  font-weight: 800;
  border-radius: 12px;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.16);
  transition: 0.12s;
}

#submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 40px rgba(46, 108, 255, 0.18);
}

/* ---------- Footer ---------- */
.siteFooter {
  padding: 22px 15px;
  color: var(--muted);
  text-align: center;
}

.footerInner {
  margin: 0 auto;
  display: flex;
  justify-content: center;
}

.footerInner small {
  display: block;
  color: var(--muted);
}

/* ---------- Message ---------- */
.message {
  text-align: center;
  padding: 10px 14px;
  border-radius: 10px;
  margin-bottom: 10px;
  font-weight: 600;
  animation: fadeIn 0.3s ease;
}

.message.success {
  background: rgba(46, 204, 113, 0.12);
  color: #2ecc71;
  border: 1px solid rgba(46, 204, 113, 0.2);
}

.message.error {
  background: rgba(231, 76, 60, 0.12);
  color: #e74c3c;
  border: 1px solid rgba(231, 76, 60, 0.2);
}

.hidden {
  display: none;
}

/* ---------- Loading ---------- */
.loading {
  background: #b3c7e6 !important;
  color: #fff !important;
  cursor: wait !important;
  position: relative;
  opacity: 0.7;
  transition: opacity 0.15s ease;
}

.loading::after {
  position: absolute;
  right: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem;
  animation: spinnerRotate 0.8s linear infinite;
}

span {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

@media (max-width: 720px) {
  .siteHeader {
    padding: 16px 0 8px;
  }

  .headerInner {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .headerNavigation {
    flex-wrap: wrap;
    gap: 12px 16px;
  }

  .pageMain {
    align-items: flex-start;
    padding: 24px 12px 32px;
  }

  .card {
    max-width: 100%;
    padding: 28px 20px;
  }
}

@media (max-width: 420px) {
  .container {
    padding: 0 16px;
  }

  .headerNavigation {
    flex-direction: column;
    align-items: flex-start;
  }

  .cardTop h1 {
    font-size: 1.4rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
