* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  font-family: Arial, sans-serif;
  background-color: #f6f7f8;
  color: #2a3647;
  scrollbar-width: none;
}

.content-wrepper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  margin: 0 auto;
  max-width: 1920px;
  position: relative;
}

header {
  height: 80px;
  padding: 0 24px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  position: static;
  z-index: 5;
}

.logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
  transition: all 0.6s ease-in-out;
  z-index: 10;
}

.logo_page {
  width: 100px;
  height: 120px;
  transition: width 0.8s ease-in-out, height 0.8s ease-in-out;
}

body.loaded .logo {
  top: 37px;
  left: 81px;
  transform: translate(0, 0);
}

body.loaded .logo_page {
  width: 100px;
  height: 120px;
}

.button-section {
  display: flex;
  gap: 12px;
  align-items: center;
}

.button-section--mobile {
  display: none;
}

.links {
  text-decoration: none;
  color: #2a3647;
  font-size: 20px;
}

.signup {
  height: 36px;
  padding: 0 18px;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  background-color: #2a3647;
  color: white;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
  font-size: 16px;
}

.signup:hover {
  background-color: #5ec0e9;
  color: #ffffff;
}

main {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 56px 24px 96px;
}

.login-message {
  display: none;
  position: absolute;
  top: -70px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
}

.login-message.is-visible {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

@media (max-width: 500px) {
  .login-message {
    top: -58px;
  }
}

.login-form {
  width: 652px;
  height: 449px;
  background: #ffffff;
  padding: 48px 115px;
  border-radius: 30px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 13px;
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.6s ease;
  position: relative;
}

body.loaded .login-form {
  opacity: 1;
  transform: translateY(0);
}

/* Zweiter und weitere Besuche: keine Animation/Transition */
body.visited .logo {
  top: 37px;
  left: 81px;
  transform: translate(0, 0);
  transition: none !important;
}

body.visited .logo_page {
  width: 100px;
  height: 120px;
  transition: none !important;
}

body.visited .login-form {
  opacity: 1;
  transform: translateY(0);
  transition: none !important;
}

.login-form h1 {
  text-align: center;
  font-size: 61px;
  font-weight: 700;
  position: relative;
  padding-bottom: 16px;
  width: 315px;
  height: 89px;
}

.login-form h1::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0px;
  width: 88px;
  height: 3px;
  background-color: rgb(94, 192, 233);
  border-radius: 2px;
}

.input-wrapper {
  width: 422px;
  position: relative;
}

.input-wrapper input {
  width: 100%;
  padding-right: 45px;
}

.input-wrapper .input-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  pointer-events: none;
}

.login-form input {
  height: 48px;
  padding: 0 45px 0 16px;
  border-radius: 10px;
  border: 1px solid #d1d1d1;
  font-size: 16px;
  background: #ffffff;
  outline: unset;
}

.login-form input:focus {
  border: 1px solid #5ec0e9;
}

.login-form .button-group {
  width: 322px;
  height: 48px;
  display: flex;
  justify-content: center;
  gap: 35px;
  margin-top: -8px;
}

.login-form .button-group button {
  height: 48px;
  font-size: 21px;
  font-family: Inter, Arial, sans-serif;
  font-weight: 700;
  line-height: 120%;
  letter-spacing: 0;
  border-radius: 8px;
  cursor: pointer;
}

.login-btn {
  width: 110px;
  background-color: #2a3647;
  color: white;
  border: none;
}

.login-btn:hover {
  background-color: #29abe2;
}

.guest-btn {
  width: 177px;
  background-color: transparent;
  color: #2a3647;
  border: 1px solid #2a3647;
}

.guest-btn:hover {
  background-color: transparent;
  color: #29abe2;
  border-color: #29abe2;
}

.isValidate {
  border: 1px solid greenyellow !important;
}

.isInvaled {
  border: 1px solid rgb(255, 47, 47) !important;
}

.info-password,
.info-email {
  display: block;
  width: 100%;
  font-size: 16px;
  color: tomato;
  visibility: hidden;
  margin: 0;
  text-align: left;
  left: 0;
}

footer {
  display: flex;
  justify-content: center;
  padding: 0 24px 48px;
}

.footer-content {
  display: flex;
  gap: 40px;
}

footer .links {
  font-size: 16px;
  color: rgba(42, 54, 71, 0.45);
}

footer .links:hover {
  color: #29abe2;
}

@media (max-width: 1023px) {
  main {
    padding: 56px 24px 96px;
  }

  .login-form {
    width: 560px;
    height: auto;
    padding: 44px 90px;
  }

  .input-wrapper {
    width: 420px;
  }

  .login-form .button-group {
    width: 420px;
  }
  .logo_page {
    width: 64px !important;
    height: 64px !important;
  }

  #info-password {
    display: block;
  }
}

@media (max-width: 768px) {
  html,
  body {
    overflow-y: auto;
  }

  main {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 140px 16px 160px;
  }

  .login-form {
    margin: 0 auto;
  }

  footer {
    left: 0;
    right: 0;
    margin: 0 auto;
  }

  .content-wrepper {
    min-height: 98svh;
  }

  .button-section--desktop {
    display: none;
  }

  .button-section--mobile {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin: 86px auto;
    z-index: 6;
  }

  .logo {
    position: absolute;
    top: 37px;
    left: 38px;
    transform: none;
    transition: none;
    z-index: 10;
  }

  .logo_page {
    width: 64px;
    height: 64px;
    transition: none;
  }

  body.loaded .logo {
    top: 37px;
    left: 38px;
    transform: none;
  }

  body.loaded .logo_page {
    width: 64px;
    height: 78px;
  }

  main {
    justify-content: flex-start;
    align-items: center;
    flex-direction: column;
    height: calc(100vh - 160px);
    padding: 80px 16px 0px;
  }

  .login-form {
    width: 396px;
    max-width: 92vw;
    height: auto;
    padding: 32px 16px;
    gap: 8px;
    border-radius: 30px;
  }

  .login-form h1 {
    font-size: 40px;
  }

  .login-form h1::after {
    bottom: 16px;
  }

  .input-wrapper {
    width: 364px;
    max-width: 100%;
  }

  .login-form .button-group {
    width: 180px;
    height: 123px;
    max-width: 100%;
    flex-direction: column;
    align-items: center;
    gap: 21px;
  }

  .login-btn,
  .guest-btn {
    width: 180px;
    height: 48px;
  }

  footer {
    bottom: 16px;
    padding: 0 16px 16px 16px;
    z-index: 6;
  }

  .footer-content {
    gap: 26px;
  }
}

@media (max-width: 360px) {

  .login-form {
    width: 100%;
    max-width: 92vw;
    padding: 28px 14px;
  }

  .input-wrapper {
    width: 100%;
  }

  .login-form .button-group {
    width: 180px;
    height: 123px;
    gap: 21px;
  }

  .login-btn,
  .guest-btn {
    width: 180px;
    height: 48px;
  }

  .button-section--mobile {
    padding: 12px;
  }

  footer {
    padding: 0 12px;
  }
}

@media (max-width: 360px) and (max-height: 700px) {


  .login-form .button-group {
    height: auto;
    gap: 16px;
  }
}

@media (min-width: 361px) and (max-width: 390px) and (max-height: 700px) {

  .login-form .button-group {
    height: auto;
    gap: 18px;
  }
}

@media (max-width: 320px) {
  .login-form h1 {
    font-size: 36px;
  }

  .login-btn,
  .guest-btn {
    width: 160px;
  }

  .links {
    font-size: 15px;
  }
}
