body {
  margin: 0;
  padding: 0;
  color: #2a75bb;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
header {
  font-family: "Retro";
  color: white;
  font-weight: 700;
  font-size: 2rem;
  text-align: center;
  padding: 1rem 0;
}
main {
  flex-grow: 1;
  padding: 1rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

progress {
  align-self: center;
}
.generation-title {
  font-family: "Retro";
  font-size: 1.8rem;
  margin: 1.5rem 0 0.5rem;
  font-weight: normal;
  color: #fffffffb;
  border-bottom: 2px solid #ddd;
  padding-bottom: 0.3rem;
}

.unowndex-title {
  font-family: "Retro";
  font-size: 1.8rem;
  margin: 1.5rem 9rem 0.5rem;
  font-weight: normal;
  color: #fffffffb;
  border-bottom: 2px solid #ddd;
  padding-bottom: 0.3rem;
}

.otherdex-title {
  font-family: "Retro";
  font-size: 1.8rem;
  margin: 1.5rem 18rem 0.5rem;
  font-weight: normal;
  color: #fffffffb;
  border-bottom: 2px solid #ddd;
  padding-bottom: 0.3rem;
}

.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  max-width: calc(110px * 9 + 20px * 8);
  margin-left: auto;
  margin-right: auto;
  row-gap: 1rem;
  column-gap: 20px;
}

.grid-container-otherdex {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  max-width: calc(130px * 4 + 20px * 3);
  margin-left: auto;
  margin-right: auto;
  row-gap: 1rem;
  column-gap: 20px;
}

.grid-container-unowndex {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  max-width: calc(110px * 7 + 20px * 6);
  margin-left: auto;
  margin-right: auto;
  row-gap: 1rem;
  column-gap: 20px;
}

.shinydex-card {
  width: 110px;
  height: 135px;
  background-image: url('../img/button/button-dex-disabled.png');
  opacity: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  user-select: none;
  pointer-events: none;
}
.shinydex-card.captured {
  background-image: url('../img/button/button-dex-live.png');
  opacity: 90%;
  position: relative;
  cursor: pointer;
}
.shinydex-card.owned {
  background-image: url('../img/button/button-dex-owned.png');
  opacity: 90%;
  position: relative;
  cursor: pointer;
}

.otherdex-card {
  width: 130px;
  height: 135px;
  opacity: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  user-select: none;
  pointer-events: none;

  border-width: 14px 22px 14px 22px;
  border-style: solid;
  border-image-source: url("../img/button/button-dex-disabled.png");
  border-image-slice: 14 22 14 22 fill;
  border-image-repeat: round;
}
.otherdex-card.captured {
  border-image-source: url('../img/button/button-dex-live.png');
  opacity: 90%;
  position: relative;
  cursor: pointer;
}
.otherdex-card.owned {
  border-image-source: url('../img/button/button-dex-owned.png');
  opacity: 90%;
  position: relative;
  cursor: pointer;
}

.shinydex-wraper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 150px;
}
.shinydex-img {
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 0.5rem;
  object-fit: contain;
  display: block;
}
.shinydex-name {
  position: absolute;
  font-size: 0.75rem;
  text-transform: capitalize;
  text-align: center;
  color: white;
  font-family: 'Retro';
  font-size: 16px;
  transform: translateY(50px);
}

.otherdex-card .shinydex-name {
  position: absolute;
  font-size: 0.75rem;
  text-transform: capitalize;
  text-align: center;
  color: white;
  font-family: 'Retro';
  font-size: 12px;
  transform: translateY(50px);
}
@media (max-width: 600px) {
  header {
    font-size: 1.4rem;
  }
  .sprite img {
    max-width: 50px;
    max-height: 50px;
  }
}

.shinydex-tooltip {
  visibility: hidden;
  opacity: 0;
  background: #2a75bb;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 6px 10px;
  position: absolute;
  z-index: 10;
  bottom: 110%;
  left: 50%;
  transform: translateX(-50%);
  transition: opacity 0.2s, visibility 0.3s ease;;
  pointer-events: none;
  white-space: nowrap;
  font-family: 'Retro';
  font-size: 1rem;
}

.shinydex-card.captured:hover .shinydex-tooltip {
  visibility: visible;
  opacity: 1;
}

.shinydex-card.owned:hover .shinydex-tooltip {
  visibility: visible;
  opacity: 1;
}

.otherdex-card.captured:hover .shinydex-tooltip {
  visibility: visible;
  opacity: 1;
}

.otherdex-card.owned:hover .shinydex-tooltip {
  visibility: visible;
  opacity: 1;
}

.user-img-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.user-img {
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 0.2rem;
  object-fit: contain;
  display: block;
}

.top-wrap {
  display: flex;
  flex-direction: column;  
  justify-content: center;  
  align-items: center;
}
.top-capturer {
  display: flex;
  flex-direction: column;  
  justify-content: center;  
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  width: 60vw;
  max-width: 600px;
  align-self: center;
  border-radius: 0.5rem;
  margin-bottom: 1.5rem;
  border-width: 6px 6px 6px 6px;
  border-style: solid;
  border-image-source: url("../img/Background/member_holder.png");
  border-image-slice: 6 6 6 6 fill;
  border-image-repeat: round;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 6px solid #ccc;
  border-top: 6px solid #d25353;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.button-dex {
  font-family: "Retro";
  font-size: 27px;
  width: 102px;
  margin-top: 0.5rem;
  color: rgba(255, 255, 255, 0.815);
  border-width: 0px 10px 0px 10px;
  border-style: solid;
  border-image-source: url("../img/button/button-showcase.png");
  border-image-slice: 0 10 0 10 fill;
  transition: border-image-source 0.2s ease;
}

.button-dex:hover {
  border-image-source: url("../img/button/button-showcase-hover.png");
}

.button-dex:disabled{
  border-image-source: url("../img/button/button-showcase-disabled.png");
}

.button-nav {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(102px, 1fr));
  width: calc(102px * 2 + 20px * 1);
  margin-left: auto;
  margin-right: auto;
  row-gap: 1rem;
  column-gap: 20px;
  margin-top: 30px;
}

.dex-title{
  font-family: "Retro";
  color: white;
  font-weight: 700;
  font-size: 2rem;
  text-align: center;
  padding: 1rem 0;
  font-size: 2rem;
}

.dex-title2{
  font-family: "Retro";
  color: white;
  font-weight: 700;
  font-size: 2rem;
  text-align: center;
  padding: 1rem 0;
  font-size: 20px;
}