/* Регистрация — по Desktop/reg.txt */

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  background: #07020f;
  font-family: Arial, Helvetica, sans-serif;
  color: #fff;
}

.animated-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  z-index: 0;
  background: #07020f;
}

.background-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transform: scale(1.03);
  animation: backgroundBreathing 12s ease-in-out infinite;
  filter: brightness(0.9) contrast(1.05) saturate(1.1);
  z-index: 0;
}

.background-image-fallback {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url("auth-slides/register-bg.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

@keyframes backgroundBreathing {
  0% {
    transform: scale(1.03) translate(0px, 0px);
  }
  50% {
    transform: scale(1.07) translate(-8px, -4px);
  }
  100% {
    transform: scale(1.03) translate(0px, 0px);
  }
}

.animated-background::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(
      90deg,
      rgba(5, 0, 15, 0.15) 0%,
      rgba(8, 0, 20, 0.05) 45%,
      rgba(5, 0, 15, 0.55) 100%
    ),
    linear-gradient(
      180deg,
      rgba(5, 0, 15, 0.1) 0%,
      rgba(5, 0, 15, 0.2) 100%
    );
  pointer-events: none;
}

#magicCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 3;
}

.background-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  z-index: 2;
  opacity: 0.45;
}

.glow-1 {
  width: 450px;
  height: 450px;
  left: 30%;
  top: 30%;
  background:
    radial-gradient(
      circle,
      rgba(168, 40, 255, 0.6),
      rgba(70, 0, 150, 0.1),
      transparent
    );
  animation: glowPulse 6s ease-in-out infinite;
}

.glow-2 {
  width: 350px;
  height: 350px;
  right: 10%;
  bottom: 10%;
  background:
    radial-gradient(
      circle,
      rgba(120, 0, 255, 0.45),
      transparent
    );
  animation: glowPulse 8s ease-in-out infinite reverse;
}

@keyframes glowPulse {
  0% {
    transform: scale(0.8);
    opacity: 0.25;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.6;
  }
  100% {
    transform: scale(0.8);
    opacity: 0.25;
  }
}

.registration-page {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 40px 8%;
  box-sizing: border-box;
  z-index: 10;
}

.registration-panel {
  width: 420px;
  padding: 45px 40px;
  border-radius: 24px;
  background:
    linear-gradient(
      135deg,
      rgba(20, 5, 45, 0.88),
      rgba(10, 0, 30, 0.82)
    );
  border: 1px solid rgba(180, 70, 255, 0.65);
  box-shadow:
    0 0 30px rgba(150, 30, 255, 0.35),
    inset 0 0 30px rgba(100, 0, 255, 0.08);
  backdrop-filter: blur(12px);
}

.registration-panel-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.registration-panel-top a {
  color: #dca8ff;
  font-size: 13px;
  text-decoration: none;
}

.registration-panel-top a:hover {
  color: #f0abfc;
  text-decoration: underline;
}

.registration-panel-top .to-login {
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid rgba(180, 70, 255, 0.55);
  background: rgba(143, 22, 232, 0.25);
  text-decoration: none;
}

.registration-panel-top .to-login:hover {
  background: rgba(210, 44, 255, 0.35);
  text-decoration: none;
}

.registration-panel h1 {
  margin: 0 0 15px;
  color: white;
  text-align: center;
  font-size: 36px;
  letter-spacing: 2px;
  text-shadow: 0 0 15px rgba(190, 80, 255, 0.8);
}

.registration-panel > p,
.registration-panel .reg-lead {
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  line-height: 1.5;
  margin: 0 0 30px;
}

.registration-panel .reg-hint {
  margin: 0 0 8px;
  color: rgba(220, 168, 255, 0.75);
  font-size: 12px;
  text-align: left;
}

.registration-panel .hp-field {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.registration-panel .turnstile-wrap {
  margin: 4px 0 8px;
  min-height: 65px;
}

.registration-panel form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#stepPassword,
#stepOtp {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#stepPassword[hidden],
#stepOtp[hidden] {
  display: none !important;
}

.registration-panel label {
  color: #dca8ff;
  font-size: 13px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.registration-panel input[type="email"],
.registration-panel input[type="password"],
.registration-panel input[type="text"] {
  height: 52px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid rgba(170, 70, 255, 0.5);
  background: rgba(10, 0, 25, 0.75);
  color: white;
  font-size: 15px;
  outline: none;
  transition: 0.25s;
  box-sizing: border-box;
  width: 100%;
}

.registration-panel input.otp-input {
  letter-spacing: 0.45em;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
}

.registration-panel input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.registration-panel input:focus {
  border-color: #c23cff;
  box-shadow: 0 0 15px rgba(180, 50, 255, 0.45);
}

.remember {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0;
  text-transform: none !important;
  letter-spacing: normal !important;
  font-weight: 500;
  color: #dca8ff;
  cursor: pointer;
}

.remember input {
  width: auto;
  margin: 0;
  accent-color: #d22cff;
}

.registration-panel button[type="submit"],
.registration-panel button.reg-primary {
  height: 58px;
  width: 100%;
  margin-top: 10px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  color: white;
  font-size: 16px;
  font-weight: bold;
  letter-spacing: 2px;
  background: linear-gradient(135deg, #8f16e8, #d22cff);
  box-shadow: 0 0 25px rgba(190, 40, 255, 0.55);
  transition: 0.25s;
}

.registration-panel button[type="submit"]:hover,
.registration-panel button.reg-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 0 40px rgba(220, 60, 255, 0.8);
}

.registration-panel button[type="submit"]:active,
.registration-panel button.reg-primary:active {
  transform: scale(0.98);
}

.registration-panel button[type="submit"]:disabled,
.registration-panel button.reg-primary:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
  box-shadow: 0 0 16px rgba(190, 40, 255, 0.25);
}

.registration-panel .msg {
  margin-top: 14px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.65);
  text-align: center;
}

.registration-panel .msg.err {
  color: #fca5a5;
}

.registration-panel .msg.ok {
  color: #86efac;
}

.registration-panel-foot {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(180, 70, 255, 0.35);
  color: rgba(220, 168, 255, 0.75);
  font-size: 12px;
  text-align: center;
  line-height: 1.4;
}

@media (prefers-reduced-motion: reduce) {
  .background-image,
  .glow-1,
  .glow-2 {
    animation: none;
  }
}

@media (max-width: 900px) {
  .registration-page {
    justify-content: center;
    padding: 30px;
  }

  .registration-panel {
    width: 100%;
    max-width: 420px;
    padding: 32px 24px;
  }

  .registration-panel h1 {
    font-size: 28px;
  }

  .background-image,
  .background-image-fallback {
    background-position: 42% center;
    object-position: 42% center;
    filter: brightness(0.55) contrast(1.1) saturate(1.1);
  }
}
