body{
min-height: 100vh;
display: flex;
flex-direction: column;
background-color: black;
color:white;
font-family: Arial, Helvetica, sans-serif;
}

.mainbar{
    border-radius: 10px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    font-size: 2em;
    align-items: center;
    color: hsl(0, 0%, 60%);
    background-color: hsl(0, 0%, 10%);
    margin-bottom: 10px;
}

.element{
    height: 40px;
    font-size: 0.75em;
    text-align: center;
    display: flex;
    align-items: center;
    
}

.element a{
    text-decoration: none;
    display: block;
}

.element img{
        height: 40px;
        max-width: auto;
        max-height: 100%;
        display: block;
        margin-right: 10px;
        margin-left: 10px;
      
}

.button{
    width: 100px;
    height: 40px;
    font-size: 0.7em;
    color: white;
    background-color: hsl(0, 0%, 21%);
    border-radius: 10px;
    margin-right: 1px;
}

.button:hover{
    background-color: hsl(0, 0%, 15%);
}

#switch{
    height: 40px;
    width: 100px;
    color: white;
    background-color: hsl(0, 0%, 21%);
    border-radius: 10px;
    font-size: 0.66em;
    margin-left: 15px;
}
#switch:hover{
    background-color: hsl(0, 0%, 15%);
}

#forbut{
    min-width: 100px;
    padding-left: 10px;
}

#refresh{
     min-width: 450px;
}

#date{
    padding-left: 5px;
    text-align: left;
}

#time{
    padding-left: 5px;
    padding-right: 5px;
    text-align: left;
}

.main{
    flex-grow: 1;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.box_up{
    height: 76px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#clock{
    font-size: 4.5em;
    width: 400px;
    background-color: #000040;
    border: 2px solid black;
    border-radius: 15px;
    text-align: center;
    color: #999999;
}

.box{
    position: relative;
    height: 230px;
    width: 450px;
    background-color: #000040;
    border: 2px solid black;
    text-align: center;
    color: white;
}

#main_wind{
    width: 400px;
}
.box_in_t{
    font-size: 2.5em;
    height: 60px;
    line-height: 60px;
    background-color: #000050;
}

.box_in_v{
    font-size: 10em;
}

.height_unit{
    position: absolute;
    right: 0;
    bottom: 0;
    font-size: 1.5em;
    margin: 5px;
}

.speed_unit{
    position: absolute;
    right: 0;
    bottom: 20%;
    font-size: 1.5em;
    margin: 5px;
}

#speed_main{
    position: absolute;
    right: 0;
    bottom: 0;
    font-size: 2em;
    margin: 5px;
}

.bottom{
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
    color: white;
    font-size: 1em;
}

.basic{
    width: 400px;
    height: 600px;
    background-color: #000040;
    border: 2px solid black;
}

.box_bw{
    height: 130px;
    width: 220px;
    border: 2px solid black;
    background-color: #000040;
}

.box_b{
    position: relative;
    height: 130px;
    width: 220px;
    border: 2px solid black;
    background-color: #000040;

}

.inner_t{
    height: 30px;
    font-size: 1.2em;
    line-height: 30px;
    background-color: #000050

}

.inner_v{
    height: 70px;
    font-size: 4em;
    line-height: 70px;

}

.inner {
    display: flex;
    font-size: 1.5em;
}

.inner_val {
    width: 110px;
    height: 30px;
    background-color: #000030

}

.charts-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    padding: 10px;
}
.chart{
    width: 45vw;
    height: 450px;
    min-width: 300px;
}

.endbar{
    border-radius: 10px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-evenly;
    font-size: 2em;
    align-items: center;
    color: hsl(0, 0%, 60%);
    background-color: hsl(0, 0%, 10%);
    margin-top: 10px;
}


@media (max-width: 950px) {
    /* Mainbar Adjustments */
    .mainbar {
        align-items: center;
        text-align: center;
        padding: 1px;
    }
    
    /* Buttons */
    .button, #switch {
        margin-left: 5px auto;
    }

    /* Chart Container */
    .charts-container {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .chart {
        width: 95% !important; 
        height: 350px !important;
    }

    /* Main Boxes */
    .main {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .box {
        width: 450px;
        font-size: 1.0em;
    }

    /* Bottom Section */
    .bottom {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    #title, #radio, #elev, #refresh {
        display: none;
    }
}

/* Extra Small Screens (Phones under 480px) */
@media (max-width: 480px) {
    .element{
        padding-left: 10px;
    }
    
    .button, #switch {
        font-size: 0.7em;
    }

    .box_b {
        width: 100%;
        font-size: 0.85em;
    }

    .chart {
        width: 95vw !important; 
        height: 350px !important;
    }
    #title, #radio, #elev, #refresh {
        display: none;
    }
}
