:root {
    --primary-color: #e1e1e1;
    --secondary-color: #181818;
    --tertiary-color: #424242;
    --success-color: #8CD867;
    --error-color: #FF312E;
    --font-family: 'Roboto', sans-serif;
}

html {
    box-sizing: border-box;
}

body {
    margin: 0 auto;
    font-family: var(--font-family);
    color: var(--font-color);
    background-color: var(--primary-color);

    max-width: 1900px;
}

header {
    background-color: var(--primary-color);
    color: var(--font-color);
    text-align: center;
    display: flex;
    flex-direction: column;
}

header img {
    margin: 1rem auto;
}

header h1 {
    margin: auto;
    padding: 1rem 0;
}

header nav {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.5rem;
    background-color: var(--primary-color);
}

nav a {
    display: block;
    margin: 0 0.2rem;
    width: 10rem;
    height: 1.5rem;
    font-size: larger;
    color: var(--primary-color);
    background-color: var(--secondary-color);
    box-shadow: grey 3px 3px;
    transition: 0.3s;
    border: none;
}

nav a:active {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    box-shadow: none;
    transform: translate(3px, 3px);
}

main {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: var(--primary-color);
    padding: 2rem;
    border-radius: 8px;
    max-width: 50rem;
    margin: 0 auto;
}

.input-group {
    width: 100%;
    display: flex;
    flex-direction: column;
    margin-bottom: 1rem;
}

textarea {
    box-sizing: border-box;
    width: 100%;
    height: 200px;
    padding: 0.5rem;
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
}

button {
    display: block;
    width: 10rem;
    margin: 0 auto;
    height: 1.5rem;
    font-size: larger;
    color: var(--primary-color);
    background-color: var(--secondary-color);
    box-shadow: grey 3px 3px;
    text-decoration: underline;
    transition: 0.3s;
    border: none;
}

button:active {
    color: var(--secondary-color);
    background-color: var(--primary-color);
    box-shadow: none;
    transform: translate(3px, 3px);
}

button:disabled {
    background-color: #ddd;
    cursor: not-allowed;
}

.results {
    margin-top: 2rem;
    width: 100%;
    display: flex;
    flex-direction: column;
    /* height: 250px; */
}

.result-item {
    background-color: white;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
    border-left: 4px solid var(--success-color)
}

.result-item h3 {
    margin: 0;
    font-size: 1.5rem;
    word-wrap: break-word;
}

.error {
    color: var(--error-color);
    font-weight: bold;
}

.valid {
    color: var(--success-color);
    font-weight: bold;
}

.loading {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--secondary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 1rem auto;
}

.hidden {
    display: none;
}

footer {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    text-align: center;
    width: 100%;
    margin: 1rem 0;

}

footer p {
    padding: 0.1rem;
    margin: 0.1rem 0;
    font-size: smaller;
}

footer a {
    color: var(--secondary-color);
    text-decoration: underline;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@media(prefers-color-scheme: dark) {
    :root {
        --primary-color: #181818;
        --secondary-color: #e1e1e1;
        --font-color: #f1f1f1;
    }

    img {
        filter: invert();
    }

    .result-item {
        background-color: var(--tertiary-color);
        padding: 1rem;
        margin-bottom: 1rem;
        border-radius: 4px;
        border-left: 4px solid var(--success-color)
    }
}