* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-size: 1.3rem;
}

body {
  background-color: slategray;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  overflow: hidden;
}

.clock {
  background-color: black;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  -webkit-border-radius: 50%;
  -moz-border-radius: 50%;
  -ms-border-radius: 50%;
  -o-border-radius: 50%;
  border: 5px solid white;
  position: relative;
}

.clock .number {
  --rotation: 0;
  position: absolute;
  width: 100%;
  height: 100%;
  text-align: center;
  transform: rotate(var(--rotation));
  -webkit-transform: rotate(var(--rotation));
  -moz-transform: rotate(var(--rotation));
  -ms-transform: rotate(var(--rotation));
  -o-transform: rotate(var(--rotation));
  -webkit-text-orientation: sideways;
}

.number {
  color: white;
}

/* rotates the numbers around the clock face*/
.clock .number1 {
  --rotation: 30deg;
}
.clock .number2 {
  --rotation: 60deg;
}
.clock .number3 {
  --rotation: 90deg;
}

.clock .number4 {
  --rotation: 120deg;
}
.clock .number5 {
  --rotation: 150deg;
}
.clock .number6 {
  --rotation: 180deg;
}
.clock .number7 {
  --rotation: 210deg;
}
.clock .number8 {
  --rotation: 240deg;
}
.clock .number9 {
  --rotation: 270deg;
}
.clock .number10 {
  --rotation: 300deg;
}
.clock .number11 {
  --rotation: 330deg;
}

.clock .hand {
  --rotation: 0;
  position: absolute;
  bottom: 50%;
  left: 50%;
  border: 2px solid silver;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  transform-origin: bottom;
  transform: translateX(-50%) rotate(calc(var(--rotation) * 1deg));
  -webkit-transform: translateX(-50%) rotate(calc(var(--rotation) * 1deg));
  -moz-transform: translateX(-50%) rotate(calc(var(--rotation) * 1deg));
  -ms-transform: translateX(-50%) rotate(calc(var(--rotation) * 1deg));
  -o-transform: translateX(-50%) rotate(calc(var(--rotation) * 1deg));
}

.clock .hand.hour {
  width: 10px;
  height: 30%;
  border: 3px solid silver;
  background-color: white;
  z-index: 3;
}

.clock .hand.minute {
  width: 10px;
  height: 40%;
  border: 3px solid silver;
  background-color: white;
  z-index: 2;
}

.clock .hand.second {
  width: 2px;
  height: 45%;
  border: 1px solid red;
  z-index: 4;
}

/* this is the circle dot in the center of the clock */
.clock:after {
  content: " ";
  position: absolute;
  background-color: silver;
  border-radius: 50%;
  -webkit-border-radius: 50%;
  -moz-border-radius: 50%;
  -ms-border-radius: 50%;
  -o-border-radius: 50%;
  z-index: 5;
  width: 20px;
  height: 20px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  -webkit-transform: translate(-50%, -50%);
  -moz-transform: translate(-50%, -50%);
  -ms-transform: translate(-50%, -50%);
  -o-transform: translate(-50%, -50%);
}

#date {
  position: absolute;
  top: 179px;
  left: 300px;
  color: black;
  border: 3px solid silver;
  background-color: rgb(255, 255, 255, 0.8);
  padding: 1px 5px;
  z-index: 1;
}
