* {
    margin: 0;
    padding: 1%;
    font-family: 'Times New Roman', Times, serif;
    
}

html {
    padding: 0;
}

body {
    padding: 0;
    margin: 0;
    background: rgba(211, 210, 210, 0.774);
    overflow-x: hidden;
}

header {
    margin: 0;
    position: static;
    max-height: 20vh;
    min-width: 100%;
    background: rgb(3, 3, 87);
    
}

.head {
    text-decoration: none;
    cursor: pointer;
    display: inline;
}

#res-men {
    display: none;
}

header h1 {
    font-weight: 700;
    text-transform: capitalize;
    color: white;
    text-decoration: overline;
    background: rgb(3, 3, 87);
}

#res-menu1, #res-menu2 {
    width: 100%;
    background-color: aliceblue;
    /* padding-top: 18vh; */
    display: flex;
    flex-wrap: wrap;
}

#res-menu1 {
    margin: 0;
    overflow-x: scroll;
    max-height: fit-content;
    min-width: 100%;
}

#menu-menu {
    margin: 0;
    padding: 0;
    max-height: fit-content;
    display: flex;
    flex-direction:column;
    align-items: flex-start;
    position:relative;
    background-color: aliceblue;
}

#m-menu {
    max-height: fit-content;
    display: flex;
    justify-content: space-around;
    overflow-x: scroll;
}

#m-menu a {
    text-decoration: none;
    display: inline;
}

#m-menu a:hover {
    color: antiquewhite;
}
#m-menu a:active {
    color: black;
}

#scroll {
    /* display: flex;
    flex-direction: column; */
    /* justify-content: space-between; */
    overflow-x: hidden;
}

#menu-list {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    max-height: 5vh;
    overflow-y: scroll;
    scroll-behavior: smooth;
    padding: 0;
    
}

.style-menu {
    display: flex;
    min-width: 100vh;
    justify-content: space-around;
    align-items: center;
    height: min-content;
    padding: 0;
    margin-top: 1.8%;
    border-bottom: 0.5px black solid;
}

#res-menu2 {
    display: none;
    overflow-y: scroll;
}

#conopt {
    max-height: 60%;
    width: 9em;
    display: flex;
    align-self: first baseline;
    /* border-right: 1px solid black; */
    color: blue;
    font-weight: 200;
    text-decoration: underline;
    cursor: pointer;
    transition-duration: 2ms;
    transition: 1s ease;
    margin-left: 2%;
    padding: 0;
}
#conopt:hover {
    transition: 1s ease;
    background-color: rgb(250, 245, 239);
    text-decoration: none;
    
}

#opt {
    display: inline-flex;
}

main {
    margin: 0%;
    padding: 0;
}

#main-sec {
    display: flex;
    flex-direction: column;
    justify-content: safe;
    align-items: center;
    min-height: 80%;
    min-width: 100vw;
    background: rgb(250, 249, 249);
    overflow-y: hidden;
}

#in {
    width: fit-content;
    height: fit-content;
    display: flex;
}

#input-opt {
    width: 500px;
    min-height: 2em;
    border-bottom: 1em black;
}

#in button {
    border: none;
    background: black;
    color: white;
    cursor: pointer;
}
#in button::after {
    color: black;
    background-color: azure;
}
#in button:hover {
    color: rgb(206, 201, 201);
    background-color: rgb(39, 38, 38);
}

#converting-unit {
    min-width: 50%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 2px;
}

.convert {
    font-size: 2em;
    /* text-transform: lowercase; */
}

#converting-unit button {
    width: fit-content;
    height: min-content;
    border-radius: 4px;
    background-color: black;
    border: none;
    color: white;
    font-weight: 600;
    cursor: pointer;

}

#resultSpot {
    font-size: 2em;
}

#list {
    height: min-content;
    min-width: 80%;
    padding: 3%;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
}

#c-list {
    min-width: 7em;
    display: grid;
    align-items: center;
    /* justify-content: space-evenly; */
    max-height: 10em;
    overflow: hidden;
    overflow-y: scroll;
}

#c-list-loop {
    display: flex;
    justify-content: space-between;
}

#c-list em {
    display: block;
    min-width: fit-content;
}

#closebtn {
    width: fit-content;
    background-color: red;
    color: white;
    font-weight: 500;
    cursor: pointer;
    border: none;
    border-radius: 10%;
}

/* responsive designs */
@media (max-width: 950px) {

    body {
        height: inherit;
        /* overflow-x: hidden; */
    }

    header {
        position: relative;
        height: fit-content;
    }


    #res-men {
        display: block;
        min-height: 20%;
        
    }
    #res-men:active {
        background-color: rgba(250, 235, 215, 0.253);
    }

    #men1, #men2 {
        max-height: 0.5%;
        background-color: whitesmoke;
        margin: 2%;
        border-radius: 10px;
    }
    #men1 {
        width: 7%;
    }
    #men2 {
        width: 4%;
    }

    #res-menu1 {
        display: none;
    }

    #res-menu2 {
        z-index: 999;
        position: absolute;
        display: none; /*use block*/
        width: 100vw;
        height: 100%;
        grid-template-columns: auto;
        overflow-y: scroll;
        overflow-x: hidden;
    }

    .style-menu {
        padding-top: 3%;
        min-width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        /* overflow: hidden; */
        overflow-x: scroll;
        border-top: 1px solid black;
    }

    #conopt {
        margin: 2%;
        min-width: 4em;
    }
    #conopt:hover {
        color: antiquewhite;
        background-color: none;
        text-decoration: underline;
    }

    main {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        margin-top: 20%;
        max-width: 98vw;
        margin-left: 1%;
        margin-right: 1%;
    }

    #main-sec {
        max-width: 100vw;
        
    }

    #in {
        max-width: 90vw !important;
        display: flex;
        flex-direction: column;
        /* grid-template-rows: 1fr 1fr; */
        justify-content: center;
        align-items: center;
        padding: 5%;
        box-sizing: content-box;
        -webkit-box-align: center;
    }

    #input-opt {
        max-width: 80vw !important;
        /* overflow: auto; */
        border: 2px black solid;
        justify-self: center;
        border-radius: 3px;
    }

    #submit {
        margin-top: 2%;
        min-width: 80vw;
        min-height: 2em;
        border-radius: 5px;
    }
    #submit:hover {
        background-color: rgb(15, 15, 15);
        color: rgb(185, 183, 183);
    }

    #result {
        max-width: 80vw;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-wrap: wrap;
    }

    #resultSpot {
        display: block;
        text-align: center;
        text-wrap: wrap;
    }

    #c-list-loop {
        display: grid;
        gap: 20vw;
        grid-template-columns: 1fr 1fr;
        justify-content: space-between;
    }

    #hisInf {
        display: block;
        min-width: 80vw;
        
    }

    .nav {
        min-height: 30vh;
    }

}