/* General */
* {
    margin: 0;
    padding: 0;
}

:root {
    --theme-color: #0077ff;
}

body {
    font-family: sans-serif;
    font-size: 1.5rem;
    width: 100vw;
    height: 100vh;
    background: #000;
    color: #fff;
}

.bottom-theme,
.border-theme {
    transition: background-color 0.5s ease, color 0.5s ease, border-color 0.5s ease;
}

.container {
    width: 90%;
    margin: auto;
    padding-top: 10px;
    text-align: center;
}

.border-theme {
    border: 3px solid var(--theme-color);
    border-radius: 5px;
    padding: 5px;
}


#top {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 20px 0;
    position: relative;
}

#top h1 {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
}

#top select {
    font-size: 1.2rem;
    margin-left: auto;
    background: #000;
    color: #fff;
}

nav {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-top: 40px;
}

.option {
    font-size: 1.2rem;
    background: none;
    padding-bottom: 3px;
    color: #fff;
    border: none;
}

.option:hover {
    cursor: pointer;
    color: var(--theme-color);
}

.bottom-theme {
    border-bottom: 3px solid var(--theme-color);
    border-radius: 2px;
}

section {
    margin-top: 100px;
}

.measurement {
    display: none;
}

.measurement.active {
    display: flex;
    justify-content: space-evenly;
}

.to,
.from {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.to input,
.from input {
    background: transparent;
    color: #fff;
    text-align: center;
    font-size: 1.5rem;
    width: 400px;
}

.to select,
.from select {
    font-size: 1.5rem;
    width: 200px;
    text-align: center;
    background: #000;
    color: #fff;
}

input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

@media screen and (max-width: 500px) {
    #top {
        flex-direction: column;
        position: relative;
        gap: 20px;
    }
    
    #top h1 {
        position: static;
        left: 0;
        transform: translateX(0);
    }

    #top select {
        margin: 0;
    }

    nav {
        display: grid;
        grid-template-columns: 30% 30% 30%;
        gap: 20px;
        margin-top: 20px;
    }

    section {
        margin-top: 70px;
    }

    .measurement.active {
        flex-direction: column;
        gap: 80px;
    }

    .measurement.active input {
        width: 350px; 
    }

    .to,
    .from {
        gap: 15px;
    }
}