* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Arial", sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.container {
  background: white;
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
  text-align: center;
  max-width: 500px;
  width: 100%;
}

h1 {
  color: #333;
  font-size: 2.5rem;
  margin-bottom: 30px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.search-container {
  margin-bottom: 30px;
}

.search-box {
  position: relative;
  margin-bottom: 20px;
}

.suggestions-container {
  position: absolute;
  width: 100%;
  max-height: 150px;
  overflow-y: auto;
  background: white;
  border: 2px solid #e0e0e0;
  border-top: none;
  border-radius: 0 0 15px 15px;
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
  z-index: 10;
  font-size: 1rem;
  color: #333;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  opacity: 0;
  visibility: hidden;
}

.suggestions-container.show {
  opacity: 1;
  visibility: visible;
}

.suggestion-item {
  padding: 12px 20px;
  cursor: pointer;
  text-transform: capitalize;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.suggestion-item:hover {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  font-weight: bold;
}

.search-input {
  width: 100%;
  padding: 15px 20px;
  border: 2px solid #e0e0e0;
  border-radius: 50px;
  font-size: 1.1rem;
  outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.search-input:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
  transform: scale(1.02);
}

.search-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 15px 30px;
  border-radius: 50px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  font-weight: bold;
}

.search-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.search-btn:active {
  transform: translateY(0);
}

.pokemon-display {
  background: #f8f9fa;
  border-radius: 15px;
  padding: 30px;
  margin-top: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, transform 0.5s ease, visibility 0.5s;
  transform: translateY(20px);
  display: none;
}

.pokemon-display.show {
  display: block;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.pokemon-image {
  margin-bottom: 20px;
}

.pokemon-image img {
  width: 200px;
  height: 200px;
  object-fit: contain;
  border-radius: 10px;
  background: white;
  padding: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.pokemon-name {
  display: inline-block;
  font-size: 2rem;
  font-weight: bold;
  color: #333;
  margin-bottom: 15px;
  text-transform: capitalize;
}

.pokemon-id {
  margin-left: 5px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 8px 15px;
  border-radius: 20px;
  font-weight: bold;
  display: inline-block;
  margin-bottom: 20px;
}

.pokemon-types {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.pokemon-types h3 {
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: bold;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Pokemon type colors */
.type-normal {
  background: #a8a878;
}
.type-fire {
  background: #f08030;
}
.type-water {
  background: #6890f0;
}
.type-electric {
  background: #f8d030;
  color: #333;
}
.type-grass {
  background: #78c850;
}
.type-ice {
  background: #98d8d8;
}
.type-fighting {
  background: #c03028;
}
.type-poison {
  background: #a040a0;
}
.type-ground {
  background: #e0c068;
}
.type-flying {
  background: #a890f0;
}
.type-psychic {
  background: #f85888;
}
.type-bug {
  background: #a8b820;
}
.type-rock {
  background: #b8a038;
}
.type-ghost {
  background: #705898;
}
.type-dragon {
  background: #7038f8;
}
.type-dark {
  background: #705848;
}
.type-steel {
  background: #b8b8d0;
}
.type-fairy {
  background: #ee99ac;
}

.pokemon-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-bottom: 20px;
}

.info-item {
  background: white;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.info-label {
  font-size: 0.9rem;
  color: #666;
  font-weight: bold;
  text-transform: uppercase;
  margin-bottom: 5px;
}

.info-value {
  font-size: 1.1rem;
  color: #333;
  font-weight: bold;
}

.error-message {
  background: #ff6b6b;
  color: white;
  padding: 15px;
  border-radius: 10px;
  margin-top: 20px;
  display: none;
}

.error-message.show {
  display: block;
  animation: shake 0.5s;
}

.loading {
  margin-top: 20px;
  color: #667eea;
  font-size: 1.1rem;
  display: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.loading.show {
  display: block;
  opacity: 1;
}

.loading::after {
  content: "";
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(102, 126, 234, 0.3);
  border-top: 2px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-left: 10px;
}

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

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-10px);
  }
  75% {
    transform: translateX(10px);
  }
}

@media (max-width: 600px) {
  .container {
    padding: 30px 20px;
  }

  h1 {
    font-size: 2rem;
  }

  .pokemon-image img {
    width: 150px;
    height: 150px;
  }

  .pokemon-info {
    grid-template-columns: 1fr;
  }
}
