#baby-name-game { font-family: 'Segoe UI', sans-serif; text-align: center; padding: 20px; max-width: 500px; margin: auto; }
#name-card-container { perspective: 1000px; margin: 20px 0; }
.swipe-card { width: 100%; max-width: 95vw; height: 240px; background: linear-gradient(135deg, #fdf0f3, #ffe4e1); padding: 30px 20px; border-radius: 16px; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1); transition: transform 0.5s ease-out; user-select: none; display: flex; justify-content: center; align-items: center; }
#baby-name { font-size: 2.2rem; font-weight: bold; color: #ff5e99; }
#swipe-instructions { font-size: 14px; display: flex; justify-content: space-between; margin: 10px 0; color: #666; }
#final-result { background: #fff4fa; border-radius: 12px; padding: 20px; margin-top: 20px; }
.hidden { display: none !important; }
button#play-again { margin-top: 10px; padding: 10px 20px; background: #ff77aa; color: #fff; border: none; border-radius: 8px; font-weight: bold; }
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 80vh; background: linear-gradient(to bottom right, #fff0f5, #e0f7fa); backdrop-filter: blur(6px); display: flex; justify-content: center; align-items: center; z-index: 9999; animation: fadeIn 0.4s ease-in-out; }
.modal-content { background: white; padding: 2rem; border-radius: 12px; text-align: center; box-shadow: 0 8px 16px rgba(0,0,0,0.2); max-width: 320px; }
.modal-content h2 { margin-bottom: 1rem; font-size: 1.5rem; }
.button-group button { margin: 0.5rem; padding: 0.7rem 1.5rem; font-size: 1rem; border: none; border-radius: 8px; cursor: pointer; background: #00bcd4; color: white; transition: background 0.3s ease; }
.button-group button:hover { background: #0097a7; }
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; } }
#name-card { max-width: 100vw; width: 100%; height: 600px; margin: auto; background-color: #fff5f5; border-radius: 12px; box-shadow: 0 10px 20px rgba(0,0,0,0.1); display: flex; align-items: center; justify-content: center; font-size: 2.5rem; transition: transform 0.4s ease; touch-action: pan-y; margin: 0 auto; }
#final-result { background: linear-gradient(145deg, #ffe4f0, #fdf6f9); border-radius: 16px; padding: 30px 20px; margin-top: 30px; animation: fadeInResult 0.7s ease-in-out; box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08); text-align: center; font-family: 'Segoe UI', sans-serif; transition: all 0.4s ease; }
#final-result h3 { font-size: 2.2rem; margin-bottom: 15px; color: #d63384; animation: popIn 0.6s ease; }
#chosen-name, #gender-guess { font-size: 1.4rem; margin: 12px 0; font-weight: 600; background: linear-gradient(to right, #ff5e99, #ffc371); -webkit-background-clip: text; -webkit-text-fill-color: transparent; animation: slideUp 0.6s ease forwards; opacity: 0; }
#gender-guess { font-size: 1.6rem; font-weight: bold; margin-top: 10px; }
@keyframes popIn {
  0% { transform: scale(0.8); opacity: 0; }
  100% { transform: scale(1); opacity: 1; } }
@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; } }
#final-result div[style*="Share your result"] { margin-top: 25px; animation: fadeInResult 1s ease; }
#final-result a { display: inline-block; margin: 8px 10px !important; padding: 8px 14px; border-radius: 8px; font-size: 14px; font-weight: bold; text-decoration: none; transition: transform 0.2s ease, background 0.3s ease; }
#final-result a:hover { transform: scale(1.1); background: #ffe5f0; }
.share-icons {
  margin-top: 25px;
  animation: fadeInResult 1s ease-in-out;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  padding: 10px 0;
}

.share-icons p {
  width: 100%;
  font-weight: bold;
  font-size: 1rem;
  margin-bottom: 10px;
  color: #d63384;
  text-align: center;
}

.share-icons a {
  flex: 1 1 30%;
  min-width: 100px;
  max-width: 140px;
  text-align: center;
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: bold;
  text-decoration: none;
  font-size: 14px;
  color: #fff;
  transition: transform 0.2s ease, background 0.3s ease;
}

.share-icons a:hover {
  transform: scale(1.1);
}

.whatsapp-share {
  background-color: #25d366;
  color: #fff;
}

.x-share {
  background-color: #1da1f2;
  color: #fff;
}

.facebook-share {
  background-color: #3b5998;
  color: #fff;
}
#final-result a[href*="wa.me"] { background-color: #25d366; color: #fff; }
#final-result a[href*="x.com"] { background-color: #1da1f2; color: #fff; }
#final-result a[href*="facebook.com"] { background-color: #3b5998; color: #fff; }
#play-again { margin-top: 30px !important; padding: 12px 26px; font-size: 1.1rem; border-radius: 10px; background: linear-gradient(to right, #ff77aa, #ffb3d1); color: white; border: none; font-weight: bold; cursor: pointer; transition: background 0.3s ease, transform 0.2s ease; }
#play-again:hover { background: linear-gradient(to right, #ff5e99, #ff8fa3); transform: scale(1.05); }
#like-count-meter { font-size: 1rem; color: #d63384; margin-top: 10px; font-weight: bold; animation: fadeIn 0.5s ease; }
.swipe-trail {
  position: absolute;
  width: 30px;
  height: 30px;
  background: radial-gradient(circle, #ffb6c1 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  animation: fadeTrail 0.5s ease-out forwards;
  z-index: 999; }
@keyframes fadeTrail {
  0% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.5); } }
#swipe-history {
  margin-top: 30px;
  padding: 15px 10px;
  background: transparent; /* No white box */
  border-radius: 0; /* Blend into result area */
  box-shadow: none;
  animation: fadeIn 0.8s ease-in-out;
  text-align: center;
}

#swipe-history h4 {
  font-size: 1.3rem;
  color: #d63384;
  margin-bottom: 14px;
  animation: popIn 0.7s ease;
}

#swipe-history ul {
  list-style-type: none;
  padding-left: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

#swipe-history li {
  background: linear-gradient(to right, #ffe3ec, #fdf0f3);
  padding: 8px 14px;
  border-radius: 16px;
  color: #d63384;
  font-weight: bold;
  font-size: 14px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  opacity: 0;
  animation: slideUpFade 0.5s forwards;
  animation-delay: calc(var(--i) * 0.1s);
}
@keyframes slideUpFade {
  0% { transform: translateY(20px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}
.heart-emoji {
  position: fixed;
  font-size: 2.5rem;
  top: 60%;
  left: 50%;
  transform: translate(-50%, 0);
  opacity: 0;
  z-index: 9999;
  pointer-events: none;
  animation: floatHeart 1s ease forwards;
}
@keyframes floatHeart {
  0% { transform: translate(-50%, 0); opacity: 1; }
  100% { transform: translate(-50%, -150px); opacity: 0; }
}
@media (min-width: 768px) {
  #name-card { max-width: 500px; height: 250px; font-size: 2.5rem; }
  .swipe-card { height: 280px; font-size: 2.5rem; }
  .share-icons { flex-direction: column; align-items: center; }
  .share-icons a { flex: none; width: 80%; max-width: 300px; }
}