:root {
  --ground: #6b4226;
  --hole: #3d2614;
  --mole: #a0522d;
  --mole-nose: #ff5252;
  --mole-eye: #000;
}

main {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.game-title {
  text-align: center;
  margin-bottom: 2rem;
}

.game-title h1 {
  font-size: 2.5rem;
  color: var(--accent);
}

.game-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 2rem;
  position: relative;
}

.game-stats {
  display: flex;
  justify-content: space-between;
  width: 100%;
  max-width: 500px;
  margin-bottom: 1rem;
}

.stat {
  background-color: var(--bg-secondary);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  min-width: 100px;
  text-align: center;
}

.stat-value {
  font-weight: bold;
  color: var(--accent);
}

#game-board {
  width: 500px;
  height: 500px;
  background-color: var(--ground);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  padding: 20px;
  position: relative;
  border: 2px solid #333;
  overflow: hidden;
}

.row {
  display: flex;
  justify-content: space-around;
  width: 100%;
}

.hole {
  width: 130px;
  height: 130px;
  background-color: var(--hole);
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  cursor: pointer;
}

.mole {
  width: 100px;
  height: 100px;
  background-color: var(--mole);
  border-radius: 50%;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  transition: top 0.3s;
  cursor: pointer;
}

.mole:after {
  content: '';
  display: block;
  position: absolute;
  width: 25px;
  height: 25px;
  background-color: var(--mole-nose);
  border-radius: 50%;
  top: 35px;
  left: 50%;
  transform: translateX(-50%);
}

.mole:before {
  content: '';
  display: block;
  position: absolute;
  width: 40px;
  height: 10px;
  background-color: var(--mole-eye);
  border-radius: 5px;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
}

.mole.up {
  top: 20px;
}

.mole.bonked {
  background-color: #ff5252;
  animation: wobble 0.3s;
}

@keyframes wobble {
  0% {
    transform: translateX(-50%) rotate(0deg);
  }

  25% {
    transform: translateX(-50%) rotate(-20deg);
  }

  50% {
    transform: translateX(-50%) rotate(0deg);
  }

  75% {
    transform: translateX(-50%) rotate(20deg);
  }

  100% {
    transform: translateX(-50%) rotate(0deg);
  }
}

.game-controls {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.game-button {
  background-color: var(--accent);
  color: var(--text-primary);
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.3s ease;
}

.game-button:hover {
  background-color: var(--accent-hover);
}

.game-button:disabled {
  background-color: #555;
  cursor: not-allowed;
}

.game-over {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 10;
  visibility: hidden;
}

.game-over h2 {
  color: var(--accent);
  font-size: 2rem;
  margin-bottom: 1rem;
}

.game-over p {
  color: var(--text-primary);
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

@media (max-width: 768px) {
  #game-board {
    width: 320px;
    height: 320px;
    padding: 10px;
  }

  .hole {
    width: 90px;
    height: 90px;
  }

  .mole {
    width: 70px;
    height: 70px;
  }

  .mole:after {
    width: 20px;
    height: 20px;
    top: 25px;
  }

  .mole:before {
    width: 30px;
    height: 8px;
    top: 15px;
  }

  .game-stats {
    max-width: 320px;
  }
}
