@import url(https://fonts.googleapis.com/css?family=Montserrat:100,200,300,regular,500,600,700,800,900,100italic,200italic,300italic,italic,500italic,600italic,700italic,800italic,900italic);

:root {
  --primary-color: #40b89c;
  --bg-color: #fff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Montserrat", sans-serif;
}
body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #228f75;
}
.container {
  width: 400px;
  height: 800px;
  border-radius: 10px;
  padding: 20px;
  background-color: var(--bg-color);
}
.clock-wrapper {
  position: relative;
  width: 100%;
  margin-top: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.clock-wrapper .clock {
  position: relative;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  box-shadow: 0 0 0 1px #228f7621, 0 5px 15px #228f7663;
}
.clock .hand {
  width: 2px;
  height: 40%;
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 10px;
  transform-origin: top;
  background-color: var(--primary-color);
  z-index: 1;
}
.clock .hand.hour-hand {
  height: 25%;
  transform: rotate(-90deg);
}
.clock .hand.minute-hand {
  height: 30%;
  transform: rotate(90deg);
}
.clock .hand.second-hand {
  height: 35%;
  transform: rotate(180deg);
}
.clock .center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 2px solid var(--primary-color);
  background-color: var(--bg-color);
  z-index: 1;
}
.clock .numbers {
  position: absolute;
  width: 90%;
  height: 90%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(90deg);
}
.clock .number {
  position: absolute;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  transform: rotate(calc(var(--i) * 30deg));
}
.clock .number span {
  position: relative;
  color: var(--primary-color);
  font-size: 12px;
  font-weight: 800;
  transform: rotate(calc(var(--i) * -30deg - 90deg));
}
.clock .number:nth-child(3n) span {
  font-size: 20px;
  font-weight: 700;
}
.clock .lines {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 50%;
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%) rotate(45deg);
}
.clock .line {
  position: absolute;
  width: 1px;
  height: 90%;
  display: flex;
  align-items: center;
  transform: rotate(calc(var(--i) * 30deg));
  background-color: var(--primary-color);
}
.clock .line::after {
  content: "";
  position: absolute;
  width: 500%;
  height: 90%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: var(--bg-color);
}
.clock-wrapper .am-pm {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  gap: 30px;
  margin-top: 40px;
  font-size: 10px;
  font-weight: 500;
  color: var(--primary-color);
}
.am-pm div {
  position: relative;
}
.am-pm div::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: var(--bg-color);
  transform: translate(-50%, -50%);
  z-index: -1;
}
.am-pm div.active {
  color: var(--bg-color);
}
.am-pm div.active::before {
  background-color: var(--primary-color);
}
.alarms {
  position: relative;
  margin-top: 80px;
  height: 350px;
  overflow: auto;
  overflow-x: hidden;
  padding: 10px 20px;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, 1fr);
}
.alarms .alarm {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  max-height: 150px;
  gap: 10px;
  padding: 20px;
  border-radius: 10px;
  background-color: var(--bg-color);
  box-shadow: 0 0 0 1px #228f7621, 0 3px 5px #228f7663;
  transition: all 0.3s ease;
}
.alarms .alarm:hover {
  transform: scale(1.02);
}
.alarm .head {
  width: 100%;
  display: flex;
  justify-content: space-between;
}
.alarm .name {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary-color);
}
.alarm .body {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.alarm .time {
  font-size: 30px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--primary-color);
}
.alarm .days .day {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary-color);
}
.alarm .delete {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  background-color: var(--primary-color);
  color: var(--bg-color);
  transition: all 0.3s ease;
}
.alarm .delete img {
  pointer-events: none;
  width: 60%;
}
.alarm:hover .delete {
  opacity: 1;
  visibility: visible;
}
.alarms .no-alarms {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  color: var(--primary-color);
}
#add-alarm-btn {
  position: absolute;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  text-transform: uppercase;
  background-color: var(--primary-color);
}
.toggle {
  position: relative;
  width: max-content;
}
.toggle .track {
  width: 50px;
  height: 25px;
  border-radius: 25px;
  background-color: #228f763d;
  cursor: pointer;
  transition: all 0.3s ease;
}
.toggle .thumb {
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: var(--primary-color);
  top: 50%;
  left: 2px;
  cursor: pointer;
  transform: translate(0, -50%);
  transition: all 0.3s ease;
  z-index: 1;
}
.toggle .checkbox:checked ~ .thumb {
  left: 28px;
  background-color: var(--bg-color);
}
.toggle .checkbox:checked ~ .track {
  background-color: var(--primary-color);
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #228f763d;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}
.modal.active {
  opacity: 1;
  visibility: visible;
}
.modal .content {
  position: relative;
  width: 400px;
  background-color: var(--bg-color);
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 0 0 1px #228f7621, 0 3px 15px #228f7663;
}
.modal .content .head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 20px;
}
.modal .head {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary-color);
}
.modal .close {
  cursor: pointer;
}
.modal .body {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 10px;
}
.modal .time {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.modal .time > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 30px;
  font-weight: 700;
  color: var(--primary-color);
}
.modal .time > div div:not(.number) {
  cursor: pointer;
}
.modal .days {
  display: flex;
  gap: 10px;
}
.modal .day {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary-color);
}
.modal .day.active {
  color: var(--bg-color);
  background-color: var(--primary-color);
}

.modal .footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}
.modal .footer .btn {
  font-size: 12px;
  font-weight: 700;
  padding: 10px 20px;
  border-radius: 5px;
  color: var(--primary-color);
  cursor: pointer;
  text-transform: uppercase;
}
.modal .footer .btn.save {
  color: var(--bg-color);
  background-color: var(--primary-color);
}
.modal .footer .btn.cancel {
  color: var(--primary-color);
  background-color: #228f763d;
}
.modal input[type="text"] {
  width: 100%;
  height: 40px;
  border-radius: 5px;
  padding: 0 10px;
  border: 1px solid #228f7621;
  font-size: 14px;
  font-weight: 700;
  color: var(--primary-color);
  outline: none;
  transition: all 0.3s;
}
