body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #89f7fe 0%, #66a6ff 100%);
  margin: 0;
  padding: 40px 20px;
  display: flex;
  justify-content: center;
  min-height: 100vh;
  align-items: center;
}

.game-board {
  text-align: center;
  max-width: 960px;
  width: 100%;
  background: #ffffffdd;
  padding: 30px;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

h1 {
  margin-bottom: 30px;
  font-size: 3rem;
  color: #1e3a8a;
  font-weight: 700;
  text-shadow: 1px 1px 4px rgba(0,0,0,0.1);
}

.cards-container {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.card {
  width: 160px;
  height: 220px;
  perspective: 1200px;
  cursor: pointer;
  border-radius: 16px;
  box-shadow: 0 8px 15px rgba(0,0,0,0.1);
  transition: transform 0.2s ease;
  will-change: transform;
  background: transparent;
}

.card:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 25px rgba(0,0,0,0.2);
}

.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
  border-radius: 16px;
  box-shadow: inset 0 0 15px rgba(0,0,0,0.05);
}

input[type="checkbox"]:checked + label .card-inner {
  transform: rotateY(180deg);
}

.card-front, .card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 16px;
  overflow: hidden;
  background-color: #fff;
  box-shadow: 0 8px 12px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-front img,
.card-back img {
  width: 90%;
  height: 90%;
  object-fit: contain;
  border-radius: 12px;
}

.card-back {
  transform: rotateY(180deg);
  background: linear-gradient(135deg, #a1c4fd 0%, #c2e9fb 100%);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}
