#memory-game {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  margin: auto;
  max-width: 1200px;
  backdrop-filter: blur(3px);
  text-align: center;
  padding: 15px;
  border-radius: 6px;
  color: white;
  min-height: 100vh;
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  animation: welcomeFadeIn 0.3s ease-out;
  z-index: 99;
}
#memory-game.active {
  display: block;
}

.mg-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mg-controls,
.mg-info {
  display: flex;
  gap: 10px;
  margin: 20px 0;
}

#close-memory-game {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #ffffff26;
  border-radius: 50px;
  text-align: center;
  backdrop-filter: blur(2px);
  cursor: pointer;
}

#start-memory-game {
  border-radius: 50px;
}

/* board */
.memory-game-board {
  margin-top: 40px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}
.card-style {
  background: linear-gradient(135deg, #aaa 0%, #fff 100%);
  color: #000;
  backdrop-filter: blur(2px);
  text-align: center;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18%;
  min-height: 70px;
  margin: 2px;
  position: relative;
  border-radius: 8px;
}

#memory-game .card-style:nth-child(even) {
  background: linear-gradient(135deg, #ffffffd2 0%, #ffffff96 100%);
}

.memory-game-board .card-style {
  font-size: 40px;
}

/* إضافات لعرض اللاعبين */
.mg-players-stats {
  display: flex;
  justify-content: space-around;
  margin: 20px auto;
  gap: 20px;
  max-width: 360px;
}

.mg-player-stat {
  flex: 1;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  border-radius: 12px;
  padding: 10px;
  text-align: center;
  font-weight: bold;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
}

.mg-player-stat.blue-team {
  background: linear-gradient(135deg, #1e3c72, #2a5298);
  background: linear-gradient(135deg, #022564, #2a5298);
}
.mg-player-stat.red-team {
  background: linear-gradient(135deg, #8b0000, #b22222);
  background: linear-gradient(135deg, #7b0707, #b22222);
}

.mg-player-name {
  display: block;
  font-size: 1.2rem;
  margin-bottom: 5px;
}

.mg-player-score {
  display: block;
  font-size: 2rem;
  font-weight: bold;
  color: gold;
}

.mg-turn-indicator {
  text-align: center;
  font-size: 1.2rem;
  background: #ff9800;
  padding: 5px 15px;
  border-radius: 30px;
  margin: 14px;
  color: #000;
  font-weight: bold;
}

#mg-current-turn {
  font-weight: bold;
  color: #fff;
  background: #00000080;
  padding: 2px 8px;
  border-radius: 20px;
}
#mg-current-turn.red {
  background: linear-gradient(135deg, #8b0000, #b22222);
}

#mg-current-turn.blue {
  background: linear-gradient(135deg, #1e3c72, #2a5298);
}
