*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #081b29;
    overflow: hidden;
}

.wrapper{
    position: relative;
    width: 500px;
    height: 500px;
    /* background: seagreen; */
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: colorful 30s linear infinite;
}

@keyframes colorful {
    100% {
        filter: hue-rotate(360deg);
    }
}

.bar-seconds,
.number-hours {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

.bar-seconds span {
    position: absolute;
    transform: rotate(calc(var(--index) * 6deg));
    inset: -20px;
    text-align: center;
}

.bar-seconds span p {
    display: inline-block;
    width: 2px;
    height: 12px;
    background: #0ef;
    border-radius: 2px;
    box-shadow: 0 0 10px #0ef;
}

/* 5n every multiple of 5 */
.bar-seconds span:nth-child(5n) p {
    width: 6px;
    height: 18px;
    transform: translateY(1px);
}

.number-hours span {
    position: absolute;
    /* 360deg / 12 = 30deg */
    transform: rotate(calc(var(--index) * 30deg));
    inset: 6px;
    text-align: center;
}

.number-hours span p {
    font-size: 52px;
    color: #0ef;
    text-shadow: 0 0 10px #0ef;
    transform: rotate(calc(var(--index) * -30deg));
}

.hands-box {
    position: relative;
    justify-content: center;
    display: flex;
    align-items: center;
}

.hands-box .hand {
    position: absolute;
    border-radius: 50%;
    display: flex;
    justify-content: center;
}


.hands-box .hand i {
    display: inline-block;
    transform-origin: bottom;
    border-radius: 50%;
    box-shadow: 0 0 10px #0ef;
}

.hands-box .hours {
    width: 320px;
    height: 320px;
}

.hands-box .hours i {
    width: 8px;
    /* half of parent height */
    height: 160px;
    background: #0ef;
}

.hands-box .minutes {
    width: 450px;
    height: 450px;
}

/* center dot bottom */
.hands-box .minutes::before {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 25px;
    height: 25px;
    background: #0ef;
    border-radius: 50%;
    box-shadow: 0 0 5px #0ef;
}


.hands-box .minutes i {
    width: 8px;
    /* half of parent height */
    height: 225px;
    background: #0ef;
    
}

.hands-box .seconds {
    width: 480px;
    height: 480px;
    /* transform: rotate(160deg); */
    
}

/* center dot top */
.hands-box .seconds::before {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 2px rgba(0, 0, 0, .5);
}

.hands-box .seconds i {
    width: 4px;
    /* half of parent height */
    height: calc(240px + 70px);
    background: white;
    box-shadow: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .wrapper {
        width: 350px;
        height: 350px;
    }

    .bar-seconds span p {
        width: 1.5px;
        height: 10px;
    }

    .bar-seconds span:nth-child(5n) p {
        width: 4px;
        height: 14px;
    }

    .number-hours span p {
        font-size: 36px;
    }

    .hands-box .hours {
        width: 220px;
        height: 220px;
    }

    .hands-box .hours i {
        width: 6px;
        height: 110px;
    }

    .hands-box .minutes {
        width: 310px;
        height: 310px;
    }

    .hands-box .minutes::before {
        width: 20px;
        height: 20px;
    }

    .hands-box .minutes i {
        width: 6px;
        height: 155px;
    }

    .hands-box .seconds {
        width: 330px;
        height: 330px;
    }

    .hands-box .seconds::before {
        width: 16px;
        height: 16px;
    }

    .hands-box .seconds i {
        width: 3px;
        height: calc(165px + 50px);
    }
}

@media (max-width: 480px) {
    .wrapper {
        width: 280px;
        height: 280px;
    }

    .bar-seconds span p {
        width: 1px;
        height: 8px;
    }

    .bar-seconds span:nth-child(5n) p {
        width: 3px;
        height: 12px;
    }

    .number-hours span p {
        font-size: 28px;
    }

    .hands-box .hours {
        width: 180px;
        height: 180px;
    }

    .hands-box .hours i {
        width: 5px;
        height: 90px;
    }

    .hands-box .minutes {
        width: 250px;
        height: 250px;
    }

    .hands-box .minutes::before {
        width: 16px;
        height: 16px;
    }

    .hands-box .minutes i {
        width: 5px;
        height: 125px;
    }

    .hands-box .seconds {
        width: 270px;
        height: 270px;
    }

    .hands-box .seconds::before {
        width: 14px;
        height: 14px;
    }

    .hands-box .seconds i {
        width: 2px;
        height: calc(135px + 40px);
    }
}