*,
*:after,
*:before {
    outline: none;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

html {
    position: relative;
}

body {
    margin: 0;
    font-family: "Poppins", sans-serif;
    position: relative;
    background-color: hsl(210, 10%, 15%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

#bg {
    top: 0;
    position: absolute;
    width: 100%;
    height: 30rem;
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-image: url("./assets/images/bg.webp");
    z-index: -1;
}

header {
    background-color: #FFC107;
    min-height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;

    p {
        padding: 1rem;
    }
}

main {
    display: flex;
    justify-content: center;
    flex-direction: column;
    color: white;
    align-items: center;
    text-align: center;
}

article {
    max-height: 1000rem;
    width: auto;
    padding: 2rem;
    background-color: hsl(210, 10%, 17.5%);
    border-radius: 0.75rem;
    display: flex;
    flex-direction: row;
    justify-content: center;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
    transition: max-height 0.25s ease-in-out;
}

h1 {
    margin-top: 4rem;
    font-weight: 700;
    font-size: 3em;
    text-align: center;
    font-family: "Poppins", sans-serif;
}

h1 span {
    background: linear-gradient(to right, #77C3FE, #2CBCED);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: rainbow_animation 2s ease-in-out infinite;
    background-size: 400% 100%;
}

@keyframes rainbow_animation {

    0%,
    100% {
        background-position: 0 0;
    }

    50% {
        background-position: 100% 0;
    }
}

#sub {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#sub label {
    margin-top: 2rem;
}

select {
    margin: 0.5rem 0 2rem 0;
    padding: 0.5rem 1rem 0.5rem 1rem;
    border-radius: 0.5rem;
    border: #7D7D7D 2px solid;
    background-color: hsl(210, 10%, 12.5%);
    color: white;
    font-family: "Poppins", sans-serif;
    font-size: 1em;
    font-weight: 400;
    text-align: center;
    transition: background-color 0.25s ease-in-out;
    cursor: pointer;
}

select:hover {
    background-color: hsl(210, 10%, 10%);
}

form {
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
}

#top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

#top div {
    display: flex;
    align-items: center;
    width: 100%;
    margin: 0 2rem 0 2rem;
    justify-content: center;
}

#top #in {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#top #in input {
    width: 100%;
    padding: 0.5rem;
    border-radius: 0.5rem 0.5rem 0 0;
    border: #7D7D7D 2px solid;
    border-bottom: none;
    background-color: hsl(210, 11%, 12.5%);
    color: white;
    font-family: "Poppins", sans-serif;
    text-align: center;
    font-size: 1.5em;
    font-weight: 500;
    transition: background-color 0.25s ease-in-out;
}

#top #in input:hover {
    background-color: hsl(210, 10%, 10%);
}

#top #in select {
    width: 100%;
    margin: 0;
    font-size: 1em;
    padding: 0.25rem;
    border: #7D7D7D 2px solid;
    border-radius: 0 0 0.5rem 0.5rem;
    background-color: hsl(210, 10%, 12.5%);
    font-weight: 300;
    font-family: "Poppins", sans-serif;
}

#top #in select:hover {
    background-color: hsl(210, 10%, 10%);
}

#top #in #mark2 {
    display: none;
    margin: 0;
} #top #in #mark2 #mark21 {
    border-top-right-radius: 0;
    border-right: #7D7D7D 1px solid;
} #top #in #mark2 #mark22 {
    border-top-left-radius: 0;
    border-left: #7D7D7D 1px solid;
}

#top #arrow {
    width: auto;
}

#top #arrow i {
    font-size: 3em;
}

#top #result {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#top #result h2 {
    font-weight: 600;
    font-size: 2.5em;
    display: flex;
    align-items: center;
    font-family: "Poppins", sans-serif;
}


button {
    margin-top: 2rem;
    position: relative;
    padding: 0.5rem 2rem 0.5rem 2rem;
    font-size: 1.25em;
    border-radius: 0.5rem;
    border: #7D7D7D 2px solid;
    background-color: hsl(210, 10%, 12.5%);
    color: white;
    font-family: "Poppins", sans-serif;
    font-weight: 400;
    z-index: 1;
    width: auto;
}

button::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-image: linear-gradient(to bottom right, hsl(210, 10%, 12.5%), #002B6D);
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.25s ease-in-out;
    z-index: -1;
    opacity: 0;
}

button:hover::before {
    opacity: 1;
}

button:hover {
    cursor: pointer;
}

#bottom {
    display: grid;
    grid-auto-columns: minmax(0, 1fr);
    grid-template-areas:
        "header header header"
        "level raw conv";
    text-align: center;
    width: auto;
}

#bottom h2 {
    margin: 4rem 0 0.5rem 0;
    font-weight: 600;
    font-size: 2em;
    display: flex;
    align-items: center;
    font-family: "Poppins", sans-serif;
    grid-area: header;
    justify-content: center;
}

#bottom h3 {
    font-weight: 500;
    font-size: 1.25em;
    margin-bottom: 0.25rem;
}

#bottom p{
    border-top: 1px hsl(210, 10%, 25%) solid;
    padding: 0.25rem 0 0.25rem 0;
}

#bottom #section-lvl {
    grid-area: level;
}

#bottom #section-raw {
    grid-area: raw;
}

#bottom #section-conv {
    grid-area: conv;
}

footer {
    color: white;
    margin-top: 4rem;
    text-align: center;
    font-family: "Poppins", sans-serif;
    padding: 1.5em;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: hsl(210, 10%, 11%);
    font-weight: 300;
}

footer a {
    font-size: 1em;
    color: #77C3FE;
    text-decoration: underline;
}

footer p {
    width: 70%;
    font-size: 0.9em;
}

#master {
    font-size: 1.25em;
    color: #77C3FE;
    text-decoration: underline;
}

@media screen and (max-width: 900px) {

    html {
        scroll-behavior: smooth;
    }

    h1 {
        margin: 2rem 2rem 0 2rem;
        font-size: 2.25em;
    }

    article {
        width: 80%;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        height: auto;
    }

    #top {
        flex-direction: column;
    }

    #top div {
        width: 100%;
        margin: 1rem 0 1rem 0;
    }

    #top #in {
        width: 80%;
    }

    #arrow {
        margin: 2rem;
    }

    #bottom div {
        margin: 0;
    }

    h2 {
        display: flex;
        flex-direction: column;
    }
}