@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500&display=swap");

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

:root {
    --hue-clr: 240;
    --text-clr: hsl(var(--hue-clr), 12%, 75%);
    --main-bg: hsl(var(--hue-clr), 10%, 16%);
    --blue-clr: hsl(var(--hue-clr), 53%, 49%);
    --num-clr: hsl(var(--hue-clr), 12%, 65%);
    --bold-clr: hsl(var(--hue-clr), 12%, 95%);
    --clock-box-shadow: 6px 6px 16px hsl(var(--hue-clr), 8%, 12%),
    -6px -6px 16px hsl(var(--hue-clr), 8%, 20%),
    inset -6px -6px 16px hsl(var(--hue-clr), 8%, 20%),
    inset 6px 6px 12px hsl(var(--hue-clr), 8%, 12%);
    --toggle-box-shadow: inset -1px -1px 1px hsla(var(--hue-clr), 8%, 20%, 1),
    inset 1px 1px 1px hsla(var(--hue-clr), 8%, 12%, 1);
}

:root .light-mode {
    --text-clr: hsl(var(--hue-clr), 12%, 35%);
    --main-bg: hsl(var(--hue-clr), 24%, 94%);
    --blue-clr: hsl(var(--hue-clr), 53%, 49%);
    --num-clr: hsl(var(--hue-clr), 12%, 45%);
    --bold-clr: hsl(var(--hue-clr), 53%, 15%);
    --clock-box-shadow: -6px -6px 16px white,
    6px 6px 16px hsla(var(--hue-clr), 30%, 86%, 1),
    inset 6px 6px 16px hsla(var(--hue-clr), 30%, 86%, 1),
    inset -6px -6px 16px white;
    --toggle-box-shadow: inset -1px -1px 1px hsla(var(--hue-clr), 0%, 100%, 1),
    inset 1px 1px 1px hsla(var(--hue-clr), 30%, 86%, 1);
}

body {
    min-height: 100vh;
    color: var(--text-clr);
    background: var(--main-bg);
    font-size: 18px;
    font-family: 'Poppins', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s linear;
}

main {
    display: flex;
    flex-direction: column;
    align-items: center;
}

main .analog {
    width: 300px;
    height: 300px;
    box-shadow: var(--clock-box-shadow);
    border-radius: 50%;
    margin-bottom: 3rem;
    cursor: pointer;
    position: relative;
}

.analog::after {
    position: absolute;
    content: '';
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: var(--blue-clr);
    border: 2px solid var(--main-bg);
    border-radius: 50%;
    z-index: 2;
}

.analog .toggle {
    position: absolute;
    right: -1rem;
    top: -1rem;
    width: 1.3rem;
    height: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blue-clr);
    font-size: .8rem;
    box-shadow: var(--toggle-box-shadow);
    border-radius: 50%;
    overflow: hidden;
}

.fa-moon {
    display: none;
}

.toggle.active .fa-moon {
    display: block;
}

.toggle.active .fa-sun {
    display: none;
}

.analog .number {
    --rotation: 0;
    color: var(--num-clr);
    font-size: .8rem;
    position: absolute;
    width: 100%;
    height: 100%;
    text-align: center;
    transform: rotate(var(--rotation));
    padding: 8px;
}

.number.big {
    font-size: 1.3rem;
}

.analog .number1 {
    --rotation: 30deg;
}

.analog .number2 {
    --rotation: 60deg;
}

.analog .number3 {
    --rotation: 90deg;
}

.analog .number4 {
    --rotation: 120deg;
}

.analog .number5 {
    --rotation: 150deg;
}

.analog .number6 {
    --rotation: 180deg;
}

.analog .number7 {
    --rotation: 210deg;
}

.analog .number8 {
    --rotation: 240deg;
}

.analog .number9 {
    --rotation: 270deg;
}

.analog .number10 {
    --rotation: 300deg;
}

.analog .number11 {
    --rotation: 330deg;
}

.analog .hand {
    position: absolute;
    bottom: 50%;
    left: 50%;
    border-radius: 1rem;
    z-index: 1;
    transform-origin: bottom;
}

.hour-hand {
    width: 4px;
    height: 20%;
    background: var(--bold-clr);
}

.min-hand {
    width: 3px;
    height: 30%;
    background: var(--bold-clr);
}

.sec-hand {
    width: 2px;
    height: 34%;
    background: var(--blue-clr);
}

.digital {
    color: var(--bold-clr);
    font-size: 2.5rem;
    position: relative;
}

.digital .ampm {
    position: absolute;
    top: 0;
    right: -2rem;
    font-size: .9rem;
}