* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    background-color: var(--bgMain);
    color: var(--textMain);
}

body {
    height: 100vh;
    /*width: 100vw;*/
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

main {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-grow: 1;
    width: 100%;
    max-width: 1000px;
    padding: 1rem;
    gap: 1rem;
}

.link {
    text-decoration: none;
    font-size: 1.2rem;
    color: var(--textMain);
    font-weight: bold;
    -webkit-user-select: none;
}

.link:hover, .button:hover {
    transform: scale(1.05);
}
.link:active, .button:active {
    transform: scale(.95);
}

input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px #000000 inset !important;
    -webkit-text-fill-color: var(--textMain) !important;
}

.password-wrapper {
  position: relative;
  display: inline-block;
  width: 100%;
}

.password-wrapper input {
  width: 100%;
  padding-right: 40px; /* Leave space for button */
}

.toggle-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
}

input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
  display: none;
}

.select, input[type="password"], input[type="number"], input[type="text"] {
    width: 250px;
}

input[type="password"]:focus, input[type="text"]:focus {
    background: black;
    color: var(--textMain);
}

input[type="password"], input[type="text"], input[type="number"], select {
    background: black;
    color: var(--textMain);
    border: none;
    outline: none;
    padding: 0.5rem;
}

input[type="text"]:focus {
    outline: none;
    border: var(--borderMedium);
}

input[type="password"]::selection, input[type="text"]::selection {
    background-color: var(--bgButton);
}
    
.button {
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: var(--bgButton);
    border: var(--borderMedium);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: color 0.2s, transform 0.2s;
    outline: none;
    padding: 0.5rem;
    position: relative;
    z-index: 300;
    color: var(--textMain);
    font-weight: bold;
    font-size: 1rem;
}

.button:hover {
    transform: scale(1.1);
}
.button:active {
    transform: scale(1);
}
.button:focus{
    outline: none;
}

.center_self {
    align-self: center;
}