/*HOST SCREEN */
.mfs-gender-options {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 1.5rem 0;
}

.mfs-gender-btn {
  padding: 0.8rem 1.2rem;
  border-radius: 12px;
  background: #f0f0f0;
  cursor: pointer;
  border: 3px solid transparent;
  font-weight: bold;
  transition: all 0.3s ease;
  font-size: 1.1rem;
}

.mfs-gender-btn input {
  display: none;
}

.mfs-gender-btn.selected#btn-boy {
  background: #e3f2fd;
  border-color: #2196f3;
  color: #0d47a1;
}

.mfs-gender-btn.selected#btn-girl {
  background: #fce4ec;
  border-color: #e91e63;
  color: #880e4f;
}

.mfs-gender-btn.selected#btn-twins {
  background: #ede7f6;
  border-color: #9c27b0;
  color: #4a148c;
}

#mfs-link-box {
  background: #fff3e0;
  padding: 1rem;
  border-radius: 15px;
  box-shadow: 0 0 15px rgba(0,0,0,0.05);
}

#mfs-generated-link {
  width: 100%;
  padding: 0.6rem;
  border-radius: 10px;
  border: 1px solid #ccc;
  font-family: monospace;
  margin-bottom: 1rem;
}

#mfs-host-message {
  width: 90%;
  margin: 1rem auto;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 10px;
  font-size: 1rem;
  min-height: 60px;
  resize: vertical;
  font-family: 'Comic Sans MS', cursive;
  display: block;
  background: #fff8e1;
}

.mfs-link-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.mfs-link-buttons button {
  padding: 0.6rem 1.2rem;
  border-radius: 10px;
  font-weight: bold;
  cursor: pointer;
  background: linear-gradient(45deg, #4caf50, #81c784);
  border: none;
  color: white;
  transition: transform 0.2s ease;
}

.mfs-link-buttons button:hover {
  transform: scale(1.05);
}

.animate-border {
  animation: pulse-border 2s infinite;
  border: 4px solid #ffcc80;
  padding: 0.5rem;
  border-radius: 20px;
}

@keyframes pulse-border {
  0% {
    box-shadow: 0 0 5px rgba(255, 204, 128, 0.5);
  }
  50% {
    box-shadow: 0 0 20px rgba(255, 204, 128, 1);
  }
  100% {
    box-shadow: 0 0 5px rgba(255, 204, 128, 0.5);
  }
}

/* GAME SCREEN */
body {
  background: #fffde7;
  font-family: 'Comic Sans MS', cursive;
}

#mfs-container {
  max-width: 600px;
  margin: 2rem auto;
  text-align: center;
  padding: 1rem;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.05);
}

.mfs-title {
  font-size: 2rem;
  color: #333;
  margin-bottom: 1rem;
}

.mfs-subtitle {
  color: #666;
  margin-bottom: 1rem;
}

.mfs-difficulty-options {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 1rem auto 1.5rem;
  flex-wrap: wrap;
}

.mfs-difficulty-btn {
  padding: 0.8rem 1.2rem;
  background: #f9f9f9;
  border: 2px solid #ccc;
  border-radius: 12px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
  user-select: none;
  transform: scale(1);
}

.mfs-difficulty-btn input[type="radio"] {
  display: none;
}

.mfs-difficulty-btn input[type="radio"]:checked {
  background: #ffe082;
  border-color: #fbc02d;
}

.mfs-difficulty-btn.selected {
  background: #fff3cd;
  border-color: #ffc107;
  color: #5d4037;
  box-shadow: 0 0 12px rgba(255, 193, 7, 0.6);
  transform: scale(1.08);
  transition: all 0.2s ease-in-out;
}

.mfs-difficulty-btn:hover {
  transform: scale(1.04);
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.1);
}

#mfs-setup input {
  padding: 10px;
  margin: 0.5rem;
  border-radius: 10px;
  border: 1px solid #ccc;
  font-size: 1rem;
  width: 80%;
}

#mfs-start {
  padding: 10px 20px;
  margin-top: 1rem;
  margin-bottom: 1.5rem;
  background: #4caf50;
  color: #fff;
  border: none;
  font-size: 1rem;
  border-radius: 10px;
  cursor: pointer;
}

#mfs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 12px;
  justify-items: center;
  margin-top: 1rem;
}

#mfs-score {
  background: #fce4ec;
  color: #4a148c;
  font-weight: bold;
  font-size: 1.1rem;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  margin: 1rem auto;
  display: inline-block;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  border: 2px solid #f8bbd0;
}

.card {
  width: 70px;
  height: 90px;
  background: #ddd;
  border-radius: 8px;
  perspective: 600px;
  cursor: pointer;
  position: relative;
}

.card-inner {
  position: absolute;
  width: 100%;
  height: 100%;
  transition: transform 0.6s;
  transform-style: preserve-3d;
  transform: rotateY(180deg);
}

.card.flipped .card-inner {
  transform: rotateY(0deg);
}

.card-front, .card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 8px;
}

.card-front {
  background: #f3f3f3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.card-back {
  background: #ffccbc;
  transform: rotateY(180deg);
}

.card.matched .card-inner {
  box-shadow: 0 0 10px 0px #ffc107;
  cursor: default;
}

#mfs-analytics {
  background: #fff8e1;
  border-radius: 15px;
  padding: 1rem 1.5rem;
  margin: 2rem auto;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.05), 0 4px 15px rgba(255, 224, 178, 0.5);
  max-width: 90%;
  font-size: 1rem;
  font-weight: 500;
  color: #4e342e;
  border: 2px solid #ffe082;
  text-align: left;
}
#mfs-analytics p {
  margin: 0.4rem 0;
}

#result {
  font-size: 2.5rem;
  margin: 1rem 0;
  color: #d81b60;
}

.hidden { display: none !important; }

.mfs-reveal-boy {
  background: linear-gradient(135deg, #e0f7fa, #bbdefb); /* Light blue-cyan */
}

.mfs-reveal-girl {
  background: linear-gradient(135deg, #fce4ec, #f8bbd0); /* Soft pinks */
}

.mfs-reveal-twins {
  background: linear-gradient(135deg, #ede7f6, #d1c4e9); /* Soft purple */
}

.mfs-reveal-boy,
.mfs-reveal-girl,
.mfs-reveal-twins {
  transition: background 1s ease-in-out;
  background-size: 200% 200%;
  animation: gradient-flow 8s ease infinite;
}

@keyframes gradient-flow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

#mfs-reveal {
  padding: 2rem 1rem;
  border-radius: 20px;
  color: white;
  text-align: center;
  animation: fadeIn 1s ease-in;
}

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

#mfs-result {
  font-size: 2rem !important;
  line-height: 1.4;
  font-weight: 800;
  text-align: center;
  margin: 1em 0;
  animation: shimmer 2.5s infinite;
  background: linear-gradient(90deg, #ffd700, #ff69b4, #00bfff);
  background-size: 400% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

@keyframes shimmer {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Final Reveal Message (host optional message) */
#mfs-message {
  font-size: 1.1rem;
  margin: 1rem auto;
  max-width: 90%;
  color: #5d4037;
  font-style: italic;
  background: #fff8e1;
  padding: 12px 16px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* Share section styling */
.mfs-share {
  text-align: center;
  margin-top: 2rem;
  padding: 1rem;
}

.mfs-share a {
  display: inline-block;
  margin: 8px;
  padding: 10px 18px;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  border-radius: 40px;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.mfs-share p {
  font-size: 1.2rem;
  font-weight: bold;
  color: #333;
  margin-bottom: 1rem;
}

#share-whatsapp {
  background: linear-gradient(135deg, #25d366, #128c7e);
}

#share-x {
  background: linear-gradient(135deg, #1da1f2, #0d8ddb);
}

#share-fb {
  background: linear-gradient(135deg, #3b5998, #4c70ba);
}

.mfs-share a:hover,
.mfs-share a:active {
  transform: scale(1.05);
  box-shadow: 0 6px 12px rgba(0,0,0,0.25);
}

#mfs-play-again {
  background: linear-gradient(135deg, #00c6ff, #0072ff);
  color: white;
  border: none;
  padding: 12px 25px;
  font-size: 1.2rem;
  font-weight: bold;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  transition: all 0.3s ease;
  margin-top: 1rem;
  margin-bottom: 3rem;
}

#mfs-play-again:hover {
  background: linear-gradient(135deg, #0072ff, #00c6ff);
  transform: scale(1.05);
}

@media (max-width: 480px) {
  #mfs-result { font-size: 1.6rem; }
  #mfs-play-again {
    font-size: 1rem;
    padding: 10px 20px;
	width: 80%;
  }
  .mfs-share a {
    display: block;
    width: 80%;
    margin: 10px auto;
    font-size: 0.95rem;
    text-align: center;
  }
  #mfs-message {
    font-size: 1rem;
    padding: 10px;
  }
}