@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');
*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body{
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #505053;
}
.digital-clock{
    position: relative;
    color: #fff;
    background: #5D5E70;
    width: 425px;
    padding: 20px 45px;
    box-shadow: 0 50px 25px rgba(14, 21, 37, 0.6);
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;

}
.digital-clock::before{
    content: '';
    position: absolute;
    background: linear-gradient(45deg,#23fdfc,#5efe5e);
    background-size: 2% 2%;
    top: -5px;
    left: -5px;
    bottom: -5px;
    right: -5px;
    z-index: -1;
    filter: blur(40px);
    animation: glowing 10s ease infinite;
}

@keyframes glowing{
    0%{
        background-position: 0 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}
.time{
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}
.hours, .dots, .minutes{
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 600;
    padding: 0 10px;
    line-height: 125px;
}
.hours, .minutes{
    font-size: 6.5em;
    width: 125px;
}
.dots{
    font-size: 6em;
    color:#a3e30e;
    margin: 0;   
}
.hours{
    background: -webkit-linear-gradient(90deg,#a3e30e, #aefed9);
    -webkit-text-fill-color: transparent;
    -webkit-background-clip: text;
}
.minutes{
    background: -webkit-linear-gradient(90deg,#a3e30e, #aefed9);
    -webkit-text-fill-color: transparent;
    -webkit-background-clip: text;
}
.right-side{
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    margin-left: 10px;
}
.period, .seconds{
    font-size: 1,2em;
    font-weight: 500;
}
.period{
    transform: translateY(-20px);
    background: -webkit-linear-gradient(90deg,#a3e30e, #aefed9);
    -webkit-text-fill-color: transparent;
    -webkit-background-clip: text;
}
.seconds{
    transform: translateY(16px);
    background: -webkit-linear-gradient(90deg,#e32a0e, #e3f79a);
    -webkit-text-fill-color: transparent;
    -webkit-background-clip: text;
}
.calendar{
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.3em;
    font-weight: 500;
    margin-bottom: 5px;
    background: -webkit-linear-gradient(90deg,#a3e30e, #aefed9);
    -webkit-text-fill-color: transparent;
    -webkit-background-clip: text;
}
.day-name, .day-number, .year, .month-name{
    margin-left: 8px;
}
.dot-menu-btn{
    position: absolute;
    top: 0;
    right: 0;
    margin: 10px;
    color: #f0caf8;
    font-size: 1.5em;
    cursor: pointer;
}
.dot-menu{
    z-index: 999;
    position: absolute;
    top: 7px;
    right:5px;
    list-style: none;
    background:#5b5c6d;
    padding: 10px 20px;
    border-radius: 5px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.5);
    visibility: hidden;
    opacity: 0;
    transition: 0.3s ease;
}
.dot-menu.active{
    visibility: visible;
    opacity: 1;
}
.menu-item{
    display: flex;
    justify-content: center;
    align-items: center;
}
.clock-format-text{
    color:#efefef;
    font-size: 0.9em;
    margin-right: 20px;
}
.format-switch-btn{
    width: 35px;
    height: 15px;
    background:#7f7f97;
    border-radius: 75px;
    box-shadow: inset 2px 2px 4px rgba(255, 255, 255, 0.1),
                inset -2px -2px 4px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}

.format-switch-btn:before{
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    background: #ff5e9a;
    border-radius: 50%;
    box-shadow: 0 5px 25px #ff5e9a;
    transform: translateX(-10px);
    transition: 0.3s ease;
    transition-property: background, tranform;
}
.format-switch-btn.active:before{
    background: #0bff8d;
    box-shadow: 0 5px 25px #0bff8d;
    transform: translateX(10px);
}