*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: consolas;
}

section {
    position: relative;
    width: 100%;
    height: 100vh;
    background: #19172e;
    display: flex;
    justify-content: center;
    align-items: center;
}

section::before{
    content: '';
    position: absolute;
    top: 10%;
    right: 20%;
    width: 300px;
    height: 300px;
    border-radius: 10px;
    background: linear-gradient(#f9d924,#ff2c24);
    animation: animate 5s ease-in-out infinite;
}

section::after{
    content: '';
    position: absolute;
    bottom: 10%;
    left: 20%;
    width: 250px;
    height: 250px;
    border-radius: 10px;
    background: linear-gradient(#01d6ff,#0f24f9);
    animation: animate 5s ease-in-out infinite;
    animation-delay: -2.5s;
}

@keyframes animate{
    0%,100%
    {
transform: translateY(20px);
    }
    50%
    {
transform: translateY(-20px);
    }
}

.clock{
    position: relative;
    width: 700px;
    height: 250px;
    background: rgba(225, 225,225, 0.05);
    box-shadow: 0 15px 25px rgba(0,0,0,0.1);
    z-index: 1000;
    border-radius: 20px;
    border: 1px solid rgba(225, 225,225, 0.05);
    backdrop-filter: blur(20px);
}

.clock .container{
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;

}

.clock .container h2{
    font-size: 6em;
    color: white;

}

.clock .container h2:nth-child(odd)
{
    padding: 5px 15px;
    border-radius: 10px;
    background:rgba(225, 225,225, 0.05) ;
    box-shadow: 0 15px 25px rgba(0,0,0,0.2) ;
    margin: 0 10px;
    border-bottom: 1px solid rgba(225, 225,225, 0.1);
    border-right: 1px solid rgba(225, 225,225, 0.1);
}

.clock .container h2#seconds{
    color: #f9d924;
}
#ampm{
    position: relative;
    top: -50px;
    color: #fff;
    font-weight: 700;
}


/* Media queries for responsiveness */
@media (max-width: 768px) {
    .clock {
        height: 300px;
        width: 550px;
   
    }
    .clock .container h2 {
        font-size: 4em;
    }
    #ampm {
        top: -30px;
    }
}

@media (max-width: 480px) {
    .clock {
        height: 500px;
        width: 150px;
        flex-direction: column;

     
    }

    .clock .container{
        flex-direction: column;
    }
    
    .clock .container h2 {
        font-size: 3em;
     
    }
    #ampm{
        position: relative;
        top: 10px;
        color: #fff;
        font-weight: 700;
    }
    
}