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

#tiny-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: 1.4rem;
  margin-bottom: 10px;
  color: #444;
}

.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: 3rem !important;
  color: #ba55d3;
  font-weight: bold !important;
  animation: revealScale 2s ease-in-out;
  position: relative;
  z-index: 2;
}
.final-celebrate {
  font-size: 5rem;
  font-weight: bold;
  padding: 20px;
  animation: popCelebrate 2.2s ease-in-out forwards;
  text-shadow: 3px 3px 10px #ffb6c1, -3px -3px 10px #dda0dd;
  color: #ff1493;
  background: linear-gradient(135deg, #fff0f5 0%, #ffe4e1 100%);
  border-radius: 20px;
  display: inline-block;
  box-shadow: 0 0 30px rgba(255, 105, 180, 0.6);
}

.final-celebrate::before,
.final-celebrate::after {
  content: "✨";
  font-size: 2rem;
  position: absolute;
  animation: sparkleSpin 3s infinite linear;
}

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

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

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

@media (min-width: 600px) {
  #hint-btn { margin-left: auto; margin-right: 0; }
}