/*======== Google fongs ======*/
@import url('https://fonts.googleapis.com/css2?family=Sarabun:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800&display=swap');

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Sarabun', sans-serif;    
}

body{
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    background: #2e2e44;
}
/*Analog*/
/*======== Clock face ======*/
.analog-clock{
    background: #2d2f41;
    position: relative;
    width: 350px;
    height: 350px;
    margin: 25px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    box-shadow: 0 5px 25px rgb(14, 21, 37, 0.8);
}

.analog-clock::before{
    z-index: 000;
    content: "Clock";
    position: absolute;
    color: #cee0f6;
    font-size: 6.5em;
    font-weight: 700;
    opacity: 0.03;
}

.analog-clock::after{
    content: ".in.th";
    position: absolute;
    color: #cee0f6;
    font-size: 1.2em;
    font-weight: 300;
    margin-right: 80px;
    opacity: 0.05;
    transform: translate(140px, 55px);
}

/*======== Clock hour-numbers ======*/
.analog-clock ul{
    list-style: none;
}

.hour-container{
    width: 460px;
}

.hour-numbers{
    display: flex;
    justify-content: center;
    align-items: center;
}

.hour-numbers li{
    position: absolute;
    height: 100%;
    top: 0;    
}

.hour-numbers .num{
    color: #cee0f6;
    font-size: 2em;
    font-weight: 500;
    margin: 15px;
}

.hour-numbers li:nth-child(1){
    transform: rotate(30deg);
}

.hour-numbers li:nth-child(1) .num{
    transform: rotate(-30deg);
}

.hour-numbers li:nth-child(2){
    transform: rotate(60deg);
}

.hour-numbers li:nth-child(2) .num{
    transform: rotate(-60deg);
}

.hour-numbers li:nth-child(3){
    transform: rotate(90deg);
}

.hour-numbers li:nth-child(3) .num{
    transform: rotate(-90deg);
}

.hour-numbers li:nth-child(4){
    transform: rotate(120deg);
}

.hour-numbers li:nth-child(4) .num{
    transform: rotate(-120deg);
}

.hour-numbers li:nth-child(5){
    transform: rotate(150deg);
}

.hour-numbers li:nth-child(5) .num{
    transform: rotate(-150deg);
}

.hour-numbers li:nth-child(6){
    transform: rotate(180deg);
}

.hour-numbers li:nth-child(6) .num{
    transform: rotate(-180deg);
}

.hour-numbers li:nth-child(7){
    transform: rotate(210deg);
}

.hour-numbers li:nth-child(7) .num{
    transform: rotate(-210deg);
}

.hour-numbers li:nth-child(8){
    transform: rotate(240deg);
}

.hour-numbers li:nth-child(8) .num{
    transform: rotate(-240deg);
}

.hour-numbers li:nth-child(9){
    transform: rotate(270deg);
}

.hour-numbers li:nth-child(9) .num{
    transform: rotate(-270deg);
}

.hour-numbers li:nth-child(10){
    transform: rotate(300deg);
}

.hour-numbers li:nth-child(10) .num{
    transform: rotate(-300deg);
}

.hour-numbers li:nth-child(11){
    transform: rotate(330deg);
}

.hour-numbers li:nth-child(11) .num{
    transform: rotate(-330deg);
}

.hour-numbers li:nth-child(12){
    transform: rotate(360deg);
}

.hour-numbers li:nth-child(12) .num{
    transform: rotate(-360deg);
}
/*======== Clock hour-marks & middle Lines ======*/
.hour-marks{
    display: flex;
    justify-content: center;
    align-items: center;
}

.hour-marks .mark{
    background: #cee0f6;
    width: 1px;
    height: 1px;
    margin-top: 19px;
}

.hour-marks li{
    position: absolute;
    height: 100%;
    top: 0;
}

.hour-marks li:nth-child(1){
    transform: rotate(15deg);
}

.hour-marks li:nth-child(2){
    transform: rotate(45deg);
}

.hour-marks li:nth-child(3){
    transform: rotate(75deg);
}

.hour-marks li:nth-child(4){
    transform: rotate(105deg);
}

.hour-marks li:nth-child(5){
    transform: rotate(135deg);
}

.hour-marks li:nth-child(6){
    transform: rotate(165deg);
}

.hour-marks li:nth-child(7){
    transform: rotate(195deg);
}

.hour-marks li:nth-child(8){
    transform: rotate(225deg);
}

.hour-marks li:nth-child(9){
    transform: rotate(255deg);
}

.hour-marks li:nth-child(10){
    transform: rotate(285deg);
}

.hour-marks li:nth-child(11){
    transform: rotate(315deg);
}

.hour-marks li:nth-child(12){
    transform: rotate(345deg);
}

/*======== Clock middle Lines ======*/
.middle-lines{
    display: flex;
    justify-content: center;
    align-items: center;
}

.middle-lines .line{
    background: #cee0f6;
    width: 1px;
    height: 140px;
    opacity: 0.2;
    margin-top: 55px;
}

.middle-lines li{
    position: absolute;
    height: 100%;
    top: 0;
}

.middle-lines li:nth-child(1){
    transform: rotate(90deg);
}

.middle-lines li:nth-child(2){
    transform: rotate(180deg);
}

.middle-lines li:nth-child(3){
    transform: rotate(270deg);
}
/*======== Clock hands ======*/
.hands-container{
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hand{
    z-index: 888;
    position: absolute;
}

.hr-hand{
    width: 12px;
    height: 250px;
}

.hr-hand::before{
    content: "";
    position: absolute;
    width: 100%;
    height: 140px;
    background: linear-gradient(180deg, #634dff, #5fd4ff);
    border-radius: 20px;
    box-shadow: 0 0 15px rgba(2, 2, 2, 0.5);
}

.min-hand{
    width: 8px;
    height: 285px;
}

.min-hand::before{
    content: "";
    position: absolute;
    width: 100%;
    height: 160px;
    background: linear-gradient(180deg, #ff5e9a, #ffb960);
    border-radius: 20px;
    box-shadow: 0 0 15px rgba(2, 2, 2, 0.5);
}

.sec-hand{
    width: 5px;
    height: 305px;
}

.sec-hand::before{
    content: "";
    position: absolute;
    width: 100%;
    height: 200px;
    background: linear-gradient(180deg, #08b843, #79f1d1);
    border-radius: 20px;
    box-shadow: 0 0 15px rgba(2, 2, 2, 0.5);
}
/*======== Clock center dot ======*/
.center-dot{
    z-index: 999;
    position: absolute;
    background: #cee0f6;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 7px solid #2d2f41;
}

/*Digital*/
.digital-clock{
    position: relative;
    color: #fff;
    background: #2d2f41;
    width: 350px;
    padding: 20px 20px;
    margin: 20px;
    box-shadow: 0 5px 25px rgba(14, 21, 37, 0.8);
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.digital-clock:before{
    content: '';
    position: absolute;
    background: linear-gradient(45deg, #24ff6d #2f93f1 #ff5e9a);
    background-size: 200% 200%;
    top: -5px;
    left: -5px;
    bottom: -5px;
    right: -5px;
    z-index: -1;
    filter: blur(40px);
    animation: glowwing 10s ease infinite;
}

@keyframes glowing{
    0%{
        background-position: 0 50%;
    }
    50%{
        background-position: 100% 50%;
    }
    100%{
        background-position: 0 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.2em;
    width: 120px;
}

.dots{
    font-size: 5em;
    color: #929292;
}

.hours{
    background: -webkit-linear-gradient(90deg, #634dff, #5fd4ff);
    -webkit-text-fill-color: transparent;
    -webkit-background-clip: text;
}

.minutes{
    background: -webkit-linear-gradient(90deg, #ff5e9a, #ffb960);
    -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.0em;
    font-weight: 500;    
}

.period{
    transform: translateY(-20px);
    background: -webkit-linear-gradient(90deg, #f7b63f, #faf879);
    -webkit-text-fill-color: transparent;
    -webkit-background-clip: text;
}

.seconds{
    transform: translateY(16px);
    background: -webkit-linear-gradient(90deg, #24ff6d, #2f93f1);
    -webkit-text-fill-color: transparent;
    -webkit-background-clip: text;
}

.calendar{
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2em;
    font-weight: 500;
    margin-bottom: 5px;
    background: -webkit-linear-gradient(90deg, #ae4af6, #ff98d1);
    -webkit-text-fill-color: transparent;
    -webkit-background-clip: text;
}    

.day-name, .day-number, .month-name, .year{
    margin-left: 8px;
}

.dot-menu-btn{
    position: absolute;
    top: 0;
    right: 0;
    margin: 10px;
    color: #efefef;
    font-size: 1.5em;
    cursor: pointer;
}

.dot-menu{
    z-index: 999;
    position: absolute;
    top: 7px;
    right: 5px;
    list-style: none;
    background: #353e54;
    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: #485470;
    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: brackground,transform;
}

.format-switch-btn.active:before{
    background: #0bff8d;
    box-shadow: 0 5px 25px #0bff8d;
    transform: translateX(10px);

}

/*======== Link logo clock.in.th ======*/
.clock_logo{
    color: #a19f9f;
    font-size: 0.7em;
    justify-content: center;
    align-items: center;
}