
@import url('https://fonts.googleapis.com/css?family=Heebo:300&display=swap');

* {
    box-sizing: border-box; /*if we add border or padding, it doesn't affect the width of it. */
}

:root {
    --primary-color: #010101;
    --secondary-color: #fff;
}

html {
    transition: all 0.5s ease-in;
}

html.dark {
    --primary-color: #ffffff;
    --secondary-color: #333;
}

html.dark {
    background-color: #111;
    color: var(--primary-color);
}

body {
    font-family: 'Heebo', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    overflow: hidden; /*don't want scroll bar to appear.*/
    margin: 0px;
}

/* toggle button to switch mode */
.toggle {
    background-color: var(--primary-color );
    color: var(--secondary-color);
    border: 0px;
    border-radius: 4px;
    padding: 8px 12px;
    position: absolute;
    top: 100px;
    cursor: pointer;
}

/* whole container except button*/
.clock-container {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}

/* analog clock */
.clock {
    position: relative;
    width: 200px;
    height: 200px;
    /* background-color: #f0f0f0; */
    /* just to style the clock */
}

/* hands of analog clock */
.needle {
    background-color: var(--primary-color);
    position: absolute;
    top: 50%;
    left: 50%;
    height: 65px;
    width: 3px;
    transform-origin: bottom center;
    border-radius: 30% 30% 0% 0%;
    transition: all 0.5s ease-in-out;
}

.needle.hour {
    transform: translate(-43%, -100%) rotate(0deg);
    width: 4px;
}

.needle.minute {
    transform: translate(-50%, -100%) rotate(0deg);
    height: 90px;
}

.needle.second {
    transform: translate(-50%, -100%) rotate(0deg);
    height: 100px;
    background-color: #e74c3c;
}

/* circle at the center */
.center-point {
    background-color: #e74c3c;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;

    /* to make it center of the center */
    transform: translate(-50%, -50%);
}

/* black point at the center */
.center-point::after{
    content: '';
    background-color: var(--primary-color);
    width: 5px;
    height: 5px;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;

    /* to make it center of the center */
    transform: translate(-50%, -50%);
}

/* time in digital clock */
.time {
    font-size: 60px;
}

/* day and month */
.date {
    color: var(--primary-color);
    font-size: 14px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

/* date */
.date .circle {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    border-radius: 50%;
    height: 18px;
    width: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 18px;
    transition: all 0.5s ease-in;
    font-size: 12px;
}