*{
    margin: 0;
    padding: 0;
    user-select: none;
    box-sizing: border-box;
}
body{
    height: 100vh;
    width: 100vw;
}
main {
    width: 100%;
    height: 90%;
    position: fixed;
    display: grid;
    grid-template-rows: 8% 27% 10% 65%;
    transition: all 3s ease;
}
/* nav element designs */
main nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100vw;
    padding: 10px;
}
main nav .nav-img{
    position: relative;
    width: 3%;
    height: auto;
}
.nav-img img{
    height: 100%;
    width: 100%;
    border-radius: 25%;
}
main nav .sidebar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1dvw;
    font-weight: bold;    
    cursor: pointer;
}
main nav .sidebar .learn-more {
    border: 1px solid black;
    border-radius: 50%;
    padding: 0 1dvw 0 1dvw;
    cursor: help;
}
/* calculator display designs */
main .display {
    display: grid;
    grid-template-rows: 75% 25%;
}
main .up-display, main .result {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    font-size: 3dvw;
    font-weight: bolder;
    padding-right: 1dvw;
    transition: all 0.7s ease;
}
main .result {
    font-size: 2.3dvw;
    font-weight: bold;
    color: darkcyan;
    padding-bottom: 3dvw;
}
/* calculator number pad designs */
main .pre-pad {
    display: grid;
    grid-template-columns: 1fr 50% 1fr;
    
}
main #clear {
    background-color: darkred;
    color: white;
}
main .pad {
    display: grid;
    grid-template-rows: repeat(5, 1fr);
}
main .pad-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}
main .pad-column {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 3dvw;
    font-weight: bold;
    box-shadow: inset 2px 2px 2px 0px rgba(255,255,255,.5), 7px 7px 20px 0px rgba(0,0,0,.1), 4px 4px 5px 0px rgba(0,0,0,.1);
    outline: none;
    transition: all 0.3s ease;
}

main .pad-column:active {
    background-color: lightgray;
    transform: translateY(4px);
    box-shadow: 4px 4px 6px 0 rgba(255,255,255,.5),
              -4px -4px 6px 0 rgba(116, 125, 136, .5), 
    inset -4px -4px 6px 0 rgba(255,255,255,.2),
    inset 4px 4px 6px 0 rgba(0, 0, 0, .4);
}

main .symbol {  
    font-size: 3dvw;
    color: darkcyan;
}
main .equals {
    background-color: darkcyan;
    color: white;
}
/* hidden history pad designs */
main .history-div {
    display: none;
    grid-template-columns: 75% 1fr;
    box-shadow: inset 2px 2px 2px 0px rgba(255,255,255,.5), 7px 7px 20px 0px rgba(0,0,0,.1), 4px 4px 5px 0px rgba(0,0,0,.1);
    transition: all 0.3s ease;
}
main .history-div .history-pad {
    display: grid;
    grid-template-rows: repeat(5, 1fr);
}
main .history-div .history-elm {
    display: grid;
    grid-template-rows: 90% 1fr;
    overflow: scroll;
}
main .history-div .history-elm .history-items {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-end;
    font-size: 3dvw;
    font-weight: bold;
    max-height: 100dvh;
    overflow-y: scroll;
}
main .history-div .history-elm .history-items .history-item {
    display: flex;
    width: 100%;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-end;
    font-size: 2.5dvw;
    font-weight: bold;
    padding: 1dvw;
    border-top: 1px solid lightgray;
}
main .history-div .history-elm .history-items .history-item .history-time {
    font-size: 1.5dvw;
    font-weight: light;
    color: lightgray;
    padding-right: 80%;
}
main .history-div .history-elm .history-items .history-item .history-expr {
    font-size: 2.5dvw;
    font-weight: bold;
    color: gray;
}
main .history-div .history-elm .history-items .history-item .history-result {
    font-size: 3dvw;
    font-weight: bold;
    color: cyan;
}

/* creating a pop up window for help */
#popup-window {
    position: fixed;
    width: 50dvw;
    height: 90dvh;
    background: white;
    border: 1px solid black;
    border-radius: 10px;
    padding: 10px;
    margin: auto;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 10;
    padding: 4dvw;
    display: none;
    overflow: scroll;
}

#popup-window h1 {
    font-size: 1.5em;
    font-weight: bold;
    color: darkcyan;
    text-align: center;
    margin-bottom: 10px;
    border-bottom: 1px solid lightgray;
}

#popup-window h1 #close-button {
    position: absolute;
    right: 2vw;
    top: 1vh;
    font-size: 1.5em;
    font-weight: bold;
    color: darkcyan;
    cursor: pointer;
}