/* Stili base */
body {
  font-family: 'Arial', sans-serif;
  background-color: #f0f0f0;
  margin: 0;
  padding: 20px;
  color: #333;
  display: flex;
  justify-content: center;
  min-height: 100vh;
}

.pokedex-container {
  width: 100%;
  max-width: 900px;
  background-color: #e60000;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  border: 10px solid #3b4cca;
}

.pokedex-header {
  background-color: #cc0000;
  padding: 15px;
  position: relative;
  border-bottom: 5px solid #3b4cca;
}

.pokedex-lights {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.light {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #000;
}

.big-light {
  width: 30px;
  height: 30px;
}

.red {
  background-color: #ff0000;
  box-shadow: 0 0 10px #ff0000;
}

.yellow {
  background-color: #ffff00;
  box-shadow: 0 0 10px #ffff00;
}

.green {
  background-color: #00ff00;
  box-shadow: 0 0 10px #00ff00;
}

.titolo {
  color: #ffcc00;
  margin: 0;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  font-size: 2.5em;
  text-align: center;
}

/* Vista Griglia */
.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 15px;
  padding: 20px;
  background-color: #ffcc00;
}

.pokemon-card {
  background-color: white;
  border: 3px solid #3b4cca;
  border-radius: 10px;
  padding: 10px;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  text-align: center;
}

.pokemon-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
  background-color: #f8f8f8;
}

.pokemon-card img {
  width: 96px;
  height: 96px;
  image-rendering: pixelated;
  background-color: #f8f8f8;
  border-radius: 50%;
  padding: 5px;
}

.pokemon-card p {
  margin: 5px 0 0;
  font-weight: bold;
  color: #333;
}

/* Vista Dettaglio */
.detail-container {
  padding: 20px;
  background: linear-gradient(to bottom, #ffcc00, #ffde59);
  min-height: 500px;
}

.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

#back-button {
  background-color: #3b4cca;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 50px;
  font-size: 1em;
  cursor: pointer;
  transition: all 0.3s;
}

#back-button:hover {
  background-color: #2a3aac;
  transform: scale(1.05);
}

.detail-title {
  flex-grow: 1;
  text-align: center;
}

#poke-name {
  color: #3b4cca;
  font-size: 2em;
  margin: 0;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.detail-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.pokemon-main {
  display: flex;
  gap: 20px;
  align-items: center;
  background-color: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

#poke-img {
  width: 200px;
  height: 200px;
  image-rendering: pixelated;
  background-color: white;
  border-radius: 50%;
  border: 5px solid #3b4cca;
  padding: 10px;
}

.pokemon-info {
  flex-grow: 1;
}

.pokemon-info p {
  margin: 10px 0;
  padding: 5px;
  background-color: #f8f8f8;
  border-radius: 5px;
}

.pokemon-info strong {
  color: #3b4cca;
}

.pokemon-stats {
  display: flex;
  gap: 20px;
}

.stats-section, .moves-section {
  flex: 1;
  background-color: white;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.stats-section h3, .moves-section h3 {
  color: #3b4cca;
  margin-top: 0;
  border-bottom: 2px solid #3b4cca;
  padding-bottom: 5px;
}

.stat-item {
  display: flex;
  justify-content: space-between;
  margin: 5px 0;
}

.stat-name {
  font-weight: bold;
}

.stat-bar-container {
  width: 60%;
  background-color: #f0f0f0;
  border-radius: 5px;
  overflow: hidden;
}

.stat-bar {
  height: 20px;
  background-color: #3b4cca;
  border-radius: 5px;
}

.moves-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.search-input {
  padding: 8px;
  border: 2px solid #3b4cca;
  border-radius: 5px;
  font-size: 1em;
}

.moves-list {
  max-height: 300px;
  overflow-y: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.move-item {
  background-color: #3b4cca;
  color: white;
  padding: 5px 10px;
  border-radius: 15px;
  font-size: 0.8em;
  cursor: pointer;
  transition: all 0.2s;
}

.move-item:hover {
  background-color: #2a3aac;
  transform: scale(1.05);
}

.pokemon-description {
  background-color: white;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Stili per i tipi di Pokémon */
.type-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 15px;
  margin: 2px;
  font-size: 0.8em;
  color: white;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.3);
}

.ability-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 15px;
  margin: 2px;
  font-size: 0.8em;
  background-color: #3b4cca;
  color: white;
}

/* Colori per ogni tipo */
.type-normal { background-color: #A8A878; }
.type-fire { background-color: #F08030; }
.type-water { background-color: #6890F0; }
.type-electric { background-color: #F8D030; color: #333; }
.type-grass { background-color: #78C850; }
.type-ice { background-color: #98D8D8; color: #333; }
.type-fighting { background-color: #C03028; }
.type-poison { background-color: #A040A0; }
.type-ground { background-color: #E0C068; color: #333; }
.type-flying { background-color: #A890F0; }
.type-psychic { background-color: #F85888; }
.type-bug { background-color: #A8B820; }
.type-rock { background-color: #B8A038; }
.type-ghost { background-color: #705898; }
.type-dragon { background-color: #7038F8; }
.type-dark { background-color: #705848; }
.type-steel { background-color: #B8B8D0; color: #333; }
.type-fairy { background-color: #EE99AC; }

.hidden {
  display: none;
}

/* Scrollbar personalizzata */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: #3b4cca;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: #2a3aac;
}

/* Responsive design */
@media (max-width: 768px) {
  .pokemon-main {
    flex-direction: column;
  }
  
  .pokemon-stats {
    flex-direction: column;
  }
  
  .grid-container {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
}

/* Stili per la barra di ricerca */
.search-container {
    padding: 15px 20px;
    background-color: #cc0000;
    position: sticky;
    top: 0;
    z-index: 10;
}

#pokemon-search {
    width: 100%;
    padding: 10px 15px;
    border: none;
    border-radius: 50px;
    font-size: 1em;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Modifica al grid-container per la scrollabilità */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    padding: 20px;
    background-color: #ffcc00;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
    margin: 0;
}

/* Aggiungi questo per il footer */
.pokedex-footer {
    background-color: #cc0000;
    padding: 10px;
    text-align: center;
    color: #ffcc00;
    font-size: 0.8em;
    border-top: 5px solid #3b4cca;
}

.install-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #3b4cca;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 50px;
  font-size: 1em;
  cursor: pointer;
  z-index: 1000;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  transition: all 0.3s;
}

.install-button:hover {
  background-color: #2a3aac;
  transform: scale(1.05);
}