/* Card Table Body */
body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  text-align: center;
  background-color: #2e8b57; /* Card table green */
  color: #fff;
  padding: 30px;
}

h1 {
  color: #f9f9f9;
  margin-bottom: 20px;
  font-size: 2.5rem;
  text-shadow: 2px 2px 4px #000;
}

/* Style the card container */
.card-container {
  width: 100px;
  height: 150px;
  perspective: 1000px; /* Create a 3D perspective for the flip effect */
  display: inline-block;
}

/* The card itself */
.card {
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.5s ease-in-out; /* Smooth flip transition */
  position: relative;
}

/* The card's front and back faces */
.card .front,
.card .back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden; /* Hide the back face when flipped */
  border-radius: 5px; /* Optional: to make the cards look nicer */
}

.card .front {
  background-color: white; /* You can set this as the card face */
}

.card .back {
  background-color: #1a1a1a; /* A darker back face color */
  transform: rotateY(180deg); /* Flip the back face */
}

/* When the card has the "flip" class applied, it will rotate */
.card-flip {
  animation: flip 0.6s ease-in-out forwards;
}

/* WAR! Message styling */
#message.war {
  font-size: 2rem;
  color: red;
  text-shadow: 2px 2px 10px yellow;
  animation: flashWar 1s infinite alternate;
}

/* Card flip / pop effect */
.card-animate {
  transform: scale(1.1);
  transition: transform 0.3s ease;
}

@keyframes flip {
  0% {
    transform: rotateY(0);
  }
  100% {
    transform: rotateY(180deg);
  }
}
.card-hidden {
  opacity: 0;
}
.card-slot {
  margin: 0 40px;
  background: #1c1c1c;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
}

.card-slot img {
  height: 150px;
  margin: 5px;
  border-radius: 10px;
  border: 2px solid #fff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
  transition: transform 0.2s ease;
}

.card-slot img:hover {
  transform: scale(1.05);
}

#message {
  margin: 20px 0;
  font-size: 1.4em;
  font-weight: bold;
  color: #fffa;
  text-shadow: 1px 1px 2px #000;
}

button {
  padding: 12px 24px;
  font-size: 18px;
  margin: 10px;
  border: none;
  border-radius: 6px;
  background-color: #ffcc00;
  color: #222;
  cursor: pointer;
  font-weight: bold;
  box-shadow: 0 4px #caa100;
  transition: background 0.3s, transform 0.1s;
}

button:hover {
  background-color: #e6b800;
  transform: scale(1.05);
}

button:active {
  transform: scale(0.98);
  box-shadow: 0 2px #a07f00;
}

.score {
  font-size: 1.3rem;
  margin-top: 10px;
  color: #fff;
}

.war-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85)
    url("https://i.gifer.com/origin/6c/6cb8b4c7aafbd81b01724922a69fca62_w200.gif")
    center/cover no-repeat;
  color: white;
  font-size: 4rem;
  font-weight: bold;
  text-align: center;
  padding-top: 20%;
  z-index: 1000;
  transition: opacity 0.6s ease;
}

.war-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}
.war-overlay.show {
  opacity: 1;
}
