body {
  margin: 0;
  padding: 0;
  background: #f0f0f0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100vh;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  transition: background 0.3s ease;
}

.clock-parent {
  width: 90vw;
  max-width: 18rem;
  aspect-ratio: 1 / 1;
  border: 0.8rem solid #333;
  border-radius: 50%;
  position: relative;
  background: radial-gradient(circle, #ffffff, #dddddd);
  box-shadow: inset 0 0 10px #aaa, 5px 5px 15px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.middle-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1rem;
  height: 1rem;
  background: #222;
  border: 3px solid #2196f3;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 6px #2196f3;
  z-index: 10;
}

.hand {
  position: absolute;
  top: 50%;
  left: 50%;
  transform-origin: bottom center;
  transform: translateX(-50%) translateY(-100%);
  border-radius: 6px;
  transition: all 0.05s ease-in-out;
}

.hour-hand {
  height: 26%;
  width: 0.5rem;
  background: #4d4d4d;
  z-index: 3;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.5);
}

.minute-hand {
  height: 33%;
  width: 0.3rem;
  background: #6a6a6a;
  z-index: 2;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.5);
}

.second-hand {
  height: 45%;
  width: 0.15rem;
  background: #e63946;
  z-index: 1;
  box-shadow: 0 0 6px rgba(230, 57, 70, 0.6);
}

.number {
  position: absolute;
  width: 2rem;
  height: 2rem;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: bold;
  color: #222;
  font-size: 1.3rem;
  transform: translate(-50%, -50%);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
  transition: color 0.3s ease;
}

.n1 {
  top: 15%;
  left: 74%;
}

.n2 {
  top: 30%;
  left: 86%;
}

.n3 {
  top: 50%;
  left: 92%;
}

.n4 {
  top: 69%;
  left: 86%;
}

.n5 {
  top: 85%;
  left: 74%;
}

.n6 {
  top: 92%;
  left: 50%;
}

.n7 {
  top: 85%;
  left: 26%;
}

.n8 {
  top: 69%;
  left: 14%;
}

.n9 {
  top: 50%;
  left: 8%;
}

.n10 {
  top: 31%;
  left: 14%;
}

.n11 {
  top: 15%;
  left: 26%;
}

.n12 {
  top: 8%;
  left: 50%;
}

/* 🌗 Toggle Switch */
.theme-toggle {
  margin-top: 2rem;
  width: 130px;
  height: 50px;
  background: #bbbbbb;
  border-radius: 30px;
  position: relative;
  cursor: pointer;
  transition: background 0.3s ease;
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  box-sizing: border-box;
}

.toggle-label {
  font-size: 0.9rem;
  font-weight: bold;
  color: #333;
  transition: color 0.3s ease;
}

.toggle-circle {
  width: 44px;
  height: 44px;
  background: rgb(0, 134, 245);
  border-radius: 50%;
  position: absolute;
  top: 3px;
  left: 3px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.3rem;
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  z-index: 1;
}

/* 🌙 DARK MODE STYLES */
body.dark-mode {
  background: #121212;
}

body.dark-mode .clock-parent {
  background: radial-gradient(circle, #333, #111);
  border-color: #888;
  box-shadow: inset 0 0 12px #000, 5px 5px 20px rgba(0, 0, 0, 0.6);
}

body.dark-mode .number {
  color: #eee;
  text-shadow: 1px 1px 2px #000;
}

body.dark-mode .theme-toggle {
  background: #c5cfff;
}

body.dark-mode .toggle-circle {
  left: 83px;
  background: #c914f2;
}

body .dark-mode .toggle-label {
  color: #fff;
}

@media (max-width: 600px) {
  .clock-parent {
    max-width: 14rem;
  }

  .number {
    font-size: 1rem;
    width: 1.5rem;
    height: 1.5rem;
  }

  .theme-toggle {
    width: 110px;
    height: 45px;
    padding: 0 7px;
  }

  .toggle-circle {
    width: 40px;
    height: 40px;
  }

  body.dark-mode .toggle-circle {
    left: 63px;
  }
}
