/* HOST SCREEN */
.host-screen {
  padding: 30px 20px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 0 20px rgba(255, 105, 180, 0.3);
  border: 3px solid transparent;
  animation: borderGlow 3s infinite linear;
}

@keyframes borderGlow {
  0% { border-color: #ff69b4; }
  50% { border-color: #00f0ff; }
  100% { border-color: #ff69b4; }
}

.gender-options {
  display: flex;
  justify-content: space-around;
  margin: 20px 0;
}

.gender-radio {
  padding: 10px 30px;
  border-radius: 20px;
  border: 2px solid #ccc;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: bold;
  font-size: 1em;
}
.gender-radio input[type="radio"] {
  display: none;
}
.gender-radio.boy.selected {
  background-color: #00f0ff;
  color: #fff;
  box-shadow: 0 0 15px #0ff;
}
.gender-radio.girl.selected {
  background-color: #ff6ec7;
  color: #fff;
  box-shadow: 0 0 15px #f0f;
}
.gender-radio.twins.selected {
  background: linear-gradient(90deg, #00f0ff, #ff6ec7);
  color: white;
  box-shadow: 0 0 20px #ff69b4;
}

#linkOutput {
  width: 100%;
  border: 1px #ff69b4;
  border-radius: 15px;
  font-size: 1em;
  background: transparent;
  text-align: center;
  color: #ff1493;
  font-weight: bold;
  padding: 15px;
  margin-bottom: 15px;
  animation: fadeGlow 1.5s infinite alternate;
}

@keyframes fadeGlow {
  0% { box-shadow: 0 0 10px #ffe6f0; }
  100% { box-shadow: 0 0 20px #ff69b4; }
}

.game-container {
  max-width: 575px;
  margin: auto;
  text-align: center;
  padding: 20px;
  font-family: 'Comic Sans MS', cursive;
  position: relative;
  overflow: hidden;
}

#start-screen {
  max-width: 100%;
  margin: 30px auto;
  padding: 30px 20px;
  background: #fff;
  border-radius: 20px;
  border: 5px solid #ff79c6;
  box-shadow:
    0 0 10px #ff79c6,
    0 0 20px #ff79c6,
    0 0 30px #ff79c6;
  text-align: center;
}

#babyFace {
  width: 90%;
  max-width: 300px;
}

.draggable {
  left: calc(50% - 100px);
  transform: none;
  z-index: 1000;
  width: 100px;
  cursor: grab;
  position: absolute;
  bottom: 20px;
  animation: pulse 1.5s infinite;
  transition: none;
}

#scoreDisplay {
  margin-top: 20px;
  font-size: 1.2em;
  font-weight: bold;
}

#end-screen {
  padding: 10px 20px;
  background: radial-gradient(circle, #fff0f8, #ffe4ec);
  border: 5px solid #ff69b4;
  border-radius: 30px;
  animation: glowBorder 2s infinite alternate;
}

@keyframes glowBorder {
  0% { box-shadow: 0 0 10px #ffc0cb; }
  100% { box-shadow: 0 0 25px #ff69b4; }
}

#genderResult {
  font-size: 3.2em;
  font-weight: 900;
  margin-bottom: 40px !important;
  animation: revealPop 1.2s ease-out forwards, glitter 2s infinite alternate;
  text-align: center;
  line-height: 1.2;
  word-break: break-word;
}

@keyframes revealPop {
  0% { transform: scale(0.2); opacity: 0; }
  60% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(1); }
}

.game-summary-intro {
  font-size: 0.97em;
  margin-top: 20px;
  font-weight: 600;
  color: #d63384;
}

.game-btn {
  background: linear-gradient(145deg, #ff6ec7, #ffb6c1);
  border: none;
  color: #fff;
  padding: 12px 26px;
  font-weight: bold;
  border-radius: 25px;
  font-size: 1em;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(255, 105, 180, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  margin: 10px;
}

.game-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 18px rgba(255, 105, 180, 0.5);
}

#end-screen .share-buttons {
	margin-bottom: 100px;
}

.share-buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 15px;
  flex-wrap: wrap;
  animation: fadeInUp 1s ease-in-out;
}

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

.share-buttons .share-btn {
  background: linear-gradient(145deg, #ff6ec7, #ffb6c1);
  border: none;
  color: #fff;
  padding: 10px 20px;
  font-weight: bold;
  border-radius: 25px;
  font-size: 0.95em;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(255, 105, 180, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.share-buttons button {
  margin: 8px; /* Adjust this value as needed */
}

.share-buttons .share-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 18px rgba(255, 105, 180, 0.5);
}

#end-screen .gender-text {
  font-size: 2.5em;
  font-weight: bold;
  animation: glitter 2s infinite alternate;
}

.sparkle-text {
  font-size: 2.2em;
  animation: glitter 2s infinite alternate;
  font-weight: bold;
  padding: 10px;
}

.game-analytics {
  font-size: 0.92em;
  text-align: center;
  background: #ffeaf5;
  padding: 20px;
  margin: 20px auto;
  border-radius: 20px;
  border: 2px dashed #ff99cc;
  color: #cc2e7d;
  max-width: 90%;
  box-shadow: 0 0 10px rgba(255, 105, 180, 0.1);
}
.game-analytics p {
  margin: 6px 0;
  font-weight: 500;
  font-size: 0.95em;
}

.gender-text span.boy {
  color: #00f0ff;
  text-shadow: 0 0 10px #0ff;
}
.gender-text span.girl {
  color: #ff6ec7;
  text-shadow: 0 0 10px #f0f;
}
.gender-text span.twins {
  background: linear-gradient(45deg, #00f0ff, #ff6ec7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: rainbowReveal 2s infinite;
}

#retry-screen, #mode-selection {
  padding: 40px 20px;
  background: radial-gradient(circle, #fff0f8, #ffe4ec);
  border: 5px solid #ffa3c4;
  border-radius: 30px;
  box-shadow: 0 0 15px #ffc0cb;
  text-align: center;
}

#retry-screen h2 {
  color: #ff69b4;
  font-size: 2em;
  margin-bottom: 10px;
}

#retry-screen p {
  font-size: 1em;
  margin: 8px 0;
  font-weight: 500;
}

.celebration-message {
  margin-top: 20px;
  font-size: 1.2em;
}

@keyframes sway {
  0% { transform: rotate(0deg); }
  50% { transform: rotate(3deg); }
  100% { transform: rotate(-3deg); }
}
#babyFace.swaying {
  animation: sway 1.5s infinite ease-in-out;
}

@keyframes glitter {
  from { text-shadow: 0 0 5px #fff; }
  to { text-shadow: 0 0 20px #ff69b4, 0 0 30px #87cefa; }
}

@keyframes pulse {
  0% { transform: scale(1) translateX(-50%); }
  50% { transform: scale(1.05) translateX(-50%); }
  100% { transform: scale(1) translateX(-50%); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  50% { transform: translateX(5px); }
  75% { transform: translateX(-5px); }
}
.shake {
  animation: shake 0.6s ease-in-out 2;
}

#sparkleContainer {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: visible;
    z-index: 9999;
}

.sparkle-dot {
    position: absolute;
    border-radius: 50%;
    opacity: 0.9;
    filter: drop-shadow(0 0 8px white);
    animation: sparkleRise 6s ease-out forwards; /* ← extended duration */
    mix-blend-mode: screen;
}

.sparkle-star {
    border-radius: 0;
    clip-path: polygon(
        50% 0%, 61% 35%, 98% 35%, 68% 57%,
        79% 91%, 50% 70%, 21% 91%, 32% 57%,
        2% 35%, 39% 35%
    );
}

.sparkle-diamond {
    border-radius: 0;
    transform: rotate(45deg);
}

@keyframes sparkleRise {
    0% {
        transform: scale(0.5) translateY(0);
        opacity: 1;
    }
    60% {
        transform: scale(1.2) translateY(-150px) rotate(180deg);
        opacity: 1;
    }
    100% {
        transform: scale(0.8) translateY(-300px) rotate(360deg);
        opacity: 0;
    }
}

.hidden { display: none !important; }

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

#blackout {
  position: fixed;
  background: rgba(0, 0, 0, 0.9);
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
#blackout.visible {
  opacity: 1;
  pointer-events: auto;
}

.zoom-blur {
  animation: zoomBlur 2s forwards;
}

@keyframes zoomBlur {
  0% {
    transform: scale(1);
    filter: blur(0px);
  }
  100% {
    transform: scale(1.2);
    filter: blur(10px);
  }
}

.strong-shake {
  animation: strongShake 0.6s ease-in-out 2;
}

@keyframes strongShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-20px); }
  40% { transform: translateX(20px); }
  60% { transform: translateX(-15px); }
  80% { transform: translateX(15px); }
}

.blurred {
  filter: blur(7px);
}

.blind-overlay::before {
  content: "";
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.99);
  z-index: 9999;
  animation: fadeBlind 1s ease-out;
}

@keyframes fadeBlind {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

@media (max-width: 768px) {
  .draggable { width: 70px; left: calc(50% - 20px); }
  #babyFace { max-width: 250px; }
  #start-screen { text-align: center; padding: 20px; }
  .gender-options { flex-direction: column; align-items: center; }
  .gender-radio { width: 60%; margin-bottom: 20px; }
  body, .game-container { font-family: 'Arial', sans-serif !important; }
  #genderResult { font-size: 2.4em; }
  .sparkle-text { font-size: 1.5em; }
  .game-analytics { font-size: 1em; }
}