@charset "UTF-8";

* {
  transition:
    background 0.2s ease-in-out,
    color 0.2s ease-in-out,
    border-color 0.2s ease-in-out;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100dvh;
  margin: 0;
  background: white;
  color: black;
  font-family: Arial, sans-serif;
  white-space: nowrap;
  overflow-y: hidden;

  @media (prefers-color-scheme: dark) {
    & {
      background: rgb(19, 21, 22);
      color: rgb(235, 235, 235);
    }
  }

  --width: 300px;

  @media screen and (max-width: 406px) {
    --width: calc(100dvw - 100px);
  }
  @media screen and (max-width: 312px) {
    --width: 232px;
  }
}

button {
  width: var(--width);
  height: 50px;
  padding: 12px;
  border: none;
  border-radius: 6px;
  font-size: large;
  cursor: pointer;

  &[disabled] {
    cursor: default;
  }
}

label {
  margin-bottom: 4px;
  text-align: center;
}

input {
  width: calc(var(--width) - 40px);
  margin: 0 14px;
  padding: 6px;
  background: rgb(245, 245, 245);
  color: black;
  border: none;
  border-bottom: 3px solid rgb(70, 70, 70);
  border-radius: 0;
  outline: none;
  text-align: center;
  font-size: x-large;

  @media (prefers-color-scheme: dark) {
    & {
      background: rgb(25, 27, 28);
      color: white;
      border-bottom: 3px solid rgb(235, 235, 235);
    }
  }

  &:focus {
    border-color: rgb(10, 85, 210);

    @media (prefers-color-scheme: dark) {
      & {
        border-color: rgb(0 130 255);
      }
    }
  }

  &:invalid {
    border-color: rgb(255, 77, 77);

    @media (prefers-color-scheme: dark) {
      & {
        border-color: rgb(175, 0, 0);
      }
    }
  }

  &[disabled] {
    background: rgb(245, 245, 245);
    color: rgb(120, 120, 120);
    border-color: rgb(120, 120, 120);

    @media (prefers-color-scheme: dark) {
      & {
        background: rgb(25, 27, 27);
        color: rgb(155, 150, 135);
        border-color: rgb(100, 90, 80);
      }
    }
  }
}

h1 {
  margin-top: -10px;
  text-align: center;
}

.main-button {
  background: rgb(10, 85, 210);
  color: white;

  @media (prefers-color-scheme: dark) {
    & {
      background: rgb(5, 65, 170);
    }
  }

  &[disabled] {
    background: rgb(120, 120, 120);
    color: rgb(220, 220, 220);

    @media (prefers-color-scheme: dark) {
      & {
        background: rgb(90, 95, 100);
        color: rgb(215, 210, 205);
      }
    }
  }
}

.sub-button {
  background: rgb(245, 245, 245);
  color: black;

  @media (prefers-color-scheme: dark) {
    & {
      background: rgb(25, 27, 27);
      color: white;
    }
  }

  &[disabled] {
    color: gray;

    @media (prefers-color-scheme: dark) {
      & {
        color: rgb(170, 170, 165);
      }
    }
  }
}

#content-area {
  width: var(--width);
  padding: 40px;
  border: 1px solid gray;
  border-radius: 12px;

  @media (prefers-color-scheme: dark) {
    & {
      border-color: rgb(80, 90, 90);
    }
  }
}

#register-area {
  width: fit-content;
  height: 50px;
  margin-top: 16px;
  background: rgb(245, 245, 245);
  border-radius: 6px;
  overflow: hidden;
  transition: height 0.3s ease-in-out;

  @media (prefers-color-scheme: dark) {
    & {
      background: rgb(25, 27, 27);
    }
  }

  &.open {
    height: 219px;
  }
}

#register-sub-area {
  display: grid;
  width: fit-content;
  grid-template-rows: repeat(3, auto);
}

#resend-code {
  background: none;
  color: rgb(10, 85, 210);

  @media (prefers-color-scheme: dark) {
    & {
      color: rgb(80, 165, 250);
    }
  }

  &[disabled] {
    color: rgb(120, 120, 120);

    @media (prefers-color-scheme: dark) {
      & {
        color: rgb(155, 150, 135);
      }
    }
  }
}
