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

:root {
  --primary-color: rgb(46, 46, 46);
  --secondary-color: rgb(231, 231, 231);
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  transition: all 0.5s ease-in;
}

html.dark {
  --primary-color: rgb(231, 231, 231);
  --secondary-color: rgb(46, 46, 46);
}

html.dark {
  background-color: #111;
  color: var(--primary-color);
}

body {
  font-family: 'Heebo', sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  overflow: hidden;
  margin: 0;
}

.toggle {
  cursor: pointer;
  background-color: var(--primary-color);
  color: var(--secondary-color);
  border: 0;
  border-bottom: 3px solid var(--primary-color);
  border-radius: 4px;
  padding: 0.5rem 0.75rem;
  font-size: inherit;
  position: absolute;
  top: 5rem;
  transition: 0.3s ease;
}

.toggle:focus {
  outline: 0;
}

.toggle:hover {
  border-bottom: 3px solid #e74c3c;
}

.toggle:active {
  transform: scale(0.98);
}

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

.clock {
  position: relative;
  width: 12rem;
  height: 12rem;
}

.needle {
  background-color: var(--primary-color);
  position: absolute;
  top: 50%;
  left: 50%;
  height: 4rem;
  width: 2px;
  transform-origin: bottom center;
  transition: all 0.5s ease-in;
}

.needle.hour {
  transform: translate(-50%, -100%) rotate(0deg);
}

.needle.minute {
  transform: translate(-50%, -100%) rotate(0deg);
  height: 6rem;
}

.needle.second {
  transform: translate(-50%, -100%) rotate(0deg);
  height: 6rem;
  background-color: #e74c3c;
}

.center-point {
  background-color: #e74c3c;
  height: 0.6rem;
  width: 0.6rem;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
}

.center-point::after {
  content: '';
  background-color: var(--primary-color);
  height: 0.3rem;
  width: 0.3rem;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
}

.time {
  font-size: 3.75rem;
}

.date {
  color: #aaa;
  font-size: 0.9rem;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.date .circle {
  background-color: var(--primary-color);
  color: var(--secondary-color);
  border-radius: 50%;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 0.7rem;
  height: 1.1rem;
  width: 1.1rem;
  line-height: 1.1rem;
  font-size: 0.75rem;
  transition: all 0.5s ease-in;
}

@media (max-width: 500px) {
  html {
    font-size: 12px;
  }
}
