@font-face {
  font-family: 'Google Sans';
  src: url('fonts/GoogleSans-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: 'Google Sans';
  src: url('fonts/GoogleSans-Italic.ttf') format('truetype');
  font-weight: 400;
  font-style: italic;
}

@font-face {
  font-family: 'Google Sans';
  src: url('fonts/GoogleSans-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
}

@font-face {
  font-family: 'Google Sans';
  src: url('fonts/GoogleSans-MediumItalic.ttf') format('truetype');
  font-weight: 500;
  font-style: italic;
}

@font-face {
  font-family: 'Google Sans';
  src: url('fonts/GoogleSans-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
}

@font-face {
  font-family: 'Google Sans';
  src: url('fonts/GoogleSans-BoldItalic.ttf') format('truetype');
  font-weight: 700;
  font-style: italic;
}

*, 
*::before, 
*::after {
  box-sizing: border-box;
}

body {
  font-family: 'Google Sans', sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f0f4f9;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.box-wrapper {
  width: 100%;
  max-width: 1040px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.login-box.password-open {
  height: 401px;

}
.login-box {
  width: 100%;
  max-width: 1040px;
  height: 422px;
  background-color: white;
  border-radius: 28px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 40px 48px 36px 48px;
  box-sizing: border-box;
  box-shadow: none;              
  position: relative;
  overflow: hidden;
}

.login-box h1 {
  font-size: 43.5px;
  font-weight: 100;
  margin: 0;
  line-height: 1;
  padding-bottom: 2px; /* точная подгонка */
}

  .login-box .subtitle {
  font-size: 16px;
  margin-top: 19px; /* чуть ближе */
  line-height: 1.4;
  max-width: 500px; /* Подбирай вручную — обычно от 340px до 380px */
  white-space: normal; /* ← на всякий случай */
}

.login-box input:focus {
  border: 2px solid #0b57d0;
}
.input-row {
  display: flex;
  flex-direction: row;
  align-items: center; /* ← это выровняет "Вход" по центру с полем */
  justify-content: space-between;
  width: 100%;
  box-sizing: border-box;
}

.left-text {
  position: absolute;
  left: 36px;
  top: 112px;
  display: inline-block; /* теперь ширина по содержимому */
  flex-direction: column;
  justify-content: flex-start;
}
.button-wrapper {
  position: absolute;
  bottom: 36px;
  left: 0;
  right: 0;
  padding: 0 36px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 26px; 
}

.button-wrapper button {
  height: 36px;
  padding: 0 24px;
  font-size: 14px;
  border: none;
  border-radius: 4px;
  font-family: 'Google Sans', sans-serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.loading-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 4px;
  width: 0;
  background-color: #0b57d0;
  transition: width 1s ease;
  z-index: 110;
}

.box-overlay {
  position: fixed; /* ← фиксированное, поверх всего */
  inset: 0; /* top:0; right:0; bottom:0; left:0 */
  background: rgba(0,0,0,0.15);
  display: none;
  z-index: 100;
}

.box-overlay.active {
  display: block;
}

.footer {
  width: 100%;
  margin: 0 auto;
  height: 64px;
  display: flex;
  justify-content: space-between; /* ключевой момент — space-between */
  align-items: center;
  font-size: 12.5px;
  color: #1f1f1f;
  font-family: 'Google Sans', sans-serif;
  box-sizing: border-box;
  margin-top: 0px;
  padding: 3px 4px; /* Отступы по бокам */
}

.footer a {
  color: #1f1f1f;
  text-decoration: none;
  font-size: 12px;
  padding: 8px 12px; /* управляет высотой и шириной области подсветки */
  border-radius: 6px;
  transition: background-color 0.2s ease;
  font-family: 'Google Sans', sans-serif;
  display: inline-block; /* обязательно, чтобы padding и hover работали корректно */
  }

  .footer a:hover {
  background-color: #e8ebf0; /* светло-серая подсветка при наведении */
}
.language {
  font-size: 12.4px;
  padding: 8px 12px;
  border-radius: 6px;
  font-family: 'Google Sans', sans-serif;
  display: inline-block;
  color: #1f1f1f;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.language:hover {
  background-color: #e8ebf0;
}
.footer .language .arrow {
  font-size: 7px;
  color: #444746;
  font-family: 'Google Sans', sans-serif;
  margin-top: 1px; /* слегка опустить, если нужно */
  display: inline-block;     /* обязательно для transform */
  transform: scaleX(1.4) scaleY(1.0); /* шире и ниже */
}

.footer-links {
  display: flex;
  gap: 7.5px;
}

.footer-left {
  display: flex;
  align-items: center;
  font-family: 'Google Sans', sans-serif;
  padding-left: 0px;
}

.footer-right {
  display: flex;
  gap: 8px;
  font-family: 'Google Sans', sans-serif;
  align-items: center;
}
.footer-left .language {
  display: flex;
  align-items: center;
  gap: 112px;
}
.page-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
  padding: 0 16px;              
  width: 100%;             
  max-width: 100vw;        
}
.button-wrapper .create-account {
  background: none;
  color: #0b57d0;
  font-weight: 500;
  padding: 20px 14px;
  border-radius: 20px;
  transition: background-color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: normal; /* или 1.2 */
}

/* Эффект наведения */
.button-wrapper .create-account:hover {
  background-color: #f0f4f9;
}

.button-wrapper .next {
  width: 90px;
  height: 40px;
  background-color: #0b57d0;
  color: white;
  border: none;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease;
  padding: 0;
}
.input-container {
  position: absolute;
  top: 116px;
  right: 36px;
  width: 100%;
  max-width: 460px;
  display: flex;
  flex-direction: column;
  align-items: flex-start; 
  box-sizing: border-box;
}

#email-step .input-container {
  top: 116px;
  right: 36px;
}

/* Для пароля — поднимаем выше */
#password-step .input-container {
  top: 110px; /* подкорректируй по необходимости */
  right: 36px; /* если нужно */
}

#code-input.error {
  border: 2px solid red;
}

#code-error {
  color: #b3261e;
  font-size: 12px;
  margin-top: 4px;  /* отступ сверху от поля */
  display: none;    /* по умолчанию скрыто */
  width: 100%;      /* чтобы занимало всю ширину поля */
}

#code-step .input-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

#password-error,
#limit-error {
  color: #b3261e;
  font-size: 12px;
  margin-top: 4px;
  display: none;
}
/* === Code step === */
#code-step {
  display: none; /* скрыт по умолчанию */
  width: 100%;
}

#code-input {
  width: 100%;
  padding: 0 15px; /* как у обычного input */
  height: 56px;    /* как у пароля */
  border: 1px solid #747775; /* тот же цвет */
  border-radius: 4px;        /* тот же радиус */
  font-size: 16px;
  box-sizing: border-box;
  outline: none;
  background: none;
  transition: border 0.2s;
}

.code-next {
  width: 100%;
  padding: 12px;
  background: #1877f2;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
}

.code-next:hover {
  background: #166fe5;
}

#code-input:focus {
  border: 2px solid #0b57d0;
  outline: none; /* чтобы убрать стандартный синий контур браузера */
}

input.error {
  border: 2px solid #b3261e !important;
}

input.error::placeholder {
  color: #b3261e !important;
  transition: color 0.3s ease;
}

input.error:focus::placeholder {
  color: #999 !important;
}

input.error + label {
  color: #b3261e !important;
}

.limit-error {
 display:none; 
 color:#b3261e; 
 font-size:12px; 
 margin-top:4px;
 }
 
.button-wrapper .next:hover {
  background-color: #0842a0;
}

.input-wrapper {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: flex-end;
}

input {
  width: 100%;
  height: 56px; 
  padding: 0 15px; 
  font-size: 16px; 
  border: 1px solid #747775; 
  color: #1f1f1f;
  border-radius: 4px; 
  outline: none; 
  background: none; 
  transition: border 0.2s;
  box-sizing: border-box;
}

input[type="email"]:focus {
  border: 2px solid #0b57d0; 
}
input:focus,
input.focused {
  border: 2px solid #0b57d0;
}

.input-wrapper label {
  position: absolute; 
  top: 18px; 
  left: 12px; 
  font-size: 16px; 
  font-weight: 400;
  color: #3c4043; 
  pointer-events: none; 
  background-color: #fff; 
  transition: 0.2s ease all; 
  padding: 0 4px; 
}

.input-wrapper input:focus + label,
.input-wrapper input:not(:placeholder-shown) + label {
  top: -8px;
  left: 8px;
  font-size: 12px;
  color: #0b57d0;
}

.input-wrapper input:not(:placeholder-shown):not(:focus) + label {
  color: #5f6368; 
}
.forgot-email {
  margin-top: 9px;
  margin-left: -5px; /* ← вот здесь управляй смещением */
  justify-content: flex-start;   
  padding-left: calc(100% - 530px); 
  box-sizing: border-box;
}

.forgot-email a {
  font-size: 14px;
  color: #0b57d0;
  text-decoration: none;
  font-weight: 500;
  padding: 1px 4px;         
  border-radius: 20px;      
  transition: background-color 0.2s ease; 
  letter-spacing: 0.3px; 
}

.forgot-email a:hover {
  background-color: #f0f4f9;

}

.guest-mode {
  font-size: 14.2px;
  color: #444746; /* ← серый текст */
  margin-top: 45px;
  padding-left: calc(100% - 530px);
  line-height: 1.4;
  max-width: 460px;
  box-sizing: border-box;
}

.guest-mode a {
  color: #0b57d0; /* ← синий цвет ссылки */
  text-decoration: none;
  font-weight: 500;
  font-size: 14.2px;
}

.guest-mode a:hover {
  text-decoration: underline;
  color: #0b57d0; /* ← синий цвет ссылки */
}

.footer-mobile {
  display: none;
}
.language-mobile {
  display: none;
}
.login-logo {
  position: absolute;
  top: 36px;
  left: 35px;
  width: 48px; /* можно изменить по размеру */
  height: 48px;
}
.button-wrapper .forgot-password-button {
  background: none;
  color: #0b57d0;
  font-weight: 500;
  padding: 20px 14px;
  border-radius: 20px;
  font-size: 14px;
  font-family: 'Google Sans', sans-serif;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.button-wrapper .forgot-password-button:hover {
  background-color: #f0f4f9;
}

.button-wrapper .login-button {
  width: 90px;
  height: 40px;
  background-color: #0b57d0;
  color: white;
  border: none;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.button-wrapper .login-button:hover {
  background-color: #0842a0;
}
.email-bubble {
  border: 1px solid #747775;
  padding: 5px 18px;
  border-radius: 28px;
  font-size: 14px;
  color: #202124;
  background-color: white;
  display: inline-flex;
  margin-bottom: 18px;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  margin-top: 16px; /* немного отодвинет от заголовка */
  align-items: center;
  gap: 8px;
  padding-left: 4px;
  font-weight: 500;
}
.email-bubble .email-icon {
  width: 20.5px;                 /* размер иконки */
  height: 20.5px;
}
.email-arrow {
 font-size: 7px;
  color: #444746;
  font-family: 'Google Sans', sans-serif;
  margin-top: 1px; /* слегка опустить, если нужно */
  display: inline-block;     /* обязательно для transform */
  transform: scaleX(1.4) scaleY(1.0); /* шире и ниже */
}

.show-password-container {
  margin-top: 12px; /* отступ сверху */
  display: flex;
  align-items: center;
  gap: 19px; /* расстояние между чекбоксом и текстом */
  font-size: 14px;
  color: #3c4043;
  user-select: none; /* чтобы текст не выделялся при клике */
  font-weight: 500;
  padding-left: 3px;
}

.show-password-container input[type="checkbox"] {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: none !important;

  width: 18px;
  height: 18px;
  border: 2.5px solid #3c4043;
  border-radius: 0px;
  background-color: white;
  position: relative;
  cursor: pointer;
  box-sizing: border-box;
  box-shadow: none;
  outline: none;
  margin: 0;
  padding: 0;
}
.show-password-container input[type="checkbox"]:checked {
  background-color: #0b57d0; /* синий фон */
  border-color: #0b57d0;     /* синий бордер */
}

.show-password-container input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  top: 1px;       /* чуть поднять */
  left: 5px;      /* сдвинуть левее */
  width: 5px;     /* увеличить ширину */
  height: 12px;   /* увеличить высоту */
  border: solid white;
  border-width: 0 2.5px 2.5px 0; /* оставить тоньше, но немного толще */
  transform: rotate(45deg);
}

.show-password-container label {
  cursor: pointer;
}

.confirm-text {
  font-size: 14px;
  color: black; /* или другой подходящий цвет */
  margin-bottom: 48px; /* отступ снизу от текста до поля */
  max-width: 460px;    /* можно задать ширину, если нужно */
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.login-button.loading {
  color: transparent;
  pointer-events: none;
  position: relative;
}

.login-button.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 3px solid #555;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.digit-display {
  font-size: 50px;
  margin-top: 0px;
  color: #000; /* или любой цвет текста */
  text-align: center;   /* выравнивание по левому краю */
  width: 100%;        /* занимает всю ширину контейнера */
  margin-bottom: 8px;      /* отступ между цифрой и текстом */
}

.digit-subtitle {
  font-size: 14px;
  margin-top: 25px;
  color: #000; 
  max-width: 450px;     /* ограничиваем ширину (подбирай под свой макет) */
}

.digit-wrapper {
  display: flex;
  flex-direction: column;  /* расположение в столбик */
  margin-top: 15px;
  align-items: center; /* выравниваем влево */
  margin-right: 150px; /* подбирай значение отступа */
}

.digit-text {
  font-size: 16px;
  color: #000;
  text-align: left;
  margin-top: 8px;
  white-space: nowrap; /* запрет переноса строк */
}

.digit-extra {
  font-size: 13px;
  color: #000;
  margin-top: 5px;
  text-align: left;
}

@media (max-width: 768px) {
   body {
    overflow-y: auto;
    min-height: 100dvh;
  }
  .login-box {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
    max-width: none;
    padding: 40px 24px 100px;
    box-sizing: border-box;
    margin-bottom: 0;
    padding-bottom: 0;
  }

  .page-wrapper {
    height: auto;
    min-height: 100dvh;
    padding: 0;
  }

  .input-container {
    position: static !important;
    top: auto !important;
    right: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 0px !important;
    box-sizing: border-box;
    align-items: stretch !important;
  }

  .input-wrapper {
  width: 100% !important;
  max-width: none !important;
  padding: 0 !important;
  justify-content: stretch !important;
  box-sizing: border-box;
}

  .input-wrapper input {
  width: 100% !important;
  max-width: none !important;
  box-sizing: border-box;
}

  .forgot-email {
  margin-top: 10px;
  justify-content: flex-start;
  padding-left: 1px; 
  display: flex;
}

  .button-wrapper {
    display: flex;
    justify-content: space-between;
    padding: 0 37px;
    position: static;
    margin-top: 25px;
    box-sizing: border-box;
  }

  .button-wrapper .create-account {
    margin-left: -51px;
  }

  .button-wrapper .next {
    margin-right: -37px;
  }

  .button-wrapper .forgot-password-button {
    margin-left: -51px;
  }

  .button-wrapper .login-button {
    margin-right: -37px;
  }

  .guest-mode {
  margin-top: 45px;
  padding-left: 0px;
  padding-right: 0px;
  font-size: 14.2px;
  max-width: 100%;
  box-sizing: border-box;
}
.footer {
    display: none;
    margin-top: 0;
  }

  .footer-mobile {
  display: flex;
  flex-direction: column; /* вертикально */
  align-items: flex-start;
  position: fixed;
  bottom: 5px;
  left: 0;
  width: 100%;
  padding: 12px 13px;
  font-size: 12.1px;
  color: #1f1f1f;
  background-color: white;
}

.footer-mobile-links {
  display: flex;
  gap: 7px;
}

  .footer-mobile a {
    font-size: 12.1px;
    color: #1f1f1f;
    text-decoration: none;
  }
  .language-mobile {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 110px;
  font-size: 12.2px;
  color: #1f1f1f;
  font-family: 'Google Sans', sans-serif;
  font-weight: 400;
  padding: 0; /* убираем лишние отступы сверху */
  margin-bottom: 4px; /* небольшой отступ снизу */
  margin-top: -47px; /* ← это поднимает выше */
  margin-left: 10.5px; /* ← или 16px, 20px, подбирай по вкусу */
}


  .language-mobile .lang-arrow {
    font-size: 10px;
    margin-top: 1px; /* выравнивание по высоте */
    color: #1f1f1f;
    display: inline-block;     /* обязательно для transform */
    transform: scaleX(1.0) scaleY(0.5); /* шире и ниже */
  }
  .login-box h1 {
  position: static !important;
  top: auto !important;
  left: auto !important;
  font-size: 31.5px; /* или другой размер для мобилки */
  margin-bottom: 8px; /* зазор между h1 и subtitle */
}
.left-text {
  position: static !important;
  top: auto !important;
  left: auto !important;
  padding: 0 !important;
  margin-bottom: 12px; /* чтобы был отступ вниз */
}
.login-logo {
    position: static;
    width: 52px;      /* уменьшаем ширину на мобилке */
    margin-bottom: 29px;
    margin-top: -16px; /* подгони при необходимости */
    align-self: flex-start;
    padding-left: 4px;
    margin-left: -5px;   /* ← подвинуть влево, если нужно */
  }

  .login-logo img {
    width: 60px; /* меньше для мобильных */
    height: 65px;
  }
  .subtitle {
    white-space: normal; /* разрешаем перенос строк */
  }
  .left-text h1 {
  margin-bottom: -1px; /* или любое другое значение, например 16px, 24px */
}
.subtitle {
  margin-bottom: 32px; /* подбери нужное значение */
}
.guest-mode {
  margin-bottom: 16px; /* подбери нужное тебе значение */
}
.login-box.password-open {
    height: auto;
    min-height: 100vh; /* чтобы растягивалась по содержимому */
  }
    #password-step .input-container {
  margin-bottom: 63px;
  }

 #password-step .confirm-text {
    margin-top: 5px; /* если был большой верхний отступ — убрать */
  }

  #code-step .button-wrapper {
    justify-content: flex-end !important;
    padding-right: 0px; /* подгони отступ */
  }

  #code-step .button-wrapper .login-button {
    margin-right: 0 !important; /* убираем отрицательный сдвиг */
  }

  .digit-wrapper {
    margin-right: 0 !important;
    align-items: center !important;
    justify-content: center;
    width: 100%;
  }

  .digit-display {
    text-align: center !important;
    width: 100% !important;
  }
  .digit-text,
  .digit-extra {
    text-align: left !important;
    width: 100%;         /* чтобы заняли всю ширину */
    padding-left: 0px;  /* небольшой отступ, подгони */
    box-sizing: border-box;
  }
}