*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --white: #E4E4E4;
    --soft-white: #a0a0a0;
    --accent: #d31313;
    --green: #076607;
    --black: #141313;
}

body {
    min-height: 100vh;
    display: grid;
    justify-content: center;
    background-color: var(--black);
    font-family: "Dosis", sans-serif;
    background-image: url('https://images.unsplash.com/photo-1471243042328-9687c4488fa3?crop=entropy&cs=srgb&fm=jpg&ixid=MnwxNDU4OXwwfDF8cmFuZG9tfHx8fHx8fHx8MTY0NzQ5ODc3NA&ixlib=rb-1.2.1&q=85');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
}

.container {
    width: 100%;
    max-width: 600px;
    padding: 1em;
    margin-top: 5vmax;
}

.block {
    position: absolute;
    width: 6px;
    height: 6px;
    background-color: var(--soft-white);
}

/* ----------------------------------------
   TitleBox
---------------------------------------- */
header {
    width: 100%;
    height: 9vmax;
    display: grid;
    place-items: center;
    border: 1px dashed var(--soft-white);
    position: relative;
}

header h1 {
    font-size: clamp(2.5rem, 4vw, 4rem);
    font-family: "Share Tech Mono", monospace;
    font-weight: normal;
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: 5px;
}

header .block:nth-of-type(1) { top:    -3px; left:  -3px; }
header .block:nth-of-type(2) { top:    -3px; right: -3px; }
header .block:nth-of-type(3) { bottom: -3px; left:  -3px; }
header .block:nth-of-type(4) { bottom: -3px; right: -3px; }

/* ----------------------------------------
   ErrorBox
---------------------------------------- */
.error-box {
    position: relative;
    margin-top: 3em;
    border: 1px dashed var(--soft-white);
    padding: 1em;
    font-family: "Share Tech Mono", monospace;
    font-size: clamp(0.8rem, 1rem, 3vw);
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.error-box .block {
    background-color: var(--soft-white);
    top: -3px;
    left: 50%;
    transform: translateX(-50%);
}

/* ----------------------------------------
   RegisterBox
---------------------------------------- */
section {
    height: min-content;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    border: 1px dashed var(--soft-white);
    position: relative;
    margin-top: 3em;
    text-transform: uppercase;
}

section p {
    font-size: clamp(0.8rem, 1rem, 3vw);
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 1em;
    grid-column: 1 / 3;
}

section input {
    width: 100%;
    min-height: 60px;
    padding: 0.5em 0.8em;
    border: none;
    font-family: "Share Tech Mono", monospace;
    font-size: clamp(1rem, 1.5vw, 1.4rem);
    color: #ffffff;
    text-transform: uppercase;
    background-color: transparent;
    border-top: 1px dashed var(--soft-white);
    letter-spacing: 5px;
    outline: none;
    transition: background-color 0.2s;
}

section input::placeholder {
    color: #ffffff;
    opacity: 0.6;
    font-size: 0.8em;
    letter-spacing: 3px;
}

section input:focus {
    background-color: rgba(255, 255, 255, 0.03);
}

section input.input-username {
    grid-column: 1 / 3;
    border-bottom: 1px dashed var(--soft-white);
}

section input.input-password {
    grid-column: 1 / 2;
    border-right: 1px dashed var(--soft-white);
}

section input.input-confirm {
    grid-column: 2 / 3;
}

section .block:nth-of-type(1) { top:    -3px; left:  -3px; }
section .block:nth-of-type(2) { top:    -3px; right: -3px; }
section .block:nth-of-type(3) { bottom: -3px; left:  -3px; }
section .block:nth-of-type(4) { bottom: -3px; right: -3px; }

/* ----------------------------------------
   SubmitBox
---------------------------------------- */
footer {
    margin-top: 3em;
    position: relative;
}

footer .cb {
    border: 1px dashed var(--soft-white);
}

footer button[type="submit"] {
    width: 100%;
    height: 100px;
    border: 1px dashed var(--soft-white);
    outline: none;
    display: grid;
    place-items: center;
    background-color: transparent;
    color: var(--white);
    font-family: "Share Tech Mono", monospace;
    font-size: clamp(1.5rem, 2vw, 2rem);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 5px;
    opacity: 0.9;
    cursor: pointer;
    transition: opacity 0.3s, font-size 0.3s;
}

footer button[type="submit"]:hover {
    opacity: 1;
    font-size: 2rem;
}

footer .block {
    top: -3px;
    left: 50%;
    transform: translateX(-50%);
}

/* ----------------------------------------
   Login link
---------------------------------------- */
.login-link {
    margin-top: 2em;
    margin-bottom: 2em;
    text-align: center;
    font-family: "Share Tech Mono", monospace;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #ffffff;
}

.login-link a {
    color: var(--white);
    text-decoration: none;
    border-bottom: 1px dashed var(--soft-white);
    padding-bottom: 2px;
    transition: color 0.2s, border-color 0.2s;
}

.login-link a:hover {
    color: var(--accent);
    border-color: var(--accent);
}

/* ----------------------------------------
   Button stripe animation
---------------------------------------- */
@keyframes repeatAni {
    0%   { background-position: 0% 0%; }
    100% { background-position: 100% 100%; }
}

/* ----------------------------------------
   Responsive
---------------------------------------- */
@media screen and (max-width: 500px) {
    .container {
        margin-top: 1vmax;
    }
    section, footer {
        margin-top: 2em;
    }
}
