/* ========== Shared Container Styles (applies to both games) ========== */
.container.number-memory,
.container.picture-memory {
  background: rgba(255,255,255,0.98);
  padding: 2.2rem 2.7rem;
  border-radius: 32px;
  box-shadow: 0 10px 36px 0 rgba(0,0,0,0.18), 0 2px 4px 0 rgba(0,0,0,0.08);
  text-align: center;
  min-width: 340px;
  min-height: 270px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* ========== Number Memory Game ========== */
.container.number-memory .numbers {
  font-size: 2.8rem;
  letter-spacing: 1rem;
  margin: 2rem 0 1.5rem 0;
  color: #7b2ff2;
  font-weight: 700;
  text-shadow: 0 2px 12px #f2f2f2;
  transition: opacity 0.3s;
}
.container.number-memory .message,
.container.picture-memory .message {
  font-size: 1.4rem;
  margin: 1rem 0;
  color: #43cea2;
  font-weight: 600;
  min-height: 36px;
}
.container.number-memory .level,
.container.picture-memory .level {
  font-size: 1.1rem;
  font-weight: 500;
  color: #273c75;
  letter-spacing: 1px;
  margin-bottom: 10px;
}
.container.number-memory input[type="text"] {
  font-size: 2.1rem;
  padding: 0.7rem 1.2rem;
  border-radius: 18px;
  border: 2px solid #a18cd1;
  outline: none;
  width: 14rem;
  margin-bottom: 1.1rem;
  background: #f2f2f2;
  transition: border-color 0.2s;
  letter-spacing: 0.5rem;
  color: #654ea3;
  text-align: center;
  font-family: inherit;
}
.container.number-memory input[type="text"]:focus {
  border-color: #7b2ff2;
  background: #e0e7ff;
}

/* ========== Picture Memory Game ========== */
.picture-row {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  margin: 2rem 0 1.5rem 0;
  flex-wrap: wrap;
}
.pic-card {
  font-size: 3rem;
  background: #f6d365;
  background: linear-gradient(315deg, #f6d365 0%, #fda085 100%);
  border-radius: 15px;
  width: 70px; height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 14px rgba(243, 133, 60, 0.10);
  border: 2px solid #fff6;
  transition: box-shadow 0.2s;
}
.options-row {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  margin: 2rem 0 1.5rem 0;
  width: 100%;
  align-items: center;
}
.option-btn {
  padding: 0.8rem 1.1rem;
  border: none;
  border-radius: 18px;
  font-size: 1.2rem;
  background: linear-gradient(90deg, #b4ec51 20%, #429321 100%);
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  letter-spacing: 0.05rem;
  cursor: pointer;
  min-width: 220px;
  transition: background 0.17s, box-shadow 0.18s;
  box-shadow: 0 4px 12px rgba(180,236,81,0.09);
}
.option-btn:hover, .option-btn:focus {
  background: linear-gradient(90deg, #429321 10%, #b4ec51 90%);
  box-shadow: 0 6px 20px rgba(66,147,33,0.13);
}

/* ========== Buttons (shared, overrides default app style for games) ========== */
.container.number-memory button,
.container.picture-memory button {
  padding: 0.9rem 2.4rem;
  background: linear-gradient(90deg,#7b2ff2 20%, #f357a8 100%);
  color: #fff;
  border: none;
  border-radius: 18px;
  font-size: 1.35rem;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  cursor: pointer;
  margin-top: 0.5rem;
  margin-bottom: 0.8rem;
  box-shadow: 0 4px 12px rgba(123,47,242,0.09);
  transition: background 0.2s, box-shadow 0.2s;
}
.container.number-memory button:hover,
.container.number-memory button:focus,
.container.picture-memory button:hover,
.container.picture-memory button:focus {
  background: linear-gradient(90deg,#f357a8 10%, #7b2ff2 90%);
  box-shadow: 0 6px 20px rgba(243,87,168,0.13);
}
.hidden { display: none !important; }

/* ========== Confetti & Overlay (shared by both games) ========== */
.confetti {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  pointer-events: none;
  z-index: 99;
  overflow: hidden;
}
.overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(66, 36, 99, 0.73);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  animation: fadeIn 0.5s;
}
@keyframes fadeIn {
  0% { opacity: 0;}
  100% { opacity: 1;}
}
.overlay-content {
  background: rgba(255,255,255,0.97);
  border-radius: 28px;
  padding: 2.2rem 3rem;
  text-align: center;
  box-shadow: 0 8px 32px rgba(66,36,99,0.13);
  min-width: 320px;
}
.overlay-content h2 {
  font-size: 2.3rem;
  color: #f357a8;
  margin-bottom: 0.7rem;
  font-family: 'Montserrat', sans-serif;
}
.overlay-content p {
  font-size: 1.25rem;
  color: #273c75;
  margin-bottom: 1.5rem;
}

/* ========== Mobile Responsive Tweaks ========== */
@media (max-width: 500px) {
  .container.number-memory,
  .container.picture-memory {
    padding: 1.2rem 0.3rem;
    min-width: 95vw;
    min-height: 60vh;
  }
  .overlay-content {
    min-width: 90vw;
    padding: 1.1rem 0.3rem;
  }
  .pic-card {
    width: 48px; height: 48px; font-size: 2rem;
  }
}
