/* Import Google font - Poppins */
@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: "Poppins", sans-serif;
  font-size: 10px;
}

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

.container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 100px;
}

.container-title {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 10px;
  height: 230px;
  font-size: 2rem;
  text-transform: uppercase;
  border-left: 10px solid #121212;
}

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

.clock {
  position: relative;
  width: 400px;
  height: 400px;
  background-color: white;
  box-shadow: 0 0 10px 10px #00000059;
  border-radius: 50%;
  transition: all 0.5s;
}

.clock label {
  position: absolute;
  inset: 15px;
  transform: rotate(calc(var(--i) * (360deg / 12)));
  text-align: center;
}

.clock span {
  display: inline-block;
  font-size: 2rem;
  font-weight: 500;
  transform: rotate(calc(var(--i) * (-360deg / 12)));
}

.clock-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 1.75rem;
  height: 1.75rem;
  background-color: black;
  border: 5px solid crimson;
  border-radius: 50%;
  z-index: 100;
}

.hand {
  position: absolute;
  bottom: 50%;
  left: 50%;
  transform-origin: bottom;
  border: none;
  border-radius: 5px;
  transition: all 0.07s;
}

.second-hand {
  width: 0.4rem;
  height: 40%;
  background-color: crimson;
  z-index: 50;
}

.minute-hand {
  width: 0.4rem;
  height: 35%;
  background-color: black;
}

.hour-hand {
  width: 6px;
  height: 28%;
  background-color: black;
}

.switch-btn {
  padding: 10px 20px;
  font-size: 1.4rem;
  text-transform: capitalize;
  color: white;
  background-color: #121212;
  box-shadow: 0 0 5px 5px #00000063;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.5s;
}

/*****************************/
/********** ACTIVE ***********/
/*****************************/

.clock.active {
  color: white;
  background-color: #121212;;
}

.minute-hand.active,
.hour-hand.active {
  background-color: white;
}

.switch-btn.active {
  color: black;
  background-color: white;
}

/*********************************/
/********** RESPONSIVE ***********/
/*********************************/
@media (max-width: 800px) {
  .container {
    flex-direction: column;
    gap: 20px;
  }

  .container-title {
    align-items: center;
    justify-content: unset;
    width: 230px;
    height: fit-content;
    font-size: 1.5rem;
    border-top: 10px solid #121212;
    border-left: none;
  }

  .clock {
    width: 240px;
    height: 240px;
  }

  .switch-btn {
    padding: 20px 100px;
    font-size: 1.7rem;
  }
}
