/* ===== СТИЛИ ДЛЯ СТРАНИЦЫ РЕГИСТРАЦИИ ===== */
/* Базовые стили наследуются из style.css */

/* ===== ТИПОГРАФИЯ ===== */
h1,
h2,
h3,
h4 {
  font-family: 'Muller', 'Inter', sans-serif;
  font-weight: 700;
  line-height: 1.2;
}

.page {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  font-size: 16px;
  color: #e0e0e0;
  background: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 100%);
  min-height: 100vh;
}

.page__body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.page__body--auth {
  background: linear-gradient(135deg, var(--color-bg-primary) 0%, #1a1a2e 100%);
  position: relative;
  overflow-x: hidden;
}

.page__body--auth::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(102, 126, 234, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(240, 147, 251, 0.1) 0%, transparent 50%);
  z-index: -1;
}

/* ===== КОНТЕЙНЕРЫ ===== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.container--register {
  display: grid;
  align-items: start;
  max-width: 1200px;
  padding: 20px 20px;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

/* ===== ШАПКА ===== */
.navbar {
  padding: 20px 0;
  background: rgba(15, 15, 26, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border-light);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ===== ЛОГОТИП ===== */
.header__logo {
  display: flex;
  align-items: center;
  gap: 15px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s ease;
}

.header__logo:hover {
  transform: translateY(-2px);
}

.header__logo-icon {
  font-size: 2.5rem;
  color: var(--color-primary-start);
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.header__logo-text {
  display: flex;
  flex-direction: column;
}

.header__logo-title {
  margin: 0;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}

.logo__highlight,
.header__highlight {
  font-family: 'Muller', sans-serif;
  background: linear-gradient(135deg, var(--color-primary-start), var(--color-secondary-start));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.header__tagline {
  padding-top: 2px;
  font-size: 1.2rem;
  line-height: 1;
  color: var(--color-text-muted);
}

/* ===== ОСНОВНОЙ КОНТЕНТ ===== */
.main {
  flex: 1;
}

.register {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 0;
}

/* ===== АВТОРИЗАЦИОННЫЙ ЛАЙАУТ ===== */
.form-row {
  margin-bottom: 25px;
  display: grid;
  gap: 10px;
}

.register__section {
  height: 100%;
}

.form__group--register {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  margin-bottom: 0;
}

.form__group--register .form__input {
  margin-top: auto;
}

.form-hint {
  font-size: 0.85rem;
  line-height: 1.2;
  color: var(--color-text-muted);
}

.checkbox--register {
  justify-content: start;
}

.register__info {
  height: 100%;
  animation: slideIn 0.6s ease-out 0.2s backwards;
}

.register__features-list {
  margin-bottom: 0;
}

.footer__content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 1024px) {
  .container--register {
    grid-template-columns: 1fr;
    gap: 40px;
    max-width: 500px;
    margin: 0 auto;
  }

  .register__info {
    display: none;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 15px;
  }

  .header__inner {
    flex-direction: column;
    gap: 20px;
  }

  .logo {
    justify-content: center;
  }
}

/* ===== ПРИМЕНЕНИЕ АНИМАЦИЙ ===== */
.register-layout__form {
  animation: slideIn 0.6s ease-out;
}

.register__info {
  animation: slideIn 0.6s ease-out 0.2s backwards;
}

.register__card {
  animation: fadeInUp 0.6s ease-out;
}

.form--register {
  animation: fadeIn 0.5s ease-out 0.3s backwards;
}

/* Анимация для преимуществ */
.features-list__item {
  transition: all 0.5s ease;
}

.features-list__item.animate {
  opacity: 1;
  transform: translateX(0);
}

/* Анимация кнопки */
.btn--submit {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn--submit:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-primary);
}

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

/* ===== ДОСТУПНОСТЬ ===== */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

:focus {
  outline: 2px solid var(--color-primary-start);
  outline-offset: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}

/* ===== ПЕРЕКЛЮЧАТЕЛЬ ПАРОЛЯ ===== */
.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  flex-direction: column;
  width: 100%;
}

.password-toggle {
  position: absolute;
  top: 15px;
  right: 12px;
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 4px;
  font-size: 1.1rem;
  z-index: 2;
  transition: color 0.3s ease;
}

.password-toggle:hover {
  color: var(--color-primary-start);
}

.password-toggle:focus-visible {
  outline: 2px solid var(--color-primary-start);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ===== ИНДИКАТОР СЛОЖНОСТИ ПАРОЛЯ ===== */
.password-strength {
  width: 100%;
}

.strength-meter {
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
  width: 100%;
}

.strength-meter-fill {
  height: 100%;
  width: 0;
  transition: all 0.3s ease;
}

.strength-text {
  font-size: 0.8rem;
  margin-top: 4px;
  color: var(--color-text-muted);
}

/* ===== УВЕДОМЛЕНИЯ ===== */
.notification {
  position: fixed;
  top: 30px;
  right: 30px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border: 1px solid var(--color-border-light);
  border-radius: 12px;
  padding: 15px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 400px;
  transform: translateX(150%);
  transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  z-index: 9999;
  opacity: 0;
}

.notification.show {
  transform: translateX(0);
  opacity: 1;
}

.notification__icon {
  font-size: 1.2rem;
}

.notification--success {
  border-left: 4px solid #2ed573;
}

.notification--success .notification__icon {
  color: #2ed573;
}

.notification--error {
  border-left: 4px solid #ff4757;
}

.notification--error .notification__icon {
  color: #ff4757;
}

.notification--info {
  border-left: 4px solid var(--color-primary-start);
}

.notification--info .notification__icon {
  color: var(--color-primary-start);
}

.notification--warning {
  border-left: 4px solid #ffa502;
}

.notification--warning .notification__icon {
  color: #ffa502;
}

.notification__text {
  flex: 1;
  color: var(--color-text-white);
  font-size: 0.95rem;
}

.notification__close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  padding: 4px;
  font-size: 1rem;
  transition: color 0.3s ease;
}

.notification__close:hover {
  color: var(--color-text-white);
}

.notification__close:focus-visible {
  outline: 2px solid var(--color-primary-start);
  outline-offset: 2px;
  border-radius: 4px;
}

.footer--register {
  background: transparent;
  border-top: 1px solid rgba(255, 255, 255, 0.1)
}

.form__error {
  color: #ff4757;
  font-size: 0.85rem;
  margin-top: 5px;
  display: none;
  /* ← СКРЫТ ПО УМОЛЧАНИЮ */
  align-items: center;
  gap: 5px;
}

.form__error:not(:empty) {
  display: flex;
  /* ← ПОКАЗЫВАЕМ ТОЛЬКО КОГДА ЕСТЬ ТЕКСТ */
}

.form__error::before {
  content: "⚠️";
  font-size: 0.9rem;
}

/* Убираем желтую/белую подсветку автозаполнения */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 30px rgba(255, 255, 255, 0.05) inset !important;
  -webkit-text-fill-color: #ffffff !important;
  transition: background-color 5000s ease-in-out 0s;
}

/* Для Firefox */
input:-moz-autofill {
  background-color: rgba(255, 255, 255, 0.05) !important;
  color: #ffffff !important;
}

/* Альтернатива — полностью отключить смену фона */
input:-webkit-autofill {
  background-color: transparent !important;
  background-image: none !important;
}

@media (max-width: 768px) {
  .notification {
    top: 20px;
    right: 20px;
    left: 20px;
    max-width: none;
  }
}

/* ===== АНИМАЦИЯ ПРИ ФОКУСЕ ===== */
.form__group.focused .form__label {
  color: var(--color-primary-start);
  transform: translateY(-2px);
}

.form__group.focused .form__input {
  border-color: var(--color-primary-start);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* ===== ДОПОЛНИТЕЛЬНЫЕ СТИЛИ ДЛЯ СТРАНИЦ АВТОРИЗАЦИИ ===== */
.register__card {
  background: var(--color-bg-card);
  border-radius: 20px;
  padding: 40px;
  border: 1px solid var(--color-border-light);
}

.form-group {
  margin-bottom: 20px;
}

.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  cursor: pointer;
}

.forgot-password {
  color: var(--color-primary-start);
  font-size: 0.95rem;
}

.forgot-password:hover {
  text-decoration: underline;
}

.btn-vk:hover {
  background: #4c75a3;
  border-color: #4c75a3;
}

.btn-google:hover {
  background: #db4437;
  border-color: #db4437;
}

.register-link:hover {
  text-decoration: underline;
}