/* GAMES SECTION */


.game-section1 {
  height: auto;
  width: 100%;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  padding: 60px 8px 12px;
  overscroll-behavior: none;
}


.game-section1 h2 {
  color: white;
}

#game-screen{
  width: 100%;
}

.game-container {
  width: 100%;
  max-width: 980px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: clamp(12px, 4vw, 40px);
  padding: 0;
  overscroll-behavior: none;
}

.hidden {
  display: none;
}

.game-board {
  order: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr); 
  grid-auto-rows: 1fr;                  
  width: min(520px, 92vw);
  gap: clamp(6px, 2vw, 10px);
  padding: 0;
  border-radius: 10px;
}


.card {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: clamp(1.6rem, 6vw, 3rem);
  cursor: pointer;
  transition: transform 0.5s ease;
  width: 100%;
  aspect-ratio: 1 /1;
  overflow: hidden;
}

.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card.flipped {
  transform: rotateY(180deg);
}



.game-info {
  order: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center; 
  width: min(320px, 92vw);         
  padding: 0.70rem;
  text-align: left;  
}

/* Level Number */
.game-info h2 {
  font-size: 1rem;
  font-weight: bold;
  margin-bottom: 15px;
  color: #ff1493;
  gap: 6px;        
  white-space: nowrap;       
  margin: 0 0 15px;
}



#timer {
  font-size: 1rem;
  font-weight: bold;
  margin-bottom: 15px;
  color: #ff1493;
  gap: 6px;
  white-space: nowrap;  
  margin: 0 0 15px;
}


/* Score Displays */
#score-display{
  font-size: 1.2rem;
  margin-bottom: 10px;
  padding: 1rem;
}

/* Buttons */
button {
  background: #ff1493;
  color: white;
  font-weight: bold;
  padding: 8px 12px;
  margin: 10px 0;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.4s ease;
}

button:hover {
  background: #ff6;
  font-weight: bold;
  color: black;

}

.button-container {
  display: flex;
  gap: 10px;
  justify-content: center;
}



@media (max-width: 768px) {
  .game-container {
    flex-direction: column;
    align-items: center;
  }
  .game-board {
    order: 1;
  }
  .game-info {
    order: 2;
    width: min(520px, 92vw);
    padding: 0.70rem;
  }
}

@media (max-width: 480px) {
  .game-section1 {
    padding: 60px 8px 12px;
  }
  .game-info h2 {
    font-size: 1rem;
  }
  #timer {
    font-size: 1rem;
  }
  #score-display,
  #multiplayer-score {
    font-size: 1rem;
    padding: 0.5rem;
  }
  button {
    padding: 8px 12px;
    font-size: 0.9rem;
  }
}
