.game-screen--selectGame {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #FFEFCB;
  padding: 10px 20px;
}

.game-screen--selectGame .gameBanner {
  margin-bottom: 10px;
}

.game-screen--selectGame .game-select-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 5px;
  width: 100%;
}

.game-screen--selectGame .game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
  width: 100%;
  max-width: 1000px;
}

.game-screen--selectGame .game-option {
  background-color: #FFEFCB;
  color: #FF4F1F;
  padding: 15px;
  border-radius: 8px;
  text-align: center;
  font-weight: bold;
  cursor: pointer;
  border: 4px solid transparent;
  transition: all 0.3s ease;
}

.game-screen--selectGame .game-option.selected {
  border-color: #1f1f1f;
  background-color: #FFD966;
}

.game-screen--selectGame .btn {
  margin-top: 25px;
  padding: 10px 25px;
  font-size: 1em;
  background-color: #FFEFCB;
  color: #FF4F1F;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  visibility: hidden;
}

.game-screen--selectGame .btn.show {
  visibility: visible;
}

.game-screen--selectGame .btn:hover {
  background-color: #FFD966;
}

.game-screen--selectGame .confirmation {
  text-align: center;
  margin-top: 15px;
  font-size: 1.2em;
}

/* Materials popup anchored within the game area */
.game-screen--selectGame .materials-popup {
  position: absolute;
  top: 120px;
  right: .5%;
  background-color: #FFEFCB;
  color: #FF4F1F;
  padding: 1rem;
  border-radius: 12px;
  width: 220px;
  font-size: 1rem;
  box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.4);
  z-index: 10;

  max-height: calc(100% - 140px);
  /* stay inside vertical space */
  overflow-y: auto;
  /* scroll if it gets tall */
}

.game-screen--selectGame .materials-popup h3 {
  margin-top: 0;
  font-size: 1.2rem;
  border-bottom: 2px solid #FF4F1F;
  padding-bottom: 0.3rem;
}

.game-screen--selectGame .materials-popup ul {
  list-style-type: square;
  padding-left: 1.2rem;
  margin: 0;
}

.game-info-btn {
  position: absolute;
  top: 120px;
  left: 0.5%;
  z-index: 99;
  /* style it however you like */
}

/* Fullscreen dark overlay */
.game-info-popup {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  /* vertical centering */
  justify-content: center;
  /* horizontal centering */
  z-index: 999;
}

/* Centered popup box */
.game-info-popup-content {
  position: relative;
  background: #FFEFCB;
  color: #FF4F1F;
  padding: 2.5rem 1.5rem 1.5rem;
  border-radius: 14px;
  width: 90%;
  max-width: 640px;
  max-height: 80vh;
  overflow-y: auto;
  /* scroll INSIDE the card */
  text-align: left;
}

/* Centered popup box */
.game-info-popup-inner {
  position: relative;
  background: #FFEFCB;
  color: #FF4F1F;
  width: 90%;
  max-width: 640px;
  max-height: 80vh;
  /* <= the box will NEVER exceed this */
  border-radius: 14px;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  /* header stays fixed, content scrolls */
}

/* Scrollable content area */
.game-info-scroll {
  overflow-y: auto;
  /* <= scrolling happens HERE */
  margin-top: 1rem;
}

/* Fixed X button inside the popup */
.game-info-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: transparent;
  border: none;
  font-size: 1.6rem;
  font-weight: bold;
  color: #d34100;
  cursor: pointer;
}

/* Optional hover effect */
.game-info-close:hover {
  color: #a52e00;
  transform: scale(1.1);
}

/* A single game’s block */
.game-info-item {
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  background: #fff7e3;
  /* subtle highlight */
  border: 2px solid #ffb15c;
  /* warm border for contrast */
  border-radius: 12px;
}

/* Last game should not have extra spacing */
.game-info-item:last-child {
  margin-bottom: 0;
}

/* Game title styling */
.game-info-item p strong:first-child {
  font-size: 1.1rem;
  font-weight: 800;
  /* much stronger weight */
  color: #d34100;
  /* deeper orange for contrast */
}

/* Instructions list */
.game-info-item ul {
  margin-top: 0.35rem;
  padding-left: 1.25rem;
  text-align: left;
}

.game-info-item ul li {
  margin-bottom: 0.25rem;
}

.game-title {
  font-size: 1.25rem;
  font-weight: 900;
  color: #c43e00;
  margin-bottom: 0.5rem;
}