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

h1 {
  font-size: 3rem;
  margin-top: 25px;
  font-weight: 700;
}

h2 {
  font-size: 1.4rem;
  margin-top: 10px;
  font-weight: 500;
}

h3 {
  margin-top: 8px;
  color: #666;
}

.start-btn {
  padding: 12px 30px;
  font-size: 1.1rem;
  background-color: #22c55e;
  color: white;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
}
.start-btn:hover {
  background-color: #16a34a;
  transform: scale(1.05);
}

/* ----- Buttons ----- */
.btn-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px 16px 50px;
  
}

h1 {
  font-family: 'Fredoka One', cursive;
  font-size: 3rem;
  margin-bottom: 6px;
  color:#ff6b6b;
  text-shadow: 3px 3px 0 #c94040;


}

h2 {
  font-family: 'Fredoka One', cursive;
  font-size: 1.4rem;
  margin-bottom: 6px;
  min-height: 36px;
  text-align: center;

}

h3 {
  color: #aaa;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 24px;
}

/* ===== Theme Toggle (top right) ===== */
.theme-toggle-wrapper {
  position: absolute;
  top: 20px;
  right: 25px;
}
 
.theme-switch input {
  display: none;
}
 
.theme-icon {
  font-size: 2rem;
  cursor: pointer;
  transition: transform 0.3s ease;
  display: inline-block;
}
 
.theme-icon:hover {
  transform: rotate(15deg) scale(1.1);
}
 
/* ===== Controls ===== */
.controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
  max-width: 280px;
  margin-bottom: 28px;
}
 
#start-btn {
  width: 100%;
  padding: 14px;
  font-family: 'Fredoka One', cursive;
  font-size: 1.3rem;
  letter-spacing: 1px;
  color: white;
  background: #ff6b6b;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  box-shadow: 0 5px 0 #c94040;
  transition: transform 0.12s, box-shadow 0.12s;
}
 
#start-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 7px 0 #c94040;
}
 
#start-btn:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 #c94040;
}

#pause-btn,
#stop-btn {
  width: 100%;
  padding: 14px;
  font-family: 'Fredoka One', cursive;
  font-size: 1.3rem;
  letter-spacing: 1px;
  color: white;
  background: #ff6b6b;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  box-shadow: 0 5px 0 #c94040;
  transition: transform 0.12s, box-shadow 0.12s;
}
 
#pause-btn:hover,
#stop-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 7px 0 #c94040;
}
 
#pause-btn:active,
#stop-btn:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 #c94040;
}
 
/* ===== Strict Mode Toggle Row ===== */
.toggle-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border: 2px solid #ffd93d;
  border-radius: 14px;
  padding: 10px 18px;
  width: 100%;
}
 
.toggle-label {
  font-weight: 700;
  font-size: 0.95rem;
  color: #555;
}
 
/* ===== Switch ===== */
.switch {
  position: relative;
  width: 50px;
  height: 26px;
  flex-shrink: 0;
}
 
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
 
.slider {
  position: absolute;
  inset: 0;
  background: #ddd;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.3s;
}
 
.slider::before {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  left: 3px;
  top: 3px;
  background: white;
  border-radius: 50%;
  transition: transform 0.3s;
}
 
input:checked + .slider { background: #6bcb77; }
input:checked + .slider::before { transform: translateX(24px); }
 
/* ===== Game Buttons ===== */
.btn-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
 
.line-one,
.line-two {
  display: flex;
  gap: 10px;
}
 
.btn {
  width: 130px;
  height: 130px;
  border-radius: 24px;
  cursor: pointer;
  border: none;
  opacity: 0.85;
  transition: transform 0.15s, opacity 0.15s;
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.15);
}
 
.btn:hover {
  opacity: 1;
  transform: translateY(-3px);
}
 
.btn:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.15);
}
 
/* Button Colors */
.yellow { background: #ffd93d; }
.red    { background: #ff6b6b; }
.green  { background: #6bcb77; }
.purple { background: #c77dff; }
 
/* ===== Flash Animations ===== */
@keyframes gameFlashAnim {
  0%   { opacity: 0.85; transform: scale(1); }
  40%  { opacity: 1;    transform: scale(1.08); filter: brightness(1.4); }
  100% { opacity: 0.85; transform: scale(1); }
}
 
@keyframes userFlashAnim {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.1); filter: brightness(1.3); }
  100% { transform: scale(1); }
}
 
.flash     { animation: gameFlashAnim 0.35s ease; }
.userflash { animation: userFlashAnim 0.2s ease; }
 
/* Level-up bounce on h2 */
@keyframes levelUpAnim {
  0%, 100% { transform: scale(1); }
  40%      { transform: scale(1.15); color: #6bcb77; }
}
 
.level-up { animation: levelUpAnim 0.4s ease; }
 
/* Game over board shake */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25%      { transform: translateX(-8px); }
  75%      { transform: translateX(8px); }
}
 
.shake { animation: shake 0.4s ease; }
 
/* ===== Dark Mode ===== */
body.dark {
  background: #1a1a2e;
  color: #f0f0ff;
}
 
body.dark h2 {
  color: #ccc;
}
 
body.dark h3 {
  color: #666;
}
 
body.dark .toggle-group {
  background: #16213e;
  border-color: rgba(255, 217, 61, 0.3);
}
 
body.dark .toggle-label {
  color: #ccc;
}
 
body.dark .btn {
  opacity: 0.7;
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.4);
}
 
body.dark .btn:active {
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.4);
}
 
body.dark .flash {
  filter: brightness(1.6);
}
 
/* ===== Responsive ===== */
@media (max-width: 400px) {
  h1 { font-size: 2.2rem; }
  .btn { width: 100px; height: 100px; }
  .controls { gap: 12px; }
}
