/*
  reg.css - стили страницы регистрации с дизайном index2.
  Разделы: базовые, шапка/бургер/языки, промо, форма, алерты, футер, адаптив.
*/

/* База */
@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Playfair+Display:ital,wght@0,400..900;1,400..900&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; transition: all 0.7s ease; }

body {
  height: 100%;
  font-family: 'Inter', serif;
  background-image: url('../img/dragon-scales.svg');
  background-color: #330055;
  background-position: center;
  background-repeat: repeat;
  overflow-x: hidden;
}

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

/* Шапка */
.header-blok {
  position: sticky; top: 0; left: 0; right: 0; z-index: 1000;
  height: 80px;
  background: linear-gradient(#c08bff, #943bff);
  display: flex; justify-content: center; align-items: center;
}

.content-header-blok-1 {
  position: relative; max-width: 1200px; width: 100%; height: 100%;
  margin: 0 auto; padding: 0 30px; display: flex; align-items: center; justify-content: space-between;
}

.logo-header-blok-2 { display: flex; align-items: center; }
.logo-img { height: 60px; width: auto; }

.knopki-header-blok-3 { display: flex; align-items: center; gap: 8px; }
.dop-kpopki-header-blok-4 { display: flex; align-items: center; }

.knopka {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 16px; margin: 3px;
  background: linear-gradient(#fb8cff, #f934ff); color: #fff;
  border: 1px solid #943bff; border-radius: 5px; text-decoration: none;
  font-size: clamp(12px, 1.6vw, 16px); line-height: 1; cursor: pointer;
  white-space: nowrap; word-break: keep-all; hyphens: none;
}
.knopka:hover { color: #000; background: linear-gradient(#a6fbff, #659d00); }
.knopka i { margin-right: 6px; }

/* Переключатель языка */
.language-switcher { position: relative; display: inline-block; }
.language-btn {
  background: linear-gradient(#392525, #9034ff); border: 1px solid #60185f; border-radius: 5px;
  padding: 8px 12px; font-size: clamp(12px, 1.4vw, 14px); color: #ffffff; display: inline-flex; align-items: center; cursor: pointer; white-space: nowrap;
}
.language-btn img { margin-right: 8px; }
.language-btn i { margin-left: 8px; transition: transform 0.3s ease; transform: rotate(0deg); }
.language-btn:hover { background: linear-gradient(#000, #4234ff); color: #fbff00; }
.language-menu {
  opacity: 0; visibility: hidden; position: absolute; top: 100%; right: 0;
  background: #fff; border: 1px solid #e1e5eb; border-radius: 5px; margin-top: 8px; list-style: none;
  padding: 0; width: 150px; box-shadow: 0 2px 5px rgba(0,0,0,0.15); transition: opacity 0.3s ease, visibility 0.3s ease;
}
.language-menu li { padding: 8px 12px; }
.language-menu li a { text-decoration: none; color: #333; display: flex; align-items: center; }
.language-menu li a img { margin-right: 8px; }
.language-menu li:hover { background-color: #a6effb; }
.language-switcher.active .language-btn i { transform: rotate(180deg); }
.language-switcher.active .language-menu { opacity: 1; visibility: visible; }

/* Бургер (моб.) */
.menu-toggle { position: relative; width: 40px; height: 32px; display: none; background: none; border: 0; padding: 0; cursor: pointer; }
.menu-toggle .bar { position: absolute; left: 6px; right: 6px; height: 3px; background: #fff; border-radius: 2px; transition: transform .3s ease, opacity .2s ease, top .3s ease; }
.menu-toggle .bar:nth-child(1) { top: 8px; }
.menu-toggle .bar:nth-child(2) { top: 14px; }
.menu-toggle .bar:nth-child(3) { top: 20px; }
.header-blok.menu-open .menu-toggle .bar:nth-child(1) { top: 14px; transform: rotate(45deg); }
.header-blok.menu-open .menu-toggle .bar:nth-child(2) { opacity: 0; }
.header-blok.menu-open .menu-toggle .bar:nth-child(3) { top: 14px; transform: rotate(-45deg); }

/* Промо */
.promo-blok {
  width: 100%;
  background: linear-gradient(rgba(90, 0, 140, 0.5), rgba(132, 30, 255, 0.5));
  overflow: hidden; z-index: 0; text-align: center !important; padding: 30px; flex: 1;
}

.main-logo { width: min(500px, 90vw); max-width: 90vw; height: auto; display: block; margin: 0 auto; }
@media (max-width: 380px) { .main-logo { width: 85vw; max-width: 85vw; } }

.parent-container { display: flex; justify-content: center; align-items: center; margin: 10px; }
.container-img { position: relative; width: 150px; height: 150px; }
.rocket-img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; }
.rays-img { position: absolute; top: 50%; left: 50%; width: 150%; height: 150%; transform: translate(-50%,-50%) rotate(0deg); transform-origin: center; z-index: 0; animation: rotateRays 50s linear infinite; }
@keyframes rotateRays { from { transform: translate(-50%,-50%) rotate(0deg);} to { transform: translate(-50%,-50%) rotate(360deg);} }

.promo-title { font-weight: 500; margin-bottom: 0.5rem; color: #fff; font-size: 3.5rem; }
.promo-text  { color: #c1d9f8; font-size: 1.2rem; font-weight: 700; }

/* Алерты */
.message-container { text-align: center; width: 100%; display: flex; flex-direction: column; align-items: center; margin-bottom: 16px; }
.alert { padding: 7px; margin: 3px; border: 1px solid transparent; border-radius: 4px; width: 100%; display: block; text-align: left; position: relative; }
.alert-success { color: #155724; background-color: #d4edda; border-color: #c3e6cb; }
.alert-warning { color: #856404; background-color: #fff3cd; border-color: #ffeeba; border-left: 6px solid #ffcdcd; }
.close { float: right; font-size: 25px; font-weight: bold; line-height: 17px; color: #000; text-shadow: 0 1px 0 #fff; opacity: 0.5; border: none; background: none; cursor: pointer; }
.close:hover { color: #000; text-decoration: none; opacity: 0.75; }

/* Контент и форма регистрации */
.blok-kontent { display: flex; justify-content: center; padding: 24px 16px; flex: 1; }
.login-container { display: flex; justify-content: center; align-items: center; width: 100%; }
.reg-box {
  background: #fff;
  padding: 2rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 700px;
  text-align: left;
  border-radius: 10px 40px 10px;
  border: 10px solid #ffc4f9;
}
.reg-box h2 { margin: 0 0 1.5rem; text-align: center; font-size: 2rem; color: #333; border-bottom: 1px solid #d8b0ff; padding-bottom: 1rem; }

.label-wrapper { display: flex; align-items: center; gap: 8px; }
.tooltip-wrapper { position: relative; display: inline-flex; }
.info-btn { background-color: #3498db; color: #fff; border: none; cursor: pointer; border-radius: 50%; width: 20px; height: 20px; text-align: center; font-size: 16px; line-height: 20px; }
.custom-tooltip {
  position: absolute; top: 28px;
  background: #111; color: #fff; padding: 8px 10px; border-radius: 6px;
  width: 240px; font-size: 12px; z-index: 20; box-shadow: 0 6px 16px rgba(0,0,0,0.15);
  opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}
.custom-tooltip.visible { opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0); }

label { display: block; margin: 8px 0 4px; font-weight: 600; }
input[type="text"], input[type="email"], input[type="password"] {
  width: 100%; padding: 10px 12px; border: 1px solid #d0d0d0; border-radius: 6px; font-size: 14px;
}
.g-recaptcha { margin: 12px 0 16px; }

/* Переключатель Yes/No */
.checkbox-wrapper-55 input[type="checkbox"] { visibility: hidden; display: none; }
.checkbox-wrapper-55 *, .checkbox-wrapper-55 ::after, .checkbox-wrapper-55 ::before { box-sizing: border-box; }
.checkbox-wrapper-55 .rocker { display: inline-block; position: relative; font-size: 2em; font-weight: bold; text-align: center; text-transform: uppercase; color: #888; width: 7em; height: 4em; overflow: hidden; border-bottom: 0.5em solid #eee; }
.checkbox-wrapper-55 .rocker-small { font-size: 0.75em; }
.checkbox-wrapper-55 .rocker::before { content: ""; position: absolute; top: 0.5em; left: 0; right: 0; bottom: 0; background-color: #999; border: 0.5em solid #eee; border-bottom: 0; }
.checkbox-wrapper-55 .switch-left, .checkbox-wrapper-55 .switch-right { cursor: pointer; position: absolute; display: flex; align-items: center; justify-content: center; height: 2.5em; width: 3em; transition: 0.2s; user-select: none; }
.checkbox-wrapper-55 .switch-left { height: 2.4em; width: 2.75em; left: 0.85em; bottom: 0.4em; background-color: #ddd; transform: rotate(15deg) skewX(15deg); }
.checkbox-wrapper-55 .switch-right { right: 0.5em; bottom: 0; background-color: #bd5757; color: #fff; }
.checkbox-wrapper-55 .switch-left::before, .checkbox-wrapper-55 .switch-right::before { content: ""; position: absolute; width: 0.4em; height: 2.45em; bottom: -0.45em; background-color: #ccc; transform: skewY(-65deg); }
.checkbox-wrapper-55 .switch-left::before { left: -0.4em; }
.checkbox-wrapper-55 .switch-right::before { right: -0.375em; background-color: transparent; transform: skewY(65deg); }
.checkbox-wrapper-55 input:checked + .switch-left { background-color: #0084d0; color: #fff; bottom: 0px; left: 0.5em; height: 2.5em; width: 3em; transform: rotate(0deg) skewX(0deg); }
.checkbox-wrapper-55 input:checked + .switch-left::before { background-color: transparent; width: 3.0833em; }
.checkbox-wrapper-55 input:checked + .switch-left + .switch-right { background-color: #ddd; color: #888; bottom: 0.4em; right: 0.8em; height: 2.4em; width: 2.75em; transform: rotate(-15deg) skewX(-15deg); }
.checkbox-wrapper-55 input:checked + .switch-left + .switch-right::before { background-color: #ccc; }
.checkbox-wrapper-55 input:focus + .switch-left { color: #333; }
.checkbox-wrapper-55 input:checked:focus + .switch-left { color: #fff; }
.checkbox-wrapper-55 input:focus + .switch-left + .switch-right { color: #fff; }
.checkbox-wrapper-55 input:checked:focus + .switch-left + .switch-right { color: #333; }

/* Нижний блок ссылок */
.blok-vnizy { width: 100%; background: rgba(255,255,255,0.5); padding: 20px 0; }
.stolbiki   { display: flex; justify-content: center; align-items: center; max-width: 1200px; margin-right: auto; margin-left: auto; text-align: center; }
@media (max-width: 576px) { .stolbiki { display: block; } }
.column     { flex: 1 1 200px; box-sizing: border-box; }
.column h3  { font-size: 1.2em; margin-bottom: 10px; color: #000; }
.column ul  { list-style: none; padding: 0; }
.column li  { margin-bottom: 5px; }
.column a   { color: #000; text-decoration: none; }
.column a:hover { text-decoration: underline; }

/* Футер */
.kopirait {
  width: 100%;
  background: linear-gradient(#003521,#003b3e);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 60px;
  padding: 6px 0;
  gap: 2px;
}
.kopirait p { margin: 0; color: #fff; }
.kopirait .footer-meta { font-size: 12px; opacity: .85; margin-bottom: 2px; }

/* Адаптив */
@media (min-width: 769px) { .promo-blok { min-height: auto; } }

@media (max-width: 768px) {
  .knopki-header-blok-3,
  .dop-kpopki-header-blok-4 { overflow: hidden; }

  /* На мобилке меню языков должно раскрываться поверх - но только когда открыто мобильное меню */
  .header-blok.menu-open .dop-kpopki-header-blok-4 { overflow: visible; }

  .menu-toggle { display: inline-block; z-index: 1100; }
  .header-blok { height: auto; padding: 8px 0; }
  .content-header-blok-1 { flex-wrap: wrap; }
  .knopki-header-blok-3, .dop-kpopki-header-blok-4 {
    display: flex; width: 100%; justify-content: center; flex-direction: column; align-items: center; gap: 8px; padding: 0;
    max-height: 0; opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(-8px);
    transition: max-height .35s ease, opacity .25s ease, transform .35s ease;
  }
  .header-blok.menu-open .knopki-header-blok-3,
  .header-blok.menu-open .dop-kpopki-header-blok-4 {
    max-height: 480px; opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0); padding: 8px 0;
  }
  .knopki-header-blok-3 .knopka { width: 100%; max-width: 260px; text-align: center; }
  .language-switcher { width: 100%; }
  .language-btn { width: 100%; justify-content: center; }
  .language-menu { z-index: 2000; }
}
