* {
    margin: 0;
    box-sizing: 0;
    border: 0;
    padding: 0;
    font-family: "Roboto Mono", "Courier New", Courier, monospace;
}

body {
    min-height: 100vh;
    line-height: 1.5;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background-image: radial-gradient(circle at center, rgb(127, 0, 121), rgb(0, 0, 64));
}

main {
    max-width: 500px;
    width: 100%;
    padding: 1rem;
    border-radius: 1rem;
    color: #ddd;
    box-shadow: 0 0 25px rgba(38, 0, 38, 0.463);
    background-color: rgb(105, 0, 100);
}

h1 {
    margin-bottom: 1.5rem;
}

form > *:not(:last-child) {
    margin-bottom: 0.5rem;
    display: block;
}

input#password-length,
input#password-output {
    background-color: rgba(255, 255, 255, 0.227);
    padding: 4px;
    min-width: none;
    max-width: none;
    border-radius: 4px;
    width: 100px;
    outline: none;
    color: white;
}

input#password-output {
    width: 100%;
}

input#password-length::placeholder {
    color: #aaa;
}

input[type="checkbox"] {
    appearance: none;
    margin-right: 0.5rem;
    position: relative;
}

input[type="checkbox"]::after {
    content: "";
    position: absolute;
    height: 1rem;
    width: 1rem;
    background-color: rgb(255, 160, 252);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -90%);
}

input[type="checkbox"]::before {
    content: "";
    position: absolute;
    height: 0.6rem;
    width: 0.6rem;
    background-color: rgb(255, 0, 119);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -117%) scale(0);
    z-index: 10;
}

input[type="checkbox"]:checked::before {
    transform: translate(-50%, -118%) scale(1);
}

#submit-btn,
#copy-btn {
    padding: 0.5rem 1rem;
    border-radius: 4px;
    margin-top: 1rem;
    cursor: pointer;
    transition: 0.3s linear all;
}

#submit-btn:active,
#copy-btn:active {
    transform: scale(0.95);
}

#output-container {
    display: flex;
    gap: 0.2rem;
    margin-top: 1rem;
    align-items: center;
}

#output-container input#password-output {
    flex: 1;
    padding: 0.5rem;
}

#output-container #copy-btn {
    margin-top: 0;
    width: 88px;
}

#strength-bar-container {
    height: 10px;
    width: 100%;
    background: #ddd;
    border-radius: 5px;
    margin-top: 5px;
    overflow: hidden;
}

#strength-bar-container span {
    display: block;
    height: 100%;
    width: 0%;
    background: red;
    transition: width 0.3s, background-color 0.3s;
}
