html,
body {
                margin: 0;
                padding: 0;
                background-color: #1e252b;
                font-family: "Segoe UI", sans-serif;
                color: #ccc;
                
                display: flex;
                align-items: center;
                justify-content: center;
}
.header {
  position: relative;
  top: 0;
  left: 0;
  width: 100%;
  padding: 15px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 101;
  background: rgba(0, 0, 0, 0.4);
}

.logo {
  font-size: 20px;
  font-weight: bold;
  color: white;
}
.hero-video {
  position: fixed; /* Или absolute, если внутри ограниченного контейнера */
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  object-position: center;
  z-index: 0; /* Чтобы не перекрывать контент */
  opacity: 0.3;
  pointer-events: none; /* Чтобы видео не мешало кликам */
}
.menu-toggle {
  font-size: 24px;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  display: none;
}

.nav {
  display: flex;
  gap: 20px;
  margin-right: 50px;
  /* border: 1px solid white; */
  /* border-radius: 8px; */
  /* padding: 5px;
  padding-left: 20px;
  padding-right: 20px; */
}

.nav a {
  color: white;
  text-decoration: none;
  font-size: 16px;
  transition: color 0.2s;
}

.nav a:hover {
  color: #ffd;
}

.footer {
  text-align: center;
  padding: 20px;
  z-index: 1;
  color: white;
  font-size: 12px;
  width: 100%;
}
 

.form-center {
  display: flex;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  position: relative;
  z-index: 10;
  margin: 0 auto;
  min-width: 320px;
}





/* .form-center {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8vh 2vw; 
  min-height: calc(100vh - 80px); 
  box-sizing: border-box;
  width: 100%;
} */



.auth-form {
  pointer-events: all;
  background: rgba(33, 35, 46, 0.96);
  border-radius: 14px;
  box-shadow: 0 7px 34px 2px rgba(28, 38, 87, .17), 0 2px 7px 1px #28245214;
  padding: 38px 28px 17px 28px;
  width: 100%;
  max-width: 350px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  animation: fade-in-up .5s cubic-bezier(.23, .75, .68, 1.06);
  border: 1.5px solid rgba(97, 160, 255, 0.05);
  box-sizing: border-box;
  align-items: stretch;
  font-size: 1rem;
  backdrop-filter: blur(1.3px);
  margin: 0 auto;
}

@keyframes fade-in-up {
  0% {
    opacity: 0;
    transform: translateY(26px);
  }

  100% {
    opacity: 1;
    transform: none;
  }
}

.auth-form h2 {
  text-align: center;
  color: #e8edff;
  margin-bottom: 26px;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: .01em;
}
.password-wrapper {
  position: relative;
}

.toggle-password {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 14px;
  color: #aaa;
  user-select: none;
}

.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 22px;  /* было 19px — увеличим */
}

.floating-label-group {
  position: relative;
  width: 100%;
}


.floating-label-group input[type="text"],
.floating-label-group input[type="name"],
.floating-label-group input[type="email"],
.floating-label-group input[type="password"] {
  width: 100%;
  border: none;
  border-radius: 0;
  padding: 22px 9px 10px 12px;
  font-size: 1.08rem;
  background: none;
  background-color: transparent;
  color: #e8f0ff;
  box-sizing: border-box;
  box-shadow: none;
  border-bottom: 2px solid #495278;
  transition: border-color .22s, background .21s;
  font-family: inherit;
  outline: none;
}

.floating-label-group input:focus {
  border-bottom: 2px solid #5b8fff;
  background-color: rgba(45, 53, 66, 0.23);
}

.floating-label-group input.error {
  border-bottom: 2px solid #ff4a8d !important;
  background: rgba(52, 22, 37, 0.08);
}

.floating-label-group label {
  position: absolute;
  top: 19px;
  left: 12px;
  font-size: 1.1em;
  color: #a8b5d0;
  pointer-events: none;
  font-weight: 500;
  letter-spacing: .013em;
  transition:
    color .18s cubic-bezier(.7, .2, .35, 1.37),
    top .18s cubic-bezier(.44, 0, .36, 1.24),
    font-size .17s;
  background: transparent;
  z-index: 3;
}

.floating-label-group input:focus+label,
.floating-label-group input:not(:placeholder-shown)+label {
  top: -10px;
  font-size: .93em;
  color: #5b8fff;
  background: transparent;
  padding: 0;
}

.floating-label-group input.error+label {
  color: #ff4a8d;
  background: transparent;
}

.form-group .error-msg {
  color: #8e8e8e;
  min-height: 1.1em;
  margin-top: 3px;
  text-align: center;
  letter-spacing: .01em;
  font-weight: bold;
  font-size: 12px;
}

.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 13px;
}

.checkbox-custom {
  user-select: none;
  font-size: .97em;
  color: #a7b6ce;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.checkbox-custom input[type="checkbox"] {
  accent-color: #5e83ff;
  width: 16px;
  height: 16px;
}

.forgot-link {
  color: #7fd0f7;
  text-decoration: none;
  font-size: .99em;
  font-weight: 600;
  transition: color .13s;
}

.forgot-link:hover {
  color: #badafc;
}

.auth-btn {
  display: block;
  width: 100%;
  border: none;
  border-radius: 9px;
  padding: 14px 0;
  font-size: 1.16rem;
  font-weight: 600;
  background: linear-gradient(90deg, #729cff 0%, #292ecd 100%);
  color: #fff;
  margin-top: 10px;
  margin-bottom: 16px;  /* увеличим */
  box-shadow: 0 2px 9px 0 #4a4cff13;
  cursor: pointer;
  transition: background 0.15s, box-shadow .1s;
  font-family: inherit;
  text-align: center;
}

.auth-btn:hover {
  background: linear-gradient(90deg, #a4bffc 0%, #5151fb 100%);
  box-shadow: 0 2px 13px 2px #abaaff33;
}

.alt-action {
  text-align: center;
  font-size: 13px;
  margin-top: 12px;
  color: #a7b6cf;
  margin-bottom: 0;
}

.alt-action a {
  color: #6bbdff;
  font-weight: 600;
  text-decoration: none;
  transition: color .09s;
}

.alt-action a:hover {
  color: #c0e3ff;
}

.back-btn {
  position: fixed;
  bottom: 14px;
  right: 14px;
  border: none;
  background: rgba(44, 44, 100, 0.98);
  color: #a6bfe7;
  font-size: 21px;
  border-radius: 50%;
  box-shadow: 0 2px 14px 2px #02062113;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 30;
  cursor: pointer;
  transition: background .10s, color .12s;
  font-weight: 700;
  line-height: 1.17;
  outline: none;
}

.back-btn:hover {
  background: #232469;
  color: #8dd5ff;
}

@media (max-width: 520px) {
  #main {
    padding: 5vh 4vw;
    align-items: flex-start;
  }

  .form-center {
    justify-content: center; /* <--- обязательно! */
    width: 100%;
    max-width: 100%;
    margin: 0 auto; /* ⬅️ Вот это фиксирует горизонтальное центрирование */
  }
  

  .auth-form {
    border-radius: 10px;
    font-size: 0.97rem;
    padding: 20px 5vw 20px 5vw;
    max-width: 99vw;
    box-shadow: 0 3px 21px #20226117;
    width: 96%;
    margin: 0 auto; /* <--- и тут */
  }

  .auth-form h2 {
    font-size: 1.6rem;
  }

  .back-btn {
    right: 5vw;
    bottom: 3vw;
    font-size: 15px;
    width: 45px;
    height: 45px;
  }

  .floating-label-group input,
  .floating-label-group label {
    font-size: 0.97rem;
  }
  .hero-video {
    width: 100%;
    height: auto;
    min-height: 100%;
}
}

::-webkit-scrollbar {
  width: 5px;
}

::-webkit-scrollbar-thumb {
  background: #24244e;
  border-radius: 6px;
}

input:-webkit-autofill,
input:-webkit-autofill:focus,
input:-webkit-autofill:hover,
input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px rgba(36,41,56,0.92) inset !important;
  box-shadow: 0 0 0 1000px rgba(36,41,56,0.92) inset !important;
  -webkit-text-fill-color: #e8f0ff !important;
  caret-color: #fff;
  transition: background-color 5000s ease-in-out 0s;
}


/* @supports (-moz-appearance: none) {
  input:-moz-autofill {
    box-shadow: 0 0 0 1000px rgba(36,41,56,0.92) inset !important;
    -moz-text-fill-color: #e8f0ff !important;
  }
} */

input.error:-webkit-autofill,
input.error:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #482537 inset !important;
  box-shadow: 0 0 0 1000px #482537 inset !important;
  -webkit-text-fill-color: #ff4a8d !important;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  border-bottom: 2px solid #5b8fff !important;
}

.alert-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(14, 18, 33, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  pointer-events: auto;
  backdrop-filter: blur(3px);
}

.custom-alert-box {
  background: #1f2338;
  border: 2px solid #5e83ff;
  padding: 28px 34px;
  border-radius: 12px;
  color: #e6eeff;
  font-size: 1rem;
  max-width: 350px;
  text-align: center;
  box-shadow: 0 0 20px #00000060;
}

.alert-btn {
  margin-top: 16px;
  background: #5e83ff;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  font-weight: bold;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.2s;
}

.alert-btn:hover:enabled {
  background: #7b9eff;
}

.alert-btn:disabled {
  background: #3b4a7a;
  cursor: not-allowed;
  opacity: 0.8;
}
.modal-overlay {
  position: fixed;
  z-index: 9999;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.7);
  display: flex;
  justify-content: center;
  align-items: center;
}
.modal-box {
  background: #202432;
  padding: 30px;
  border-radius: 12px;
  color: white;
  text-align: center;
  width: 90%;
  max-width: 320px;
  margin: 10px;
}
.modal-box input {
    margin-top: 12px;
    font-size: 1.2rem;
    padding: 10px;
    width: 100px;
    border: 1px solid #53565e;
    border-radius: 5px;
    text-align: center;
    background-color: #2e313e;
    color: aliceblue;
}
.code-msg {
  color: #c00;
  margin-top: 5px;
font-weight: bold;
}

.warn-text {
  margin-top: 15px;
  font-size: 0.9em;
  color: #7a7a7a;
}

.info-text {
  font-size: 0.9em;
  color: #dbdbdb;
}

.center-block {
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 310px;
  margin-top: 100px;
}

@media (max-width: 520px) {
  .form-group {
    margin-bottom: 24px;
  }
  .center-block {
  margin-top: 15px;
}
  .auth-btn {
    margin-bottom: 18px;
  }
}
