html {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    font-size: 17px;
}

body {
    background: #23242a;
    color: #f2f2f2;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    position: relative;
}

.container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
}

.generator {
    position: relative;
    width: 380px;
    height: 420px;
    padding: 2rem 1rem;
    background-color: #1c1c1c;
    border-radius: 8px;
    overflow: hidden;
}

.generator::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 380px;
    height: 420px;
    background: linear-gradient(0deg,transparent,transparent,#45f3ff,#45f3ff,#45f3ff);
    z-index: 1;
    transform-origin: bottom right;
    animation: animate 6s linear infinite;
}

.generator::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 380px;
    height: 420px;
    background: linear-gradient(0deg,transparent,transparent,#45f3ff,#45f3ff,#45f3ff);
    z-index: 1;
    transform-origin: bottom right;
    animation: animate 6s linear infinite;
    animation-delay: -3s;
}

.borderline {
    position: absolute;
    top: 0;
    inset: 0;
}

.borderline::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 380px;
    height: 420px;
    background: linear-gradient(0deg,transparent,transparent,#ff2770,#ff2770,#ff2770);
    z-index: 1;
    transform-origin: bottom right;
    animation: animate 6s linear infinite;
    animation-delay: -1.5s;
}

.borderline::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 380px;
    height: 420px;
    background: linear-gradient(0deg,transparent,transparent,#ff2770,#ff2770,#ff2770);
    z-index: 1;
    transform-origin: bottom right;
    animation: animate 6s linear infinite;
    animation-delay: -4.5s;
}

@keyframes animate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.box {
    position: absolute;
    inset: 4px;
    background: #222;
    padding: 50px 40px;
    border-radius: 8px;
    z-index: 2;
    display: flex;
    flex-direction: column;
}

h1 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

input:not([type="checkbox"]),
button {
    appearance: none;
    border: none;
    background: none;
    outline: none;
}

input[type="checkbox"] {
    cursor: pointer;
    float: right;
    position: relative;
    width: 24px;
    height: 12px;
    -webkit-appearance: none;
    background: #ccc;
    outline: none;
    border-radius: 6px;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
    transition: .5s;
}

input:checked[type="checkbox"] {
    background: #1877f2;
}

input[type="checkbox"]:before {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 6px;
    top: 0;
    left: 0;
    background: #fff; 
    transform: scale(1.1);
    transition: .5s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

input:checked[type="checkbox"]:before {
    left: 12px;
}

.password-wrap {
    position: relative;
    display: flex;
    width: 100%;
    margin-bottom: 1rem;
}

.password-wrap::after {
    content: '';
    display: block;
    position: absolute;
    top: 100%;
    height: 3px;
    left: 0;
    right: 0;
    border-radius: 3px;
    background: linear-gradient(to right, #ff2770 25%, #45f3ff 75%);
}

.password-wrap input {
    flex: 1 1 0%;
    padding: .5rem;
    color: #f2f2f2;
    background-color: rgba(255,255,255,0.1);
    border-radius: 3px 0 0 0;
}

.password-wrap input::placeholder {
    color: #888;
    font-style: italic;
}

.pasword-wrap button {
    cursor: pointer;
}

#copy {
    color: #f2f2f2;
    background-color: rgba(255,255,255,0.1);
    border-radius: 0 3px 0 0;
    cursor: pointer;
}

label {
    display: block;
    flex: 1 1 0%;
    user-select: none;
    margin-bottom: 1rem;
}

label input[type="number"] {
    float: right;
    text-align: center;
    color: #f2f2f2;
    background-color: rgba(255,255,255,0.1);
    width: 50px;
    border-radius: 20px;
}

#generate {
    cursor: pointer;
    position: relative;
    display: inline-block;
    padding: 15px 30px;
    margin-top: 5px;
    color: #f2f2f2;
    text-transform: uppercase;
    background: rgba(255,255,255,0.1);
    letter-spacing: 2px;
    font-weight: bold;
    overflow: hidden;
    transition: 0.2s;
}

#generate:hover {
    background: #2196f3;
    box-shadow: 0 0 10px #2196f3, 0 0 40px rgba(255,255,255,0.1), 0 0 10px #2196f3;
    transition-delay: 1s;
}

#generate span {
    position: absolute;
    display: block;
}

#generate span:nth-child(1) {
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg,transparent,#2196f3);
}

#generate:hover span:nth-child(1) {
    left: 100%;
    transition: 1s;
}

#generate span:nth-child(3) {
    bottom: 0;
    right: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(270deg,transparent,#2196f3);
}

#generate:hover span:nth-child(3) {
    right: 100%;
    transition: 1s;
    transition-delay: 0.5s;
}

#generate span:nth-child(2) {
    top: -100%;
    right: 0;
    width: 2px;
    height: 100%;
    background: linear-gradient(180deg,transparent,#2196f3);
}

#generate:hover span:nth-child(2) {
    top: 100%;
    transition: 1s;
    transition-delay: 0.25s;
}

#generate span:nth-child(4) {
    bottom: -100%;
    left: 0;
    width: 2px;
    height: 100%;
    background: linear-gradient(360deg,transparent,#2196f3);
}

#generate:hover span:nth-child(4) {
    bottom: 100%;
    transition: 1s;
    transition-delay: 0.75s;
}
