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

body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: #e0e0e0;
    font-family:
        -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    gap: 48px;
    padding: 64px;
}

h1 {
    color: #404040;
    font-size: 2rem;
}

a {
    text-decoration: none;
}

.clock {
    width: 600px;
    max-width: 100%;
    aspect-ratio: 1/1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e0e0e0;
    box-shadow:
        20px 20px 60px #bebebe,
        -20px -20px 60px #ffffff;
    border-radius: 50%;
    padding: 16px;
    position: relative;
    container-type: inline-size;
}

/* Minute markers */
.marker {
    width: 3px;
    height: 8px;
    position: absolute;
    background: #bfbfbf;
    transform-origin: center 50cqw;
    top: 15px;
    left: 50%;
    translate: -50% 0;
}

.marker.hour {
    height: 16px;
    background: #ef4444;
}

/* Hour hand */
.hour-hand {
    width: 5px;
    height: calc(100% - 32px);
    position: absolute;
    transform-origin: 50% 50%;
    animation: rotate-hour 43200s linear infinite;
}

.hour-hand-inner {
    position: relative;
    height: 100%;
}

.hour-hand-bar {
    top: 20.2%;
    height: 33%;
    background: white;
    box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.13);
    border-radius: 99px;
    position: absolute;
    width: 100%;
}

/* Minute hand */
.minute-hand {
    width: 3px;
    height: calc(100% - 32px);
    position: absolute;
    transform-origin: center center;
    animation: rotate-minute 3600s linear infinite;
}

.minute-hand-bar {
    top: 6%;
    width: 3px;
    height: 48%;
    background: #ffffff;
    box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.13);
    border-radius: 99px;
}

/* Second hand */
.second-hand {
    top: 0%;
    width: 1px;
    height: 52.5%;
    position: absolute;
    background: #f87171;
    box-shadow: 0px 0px 20px 2px rgba(0, 0, 0, 0.13);
    transform-origin: center 95%;
    animation:
        rotate-second 60s steps(60) infinite,
        second-tick 1s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}

/* Center dot */
.center-dot {
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    position: absolute;
    translate: -50% -50% 0;
    background: #ef4444;
    border-radius: 50%;
    z-index: 10;
}

@keyframes rotate-hour {
    from {
        rotate: 0deg;
    }
    to {
        rotate: 360deg;
    }
}

@keyframes rotate-minute {
    from {
        rotate: 0deg;
    }
    to {
        rotate: 360deg;
    }
}

@keyframes rotate-second {
    from {
        rotate: 0deg;
    }
    to {
        rotate: 360deg;
    }
}

@keyframes second-tick {
    0% {
        transform: rotateZ(-6deg);
    }
    100% {
        transform: rotateZ(0deg);
    }
}
