/* ===== Global Aesthetic ===== */
body {
  font-family: "Cinzel Decorative", cursive;
  background: linear-gradient(to bottom, #fef9f2, #f3e5d8);
  color: #2f2f2f;
  display: flex;
  flex-direction: column;
  justify-content: center; /* vertical centering */
  align-items: center; /* horizontal centering */
  text-align: center;
  min-height: 100vh;
  margin: 0;
  padding: 20px; /* fixed missing unit */
}

.button-row {
  display: flex;
  gap: 8px; /* space between the buttons */
  justify-content: center;
  margin-top: 4px;
}

/* Game title */
h1 {
  font-family: "Cinzel Decorative", serif;
  color: #5a3b1c;
  text-shadow: 2px 2px #e9c89f;
  margin: 20px 0;
}

/* ===== Status Display ===== */
.status-box {
  background: rgba(255, 250, 240, 0.9);
  border: 2px solid #c9a368;
  border-radius: 15px;
  padding: 12px 20px;
  display: inline-block;
  margin: 10px 0;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
}

.status-box p {
  margin: 4px 0;
  font-weight: bold;
}

/* ===== Buttons ===== */
.btn {
  font-size: 1rem;
  font-family: "Cinzel Decorative", cursive;
  display: inline-block;
  padding: 10px 20px;
  margin: 8px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  border: 2px solid #c9a368;
  background: #4b0082;
  color: #fff;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.btn:hover {
  font-family: "Cinzel Decorative", cursive;
  background: #6a0dad;
  transform: scale(1.05);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.25);
}

.back-btn {
  font-size: 1rem;
  font-family: "Cinzel Decorative", cursive;
  display: inline-block;
  padding: 10px 20px;
  margin: 8px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  border: 2px solid #c9a368;
  background: #4b0082;
  color: #fff;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.back-btn:hover {
  font-family: "Cinzel Decorative", cursive;
  background: #c9a368;
  transform: scale(1.05);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.25);
}

/* ===== Pull Results & Collection ===== */
.display-container {
  position: relative;
  width: 100%;
  max-width: 900px; /* adjust to match banner width */
  margin: 0 auto;
}

.banner-container,
#loader,
#results {
  width: 100%;
  text-align: center;
}

.banner-img {
  max-width: 90%;
  height: auto;
  border-radius: 8px;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(5, auto); /* shrink to card width */
  gap: 12px; /* controls both horizontal & vertical gap */
  justify-content: center; /* center grid block */
}

.collection-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.card-result,
.card {
  position: relative;
  width: 150px;
  background: #fffaf3;
  border: 2px solid #c9a368;
  border-radius: 10px;
  padding: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
  text-align: center;
}

.card img,
.card-img {
  width: 100%;
  border-radius: 8px;
}

/* Responsive shrinking for gacha results only */
.results-grid .card {
  width: 140px; /* default size for normal screens */
}

@media (max-width: 1100px) {
  .results-grid .card {
    width: 120px;
  }
}

@media (max-width: 900px) {
  .results-grid .card {
    width: 100px;
  }
}

@media (max-width: 750px) {
  .results-grid .card {
    width: 85px;
  }
}

@media (max-width: 600px) {
  .results-grid .card {
    width: 70px;
  }
}

/* Rarity Borders */
.card.common {
  border: 4px solid #b0b0b0;
  background: linear-gradient(to bottom, #f9f9f9, #e6e6e6);
}

.card.rare {
  border: 4px solid #3b82f6;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.8);
  background: linear-gradient(to bottom, #e0f0ff, #cce5ff);
}

.card.legendary {
  border: 4px solid #fbbf24;
  box-shadow: 0 0 16px rgba(251, 191, 36, 0.9), 0 0 25px rgba(251, 191, 36, 0.6);
  background: linear-gradient(to bottom, #fff4cc, #ffe699);
}

/* ===== Locked Cards ===== */
.card-result.locked {
  background: #dcdcdc;
  color: #888;
  border: 2px dashed #aaa;
}

.card-result.locked .unknown {
  font-size: 2em;
  font-weight: bold;
  margin-top: 10px;
}

.locked-img {
  filter: grayscale(100%) blur(20px);
}

/* ===== Count Badge ===== */
.count-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #ff6f91;
  color: white;
  font-weight: bold;
  border-radius: 50%;
  padding: 4px 8px;
  font-size: 0.8em;
  border: 2px solid white;
}

/* ===== Messages ===== */
.message {
  color: #b22222;
  font-weight: bold;
  margin-top: 10px;
}

/* Summon circle*/
.hidden {
  display: none;
}

.summoning-loader {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 300px;
}

.summon-gif {
  width: 300px;
  height: auto;
  display: block;
  margin: 0 auto;
}
