/* === Страница регистрации === */

/* Обёртка страницы */
.register-page {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* === Header === */
.register-header {
  display: flex;
  align-items: center;
  padding: 16px 32px;
  max-width: 1280px;
  width: 100%;
  margin: 16px auto 0;
}

/* === Основная область === */
.register-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

/* === Карточка формы === */
.register-card {
  width: 100%;
  max-width: 440px;
  background: rgba(15, 15, 35, 0.65);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 20px;
  border: 1px solid rgba(100, 140, 255, 0.12);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
  padding: 40px 36px;
  animation: fadeUp 0.6s ease both;
}

.register-card__title {
  font-size: 28px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #fff 0%, #8aa4ff 50%, #c084fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.register-card__subtitle {
  font-size: 15px;
  color: rgba(200, 210, 240, 0.55);
  text-align: center;
  margin-bottom: 32px;
}

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

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: rgba(200, 210, 240, 0.75);
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}

.input-wrapper {
  position: relative;
}

.form-group input {
  width: 100%;
  padding: 12px 16px;
  font-family: 'Onest', sans-serif;
  font-size: 15px;
  color: #e0e0f0;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(100, 140, 255, 0.15);
  border-radius: 12px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.form-group input::placeholder {
  color: rgba(200, 210, 240, 0.3);
}

.form-group input:focus {
  border-color: #5b7cfa;
  box-shadow: 0 0 0 3px rgba(91, 124, 250, 0.15);
  background: rgba(255, 255, 255, 0.08);
}

/* Состояние ошибки */
.form-group input.input-error {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.form-group input.input-error:focus {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

.error-message {
  font-size: 12px;
  color: #ef4444;
  margin-top: 6px;
  display: none;
}

.error-message.visible {
  display: block;
  animation: fadeUp 0.25s ease;
}

/* Кнопка показа/скрытия пароля */
.toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(200, 210, 240, 0.4);
  transition: color 0.2s ease;
}

.toggle-password:hover {
  color: rgba(200, 210, 240, 0.7);
}

.toggle-password svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Паддинг для поля с кнопкой глаза */
.form-group input[type="password"],
.form-group input.has-toggle {
  padding-right: 44px;
}

/* === Кнопка отправки === */
.btn-submit {
  width: 100%;
  padding: 14px;
  margin-top: 8px;
  font-family: 'Onest', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #5b7cfa, #8b5cf6);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.3s ease;
  box-shadow: 0 4px 16px rgba(91, 124, 250, 0.3);
}

.btn-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(91, 124, 250, 0.45);
}

.btn-submit:active {
  transform: translateY(0);
}

.btn-submit--success {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  box-shadow: 0 4px 16px rgba(34, 197, 94, 0.3);
  pointer-events: none;
}

.btn-submit--success:hover {
  box-shadow: 0 4px 16px rgba(34, 197, 94, 0.3);
  transform: none;
}

/* === Ссылка «Уже есть аккаунт?» === */
.register-login-link {
  text-align: center;
  margin-top: 24px;
  font-size: 14px;
  color: rgba(200, 210, 240, 0.5);
}

.register-login-link a {
  color: #8aa4ff;
  font-weight: 600;
  transition: color 0.2s ease;
}

.register-login-link a:hover {
  color: #c084fc;
}

/* === Ссылка «Забыли пароль?» под кнопкой логина === */
.forgot-password-link {
  text-align: center;
  margin-top: 14px;
  font-size: 13px;
}

.forgot-password-link a {
  color: rgba(200, 210, 240, 0.65);
  text-decoration: none;
  transition: color 0.2s ease;
}

.forgot-password-link a:hover {
  color: #8aa4ff;
}

/* === Фикс autofill для тёмной темы === */
.form-group input:-webkit-autofill,
.form-group input:-webkit-autofill:hover,
.form-group input:-webkit-autofill:focus {
  -webkit-text-fill-color: #e0e0f0;
  -webkit-box-shadow: 0 0 0 1000px rgba(15, 15, 35, 0.9) inset;
  border-color: rgba(100, 140, 255, 0.25);
  transition: background-color 5000s ease-in-out 0s;
}

/* === Анимация === */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* === Чекбокс === */
.form-group--checkbox {
  margin-top: 24px;
  margin-bottom: 20px;
}

.form-group--checkbox .checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  position: relative;
}

.form-group--checkbox .checkbox-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: none;
  pointer-events: none;
}

.checkbox-custom {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border: 1px solid rgba(100, 140, 255, 0.25);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.06);
  transition: border-color 0.2s ease, background 0.2s ease;
  position: relative;
  margin-top: 1px;
}

.form-group--checkbox .checkbox-input:checked + .checkbox-custom {
  background: linear-gradient(135deg, #5b7cfa, #8b5cf6);
  border-color: transparent;
}

.form-group--checkbox .checkbox-input:checked + .checkbox-custom::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 2px;
  width: 6px;
  height: 11px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.form-group--checkbox .checkbox-input.input-error + .checkbox-custom {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.checkbox-text {
  font-size: 13px;
  color: rgba(200, 210, 240, 0.6);
  line-height: 1.4;
}

.checkbox-text a {
  color: #8aa4ff;
  text-decoration: none;
  transition: color 0.2s ease;
}

.checkbox-text a:hover {
  color: #c084fc;
}

/* === Разделитель «или войти через» === */
.social-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0 16px;
}

.social-divider::before,
.social-divider::after {
  content: '';
  flex: 1;
  border-top: 1px solid rgba(100, 140, 255, 0.12);
}

.social-divider span {
  font-family: 'Onest', sans-serif;
  font-size: 13px;
  color: rgba(200, 210, 240, 0.4);
  white-space: nowrap;
}

/* === Кнопки соцсетей === */
.social-buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 4px;
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(100, 140, 255, 0.15);
  text-decoration: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.social-btn:hover {
  transform: translateY(-1px);
}

.social-btn svg {
  width: 24px;
  height: 24px;
  fill: rgba(200, 210, 240, 0.5);
  transition: fill 0.2s ease;
}

/* Фирменные цвета при наведении */
.social-btn--yandex:hover {
  border-color: rgba(252, 63, 29, 0.5);
  box-shadow: 0 4px 12px rgba(252, 63, 29, 0.15);
}
.social-btn--yandex:hover svg {
  fill: #FC3F1D;
}

.social-btn--vk:hover {
  border-color: rgba(0, 119, 255, 0.5);
  box-shadow: 0 4px 12px rgba(0, 119, 255, 0.15);
}
.social-btn--vk:hover svg {
  fill: #0077FF;
}

.social-btn--mailru:hover {
  border-color: rgba(0, 95, 249, 0.5);
  box-shadow: 0 4px 12px rgba(0, 95, 249, 0.15);
}
.social-btn--mailru:hover svg {
  fill: #005FF9;
}

.social-btn--ok:hover {
  border-color: rgba(238, 130, 8, 0.5);
  box-shadow: 0 4px 12px rgba(238, 130, 8, 0.15);
}
.social-btn--ok:hover svg {
  fill: #EE8208;
}

/* === Сообщение об успехе === */
.success-message {
  text-align: center;
  margin-bottom: 16px;
  padding: 12px 16px;
  font-size: 14px;
  color: #22c55e;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: 12px;
  animation: fadeUp 0.3s ease;
}

/* === Блок подтверждения email === */
.verify-email-prompt {
  text-align: center;
  margin-bottom: 16px;
  padding: 16px;
  background: rgba(255, 180, 0, 0.08);
  border: 1px solid rgba(255, 180, 0, 0.25);
  border-radius: 12px;
  animation: fadeUp 0.3s ease;
}

.verify-email-prompt__text {
  font-size: 14px;
  color: rgba(255, 220, 150, 0.9);
  margin-bottom: 12px;
  line-height: 1.5;
}

.verify-email-prompt__actions {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.verify-email-prompt__btn {
  padding: 8px 24px;
  font-family: 'Onest', sans-serif;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.verify-email-prompt__btn:hover {
  transform: translateY(-1px);
}

.verify-email-prompt__btn--yes {
  color: #fff;
  background: linear-gradient(135deg, #5b7cfa, #8b5cf6);
  box-shadow: 0 4px 12px rgba(91, 124, 250, 0.3);
}

.verify-email-prompt__btn--yes:hover {
  box-shadow: 0 6px 16px rgba(91, 124, 250, 0.4);
}

.verify-email-prompt__btn--cancel {
  color: rgba(200, 210, 240, 0.7);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(100, 140, 255, 0.15);
}

.verify-email-prompt__btn--cancel:hover {
  color: rgba(200, 210, 240, 0.9);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* === Адаптивность === */
@media (max-width: 768px) {
  .register-header {
    padding: 12px 16px;
    margin: 8px auto 0;
  }

  .register-main {
    padding: 16px 12px;
  }

  .register-card {
    padding: 32px 20px;
    border-radius: 16px;
  }

  .register-card__title {
    font-size: 24px;
  }

  .register-card__subtitle {
    font-size: 14px;
    margin-bottom: 24px;
  }

  .social-btn {
    width: 44px;
    height: 44px;
    border-radius: 10px;
  }

  .social-btn svg {
    width: 22px;
    height: 22px;
  }

  .social-buttons {
    gap: 10px;
  }
}
