/* ===== GLOBAL ===== */
body {
  max-width: 100%;
  margin: 0;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;

  background: #0a0905;
  color: #f5d98b;
  font-family: "Trebuchet MS", sans-serif;
  text-shadow: 0 0 4px #b89b4a;
}

/* ===== HEADERS ===== */
.HeaderOne {
  display: flex;
  align-items: center;     /* vertical centering */
  justify-content: center; /* centers the whole group horizontally */
  gap: 20px;               /* space between logos and text */
  text-align: center;
}

/* Left logo */
#QE {
  width: 77.7px;
  height: auto;
}

/* Right logo */
#ST {
  width: 200px;
  height: auto;
}

/* Center text */
.HeaderOne h1 {
  flex: 0 1 auto;          /* allows text to stay centered */
  margin: 0;
  color: #f7e7b2;
  letter-spacing: 2px;
}


h1, h2, h3 {
  text-align: center;
  margin-bottom: 20px;
  letter-spacing: 2px;
}

h1, h3 {
  color: #f7e7b2;
}

h2 {
  color: #2261e7;
}

/* ===== BUTTONS ===== */
button {
  padding: 10px 16px;
  background: linear-gradient(#6a4f1f, #3d2b0f);
  color: #f7e7b2;
  border: 2px solid #b89b4a;
  border-radius: 6px;
  cursor: pointer;
  margin-right: 6px;
  font-weight: bold;
  letter-spacing: 1px;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

button:hover {
  background: linear-gradient(#8a6a2f, #4d3815);
  box-shadow: 0 0 8px #d4b76a;
}

.button-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 20px auto;
  width: 100%;
}

/* ===== CARD GRID (DECK AREA) ===== */
.cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px;

  width: 95%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;

  background: #1a1408;
  border: 3px solid #b89b4a;
  border-radius: 10px;

  box-shadow:
    inset 0 0 20px #000,
    0 0 12px #b89b4a;
}

/* ===== CARD TILE ===== */
.card {
  width: 200px;
  height: 230px;
  background: #2a1c0a;
  border: 2px solid #b89b4a;
  border-radius: 8px;
  box-shadow: 0 0 6px #000;

  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}

/* ===== CARD IMAGE ===== */
.card img {
  width: 150px;
  height: auto;
  border-radius: 4px;
  border: 1px solid #d4b76a;
  box-shadow: 0 0 6px #000;

  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card img:hover {
  transform: scale(2.5);
  z-index: 10;
  box-shadow: 0 0 12px #f7e7b2;
}

/* ===== MILLENNIUM PUZZLE ===== */
.Mpuzzle {
  width: 200px;
  height: 230px;
  border-radius: 8px;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 4px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

.Mpuzzle img {
  width: 160px;
  height: auto;
  filter: drop-shadow(0 0 8px #b89b4a);
  animation: glowPulse 2.5s infinite ease-in-out;
}

/* ===== GLOW ANIMATION ===== */
@keyframes glowPulse {
  0% {
    filter: drop-shadow(0 0 6px #b89b4a);
    transform: scale(1);
  }
  50% {
    filter: drop-shadow(0 0 16px #f7e7b2);
    transform: scale(1.05);
  }
  100% {
    filter: drop-shadow(0 0 6px #b89b4a);
    transform: scale(1);
  }
}

/* ===== PLAYER HAND (VERTICAL STACK) ===== */
/* PLAYER HAND — centered, wraps to new rows */
#hand {
  display: flex;
  flex-wrap: wrap;        /* allow multiple rows */
  flex-direction: row;    /* main axis is horizontal */
  justify-content: center;/* center cards in each row */
  align-items: flex-end;  /* align bottoms nicely */
  gap: 10px;

  width: 100%;
  padding: 10px 0;

  background: none;
  border: none;
  box-shadow: none;
}

/* Hand cards behave like tiles */
#hand .card {
  display: flex;          /* keep your existing card layout */
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  box-shadow: none;
}
/* Force all cards in the player's hand to be identical size */
#hand .card img {
  width: 150px;   /* same as deck */
  height: auto;
  border: none;
  box-shadow: none;
}

