body {
  background-color: var(--color-primary);
  height: 100dvh;
  width: 100vw;
  display: grid;
  place-items: center;
}

header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 70px;
  z-index: 1000;
  padding: 20px 20px;
  & button {
    border: none;
    background: none;
    cursor: pointer;
  }
  & img {
    height: 100%;
    width: auto;
  }
}

main {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 0px 20px;
}

.laptop-container {
  width: 600px;
  height: auto;
  aspect-ratio: 1.45 / 1;
  position: relative;
  background-image: url(../images/elements/Laptop.png);
  background-position: center;
  background-size: contain;
  background-repeat: no-repeat;
  color: var(--color-secondary);
  display: grid;
  place-items: center;
  & > * {
    filter: drop-shadow(0 0 1px var(--color-primary)) drop-shadow(0 0 1px var(--color-primary)) drop-shadow(0 0 1px var(--color-primary)) drop-shadow(0 0 1px var(--color-primary)) drop-shadow(0 0 1px var(--color-primary));
  }
  & > h1 {
    font-size: 80px;
  }
  & > img {
    width: 85px;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    position: absolute;
    transform: translate(-50%, -50%);
    z-index: -1;
    &:nth-of-type(1) {
      top: 30%;
      left: 50%;
    }
    &:nth-of-type(2) {
      bottom: 7%;
      left: 35%;
    }
    &:nth-of-type(3) {
      bottom: 7%;
      left: 65%;
    }
  }
}

.login-form-container {
  display: flex;
  justify-content: center;
  & > div {
    display: flex;
    flex-direction: column;
    gap: 45px;
    align-items: center;
    & > div:not(:last-child) {
      position: relative;
      background-image: url(../images/elements/Input-center.png);
      background-repeat: repeat-x;
      background-color: transparent;
      background-size: 100% 100%;
      width: 200px;
      margin-left: 25px;
      & input {
        color: var(--color-primary);
        background: none;
        font-size: 26px;
        padding: 8px;
        padding-left: 28px;
        border: none;
        outline: none;
        width: 100%;
        &:-webkit-autofill,
        &:-webkit-autofill:hover,
        &:-webkit-autofill:focus,
        &:-webkit-autofill:active {
          transition: background-color 5000s ease-in-out 5000s;
        }
      }
      &::before {
        content: "";
        position: absolute;
        left: -21px;
        height: 100%;
        width: 22px;
        background-image: url(../images/elements/Input-start.png);
        background-repeat: no-repeat;
        background-size: contain;
      }
      &::after {
        content: "";
        position: absolute;
        right: -21px;
        height: 100%;
        width: 22px;
        background-image: url(../images/elements/Input-end.png);
        background-repeat: no-repeat;
        background-size: contain;
      }
      & > img {
        position: absolute;
        top: -42px;
        left: -57px;
        width: 85px;
        height: auto;
        aspect-ratio: 1 / 1;
        object-fit: contain;
      }
    }
    & > div:last-child {
      display: flex;
      gap: 80px;
      justify-content: center;
      & > button {
        font-size: 22px !important;
        letter-spacing: -0.5px;
        border: none;
        background: none;
        background-image: url(../images/elements/Bubble.png);
        background-repeat: no-repeat;
        background-size: contain;
        background-position: center;
        color: var(--color-primary);
        font-size: 26px;
        text-align: center;
        cursor: pointer;
        height: 62px;
        width: 106px;
      }
    }
  }
}

.modal {
  transform: scaleX(0);
  margin: auto;
  width: 400px;
  border: 10px solid black;
  padding: 5px;
  box-shadow: inset 0 0 0px 5px #d1d1d1;
  background-color: var(--color-primary);
  transition: all 400ms;
  transition-behavior: allow-discrete;
  color: var(--color-secondary);
  &::backdrop {
    transition: all 400ms;
    background-color: rgba(0, 0, 0, 0);
    pointer-events: none;
  }
  &:popover-open {
    transform: scaleX(1);
    &::backdrop {
      background-color: rgba(0, 0, 0, 0.5);
    }
  }
  & > .header {
    padding: 20px;
    position: relative;
    & > button {
      position: absolute;
      right: 20px;
      top: 22px;
      background: none;
      border: none;
      cursor: pointer;
      & > img {
        width: 25px;
        aspect-ratio: 1 / 1;
      }
    }
  }
  & > .body {
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
  }
  & > .footer {
    padding: 20px 20px;
    display: flex;
    justify-content: center;
  }
}

@starting-style {
  .modal:popover-open {
    transform: scaleX(0);
    &::backdrop {
      background-color: rgba(0, 0, 0, 0);
    }
  }
}

div.pixelated-input-container {
  position: relative;
  background-image: url(../images/elements/Input-center.png);
  background-repeat: repeat-x;
  background-color: transparent;
  background-size: 100% 100%;
  width: 200px;
  margin: 0 22px;
  width: calc(100% - 44px);
  & input {
    color: var(--color-primary);
    background: none;
    font-size: 26px;
    padding: 8px;
    border: none;
    outline: none;
    width: 100%;
    &:-webkit-autofill,
    &:-webkit-autofill:hover,
    &:-webkit-autofill:focus,
    &:-webkit-autofill:active {
      transition: background-color 5000s ease-in-out 5000s;
    }
  }
  &::before {
    content: "";
    position: absolute;
    left: -21px;
    height: 100%;
    width: 22px;
    background-image: url(../images/elements/Input-start.png);
    background-repeat: no-repeat;
    background-size: contain;
  }
  &::after {
    content: "";
    position: absolute;
    right: -21px;
    height: 100%;
    width: 22px;
    background-image: url(../images/elements/Input-end.png);
    background-repeat: no-repeat;
    background-size: contain;
  }
  & > img {
    position: absolute;
    top: -42px;
    left: -57px;
    width: 85px;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: contain;
  }
}

button.pixelated-button {
  font-size: 22px !important;
  letter-spacing: -0.5px;
  border: none;
  background: none;
  background-image: url(../images/elements/Bubble.png);
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  color: var(--color-primary);
  font-size: 26px;
  text-align: center;
  cursor: pointer;
  height: 62px;
  width: 106px;
}

@media screen and (max-width: 720px) {
  main {
    gap: 30px;
  }
  .laptop-container {
    zoom: 0.75;
  }
}

@media screen and (max-width: 480px) {
  main {
    gap: 40px;
  }
  .laptop-container {
    zoom: 0.5;
  }
  .modal {
    width: calc(100% - 20px);
  }
}
