main {
  width: 100%;
  max-width: 420px;
  margin: 30px auto;
  padding: 32px 24px;
  background: #ffffff;
  border-radius: 15px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08); /* ← более заметная тень */
  box-sizing: border-box;
  transition: box-shadow 0.3s ease;
}

h2 {
  color: #0b2a5b;
  font-size: 1.6em;
  text-align: center;
  margin-bottom: 24px;
}

#authForms {
  display: flex;
  flex-direction: column;
}

/* Поля формы */
.form-field {
  position: relative;
  margin-bottom: 20px;
}

.form-field input {
  width: 100%;
  padding: 10px 44px 10px 44px; /* отступы под иконки */
  font-size: 1em;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  background-color: #f0f4ff;
  transition: border-color 0.3s, background-color 0.3s;
  box-sizing: border-box;
}

.form-field input:focus {
  border-color: #2970ff;
  background-color: #fff;
  outline: none;
}

/* Левая иконка (замок, почта и т.п.) */
.form-field > i {
  position: absolute;
  top: 50%;
  left: 16px;
  transform: translateY(-50%);
  color: #888;
  font-size: 1em;
  z-index: 2;
  pointer-events: none;
}

/* Кнопка "глаз" (справа) */
.form-field .toggle-password {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  cursor: pointer;
}

/* Иконка внутри "глаза" */
.form-field .toggle-password i {
  position: static;
  font-size: 1em;
  pointer-events: none;
  color: #666;
}

/* Ошибки под полями */
.form-field .error-message {
  color: red;
  font-size: 0.75em;
  margin-top: 4px;
  display: block;
}

/* Кнопки */
button {
  width: 100%;
  background-color: #2970ff;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 12px;
  font-size: 1em;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.3s ease;
}

button:hover {
  background-color: #1a57d2;
}

button:active {
  transform: scale(0.98);
}

/* Ссылки */
a {
  color: #2970ff;
  text-decoration: none;
  font-weight: 500;
}

p {
  font-size: 0.9em;
  color: #555;
  text-align: center;
  margin-top: 12px;
  line-height: 1.6;
}

/* Чекбокс */
.checkbox-wrapper {
  font-size: 0.9em;
  margin: 10px 0;
  display: flex;
  align-items: center;
}

.checkbox-wrapper input[type="checkbox"] {
  margin-right: 8px;
}

/* Модальное окно */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.modal-content {
  background: #fff;
  padding: 24px 30px;
  border-radius: 12px;
  max-width: 380px;
  width: 90%;
  text-align: center;
}

.modal-content button {
  margin-top: 20px;
  width: 100%;
}

/* Скрытие */
.hidden {
  display: none !important;
}

/* Мобильная адаптация */
@media (max-width: 480px) {
  main {
    padding: 24px 16px; /* чуть меньше отступы */
    margin: 20px auto;
    width: 100%;
  }

  .form-field input {
    font-size: 1em;
    padding: 10px 40px 10px 40px; /* немного меньше отступы */
  }

  button {
    font-size: 1em;
    padding: 12px;
  }

  h2 {
    font-size: 1.4em;
    margin-bottom: 20px;
  }

  .checkbox-wrapper {
    font-size: 0.85em;
    flex-direction: row;
    align-items: flex-start;
  }

  .form-field .toggle-password {
    width: 22px;
    height: 22px;
  }
}
