* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Arial', sans-serif;
  background-image: url('images/background.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.container {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

h1 {
  font-size: 3rem;
  margin-bottom: 10px;
}

.stats {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
  font-size: 1.5rem;
  flex-wrap: wrap;
}

.game-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  max-width: 600px;
  margin: 0 auto;
}

.card {
  width: 100%;
  padding-top: 100%;
  position: relative;
  perspective: 1000px;
  cursor: pointer;
}

.card-inner {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  transition: transform 0.6s;
  transform-style: preserve-3d;
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

.card.flipped .card-inner {
  transform: rotateY(180deg);
}

.card-front, .card-back {
  position: absolute;
  width: 100%; height: 100%;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  backface-visibility: hidden;
}

.card-back {
  background: linear-gradient(135deg, #1e3a8a, #3b82f6);
  font-size: 4rem;
}

.card-front {
  background: #fff;
  transform: rotateY(180deg);
}

.card-front img {
  width: 85%;
  height: 85%;
  object-fit: contain;
}

.win-message {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.9);
  padding: 40px 60px;
  border-radius: 20px;
  text-align: center;
  box-shadow: 0 0 40px rgba(255, 215, 0, 0.8);
}

.hidden { display: none; }

button {
  background: #facc15;
  color: #1e3a8a;
  border: none;
  padding: 10px 20px;
  font-size: 1.1rem;
  font-weight: bold;
  border-radius: 50px;
  cursor: pointer;
}

button:hover {
  background: #fde047;
  transform: scale(1.05);
}