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

* {
  box-sizing: border-box;
}

:root {
  --primary-color: #000;
  --secondary-color: #fff;
  --accent-color: #e74c3c;
}

html {
  transition: background-color 0.5s ease;
}

html.dark {
  --primary-color: #fff;
  --secondary-color: #333;

  background-color: #111;
  color: var(--primary-color);
}

body {
  display: grid;
  place-content: center;
  place-items: center;
  min-height: 100vh;
  margin: 0;
  font-family: Heebo, sans-serif;
}

.toggle {
  position: absolute;
  top: 100px;
  padding: 8px 12px;
  color: var(--secondary-color);
  background-color: var(--primary-color);
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  &:focus {
    outline: none;
  }
}

.clock-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.clock {
  position: relative;
  width: 200px;
  height: 200px;
  &::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    background-color: var(--primary-color);
    border: 2px solid var(--accent-color);
    border-radius: 50%;
    transform: translate(-50%, -50%);
  }
}

.needle {
  position: absolute;
  bottom: 50%;
  left: 50%;
  height: 65px;
  width: 3px;
  transform-origin: bottom center;
  background-color: var(--primary-color);
  &.hour {
    transform: translate(-50%) rotate(0deg);
  }
  &.minute {
    transform: translate(-50%) rotate(0deg);
    height: 100px;
  }
  &.second {
    transform: translate(-50%) rotate(0deg);
    height: 100px;
    background-color: var(--accent-color);
  }
}

.time {
  font-size: 60px;
}

.date {
  font-size: 14px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: #aaa;
  .circle {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 18px;
    height: 18px;
    font-size: 12px;
    color: var(--secondary-color);
    background-color: var(--primary-color);
    border-radius: 50%;
    transition: all 0.5s ease-in;
  }
}
