/* Базовый фон с анимацией */
body,html {
  margin:0; padding:0;
  width:100%; height:100%;
  overflow:hidden;
  background: radial-gradient(
    circle at center,
    #184e77 0%,
    #0a2a43 40%,
    #0a0a0f 100%
  );
  font-family: Arial, sans-serif;
}

#bgcanvas {
  position:fixed;
  top:0; left:0;
  width:100%; height:100%;
  display:block;
  z-index:0;
}

/* Логотип */
#logo {
  position:absolute;
  top:40%; left:50%;
  transform:translate(-50%, -150%);
  font-size:36px;
  font-weight:bold;
  color:white;
  text-align:center;
  opacity:0;
  transition: opacity 5s ease;
  z-index:10;
}
#logo.show {
  opacity:1;
}

/* Форма */
#loginForm {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  opacity: 0;
  transition: opacity 5s ease;
  z-index: 10;

  /* ширина */
  width: 90%;          /* почти на весь экран на мобилке */
  max-width: 400px;    /* ограничение на десктопе */
  min-width: 280px;    /* чтобы не схлопывалась слишком узко */
  box-sizing: border-box;
}

#loginForm .form-control {
  width: 100%;
  height: 36px;
}

#loginBtn {
  width: 100%;
}

#loginForm.show {
  opacity: 1;
}


/* Футер */
#footer {
  position:absolute;
  bottom:20px;
  left:50%;
  transform:translateX(-50%);
  text-align:center;
  color:white;
  font-size:14px;
  opacity:0;
  transition:opacity 5s ease;
  z-index:10;
}
#footer.show {
  opacity:1;
}
#footer .social {
  margin-top:10px;
}
#footer .social a {
  color:white;
  margin:0 8px;
  font-size:18px;
  text-decoration:none;
}
#footer .social a:hover {
  color:#3E8EF7;
}

/* Мобильная версия */
@media (max-width: 767px) {
  body, html {
    display: flex;
    flex-direction: column;
    justify-content: center; /* центруем по вертикали */
    align-items: center;     /* центруем по горизонтали */
  }

  #logo {
    margin: 20px auto 10px auto; /* регулируете верхний и нижний отступ */
    text-align: center;
  }

  #loginForm {
    width: calc(100% - 32px);
    min-width: 0;
    margin: 0;
  }

  #loginForm .form-control {
    width: 100%;
    height: 36px;
  }

  #loginBtn {
    width: 100%;
    height: 36px;
  }

  #footer {
    position: absolute;   /* фиксируем футер */
    bottom: 20px;         /* отступ снизу */
    transform: translateX(-50%);
    margin: 0;            /* убираем margin, чтобы не прыгал */
    width: 100%;          /* можно добавить, чтобы текст ровно центрировался */
    text-align: center;
  }
}
