@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap");

body {
  background-color: #000;
  font-family: "Poppins", sans-serif;
  color: #fff;
  margin: 0;
  padding: 0;
}

.main {
  text-align: center;
  padding: 20px;
}

.header img {
  width: 150px;
  height: auto;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: auto;
  flex-wrap: wrap;
}

.character-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  cursor: pointer;
}

.character-card {
  background-color: #111;
  border: 2px solid #ffcc00;
  border-radius: 10px;
  width: 250px;
  text-align: center;
  padding: 20px;
  transition: transform 0.3s, box-shadow 0.3s;
}

.character-card:hover {
  transform: scale(1.05);
  box-shadow: 0 5px 15px rgba(255, 204, 0, 0.5);
}

.character-details p {
  margin: 10px 0;
  color: #fff;
}
.character-details p strong {
  color: #ffcc00;
  text-transform: capitalize;
  padding-right: 5px;
}

.button {
  background-color: #ffcc00;
  color: #000;
  border: none;
  padding: 10px 20px;
  font-size: 16px;
  border-radius: 5px;
  cursor: pointer;
  margin: 30px 10px;
  transition: background-color 0.3s;
}

.button:hover {
  background-color: #ffb103;
}

@media (max-width: 768px) {
  .character-card {
    width: 100%;
    margin: 0 auto;
  }
  .button {
    width: 100px;
    font-size: 14px;
  }
}

/* Search Functionality */

.search-container {
  position: relative;
  margin: 50px auto;
  width: 300px;
}

.search-input {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  outline: none;
  color: #000;
}

.suggestions {
  list-style: none;
  margin: 0;
  padding: 0;
  background: #333;
  border: 1px solid #ccc;
  border-top: none;
  height: auto;
  overflow-y: auto;
  position: absolute;
  width: 100%;
  z-index: 10;
}

.suggestion-item {
  padding: 10px;
  cursor: pointer;
}

.suggestion-item:hover {
  background-color: #222;
}

@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    align-items: center;
  }

  .search-container {
    margin-top: 20px;
    width: 100%;
    max-width: none;
  }

  .header img {
    width: 120px;
  }
}

/* SKELETON */
.skeleton-character-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  list-style: none;
  padding: 0;
  justify-content: center;
}

.skeleton-character-card {
  display: flex;
  justify-content: center;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 20px;
  width: 250px;
  height: 225px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.skeleton-character-details p {
  margin: 10px 0;
}

.skeleton-line {
  text-align: center;
  background: linear-gradient(to right, #666 8%, #999 18%, #666 33%);
  background-size: 1000px 100%;
  animation: shimmer 3s infinite;
  border-radius: 4px;
  width: 120px;
  height: 16px;
  margin: 15px 0;
}

@keyframes shimmer {
  0% {
    background-position: -1000px;
  }
  100% {
    background-position: 1000px;
  }
}

@media (max-width: 768px) {
  .character-card {
    width: 100%;
    max-width: 300px;
  }
}
