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

body {
  background-image: url("https://i.pinimg.com/1200x/b5/37/f6/b537f6af75a3573bda5c9148ed16c5dc.jpg");
  cursor: url("https://cur.cursors-4u.net/sports/spo-10/spo947.cur"), auto;
  background-color: #8bc34a;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  font-family: monospace;
}

.game-container {
  text-align: center;
  background-color: cornsilk;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
  max-width: 600px;
  width: 100%;
}

h1 {
  font-family: monospace;
  font-size: 3rem;
  color: #502f09;
  text-shadow: 0 0 5px #03261f, 0 0 10px #03261f;
  margin-bottom: 20px;
  letter-spacing: 1px;
}

.game-info {
  display: flex;
  justify-content: space-around;
  margin-bottom: 20px;
  font-size: 1.2rem;
  font-weight: bold;
}
.game-info > div:hover {
  transform: scale(1.05);
  transition: transform 0.2s ease-in-out;
}

.game-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-gap: 15px;
  margin-bottom: 20px;
}

.hole {
  position: relative;
  width: 100%;
  padding-bottom: 100%;
  background-color: #654321; 
  border-radius: 50%;
  box-shadow: inset 0 10px 0 5px #432a17; 
  transition: all 0.3s ease;
  overflow: hidden; 
}

.hole:hover {
  transform: scale(1.03);
  box-shadow: 0 0 20px #ffc107, inset 0 10px 10px rgba(0, 0, 0, 0.6);
}

.mole {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('Daco_5139344.png');
  background-size: 125% auto; 
  background-repeat: no-repeat;
  background-position: center center; 
  transition: top 0.3s ease-out;
  animation: none;
  pointer-events: none;
  z-index: 1;
}

.mole.active {
  top: 15%;
  pointer-events: auto;
}

.game-button {
  background: linear-gradient(to right, #0b560f, #155f19);
  color: white;
  border: none;
  padding: 10px 20px;
  font-size: 1rem;
  border-radius: 5px;
  cursor: pointer;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, box-shadow 0.3s ease;
}

.game-button:hover {
  background-color: #43e24b;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
  transform: scale(1.05);
}

#start-button:hover {
  background-color: #388e3c;
}

#start-button:disabled {
  background-color: #9e9e9e;
  cursor: not-allowed;
}

#restart-button {
  background-color: #f44336;
}

#restart-button:hover {
  background-color: #8a0f0f;
}
.sound-controls {
  margin-top: 15px;
  font-size: 0.9rem;
}

.sound-controls label {
  cursor: pointer;
  user-select: none;
}

.sound-controls input {
  margin-right: 5px;
}
.game-over-tag {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #ff0000;
  color: white;
  font-size: 2rem;
  font-weight: bold;
  padding: 10px 20px;
  border-radius: 5px;
  z-index: 10;
  display: none;
  animation: pulse 1s infinite alternate;
}

.score-popup {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgba(255, 255, 255, 0.9);
  color: #333;
  font-size: 1.5rem;
  font-weight: bold;
  padding: 15px 25px;
  border-radius: 10px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
  z-index: 9;
  display: none;
}

@keyframes pulse {
  from {
    transform: translate(-50%, -50%) scale(1);
  }
  to {
    transform: translate(-50%, -50%) scale(1.1);
  }
}
/* improve footer */

.footer {
  margin-top: 30px;
  padding: 20px 20px;
  background-color: wheat;
  border-top: 1px solid #ddd;
  font-size: 1rem;
  color: #444;
  text-align: center;
  border-radius: 0 0 10px 10px;
  animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.footer a {
  color: #388e3c;
  font-weight: 500;
  transition: color 0.3s ease;
  text-decoration: none;
}

.footer a:hover {
  color: #2e7d32;
  text-decoration: underline;
}

.footer .heart {
  animation: beat 1s infinite alternate;
  display: inline-block;
  color: red;
}

@keyframes beat {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.2);
  }
}
@keyframes shake {
  0% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  50% { transform: translateX(5px); }
  75% { transform: translateX(-5px); }
  100% { transform: translateX(0); }
}


.mole.whacked {
  animation: shake 0.3s ease-in-out;
  animation-fill-mode: forwards;
}

/* LIGHT AND DARK MODE */

body.dark-mode {
  background-color: #212121 !important;
  background-image:
  linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)),
  url("https://i.pinimg.com/1200x/b5/37/f6/b537f6af75a3573bda5c9148ed16c5dc.jpg") !important;
  background-size: cover;
  background-position: center;
  color: var(--text-color);
}

body.dark-mode .game-container {
  background-color: #2d2d2d;
  color: #f6f6f6;
  box-shadow: 0 0 20px rgba(30,30,60,0.5);
}

body.dark-mode h1 {
  color: #ffee58;
  text-shadow: 0 0 8px #283593;
}
body.dark-mode .game-info,
body.dark-mode .score-popup,
body.dark-mode .game-over-tag,
body.dark-mode .footer {
  background-color: #26283f;
  color: #ffe082;
}

body.dark-mode .hole {
  background-color: #463018;
  box-shadow: inset 0 10px 0 5px rgba(255,255,255, 0.08);
}

.theme-toggle-btn {
  position: absolute;
  top: 12px;
  right: 16px;
  z-index: 30;
  padding: 8px 14px;
  background: #222;
  color: #fff;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  font-size: 1.05rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  transition: all .2s;
}
.theme-toggle-btn:hover {
  background: #434343;
  color: #ffee58;
}

/* Level Selection Styles */
.level-selection {
  margin-bottom: 20px;
  padding: 15px;
  border-radius: 10px;
  background-color: rgba(255, 255, 255, 0.1);
}

.level-selection h3 {
  color: #502f09;
  margin-bottom: 15px;
  font-size: 1.3rem;
  text-shadow: 0 0 3px rgba(0, 0, 0, 0.3);
}

.level-dropdown-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.level-label {
  color: #502f09;
  font-size: 1.1rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 8px;
}

.level-dropdown {
  background: linear-gradient(135deg, #ffffff, #f8f9fa);
  border: 2px solid #6a5acd;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 1rem;
  font-weight: 500;
  color: #333;
  cursor: pointer;
  min-width: 280px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  outline: none;
}

.level-dropdown:hover {
  border-color: #483d8b;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
}

.level-dropdown:focus {
  border-color: #ffa726;
  box-shadow: 0 0 0 3px rgba(255, 167, 38, 0.3);
}

.level-dropdown:disabled {
  background: linear-gradient(135deg, #e0e0e0, #d0d0d0);
  border-color: #cccccc;
  color: #999999;
  cursor: not-allowed;
  opacity: 0.6;
}

.level-dropdown option {
  padding: 10px;
  background-color: #ffffff;
  color: #333;
  font-size: 1rem;
}

.level-dropdown option:hover,
.level-dropdown option:checked {
  background-color: #f0f0f0;
  color: #6a5acd;
}

/* Dark Mode Support for Level Selection */
body.dark-mode .level-selection {
  background-color: rgba(0, 0, 0, 0.2);
}

body.dark-mode .level-selection h3,
body.dark-mode .level-label {
  color: #ffee58;
  text-shadow: 0 0 5px rgba(255, 238, 88, 0.3);
}

body.dark-mode .level-dropdown {
  background: linear-gradient(135deg, #3a3a3a, #2d2d2d);
  border-color: #ffee58;
  color: #ffffff;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

body.dark-mode .level-dropdown:hover {
  border-color: #ffc107;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

body.dark-mode .level-dropdown:focus {
  border-color: #ffa726;
  box-shadow: 0 0 0 3px rgba(255, 167, 38, 0.3);
}

body.dark-mode .level-dropdown:disabled {
  background: linear-gradient(135deg, #404040, #303030);
  border-color: #555555;
  color: #666666;
  cursor: not-allowed;
  opacity: 0.6;
}

body.dark-mode .level-dropdown option {
  background-color: #2d2d2d;
  color: #ffffff;
}

body.dark-mode .level-dropdown option:hover,
body.dark-mode .level-dropdown option:checked {
  background-color: #404040;
  color: #ffee58;
}

/* Responsive Design for Level Selection */
@media (max-width: 768px) {
  .level-dropdown-container {
    width: 100%;
  }
  
  .level-dropdown {
    min-width: 250px;
    width: 100%;
    max-width: 300px;
  }
  
  .level-selection h3 {
    font-size: 1.1rem;
  }
  
  .level-label {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .level-dropdown {
    min-width: 200px;
    padding: 10px 12px;
    font-size: 0.9rem;
  }
  
  .level-label {
    font-size: 0.9rem;
  }
  
  .level-selection h3 {
    font-size: 1rem;
  }
}
