.wp-memory-game-container * {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.wp-memory-game-container {
  font-family: Arial, sans-serif;
  background: #f0f2f5;
  padding: 2rem;
  margin: 2rem 0;
}

.wp-memory-game-container .container {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.wp-memory-game-container h1 {
  color: #1a1a1a;
  margin-bottom: 2rem;
}

.wp-memory-game-container .game-info {
  display: flex;
  justify-content: space-around;
  margin-bottom: 2rem;
  font-size: 1.2rem;
}

.wp-memory-game-container .game-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin: 0 auto;
  max-width: 600px;
}

.wp-memory-game-container .card {
  aspect-ratio: 3/4;
  background: #fff;
  border-radius: 8px;
  cursor: pointer;
  position: relative;
  transform-style: preserve-3d;
  transition: transform var(--flip-duration) ease;
}

.wp-memory-game-container .card::before {
  content: attr(data-number);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2rem;
  font-weight: bold;
  color: #4CAF50;
}

.wp-memory-game-container .card.flipped::before,
.wp-memory-game-container .card.matched::before {
  display: none;
  transform: rotateY(180deg);
}

.wp-memory-game-container .card img {
  width: 100%;
  height: calc(100% - 30px);
  object-fit: cover;
  border-radius: 8px;
  display: none;
  transform: rotateY(180deg);
}

.wp-memory-game-container .card .card-text {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 30px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 5px;
  font-size: 14px;
  text-align: center;
  display: none;
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
}

.wp-memory-game-container .card.flipped .card-text,
.wp-memory-game-container .card.matched .card-text {
  display: block;
}
.wp-memory-game-container .card.flipped img {
  display: block;
}

.wp-memory-game-container .card.matched {
  opacity: 0.8;
}

.wp-memory-game-container .restart-btn {
  margin-top: 2rem;
  padding: 0.8rem 1.5rem;
  font-size: 1.1rem;
  background: #4CAF50;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.wp-memory-game-container .pause-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.wp-memory-game-container .pause-overlay.show {
  display: flex;
}

.wp-memory-game-container .pause-content {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  text-align: center;
}

.wp-memory-game-container .pause-content h2 {
  margin-bottom: 1rem;
}

.wp-memory-game-container .restart-btn:hover {
  background: #45a049;
}

.wp-memory-game-container .game-over {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.wp-memory-game-container .game-over.show {
  display: flex;
}

.wp-memory-game-container .game-over-content {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  text-align: center;
  max-width: 400px;
  width: 90%;
}

.wp-memory-game-container .game-over h2 {
  color: #1a1a1a;
  margin-bottom: 1rem;
}

.wp-memory-game-container .game-over p {
  margin: 0.5rem 0;
  font-size: 1.1rem;
}