body {
  font-family: 'Uncial Antiqua', serif;
  margin: 0;
  background: #0b0c10;
  color: #fff;
  text-align: center;
}

header {
  background: #111;
  padding: 20px;
  font-family: 'Cinzel Decorative', serif;
  font-size: 2rem;
  color: gold;
}

main {
  max-width: 1400px;
  margin: auto;
  padding: 20px;
}

.cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  margin: 20px;
}

.card-container {
  perspective: 1200px;
}

.card {
  width: 300px;
  height: 527px;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.8s ease;
  cursor: pointer;
}

.card.flipped {
  transform: rotateY(180deg);
}

.card-face {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  backface-visibility: hidden;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
  display: flex;
  justify-content: center;
  align-items: center;
}

.card-front {
  transform: rotateY(0);
  z-index: 2;
  background: #000;
}

.card-front img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* or use contain if you want black borders */
  background: black;
}

.card-back {
  transform: rotateY(180deg);
  background: #222;
  color: #fff;
  font-size: 1.2rem;
  padding: 20px;
  box-sizing: border-box;
  flex-direction: column;
}

.card-back h2 {
  font-family: 'Cinzel Decorative', serif;
  font-size: 1.4rem;
  color: #ffd700;
  margin-bottom: 10px;
}

footer {
  background: #111;
  color: #888;
  padding: 10px;
  font-size: 0.8rem;
  margin-top: 40px;
}

button {
  margin-top: 20px;
  padding: 12px 30px;
  font-size: 1rem;
  background: #444;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 0 10px rgba(106, 13, 173, 0.7);
  transition: all 0.3s ease;
}

button:hover {
  background: #666;
}

@media(max-width: 900px) {
  .card {
    width: 240px;
    height: 422px;
  }

  .card-back {
    font-size: 1rem;
  }

  .card-back h2 {
    font-size: 1.2rem;
  }
}

@media(max-width: 600px) {
  .card {
    width: 180px;
    height: 317px;
  }

  .card-back {
    font-size: 0.9rem;
  }

  .card-back h2 {
    font-size: 1rem;
  }
}
