/* БАЗОВЫЕ СБРОСЫ, ГЛОБАЛЬНЫЕ СТИЛИ */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  min-height: 100vh;
  position: relative;
  z-index: 1;
  font-family: 'Montserrat', sans-serif;
  color: #fff;
  overflow-x: hidden;
  background: transparent;
  display: flex;
  flex-direction: column;
}
main {
  flex: 1;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 5vh;
  width: 100%;
  min-height: 0;
  box-sizing: border-box;
}
footer {
  flex: 0 0 auto;
  text-align: center;
  padding: 1rem 0.5rem;
  background: transparent;
  z-index: 10;
}

.main-content-centered {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 2vw; padding-right: 2vw; padding-bottom: 2vw; padding-top: 0;
  color: #ffffff;
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(1.05rem, 2.3vw, 1.5rem);
  line-height: 1.5;
  text-align: center;
  border-radius: 18px;
  user-select: text;
  background: none;
  box-shadow: none;
}
.main-content-centered p {
  margin-bottom: 1.3em;
  text-align: center;
}
.footer {
  padding-left: 1vw;
  padding-right: 1vw;
}

/* ХЕДЕР (Десктоп по умолчанию) */
header {
  width: 100vw;
  min-height: 135px;
  background: transparent;
  z-index: 10;
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  justify-content: stretch;
}

/* Левая часть: ЛОГО */
.header-left {
  width: 15vw;
  min-width: 110px;
  max-width: 210px;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding-left: 1vw;
  padding-top: 1vw;
  background: transparent;
  position: relative;
}
.logo-link { display: flex; align-items: flex-start; }
.logo-img {
  width: 13vw;
  min-width: 64px;
  max-width: 170px;
  height: auto;
  object-fit: contain;
  border-radius: 20%/20%;
  box-shadow: 0 2px 10px rgba(0,0,0,0.13);
}

/* Центральная часть: НАВИГАЦИЯ и заголовок */
.header-center {
  width: 70vw;
  min-width: 350px;
  max-width: 1100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: transparent;
  padding: 0;
  margin: 0 auto;
}
.header-nav-row {
  width: 100%;
  max-width: 900px;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.main-nav {
  display: flex;
  width: 100%;
  gap: 0.4vw;
  align-items: center;
  justify-content: center;
}
.nav-item {
  flex: 0 1 auto;
  min-width: 62px;
  max-width: 160px;
  white-space: nowrap;
  text-align: center;
  padding: 0.7rem 1.1rem;
  border-radius: 12px;
  background: rgba(30, 30, 40, 0.35);
  box-shadow:
    0 2px 4px rgba(0,0,0,0.5),
    inset 0 1px 0 rgba(255,255,255,0.1);
  text-decoration: none;
  color: #fff;
  font-size: clamp(0.97rem, 1.1vw, 1.15rem);
  transition: transform .2s, box-shadow .2s;
}
.nav-item:hover,
.nav-item.active {
  transform: translateY(-3px);
  background: rgba(255,255,255,0.15);
  box-shadow:
    0 6px 8px rgba(0,0,0,0.7),
    inset 0 1px 0 rgba(255,255,255,0.15);
}
.header-title-row {
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0.4em auto 0.1em auto;
}
.header-title {
  font-size: clamp(2.4rem, 7vw, 5rem);
  font-weight: bold;
  line-height: 1.1;
  color: #FDDD1C;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 0;
  margin-bottom: 0.18em;
  user-select: text;
}
.header-subtitle {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(1.15rem, 2.1vw, 1.5rem);
  font-weight: 500;
  line-height: 1.28;
  color: transparent;
  background: linear-gradient(90deg,#ffd700 40%,#7fff00 100%);
  background-clip: text;
  -webkit-background-clip: text;
  text-align: center;
  opacity: 0.98;
  max-width: 850px;
  margin-bottom: 0;
  user-select: text;
}

/* ПРАВЫЙ ХЕДЕР (Десктоп: вертикально, строго по правому краю) */
.header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-start;
  padding-right: 2vw;
  padding-top: 1vw;
  gap: 0.65em;
  width: 15vw;
  min-width: 110px;
  max-width: 210px;
  background: transparent;
  position: relative;
}

/* Кнопка "Вход" — в самом углу */
.btn-auth.styled-auth {
  font-size: 1.14em;
  font-weight: 700;
  padding: 0.45em 2.2em;
  border: none;
  border-radius: 18px;
  background: linear-gradient(90deg,#ffd700 40%,#7fff00 100%);
  color: #23264e;
  margin: 0;
  box-shadow: 0 2px 10px #0003;
  transition: background 0.2s, color 0.2s, transform 0.16s;
  cursor: pointer;
  outline: none;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  align-self: flex-end;
}
.btn-auth.styled-auth:hover {
  background: #ffe27c;
  color: #222;
  transform: translateY(-2px) scale(1.07);
}
/* Добавлено для настроек кнопки глаз и восстановления пароля) */
.password-field {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}
.password-field input[type="password"],
.password-field input[type="text"] {
  padding-right: 2.5rem;
}
.toggle-password {
  position: absolute;
  top: 50%;
  right: 0.75rem;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  outline: none;
  width: 1.75rem; height: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.8;
}
.toggle-password img { width: 1.5rem; height: 1.5rem; }

/* Язык — под кнопкой, по правому краю */
.lang-switch {
  background: transparent;
  border: none;
  box-shadow: none;
  width: 36px;
  height: 24px;
  border-radius: 9px;
  padding: 0;
  margin: 0;
  align-self: flex-end;
  position: relative;
  top: 0; right: 0;
}
.lang-switch.open,
.lang-switch:hover {
  box-shadow: 0 6px 18px #00c8ff55;
}
.lang-flag-main {
  position: relative;
  width: 36px;
  height: 24px;
  border-radius: 9px;
  overflow: hidden;
  background: #232444;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 24px;
  box-shadow: 0 1px 4px #0002;
}
.lang-flag-main .flag-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: absolute;
  left: 0; top: 0;
  z-index: 1;
}
.lang-flag-main .lang-short {
  position: absolute;
  left: 0; top: 0; right: 0; bottom: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.03rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 4px #232444, 0 0 1px #232444, 0 0 1px #232444;
  pointer-events: none;
  letter-spacing: 0.01em;
  user-select: none;
}
.lang-dropdown {
  display: none;
  position: absolute;
  top: 120%; right: 0;
  min-width: 120px;
  background: #23264e;
  box-shadow: 0 8px 28px #0006;
  border-radius: 12px;
  padding: 0.4em 0.1em;
  z-index: 111;
}
.lang-switch.open .lang-dropdown {
  display: block;
  animation: fadeIn 0.18s;
}
.lang-option {
  display: flex;
  align-items: center;
  gap: 0.55em;
  padding: 0.65em 1.15em 0.65em 0.7em;
  cursor: pointer;
  font-weight: 500;
  color: #fff;
  border-radius: 8px;
  transition: background 0.14s;
  font-size: 1.04em;
}
.lang-option:hover {
  background: #1dd5ef55;
}
.lang-option .flag-img {
  width: 28px;
  height: 20px;
  border-radius: 4px;
  vertical-align: middle;
  box-shadow: 0 1px 4px #0002;
  object-fit: cover;
}

/* Бургер — скрыт на десктопе */
.burger {
  display: none !important;
  position: relative;
  background: none;
  border: none;
  outline: none;
  cursor: pointer;
  z-index: 31;
}
.burger span,
.burger::before,
.burger::after {
  position: absolute;
  left: 8px;
  width: 28px;
  height: 4px;
  background: #fff;
  border-radius: 2px;
  display: block;
  content: "";
  transition: 0.25s;
}
.burger span { top: 21px; }
.burger::before { top: 12px; }
.burger::after  { top: 30px; }
.burger::before,
.burger::after { content: ""; }

/* АДАПТИВ — МОБИЛЬНАЯ ВЕРСИЯ (<800px) */
@media (max-width: 800px) {
  header {
    flex-direction: column;
    align-items: stretch;
    position: relative;
    min-height: 75px;
    height: auto;
    padding: 0;
  }
  .header-left,
  .header-center {
    width: 100vw;
    min-width: 0;
    max-width: none;
    padding: 0;
    margin: 0;
    justify-content: center;
  }
  .header-left {
    justify-content: flex-start;
    align-items: flex-start;
    padding-left: 2vw;
    padding-top: 2vw;
  }
  .header-center {
    padding: 0 2vw;
    width: 100vw;
  }
  .header-title-row,
  .header-nav-row {
    width: 100vw;
    max-width: 100vw;
    margin: 0;
  }
  .header-title-row {
    margin-top: 0.2em;
    padding: 0 2vw;       /* отступы по бокам */
    box-sizing: border-box;
  }
  .main-nav {
    display: none;
    position: absolute;
    top: 54px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.91);
    border-radius: 12px;
    padding: 1.2rem 0.7rem;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
    min-width: 150px;
    z-index: 20;
    margin: 0 auto;
  }
  .main-nav.active {
    display: flex;
  }
  .header-title,
  .header-subtitle {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    text-align: center;
  }
  .header-title {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: unset !important;
    font-size: 2rem !important; /* или меньше — как выглядит лучше */
  }
  .header-title-row {
    min-height: unset !important;
    height: auto !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }
  .header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.20em;
    padding-right: 1vw;
    padding-top: 1vw;
    width: auto;
    min-width: 70px;
    max-width: none;
    position: absolute;
    right: 1vw;
    top: 1vw;
  }
  .btn-auth.styled-auth {
    font-size: 1em;
    padding: 0.39em 1.3em;
    border-radius: 15px;
    min-height: 44px;
    min-width: 88px;
    align-self: flex-end;
    margin-bottom: 0.14em;
  }
  .lang-switch {
    align-self: flex-end;
    margin: 0;
    box-sizing: border-box;
    min-width: 44px;
    min-height: 44px;
    width: 44px;
    height: 44px;
    padding: 0;
    display: flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: none;
    position: static;
    right: 0;
  }
  .header-right-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
    gap: 0.15em;
  }
  .burger {
    display: flex !important;
    position: relative;
    margin-top: 0.25em;
    align-self: flex-end;
    box-sizing: border-box;
    min-width: 44px;
    min-height: 44px;
    width: 44px;
    height: 44px;
    padding: 0;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: none;
    right: 0;
    left: auto;
    top: auto;
  }
  .burger span,
  .burger::before,
  .burger::after {
    left: 8px;
    width: 28px;
    height: 4px;
    background: #fff;
    border-radius: 2px;
    display: block;
    content: "";
    transition: 0.25s;
  }
}

/* МОДАЛЬНОЕ ОКНО АВТОРИЗАЦИИ */
.auth-modal {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
}
.auth-modal__overlay {
  position: absolute;
  width: 100vw; height: 100vh;
  left: 0; top: 0;
  background: rgba(0,0,0,0.4);
  z-index: 0;
}
.auth-modal__content {
  position: relative;
  z-index: 1;
}
.auth-modal__content {
  background: #b3cde7 !important;
  color: #23264e !important;
  border-radius: 12px !important;
  box-shadow: 0 2px 20px #0006;
  padding: 2.2em 1.7em 1.4em 1.7em !important;
  min-width: 310px;
  max-width: 370px;
  width: 100%;
  margin: 5% auto;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.auth-tab-buttons {
  display: flex;
  width: 100%;
  margin-bottom: 1.1em;
}
.auth-tab-btn {
  width: 50%;
  border: none;
  outline: none;
  background: linear-gradient(90deg,#ffd700 40%,#7fff00 100%);
  color: #23264e;
  font-weight: 700;
  font-size: 1.06em;
  padding: 0.7em 0;
  cursor: pointer;
  border-radius: 10px 10px 0 0;
  transition: background 0.19s, color 0.18s;
  box-shadow: 0 2px 10px #0002;
}
.auth-tab-btn:not(.active) {
  background: #e1eaf1;
  color: #8e989b;
  font-weight: 600;
  box-shadow: none;
}
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.75em;
  width: 100%;
  align-items: stretch;
}
.auth-form input {
  width: 100%;
  padding: 0.75em 1em;
  border: none;
  border-radius: 9px;
  font-size: 1em;
  background: #fffbe3;
  color: #23264e;
  margin-bottom: 0.05em;
  box-sizing: border-box;
  font-family: inherit;
  outline: none;
}
.auth-form input:focus {
  background: #e0f7ff;
}
.auth-submit {
  margin-top: 0.7em;
  width: 100%;
  border: none;
  border-radius: 12px;
  background: linear-gradient(90deg,#ffd700 40%,#7fff00 100%); /* 90deg, #FFD700 40%, #7FFF00 65%, #8A2BE2 100% */
  color: #23264e;
  font-weight: 700;
  font-size: 1.07em;
  cursor: pointer;
  box-shadow: 0 2px 10px #0003;
  transition: background 0.2s, color 0.2s;
  padding: 0.65em 0;
}
.auth-submit:hover {
  background: #ffe27c;
  color: #222;
}
/* Скрываем невидимую форму */
.auth-form.hidden { display: none !important; }
.auth-modal.hidden { display: none !important; }

/* Вспомогательные стили и анимации */
.highlight {
  color: #FDDD1C;
  font-weight: 600;
}
.grd-bg {
  background: linear-gradient(90deg, #FFD700 40%, #7FFF00 65%, #8A2BE2 100%);
}
.grd-text {
  background: linear-gradient(90deg, #FFD700 40%, #7FFF00 65%, #8A2BE2 100%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}
/* 2. Универсальный селектор для всех <a class="btn btn-primary"> */
.btn.btn-primary {
  display: inline-block;
  margin: 0.1em 0;
  padding: 0.1em 0.1em;
  border: none;
  border-radius: 10px;
  background: linear-gradient(90deg, #ffd700 40%, #7fff00 100%);
  color: #23264e;
  font-weight: 700;
  font-size: 1em;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  transition: background 0.2s, color 0.2s;
}
.btn.btn-primary:hover {
  background: #ffe27c;
  color: #222;
}
/* 3. Стилизуем .highlight-link как кнопку «Отправить»
.highlight-link {
  display: inline-block;
  margin-top: 0.1em;
  padding: 0.1em 0.1em;
  border: none;
  border-radius: 10px;
  background: linear-gradient(90deg, #ffd700 40%, #7fff00 100%);
  color: #23264e;
  font-weight: 700;
  font-size: 1em;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  transition: background 0.1s, color 0.1s;
}
.highlight-link:hover {
  background: #ffe27c;
  color: #222;
} */

/* Стилистика для слов с гиперссылками */
.highlight-link {
  display: inline;                  /* не блок, а строчный элемент */
  padding: 0 0.2em;                 /* чуть горизонтальной «подушки» */
  background: linear-gradient(90deg, #ffd700 40%, #7fff00 100%); /* полупрозрачный жёлтый фон rgba(255, 215, 0, 0.3) */
  color: #23264e;                   /* обычный цвет текста */
  font-weight: 600;                 /* чуть жирнее, но не «кнопочно» */
  font-size: 1em;                   /* точно как окружающий текст */
  border-radius: 0.2em;             /* очень лёгкое скругление */
  text-decoration: none;            /* без подчёркивания */
  box-shadow: none;                 /* отключаем тень */
  transition: background 0.15s;     /* лёгкий hover-эффект */
}
.highlight-link:hover {
  background: rgba(255, 215, 0, 0.5); /* чуть более заметный фон */
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px);}
  to   { opacity: 1; transform: translateY(0);}
}
#bg-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
}
