:root {
  background-color: #000000;
  color: #ffffff;
  font-family: monospace;
  font-weight: bolder;
}

body {
  display: flex;
  flex-direction: column;
  gap: 70px;
}

.page-title {
  padding: 10px;
  font-weight: bolder;
  font-size: 2rem;
  color: #ffffff;
  background-color: orangered;
  width: fit-content;
  margin: auto;
  border-radius: 10px;
}

.__clock {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin: auto;

  & > .clock-nums {
    width: 300px;
    aspect-ratio: 1;
    border-radius: 100%;
    border: 7px solid dodgerblue;
    position: relative;
    font-size: 1.75rem;
    font-weight: bolder;
    --nums-trans-y: -120px;

    & > * {
      position: absolute;
      top: 50%;
      left: 50%;
      translate: -50% -50%;
      transform: rotate(var(--rot)) translateY(var(--nums-trans-y));

      &::before {
        transform: rotate(calc(var(--rot) * -1));
        position: absolute;
        top: 50%;
        left: 50%;
        translate: -50% -50%;
        font-family: monospace;
      }

      &:nth-child(1) {
        --rot: 30deg;
        &::before {
          content: "1";
        }
      }
      &:nth-child(2) {
        --rot: 60deg;
        &::before {
          content: "2";
        }
      }
      &:nth-child(3) {
        --rot: 90deg;
        &::before {
          content: "3";
        }
      }
      &:nth-child(4) {
        --rot: 120deg;
        &::before {
          content: "4";
        }
      }
      &:nth-child(5) {
        --rot: 150deg;
        &::before {
          content: "5";
        }
      }
      &:nth-child(6) {
        --rot: 180deg;
        &::before {
          content: "6";
        }
      }
      &:nth-child(7) {
        --rot: 210deg;
        &::before {
          content: "7";
        }
      }
      &:nth-child(8) {
        --rot: 240deg;
        &::before {
          content: "8";
        }
      }
      &:nth-child(9) {
        --rot: 270deg;
        &::before {
          content: "9";
        }
      }
      &:nth-child(10) {
        --rot: 300deg;
        &::before {
          content: "10";
        }
      }
      &:nth-child(11) {
        --rot: 330deg;
        &::before {
          content: "11";
        }
      }
      &:nth-child(12) {
        --rot: 360deg;
        &::before {
          content: "12";
        }
      }
    }
  }

  & > .hands {
    position: absolute;
    top: 50%;
    left: 50%;
    translate: -50% -50%;

    &::before {
      content: "";
      z-index: 4;
      width: 15px;
      aspect-ratio: 1;
      background-color: white;
      position: absolute;
      top: 50%;
      left: 50%;
      translate: -50% -50%;
      border-radius: 100px;
    }

    & > * {
      position: absolute;
      top: 50%;
      left: 100%;
      translate: 0 -50%;
      transform-origin: left;
      border-radius: 100px;
      rotate: -90deg;
    }

    & > .hrs-hand {
      width: 80px;
      height: 8px;
      background-color: orangered;
      z-index: 1;
    }
    & > .min-hand {
      width: 90px;
      height: 5px;
      background-color: #ffa500;
      z-index: 2;
    }
    & > .sec-hand {
      width: 100px;
      height: 3px;
      background-color: #ffea00;
      z-index: 3;
    }
  }
}

@media (max-width: 350px) {
  .__clock {
    & > .clock-nums {
      width: 200px;
      font-size: 1.5rem;
      --nums-trans-y: -80px;
    }

    & > .hands {
      & > .hrs-hand {
        width: 50px;
        height: 8px;
      }
      & > .min-hand {
        width: 60px;
        height: 5px;
      }
      & > .sec-hand {
        width: 70px;
        height: 3px;
      }
    }
  }
}

/* keyframes */
@keyframes r-rotate360 {
  to {
    transform: rotate(-360deg);
  }
}
