/* detail.css */

/* Type Badges */
.type-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-weight: bold;
  color: #f6f1eb;
  text-transform: capitalize;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
}

/* Type Colors */
.type-grass    { background-color: #9da477; }
.type-fire     { background-color: #eac6c4; }
.type-water    { background-color: #83b9ff; }
.type-electric { background-color: #f8d030; }
.type-normal   { background-color: #a8a878; }
.type-psychic  { background-color: #f85888; }
.type-bug      { background-color: #a8b820; }
.type-dark     { background-color: #705848; }
.type-dragon   { background-color: #7038f8; }
.type-fairy    { background-color: #ee99ee; }
.type-fighting { background-color: #c03028; }
.type-flying   { background-color: #a890f0; }
.type-ghost    { background-color: #705898; }
.type-ground   { background-color: #e0c068; }
.type-ice      { background-color: #98d8d8; }
.type-poison   { background-color: #a040a0; }
.type-rock     { background-color: #b8a038; }
.type-steel    { background-color: #b8b8d0; }

/* Base Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.75rem;
  list-style: none;
  padding: 0;
}

.stats-grid li {
  background-color: #eac6c4;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #6b4f3b;
  font-weight: bold;
}

/* Trading Card Gallery */
#cardGallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  justify-items: center;
  padding-top: 1rem;
}

#cardGallery div {
  background-color: #f6f1eb;
  border: 1px solid #d4d4d4;
  border-radius: 0.75rem;
  padding: 0.75rem;
  text-align: center;
  width: 100%;
  max-width: 180px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease-in-out;
}

#cardGallery div:hover {
  transform: translateY(-5px);
}

#cardGallery img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
  margin-bottom: 0.5rem;
}

#cardGallery p {
  font-size: 0.8rem;
}

/* Pagination Controls */
#paginationControls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

#paginationControls button {
  background-color: #9da477;
  color: #f6f1eb;
  padding: 0.6rem 1.25rem;
  border-radius: 0.5rem;
  font-weight: bold;
  font-size: 0.9rem;
  transition: background-color 0.2s ease;
}

#paginationControls button:hover:not(:disabled) {
  background-color: #8a9169;
}

#paginationControls button:disabled {
  background-color: #cccccc;
  cursor: not-allowed;
}

#paginationControls span {
  color: #6b4f3b;
  font-weight: bold;
  font-size: 0.9rem;
}

/* Back Button */
.back-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2rem;
  background-color: #6b4f3b;
  color: #f6f1eb;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: bold;
  transition: background-color 0.2s ease;
  font-size: 0.9rem;
}

.back-button:hover {
  background-color: #5a4334;
}

/* Spinner */
.spinner {
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-left-color: #6b4f3b;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
