.pokemon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  padding: 2rem 0;
}

.header-content {
  display: flex;
  padding: 1rem;
  text-align: center;
  color: var(--text-light);
  justify-content: space-between;
  max-width: 1440px;
  margin: 0 auto;
}

#searchInput {
  padding: 0.5rem;
  width: 80%;
  max-width: 300px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 4px;
}

/* Pokemoncard */
.pokemon-card {
  background: url('./assets/img/pokeball-grey-bg.png');
  background-position: center;
  background-size: 100px;
  background-repeat: no-repeat;
  background-blend-mode: soft-light;
  border-radius: var(--card-radius);
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
}

.pokemon-card:hover {
  transform: scale(1.05);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.pokemon-card .pokemon-img {
  width: 150px;
  height: 150px;
  object-fit: contain;
  object-position: center;
  position: relative;
  filter: drop-shadow(10px 0 6px #23232380);
  z-index: 2;
}

.poke-bg-img {
  width: 130px;
  height: 130px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  mix-blend-mode: soft-light;
  z-index: 2;
}

/* Pokedex Number Styling */
.pokedex-number {
  position: absolute;
  top: 0;
  left: 4px;
  font-family: 'Pokemon Solid', sans-serif;
  font-size: 24px;
  color: #ffde00;
  text-shadow: 
      -2px -2px 0 #2c70b5,
      2px -2px 0 #2c70b5,
      -2px 2px 0 #2c70b5,
      2px 2px 0 #2c70b5;
  letter-spacing: 4px;
  transform: rotate(-15deg);
  z-index: 1;
  animation: glow 2s ease-in-out infinite alternate;
}

/* Overlay */
.overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--overlay-bg);
  backdrop-filter: blur(5px);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.overlay-content {
  color: #fff;
  width: 400px;
  height: 600px;
  position: relative;

}

.pokemon-overlay-img {
  width: 200px;
  height: 200px;
  object-fit: contain;
  object-position: center;
  margin-top: 0;
  margin-bottom: 16px;
  z-index: 10;
}

.overlay-pokemon-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  padding: 24px;
  border-radius: var(--card-radius);
  position: relative;
}

.overlay-pokemon-top-info {
  position: relative;
}

/* Navigation Buttons */
.nav-control {
  display: flex;
  justify-content: center;
  gap: 24px;
  width: 100%;
}

.nav-btn {
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  background-color: #232323;
  color: var(--text-light);
}

.nav-btn:hover {
  transform: scale(1.2);
}

.prev-btn {
  left: 1rem;
}

.next-btn {
  right: 1rem;
}

/* Typ-Styles */
.types {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
}

.types * {
  width: 40px;
  height: 40px;
  padding: 0;
  margin: 0;
  filter: drop-shadow(4px 0 6px #23232380);
}

/* Tabs */
.tabs {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin: 1rem 0;
}

.tab-btn {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--type-color);
  opacity: 0.7;
  color: var(--text-light);
}

.tab-btn.active {
  opacity: 1;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.tab-content.active {
  display: block;
}

.tab {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 8px;
  
  height: 200px;
  width: 320px;
  overflow-y: auto;
  margin-bottom: 16px;
  padding: 10px;
}

.tab * {
  font-size: 14px;
}

#moves {
  flex-direction: row;
}

#moves * {
  flex-direction: row;
  background-color: #ffffff40;
  border-radius: 4px;
}

.tabs button {
  font-size: 16px;
  font-weight: 700;
}

.stat-item {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 5px;
}

/* Moves List */
.moves-list {
  max-height: 200px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.5rem;
  padding: 0.5rem;
}

.moves-list span {
  background: rgba(255, 255, 255, 0.1);
  padding: 0.3rem;
  border-radius: 5px;
  text-align: center;
}

/* Loading Overlay */
.loading-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.8);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.loading-overlay.active {
  display: flex;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid var(--primary-blue);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* -------------------------- Hilfsklassen & Animationen -------------------------- */
.load-btn {
  display: block;
  margin: 2rem auto;
  padding: 1rem 2rem;
  background: var(--primary-blue);
  color: var(--text-light);
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.load-btn:disabled {
  background: #95a5a6;
  cursor: not-allowed;
}

.load-btn:hover:not(:disabled) {
  opacity: 0.9;
}

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

/* -------------------------- Responsive Design -------------------------- */
@media (max-width: 480px) {
  .pokemon-card {
    width: 90%;
  }
  .header-content h1 {
    display: none;
  }

  #searchInput {
    width: 100%;
  }

  .pokemon-grid {
    grid-template-columns: 1fr;
    padding: 1rem;
  }
  .overlay-content {
    padding: 1rem;
  }

  .tabs {
    flex-wrap: wrap;
  }

  .evolution-chain {
    gap: 1rem;
  }
}