/* Сброс */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  max-height: 100%;
  overflow: hidden;
  max-width: 100vw;
  color: white;
  font-family: sans-serif;
}

/* Фоновое изображение */
.background {
  background: url('background-formauth.png') no-repeat center/cover;
  position: fixed;
  inset: 0;
  background-color: #302e2dc3;
  z-index: -1;
}

/* Контейнер */
.auth-container {
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 16px;
}

/* Форма */
.auth-box {
  width: 100%;
  max-width: 400px;
  max-height: 100vh;
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.044);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border: 1.5px solid #302e2d4b;
  box-shadow: 0 0 15px #00000064;
  border-radius: 25px;
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Назад */
.back-in-form {
  align-self: flex-start;
  font-size: 0.9rem;
  color: white;
  text-decoration: none;
  text-shadow: 1px 1px 1px #00000066;
  transition: color 0.3s;
}
.back-in-form:hover {
  color: #cdcdcd;
}

/* Логотип */
.logo-inside img {
  width: 70px;
  height: auto;
  filter: drop-shadow(1px 1px 1px rgba(0,0,0,0.7));
}
.logo-inside {
  display: flex;
  justify-content: center;
  width: 100%;
}

/* Вкладки */
.tab-buttons {
  display: flex;
  gap: 10px;
  width: 100%;
}
.tab {
  flex: 1;
  padding: 12px 20px;
  background: #302e2d;
  border: none;
  border-radius: 20px;
  color: white;
  font-weight: 600;
  cursor: pointer;
  text-shadow: 1px 1px 1px #00000099;
  transition: background-color 0.3s ease;
}
.tab.active {
  background: #553786;
}

/* Контент вкладок */
.tab-content {
  display: none;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  min-height: 220px; /* или нужное значение, чтобы влезла самая большая вкладка */
}

.tab-content.active {
  display: flex;
}

/* Инпуты */
input{
  padding: 12px 15px;
  border-radius: 15px;
  border: none;
  width: 100%;
  background-color: #1f1d1c;
  color: white;
  font-size: 1rem;
  outline: none;
  text-shadow: 1px 1px 1px #00000099;
  margin-bottom: 0.5em;
}
.form-fields {
  display: flex;
  flex-direction: column;
}
input::placeholder {
  color: #aaa;
}
input:focus {
  background-color: #333230;
}

/* Кнопка отправки */
.submit {
  width: 100%;
  padding: 12px;
  background-color: #302e2d;
  color: white;
  font-weight: 700;
  border: 1.5px solid transparent;
  border-radius: 20px;
  cursor: pointer;
  box-shadow: 0 0 5px #302e2d;
  text-shadow: 1px 1px 1px #000000;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}
.submit:hover {
  background-color: #553786;
}

/* Футер */
.footer {
  text-align: center;
  color: white;
  text-shadow: 1px 1px 2px #00000066;
  font-size: 0.8rem;
}
.footer p {
  margin-bottom: 10px;
}
.social-icons {
  display: flex;
  justify-content: center;
  gap: 20px;
}
.social-icons a img {
  width: 32px;
  height: 32px;
  transition: transform 0.3s ease;
  filter: drop-shadow(1px 1px 1px rgba(0,0,0,0.7));
}
.social-icons a:hover img {
  transform: scale(1.1);
}

/* Адаптив */
@media (max-width: 480px) {
  .auth-container {
    padding: 0 10px;
  }

  .auth-box {
    padding: 20px 15px;
    max-height: 100vh;
  }

  .tab-buttons {
    flex-direction: column;
  }

  .tab {
    width: 100%;
  }

  .footer {
    display: none;
  }
}

.error-message {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #721c24;
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  padding: 12px 16px;
  margin-bottom: 20px;
  border-radius: 8px;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}
.error-message::before {
  content: "⚠️";
  font-size: 20px;
}
