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

#emoji-clues-game {
  font-family: 'Comic Sans MS', cursive;
  padding: 20px;
  text-align: center;
  background: linear-gradient(to top, #f0faff, #fff0f5);
}

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

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

#riddle-text {
  font-size: 2.4rem !important;
  margin-bottom: 15px;
  color: #4b0082;
  animation: emojiBounce 1.2s infinite alternate ease-in-out;
}

@keyframes emojiBounce {
  0% { transform: scale(1); }
  100% { transform: scale(1.07); }
}

.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 #4b0082;
  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;
}

#hint-btn {
  padding: 10px 20px;
  background-color: #9370db;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
  margin: 15px auto 0 auto;
  display: block;
  max-width: 160px;
}

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

#countdown-screen {
  margin-top: 60px;
  animation: popIn 1s ease-in-out;
}

#countdown-number {
  font-size: 6rem;
  color: #4b0082;
  text-align: center;
  margin: 60px auto;
}

#final-room {
  margin-top: 40px;
}
#final-reveal-text {
  font-size: 3.2rem !important;
  background: linear-gradient(to right, #ff6ec4, #7873f5, #4ade80) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  animation: rainbowGlow 2s infinite ease-in-out !important;
  font-weight: bold !important;
  margin-top: -50px;
}

@keyframes rainbowGlow {
  0% { filter: drop-shadow(0 0 10px #ff6ec4); }
  50% { filter: drop-shadow(0 0 20px #7873f5); }
  100% { filter: drop-shadow(0 0 10px #4ade80); }
}

.final-celebrate {
  font-size: 5rem !important;
  font-weight: bold !important;
  padding: 20px;
  animation: popCelebrate 2.2s ease-in-out forwards;
  text-shadow: 3px 3px 10px rgba(0, 0, 0, 0.3);
  color: #ff1493;
  background: none;
  background-color: #fff0f5;
  border-radius: 20px;
  display: inline-block;
  box-shadow: 0 0 30px rgba(255, 105, 180, 0.6);
}

.final-celebrate::before {
  left: -30px;
  top: -20px;
}

.final-celebrate::after {
  right: -30px;
  bottom: -20px;
}

@keyframes sparkleSpin {
  0% { transform: rotate(0deg) scale(1); opacity: 1; }
  50% { transform: rotate(180deg) scale(1.4); opacity: 0.8; }
  100% { transform: rotate(360deg) scale(1); opacity: 1; }
}

.final-special {
  font-size: 4rem;
  color: #ff1493;
  text-shadow: 2px 2px 6px #fff;
  animation: bounce 1s ease-in-out;
}

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

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

.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 {
  padding: 10px 20px;
  margin: 10px;
  font-size: 1rem;
  background-color: #eee0f6;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.gender-select.active {
  background-color: #d8b0ff !important;
  box-shadow: 0 0 10px rgba(186, 85, 211, 0.6);
  transform: scale(1.05);
  font-weight: bold;
}

#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;
}
#open-link {
  margin-top: 10px;
  padding: 8px 14px;
  font-size: 0.95rem;
  background-color: #add8e6; /* Light Blue */
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

#open-link:hover {
  background-color: #87ceeb; /* Sky Blue */
  transform: scale(1.05);
}

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

.correct-popup {
  font-size: 1.8rem;
  font-weight: bold;
  color: green;
  margin-top: 10px;
  animation: correctFlash 0.6s ease-in-out;
}
#correct-wrapper {
  width: 100%;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hidden {
  display: none !important;
}
.progress-wrapper {
  max-width: 90%;
  margin: 20px auto;
  text-align: center;
}

#progress-bar {
  height: 16px;
  background-color: #eee;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 0 5px rgba(0,0,0,0.1);
}

#progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(to right, #9370db, #ff69b4);
  transition: width 0.5s ease;
  border-radius: 10px 0 0 10px;
}

#progress-text {
  margin-top: 6px;
  font-size: 0.95rem;
  color: #4b0082;
  font-weight: bold;
}

.cake-scene {
  margin: 40px auto;
  max-width: 300px;
  position: relative;
  animation: popIn 1.2s ease-in-out;
}
.cake-emoji {
  font-size: 8rem !important;
  text-align: center;
  margin: auto;
  z-index: 1;
  position: relative;
  animation: bounceCake 1s infinite alternate;
}

.cake-slice {
  font-size: 7.5rem;
  text-align: center;
  margin-top: -50px;
  animation: fadeIn 1s ease-in-out forwards;
}

.final-cake-slice {
  font-size: 6rem;
  text-align: center;
  margin: auto;
  margin-top: 20px;
  animation: fadeIn 1s ease-in-out forwards;
}
@keyframes bounceCake {
  0% { transform: scale(1); }
  100% { transform: scale(1.05); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

.knife {
  width: 150px;
  height: 150px;
  background: url('https://genderrevealgames.com/wp-content/uploads/2025/06/knife.png') no-repeat center center;
  background-size: contain;
  position: absolute;
  top: -40px;
  right: 20px;
  transform: translateX(-50%);
  cursor: pointer;
  z-index: 2; /* Ensure it's in front */
  animation: knifeFloat 2s infinite ease-in-out;
  transition: transform 0.5s ease-in-out;
}

.knife.cut {
  transform: translateX(-50%) rotate(-50deg);
  animation: none;
}

@keyframes knifeFloat {
  0% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, -10px); }
  100% { transform: translate(-50%, 0); }
}

#cake-reveal-message {
  font-size: 2rem;
  margin-top: 20px;
  color: #ff1493;
  font-weight: bold;
  animation: popCelebrate 1.5s ease-in-out;
}

@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;
}

@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 floatDown {
  0% { transform: translateY(-30px); opacity: 1; }
  100% { transform: translateY(100px); opacity: 0; }
}

@keyframes popCelebrate {
  0% { transform: scale(0.5); opacity: 0; }
  30% { transform: scale(1.3); opacity: 1; }
  60% { transform: scale(0.9); }
  100% { transform: scale(1); }
}

.confetti-drop {
  position: fixed;
  top: -20px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  animation: rainDown 10s linear forwards;
  z-index: 9999;
  opacity: 0.9;
}

@keyframes rainDown {
  0% {
    transform: translateY(0);
    opacity: 1;
  }
  100% {
    transform: translateY(110vh);
    opacity: 0.2;
  }
}

@media (min-width: 600px) {
  #hint-btn { margin-left: auto; margin-right: 0; }
  .cake-scene { display: block !important; }
}