/* ----- Basic Styling ----- */
body {
  font-family: "Poppins", sans-serif;
  text-align: center;
  background-color: #f7f7f7;
  color: #333;
  transition: background-color 0.3s, color 0.3s;
}

h1 { font-size: 3rem; margin-top: 20px; }
h2 { font-size: 1.5rem; margin-top: 10px; }
h3 { margin-top: 5px; color: #555; }

/* ----- Buttons ----- */
.btn-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 40px;
}
.line-one, .line-two { display: flex; }

.btn {
  height: 120px;
  width: 120px;
  margin: 10px;
  border-radius: 20px;
  cursor: pointer;
  opacity: 0.8;
  transition: transform 0.2s, opacity 0.2s;
}
.btn:hover { transform: scale(1.05); }

.red { background-color: #ff4c4c; }
.yellow { background-color: #ffd93d; }
.green { background-color: #4caf50; }
.purple { background-color: #9c27b0; }

/* Flash animations */
.flash { opacity: 1 !important; box-shadow: 0 0 25px white; }
.userflash { transform: scale(1.1); opacity: 1; }

/* Level Up Animation */
@keyframes levelUpAnim {
  0% { transform: scale(1); color: black; }
  50% { transform: scale(1.3); color: green; }
  100% { transform: scale(1); color: black; }
}
.level-up { animation: levelUpAnim 0.5s ease; }

/* ----- Controls ----- */
.controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin-top: 20px;
}

.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 34px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 4px;
  bottom: 3px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}
input:checked + .slider { background-color: #4caf50; }
input:checked + .slider:before { transform: translateX(26px); }

/* ----- Dark Mode ----- */
body.dark {
  background-color: #222;
  color: #f7f7f7;
}
body.dark .btn.red { background-color: #ff6666; }
body.dark .btn.yellow { background-color: #ffe066; }
body.dark .btn.green { background-color: #66ff66; }
body.dark .btn.purple { background-color: #b366ff; }
