/* ===== AUTH.CSS — стили для модального окна авторизации ===== */

/* ---- ОВЕРЛЕЙ (фон) ---- */
.auth-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeIn 0.3s ease;
}

.auth-overlay.active {
  display: flex;
}

@keyframes fadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes slideUp {
  0% { opacity: 0; transform: translateY(30px) scale(0.95); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---- МОДАЛЬНОЕ ОКНО ---- */
.auth-modal {
  background: #11191e;
  border: 1px solid #2a3a44;
  border-radius: 32px;
  padding: 40px 36px 36px;
  max-width: 440px;
  width: 100%;
  margin: 20px;
  position: relative;
  animation: slideUp 0.35s ease;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}

/* Кнопка закрытия */
.auth-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  color: #4f6a7a;
  font-size: 22px;
  cursor: pointer;
  transition: 0.2s ease;
}

.auth-close:hover {
  color: #dce9f2;
  transform: rotate(90deg);
}

/* ---- ЗАГОЛОВОК ---- */
.auth-header {
  text-align: center;
  margin-bottom: 28px;
}

.auth-header .auth-icon {
  font-size: 48px;
  color: #4f8aaa;
  margin-bottom: 12px;
  display: block;
}

.auth-header h2 {
  font-size: 26px;
  font-weight: 700;
  color: #dce9f2;
  margin-bottom: 6px;
}

.auth-header p {
  color: #6d8fa0;
  font-size: 14px;
}

/* ---- ТАБЫ (Вход / Регистрация) ---- */
.auth-tabs {
  display: flex;
  gap: 4px;
  background: #0a1218;
  border-radius: 60px;
  padding: 4px;
  margin-bottom: 28px;
  border: 1px solid #1a2a32;
}

.auth-tab {
  flex: 1;
  padding: 10px 16px;
  border: none;
  background: transparent;
  color: #6d8fa0;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  border-radius: 40px;
  cursor: pointer;
  transition: 0.25s ease;
}

.auth-tab.active {
  background: #1a2a34;
  color: #dce9f2;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.auth-tab:hover:not(.active) {
  color: #b0ccdd;
}

/* ---- ФОРМА ---- */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.auth-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-form .form-group label {
  font-size: 13px;
  font-weight: 500;
  color: #8aa6b8;
  display: flex;
  align-items: center;
  gap: 8px;
}

.auth-form .form-group label i {
  color: #4f7a92;
  font-size: 14px;
  width: 18px;
}

.auth-form .form-group input {
  background: #0a1218;
  border: 1px solid #1f2f38;
  border-radius: 14px;
  padding: 12px 16px;
  font-size: 15px;
  font-family: 'Inter', sans-serif;
  color: #eef4f8;
  transition: 0.2s ease;
  outline: none;
}

.auth-form .form-group input:focus {
  border-color: #3f8ab0;
  box-shadow: 0 0 0 3px rgba(60, 150, 200, 0.12);
  background: #0f1a22;
}

.auth-form .form-group input::placeholder {
  color: #3f5a6a;
}

/* ---- ДОПОЛНИТЕЛЬНЫЕ ОПЦИИ ---- */
.auth-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
}

.auth-options .remember {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #6d8fa0;
  font-size: 13px;
  cursor: pointer;
}

.auth-options .remember input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #3f8ab0;
  cursor: pointer;
}

.auth-options .forgot {
  color: #4f8aaa;
  font-size: 13px;
  text-decoration: none;
  transition: 0.2s ease;
}

.auth-options .forgot:hover {
  color: #70b0d0;
  text-decoration: underline;
}

/* ---- КНОПКА ВХОДА ---- */
.btn-auth-submit {
  background: linear-gradient(135deg, #1f3e4f, #0f2838);
  border: 1px solid #2f5a70;
  color: #eef6fc;
  padding: 14px 24px;
  border-radius: 60px;
  font-weight: 700;
  font-size: 16px;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: 0.25s ease;
  margin-top: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-auth-submit i {
  color: #80c8f0;
  font-size: 18px;
}

.btn-auth-submit:hover {
  background: linear-gradient(135deg, #2a5068, #163240);
  border-color: #4080a0;
  box-shadow: 0 6px 20px rgba(0, 80, 140, 0.2);
  transform: translateY(-2px);
}

.btn-auth-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ---- РАЗДЕЛИТЕЛЬ ---- */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  color: #3f5a6a;
  font-size: 12px;
  margin: 6px 0 4px;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #1a2a32;
}

/* ---- КНОПКА ВХОДА ЧЕРЕЗ ЯНДЕКС ---- */
.auth-yandex {
  width: 100%;
  padding: 12px;
  background: #0a1218;
  border: 1px solid #1f2f38;
  border-radius: 14px;
  color: #dce9f2;
  font-size: 15px;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  cursor: pointer;
  transition: 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.auth-yandex i {
  font-size: 22px;
  color: #fc3f1d;
}

.auth-yandex:hover {
  border-color: #fc3f1d;
  background: #1a0f0d;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(252, 63, 29, 0.1);
}

/* ---- ПЕРЕКЛЮЧЕНИЕ МЕЖДУ ВХОДОМ И РЕГИСТРАЦИЕЙ ---- */
.auth-switch {
  text-align: center;
  margin-top: 6px;
  color: #5f8095;
  font-size: 14px;
}

.auth-switch span {
  color: #4f8aaa;
  cursor: pointer;
  font-weight: 600;
  transition: 0.2s ease;
}

.auth-switch span:hover {
  color: #70b0d0;
  text-decoration: underline;
}

/* ---- СКРЫТЫЕ ФОРМЫ ---- */
.auth-form.hidden {
  display: none;
}

/* ---- АДАПТИВНОСТЬ ---- */
@media (max-width: 480px) {
  .auth-modal {
    padding: 28px 20px 24px;
    margin: 12px;
    border-radius: 24px;
  }

  .auth-header .auth-icon {
    font-size: 36px;
  }

  .auth-header h2 {
    font-size: 22px;
  }

  .auth-options {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }

  .auth-tabs {
    margin-bottom: 20px;
  }

  .auth-tab {
    font-size: 13px;
    padding: 8px 12px;
  }

  .auth-yandex {
    font-size: 14px;
    padding: 10px;
  }
}