body, html {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

#nursery-race-game {
  font-family: 'Comic Sans MS', cursive;
  padding: 20px;
  text-align: center;
  background: linear-gradient(to top, #fff5f9, #e0ffff);
}

.game-title {
  font-size: 2rem;
  color: #ff69b4;
  animation: popIn 1s ease-in-out;
}

.riddle-container {
  margin-top: 20px;
  animation: fadeIn 1s ease-in-out;
}

#riddle-text {
  font-size: 1.3rem;
  margin-bottom: 10px;
}

.word-display {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 15px 0;
}

.letter-box {
  width: 36px;
  height: 44px;
  line-height: 44px;
  text-align: center;
  font-size: 1.3rem;
  font-weight: bold;
  background: #fff;
  border: 2px solid #ff69b4;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  transition: transform 0.2s;
}

.letter-box[data-filled="true"] {
  color: #000;
}

.letter-box[data-filled="false"] {
  color: #bbb;
}

#final-room { margin-top: 40px; }

#final-reveal-text {
  font-size: 2rem;
  color: #ff1493;
  animation: revealScale 2s ease-in-out;
}

#hint-btn {
  padding: 10px 20px;
  background-color: #ff90c2;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
  margin-top: 10px;
}

#hint-btn:hover {
  background-color: #ff6ea5;
  transform: scale(1.05);
}

.social-share a {
  margin: 10px;
  text-decoration: none;
  color: white;
  background-color: #ff69b4;
  padding: 10px 16px;
  border-radius: 8px;
  display: inline-block;
}

/* Add shaking effect on wrong */
@keyframes shake {
  0% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  50% { transform: translateX(6px); }
  75% { transform: translateX(-4px); }
  100% { transform: translateX(0); }
}
.shake {
  animation: shake 0.3s;
}
#countdown-screen {
  margin-top: 60px;
  animation: popIn 1s ease-in-out;
}

#countdown-number {
  font-size: 6rem !important;
  color: #ff1493;
  text-align: center;
  margin: 60px auto;
}
.host-setup-screen {
  margin: 30px auto;
  text-align: center;
}
.host-intro p {
  max-width: 600px;
  margin: 10px auto;
  font-size: 1rem;
  color: #444;
  line-height: 1.5;
}

.gender-select.active {
  background-color: #ffb6c1 !important;
  box-shadow: 0 0 10px rgba(255, 105, 180, 0.6);
  transform: scale(1.05);
  font-weight: bold;
}

.gender-select {
  padding: 10px 20px;
  margin: 10px;
  font-size: 1rem;
  background-color: #ffd2e6;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

#generated-url {
  width: 90%;
  max-width: 400px;
  padding: 8px;
  margin-top: 10px;
  font-size: 0.95rem;
}

#copy-url {
  margin-top: 10px;
  padding: 8px 14px;
  font-size: 0.95rem;
  background-color: #90ee90;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

#copy-confirm {
  display: block;
  margin-top: 6px;
  color: green;
  font-weight: bold;
}

.share-label {
  margin-top: 20px;
  font-size: 1.2rem;
  font-weight: bold;
}

#play-again {
  margin-top: 20px;
  padding: 10px 20px;
  background-color: #32cd32;
  color: white;
  font-size: 1rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s ease;
}
#play-again:hover {
  background-color: #28a428;
}

.bounce {
  animation: bounce 1s;
}
.hidden {
  display: none !important;
}

.correct-popup {
  font-size: 1.8rem;
  font-weight: bold;
  color: green;
  margin-top: 10px;
  animation: correctFlash 0.6s ease-in-out;
}
#final-reveal-text.special-final {
  font-size: 3.5rem !important;
  font-weight: bold !important;
  animation: bounceReveal 1.5s ease-in-out infinite alternate !important;
  background: linear-gradient(45deg, #00bfff, #1e90ff) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  text-shadow: 0 2px 5px rgba(0, 191, 255, 0.4) !important;
  margin-bottom: 20px !important;
}

#final-reveal-text.special-final.girl {
  background: linear-gradient(45deg, #ff69b4, #ff1493);
  text-shadow: 0 2px 5px rgba(255, 105, 180, 0.4);
}

#final-reveal-text.special-final.twins {
  background: linear-gradient(45deg, #ffa07a, #87cefa);
  text-shadow: 0 2px 5px rgba(255, 160, 122, 0.4);
}

@keyframes bounceReveal {
  0% { transform: scale(1); }
  100% { transform: scale(1.05); }
}

@keyframes correctFlash {
  0% { transform: scale(0.8); opacity: 0; }
  50% { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

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

@keyframes popIn {
  0% { transform: scale(0.5); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes revealScale {
  0% { transform: scale(0.8); opacity: 0; }
  100% { transform: scale(1.1); opacity: 1; }
}

@keyframes floatDown {
  0% { transform: translateY(-30px); opacity: 1; }
  100% { transform: translateY(100px); opacity: 0; }
}