body{
    margin: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100vh;
    justify-content: center;
    background-image: url("bgimage3.jpg");
    background-size: cover;
    font-family: sans-serif;
    overflow: hidden;
}

h2{
    text-transform: uppercase;
    letter-spacing: 4px;
    font-size: 14px;
    text-align: center;
    color: aliceblue;

}
.clock{
    display: flex;
}
.clock div{
    margin: 5px;
    position: relative;
}
.clock span{
    width: 100px;
    height: 80px;
    background-color: slateblue;
    opacity: .8;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 50px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}
.clock .text{
    height: 30px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: darkblue;
    opacity: .8;
}
.clock #ampm{
    bottom: 0;
    position: absolute;
    width: 60px;
    height: 30px;
    font-size: 20px;
    background: greenyellow;
    color: maroon;
}
/*------------------------------mobile view-------------------*/
@media only screen and (max-width: 600px){
    
    body{
        justify-content: center;
        text-align: center;
        align-items: center;
    }

    .clock span{
        width: 80px;
        height: 60px;
        background-color: slateblue;
        opacity: .8;
        color: white;
        display: flex;
        justify-content: center;
        align-items: center;
        font-size: 40px;
        text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    }
    .clock .text{
        height: 30px;
        font-size: 10px;
        text-transform: uppercase;
        letter-spacing: 2px;
        background: darkblue;
        opacity: .8;
    }
    .clock #ampm{
        margin-right: 10px;
        bottom: 0;
        position: absolute;
        width: 80px;
        height: 90px;
        font-size: 25px;
        font-weight: bold;
        background: greenyellow;
        color: maroon;
    }


}
