.rmb-writeup {
  font-family: "Poppins", sans-serif;
  line-height: 1.8;
  font-size: 16px;
  color: #444;
  background-color: #fffdfd;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 0 8px rgba(0,0,0,0.05);
  max-width: 900px;
  margin: 0 auto;
}

.rmb-writeup h1, .rmb-writeup h2 {
  color: #e08ec9;
  font-weight: 700;
  margin-top: 30px;
  animation: fadeInDown 1s ease;
}

.rmb-writeup h1 {
  font-size: 2em;
  color: #58bbee;
}

.rmb-writeup ul {
  padding-left: 20px;
  margin: 15px 0;
  list-style: disc;
  color: #333;
  animation: fadeInUp 1s ease;
}

.rmb-writeup p {
  margin-bottom: 15px;
}

.rmb-writeup a {
  color: #58bbee;
  text-decoration: none;
  font-weight: 600;
}

.rmb-writeup a:hover {
  text-decoration: underline;
}

/* Style numbered FAQs */
.rmb-writeup p:nth-child(n+1):has(strong) {
  margin-left: 10px;
  background: #f9f9f9;
  padding: 12px 15px;
  border-left: 5px solid #58bbee;
  border-radius: 6px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* Animations */
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-15px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

/* HOST SCREEN */
.rmb-host-wrapper {
  max-width: 600px;
  margin: 40px auto;
  padding: 24px;
  border-radius: 24px;
  background: linear-gradient(135deg, #ffe0f0, #e0f7ff);
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.1);
  text-align: center;
  animation: fadeIn 1s ease;
  border: 5px solid #fff;
  position: relative;
  overflow: hidden;
}

.rmb-host-wrapper::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(
    from 0deg,
    #ff8fab,
    #b2e0ff,
    #ffc75f,
    #a3f7bf,
    #ff8fab
  );
  animation: rotateBorder 8s linear infinite;
  z-index: 0;
}

.rmb-host-wrapper > * {
  position: relative;
  z-index: 1;
}

@keyframes rotateBorder {
  to { transform: rotate(360deg); }
}

.rmb-host-instructions h2 {
  font-size: 1.8em;
  background: linear-gradient(90deg, #f43f5e, #8b5cf6, #10b981);
  -webkit-background-clip: text;
  color: transparent !important;
  animation: hueRotate 4s infinite linear;
  margin-bottom: 12px;
}

@keyframes hueRotate {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}

.rmb-gender-options {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin: 20px 0;
}

.rmb-gender-radio {
  padding: 14px 28px;
  border-radius: 20px;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border: 2px solid transparent;
  position: relative;
}

.rmb-gender-radio input {
  display: none;
}

.rmb-boy {
  background: #cce4ff;
  color: #004085;
  border-color: #60a5fa !important;
}

.rmb-girl {
  background: #ffd6e8;
  color: #800040;
  border-color: #f472b6 !important;
}

.rmb-twins {
  background: #e5e5ff;
  color: #333399;
  border-color: #a78bfa !important;
}

.rmb-gender-radio.selected {
  transform: scale(1.1);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
  border-color: #10b981;
}

.rmb-link-container {
  margin-top: 20px;
}

#rmb-shareable-link {
  width: 100%;
  padding: 12px;
  font-size: 14px;
  border-radius: 10px;
  border: 1px solid #ccc;
  margin-bottom: 10px;
  background: #fffefc;
  text-align: center;
  font-family: monospace;
}

.rmb-link-buttons {
  display: flex !important;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

.rmb-link-container,
.rmb-link-buttons {
  display: none;
}

.rmb-animated-button {
  padding: 12px 20px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.3s ease, transform 0.3s ease;
  font-size: 1rem;
  min-width: 100px;
}

#rmb-copy-link {
  background-color: #3b82f6;
  color: white;
}

#rmb-open-link {
  background-color: #10b981;
  color: white;
}

.rmb-animated-button:hover {
  transform: scale(1.05);
  filter: brightness(1.1);
}

/* Riddle Me Baby – CSS */
.rmb-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 16px;
  font-family: 'Poppins', sans-serif;
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
  overflow: hidden;
}

#rmb-progress-bar-wrapper {
  position: relative;
  background: #eee;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 1rem;
  margin-top: 0.5rem;
  height: 17px;
}

#rmb-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #f472b6, #60a5fa);
  animation: progress-animate 0.6s ease;
}

#rmb-progress-label {
  position: relative;
  right: 0;
  font-size: 1.1rem;
  color: #8AD;
  text-align: center;
  margin-top: 25px;
}

/* End screen styles */
.rmb-bob-shadow {
  font-size: 1.4rem;
  color: #333;
  margin: 10px 0;
  text-shadow: 1px 1px 0 #ffc107, 2px 2px 0 #f59e0b;
  animation: bobbing 2s infinite ease-in-out;
}

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

#rmb-scoreboard {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-top: 15px;
    margin-bottom: 1rem;
    font-size: 18px;
    color: #333;
}

#rmb-riddle-box {
  text-align: center;
  animation: fadeIn 1s ease;
}

#rmb-riddle-text {
  font-size: 1.2rem;
  margin-bottom: 20px;
  color: #111;
}

#rmb-answer-box {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  flex-direction: column;
  margin-bottom: 20px;
  padding: 10px;
}

.rmb-letter-input {
  width: 40px;
  height: 40px;
  margin: 4px;
  font-size: 1.2rem;
  text-align: center;
  border-radius: 8px;
  border: 2px solid #ccc;
  transition: border-color 0.3s;
  text-transform: uppercase;
}

.rmb-letter-input:focus {
  border-color: #93c5fd;
  outline: none;
}

.rmb-letter-input:disabled {
    background: #e2f4ff;
    font-weight: bold;
    border-color: #66cfff;
}

.rmb-word-line {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
	flex-wrap: wrap;
    max-width: 100%;
}

#rmb-hint-btn {
  background: #facc15;
  border: none;
  padding: 10px 25px;
  border-radius: 30px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s ease;
  margin-bottom: 20px;
}

#rmb-hint-btn:hover {
  background: #fbbf24;
}

#rmb-correct-animation {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: clamp(1.5rem, 4vw, 2rem);
    color: #4CAF50;
    background: rgba(255, 255, 255, 0.95);
    padding: 0.75rem 1.5rem;
    border-radius: 20px;
    box-shadow: 0 0 15px #4CAF50;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 99;
	white-space: nowrap;
	text-align: center;
    font-weight: bold;
}

#rmb-correct-animation.show {
    opacity: 1;
}

/* Score Animation */
.rmb-animated-score {
    transition: transform 0.3s ease, color 0.3s ease;
    will-change: transform, color;
}

.rmb-animated-score.flash-up {
    transform: scale(1.3);
    color: #4caf50; /* green */
}

.rmb-animated-score.flash-down {
    transform: scale(1.3);
    color: #f44336; /* red */
}

#rmb-end-screen {
  text-align: center;
  margin-top: 2rem;
  position: relative;
}

#rmb-reveal-text {
  font-size: 4.7rem !important;
  font-weight: bold;
  background: linear-gradient(90deg, #f43f5e, #8b5cf6, #10b981, #f43f5e);
  background-size: 200% auto;
  -webkit-background-clip: text;
  color: transparent;
  animation: rainbowFlow 5s linear infinite !important;
  white-space: nowrap;
  overflow: hidden;
  border-right: 3px solid #10b981;
}

@keyframes rainbowFlow {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}

/* Social Share Buttons */
.rmb-share-heading {
  margin-top: 30px;
  font-weight: bold;
  font-size: 1.2rem;
  color: #4b5563;
}

.rmb-social-share {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 15px 0;
}

.rmb-share-icon {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: bold;
  color: white;
  text-decoration: none;
  font-size: 16px;
  transition: transform 0.2s ease, opacity 0.3s ease;
}

/* Platform-specific colors */
#rmb-share-x {
  background-color: #000; /* X (Twitter) black */
}

#rmb-share-facebook {
  background-color: #1877F2; /* Facebook blue */
}

#rmb-share-whatsapp {
  background-color: #25D366; /* WhatsApp green */
}

/* Hover animation */
.rmb-share-icon:hover {
  transform: scale(1.05);
  opacity: 0.9;
}

#rmb-play-again-btn {
  background: #3b82f6;
  color: #fff;
  padding: 12px 24px;
  border: none;
  border-radius: 30px;
  font-size: 1rem;
  margin-top: 10px;
  margin-bottom: 25px;
  cursor: pointer;
  transition: background 0.3s ease;
}
#rmb-play-again-btn:hover {
  background: #2563eb;
}

#rmb-sparkle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1000;
}

@keyframes shake {
  0% { transform: translateX(0); }
  20% { transform: translateX(-4px); }
  40% { transform: translateX(4px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
  100% { transform: translateX(0); }
}

.shake {
  animation: shake 0.4s ease;
  border-color: #ef4444 !important;
}

/* Typewriter animation */
.typewriter {
  overflow: hidden !important;
  white-space: nowrap !important;
  animation: typing 3s steps(40, end), blink-caret .75s step-end infinite !important;
}

@keyframes typing {
  from { width: 0 }
  to { width: 100% }
}

@keyframes blink-caret {
  from, to { border-color: transparent }
  50% { border-color: #ccc }
}

/* Responsive & Portrait mode */
@media (max-width: 480px) {
  .rmb-container {
    padding: 12px;
  }

  .rmb-letter-input {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }

  #rmb-scoreboard {
    font-size: 0.9rem;
  }
  .rmb-share-icon {
	display: block;
    text-align: center;
    font-size: 15px;
	width: 65%;
    margin: 0 auto;
  }
	#rmb-reveal-text {
		font-size: 3.5rem !important;
	}
}
