body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(135deg, #1e3c72, #2a5298, #f00000, #8e2de2);
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
  font-family: Arial, sans-serif;
  transition: background 0.3s, color 0.3s;
  padding: 20px;
  box-sizing: border-box;
}

@keyframes gradientBG {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

body.dark {
  background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
}
.container {
  background: #ffffffcc;
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  backdrop-filter: blur(5px);
  max-width: 100%;
  width: 400px;
  transition: background 0.3s;
}

body.dark .container {
  background: #000000cc;
  color: #fff;
}

h1 {
  margin-bottom: 10px;
}
.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 15px;
}

.controls select, .controls button {
  padding: 8px 12px;
  cursor: pointer;
}

.score {
  margin-bottom: 10px;
  font-weight: bold;
}

.game-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
  gap: 10px;
  justify-items: center;
  max-width: 100%;
}

.card {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #fff;
  border-radius: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 26px;
  cursor: pointer;
  user-select: none;
  transition: transform 0.2s;
}

.card:hover {
  transform: scale(1.05);
}

body.dark .card {
  background: #333;
  color: #fff;
}

.card.flipped {
  background: #4caf50;
  color: #fff;
}

.gift-area {
  text-align: center;
  margin-top: 20px;
}

.gift-area h3 {
  margin-bottom: 10px;
}

.gift-boxes {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
}

.gift-box {
  font-size: 50px;
  cursor: pointer;
  transition: transform 0.2s;
}

.gift-box:hover {
  transform: scale(1.1);
}

@media (max-width: 480px) {
  .game-board {
    grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
    gap: 8px;
  }
  
.card {
    font-size: 22px;
  }
}

.gift-box {
    font-size: 40px;
  }

