.search-input {
  padding: 5px 10px !important;
  border-radius: var(--border-radius);
  border: 3px solid black;
  box-sizing: border-box;
  margin-top: -8px !important;
  transform: translateY(-7px) !important;
}

.pokemon-content {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.pokedex-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 50px;
  padding: 50px;
}
.pokemon-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  position: relative;
  width: var(--card-width);
  height: var(--card-height);
  padding: 15px;
  border: 3px solid var(--secondary-color);
  border-radius: var(--border-radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.pokemon-card:hover,
.pokemon-card:focus-visible {
  transform: translateY(-5px) scale(1.2);
  box-shadow: var(--hover-shadow);
}
.keyboard-nav .pokemon-card:hover:not(:focus-visible) {
  transform: none;
  box-shadow: none;
}
.pokemon-card:focus-visible {
  outline: none;
}
.pokemon-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  font-weight: bold;
  font-size: 16px;
  border-bottom: 1px solid aqua;
}
.pokemon-name {
  font-size: 25px;
}
.pokemon-number {
  font-size: 1.5rem;
  font-weight: bold;
}
.pokemon-image-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 200px;
}
.pokemon-image {
  width: 240px !important;
  height: 240px !important;
  transition: transform 0.3s ease;
}
.pokemon-card:hover .pokemon-image,
.pokemon-card:focus-visible .pokemon-image {
  transform: scale(1.1);
  cursor: pointer;
}
.keyboard-nav .pokemon-card:hover:not(:focus-visible) .pokemon-image {
  transform: none;
}
.type-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 15px;
  border: 3px solid black;
  font-weight: bold;
  text-transform: capitalize;
  color: black;
  background-color: var(--type-color);
  width: 120px;
  height: 50px;
}
.type-button-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 5px;
}
.pokemon-card img {
  width: 120px;
  height: 120px;
}
.pokemon-card h3 {
  margin: 10px 0;
  text-transform: capitalize;
}
.pokemon-card-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 35px;
  padding: 10px 0;
  gap: 10px;
  border-radius: 20px;
}
.type-icon {
  width: 35px !important;
  height: 35px !important;
  object-fit: contain;
  background-color: var(--type-color);
}
.pokemon-card:hover:before,
.pokemon-card:hover:after,
.pokemon-card:focus-visible:before,
.pokemon-card:focus-visible:after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  background-image: linear-gradient(
    115deg,
    transparent 20%,
    #ff000045 36%,
    #00ff0048 43%,
    #0000ff57 50%,
    #ffff0063 57%,
    #ff00ff7b 64%,
    transparent 80%
  );
  background-position: 50% 50%;
  background-size: 250% 250%;
  mix-blend-mode: color-dodge;
  opacity: 0.88;
  filter: brightness(0.66) contrast(1.33);
  transition: opacity 0.5s ease;
  border-radius: var(--border-radius);
  pointer-events: none;
  z-index: 1;
}
.detail-overlay {
  display: flex;
  flex-direction: column;
  height: 300px;
}
.tab-content {
  flex: 1;
  overflow-y: auto;
}

#Moves.tab-content {
  overflow-y: visible;
}

#About.tab-content {
  padding-right: 10px;
  margin-right: -0.75rem;
}

#BaseStats.tab-content {
  padding-right: 10px;
  margin-right: -0.75rem;
}

.stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
  font-size: 1rem;
}

.stat-row span:first-child {
  flex: 1;
  min-width: 100px;
  margin-right: 15px;
}

.stat-row progress {
  height: 30px;
  margin-right: 10px;
  flex-shrink: 0;
}

.stat-row span:last-child {
  width: 30px;
  text-align: right;
  flex-shrink: 0;
}

.moves-container {
  max-height: 500px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.moves-table-content {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  padding: 0 0 8px 0;
}

.move-compact-tag {
  background-color: rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 8px 6px;
  border-radius: 8px;
  font-size: 12px;
  font-family: var(--font-family);
  font-weight: 500;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  hyphens: manual;
  word-break: break-word;
  line-height: 1.3;
  transition: all 0.2s ease;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 35px;
}

.move-compact-tag:hover {
  background-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
#BaseStats {
  padding: 10px 0;
}

#BaseStats .tab-table {
  padding-top: 10px;
}

#BaseStats .tab-table td {
  display: flex;
  align-items: center;
  gap: 100px;
}

#BaseStats .tab-table progress {
  height: 20px;
}

#BaseStats .tab-table th {
  font-weight: normal;
}
.details-card {
  padding: 1.5rem;
  border-radius: 15px;
  max-width: 90%;
  position: relative;
  color: #fff;
}

.details-card {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  max-height: 80vh;
  height: 900px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  border: 3px solid var(--secondary-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  transform: translateZ(0);
  background-image: linear-gradient(
    115deg,
    transparent 20%,
    rgba(255, 0, 0, 0.2) 36%,
    rgba(0, 255, 0, 0.2) 43%,
    rgba(0, 0, 255, 0.2) 50%,
    rgba(255, 255, 0, 0.2) 57%,
    rgba(255, 0, 255, 0.2) 64%,
    transparent 80%
  );
  background-position: 50% 50%;
  background-size: 200% 200%;
}

.details-card::-webkit-scrollbar {
  width: 12px;
}

.details-card::-webkit-scrollbar-track {
  background: transparent;
  margin: 4px 0;
}

.details-card::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  border: 2px solid transparent;
  background-clip: content-box;
}

.details-card::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
  background-clip: content-box;
}

.details-card.moves-active {
  padding: 1.5rem;
}
.details-card:hover {
  transform: scale(1.05);
  box-shadow: var(--hover-shadow);
}

.details-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.pokemon-image-section {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px 0;
}

.details-image {
  padding: 10px;
  max-width: 86%;
  max-height: 431px;
  width: auto;
  height: auto;
  display: block;
  object-fit: contain;
}
.details-header span {
  margin-left: auto;
}

.arrow-left {
  position: absolute;
  left: -5px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
}

.arrow-right {
  position: absolute;
  right: -5px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
}

.details-card.moves-active .arrow-left {
  left: -5px;
}

.details-card.moves-active .arrow-right {
  right: -5px;
}

.details-card.moves-active .pokemon-image-section {
  padding: 10px 0;
}

.details-card.moves-active .details-image {
  padding: 10px;
  max-width: 86%;
  max-height: 431px;
}

#arrowDiv {
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
}
#access .stat-name {
  font-size: 1.2rem;
  font-weight: bold;
  color: #00698f;
}
#access .stat-row {
  background-color: #f7f7f7;
  padding: 1rem;
  border-top: 1px solid #ddd;
}
#About .tab-table {
  padding-top: 15px;
}

@media (max-width: 310px) {
  .pokemon-card {
    width: 90%;
    height: 300px;
  }
  .pokemon-image {
    width: 150px;
    height: 150px;
  }
  .overlay {
    max-width: 90vw;
    font-size: 0.9rem;
  }
  table {
    display: flex;
    flex-direction: column;
  }
}

@media (max-width: 365px) {
  .pokedex-container {
    padding: 15px;
  }
  .move-name {
    font-size: 0.8rem;
    font-weight: 500;
  }
  .move-method {
    font-size: max(0.7rem, 11px);
    padding: 2px 6px;
  }
  .moves-container {
    gap: 6px;
  }
  .move-item {
    padding: 4px 6px;
  }
}

@media (max-width: 431px) {
  #About .tab-table table {
    font-size: 12px;
  }
  #BaseStats .tab-table table {
    font-size: 12px;
  }
  #BaseStats .tab-table th,
  #BaseStats .tab-table td {
    padding: 5px;
  }
  .details-card {
    display: flex;
    flex-direction: column;
    transition: opacity 0.3s ease;
  }
  .search-input {
    margin: 3px;
    margin-top: 3px;
    margin-bottom: 8px;
    padding-bottom: 12px;
  }
}

@media (max-width: 480px) {
  .arrow-right,
  .details-card.moves-active .arrow-right {
    right: -30px !important;
  }
  .arrow-left,
  .details-card.moves-active .arrow-left {
    left: -30px !important;
  }
  .arrow-button {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }
}

.error-message {
  background-color: rgba(1, 48, 9, 0.9);
  border: 2px solid var(--secondary-color);
  border-radius: var(--border-radius);
  color: white;
  text-align: center;
  padding: 2rem;
  margin: 2rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.error-message p {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

@media (min-width: 540px) and (max-width: 1024px) {
  .search-input {
    transform: translateY(-2px) !important;
  }
}