body {
  font-family: sans-serif;
  text-align: center;
  margin: 0;
  padding: 20px;
  position: relative;
  background: none;
  z-index: 0;
}

.title {
  font-family: 'Chewy', cursive;
  font-size: 64px;
  font-weight: bolder;
  text-align: center;
  margin-bottom: 30px;
  letter-spacing: 4px;
  animation: fadeIn 2s ease;
}

.title span {
  display: inline-block;
  margin: 0 6px;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.4);
}

.title .toads {
  color: #4b0082;
  text-shadow: 2px 2px 6px #a07cc4;
}

.title .and {
  color: #d4af37;
  text-shadow: 2px 2px 6px #e0c97d;
}

.title .frogs {
  color: #228B22;
  text-shadow: 2px 2px 6px #7ec384;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.frog-container {
  display: inline-block;
  animation: bounce 2s infinite;
}

.frog-img {
  height: 80px;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

#gameSettings {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  margin-bottom: 30px;
  min-height: 200px; /* Ensure height is always reserved */
  padding-top: 20px;
}

.input-group {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.input-group label {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 6px;
  color: #333;
}

.input-group input,
.input-group select {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 16px;
  background-color: #fefefe;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.bubble-button {
  background-color: #fef3c7;
  border: none;
  border-radius: 40px;
  padding: 14px 28px;
  font-size: 18px;
  font-weight: 600;
  color: #007a70;
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  font-family: 'Fredoka', sans-serif;
}

.bubble-button:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 24px rgba(0,0,0,0.3);
}

.board {
  display: flex;
  justify-content: center;
  margin: 40px auto;
  gap: 8px;
}

.cell {
  width: 70px;
  height: 70px;
  font-size: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #333;
  border-radius: 8px;
  background-color: #ffffff;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.rules-container button {
  padding: 8px 16px;
  font-size: 16px;
  background-color: #d4e7d154;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  margin-bottom: 10px;
}

.rules-container button:hover {
  background-color: #bcd0c7;
}

.rules-container ul {
  background-color: #f8f9fa;
  padding: 15px 25px;
  border: 1px solid #ccc;
  border-radius: 8px;
  list-style-type: disc;
  text-align: left;
  max-width: 600px;
  margin: 0 auto;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  line-height: 1.6;
}

.rules-container h3 {
  margin-top: 0;
  color: #333;
}

.cell-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.title-image {
  width: 60%;
  max-width: 500px;
  margin-bottom: 30px;
  animation: bounceFade 2s ease-out;
}

@keyframes bounceFade {
  0% {
    opacity: 0;
    transform: scale(0.6) translateY(-40px);
  }
  60% {
    opacity: 1;
    transform: scale(1.1) translateY(10px);
  }
  100% {
    transform: scale(1) translateY(0);
  }
}

.title-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 30px;
  text-align: center;
}

.frog-bounce {
  width: 80px;
  height: auto;
  animation: bounce 2s infinite;
}

.status-icon {
  width: 24px;
  height: 24px;
  vertical-align: middle;
  margin: 0 4px;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url(bg.jpg);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  background-attachment: fixed;
  opacity: 0.6;
  z-index: -1;
}