* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Press-Start-2P;
}

.d-none {
  display: none !important;
}

a {
  text-decoration: none;
  color: white;
  cursor: pointer;
}

a:hover {
  color: red;
}

h1,
h2,
p {
  pointer-events: none;
}

body {
  background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)),
    url("./assests/img/pokemon-1624022_1280.jpg");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  background-attachment: fixed;
  transition: background-position 0.5s ease;
}

button {
  background: #ffffff;
  padding: 10px 30px;
  border-radius: 12px;
  border: 1px solid #ccc;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
}

button:hover {
  background: #e9e9e9;
}

input {
  padding: 10px 40px;
  font-size: 16px;
  text-align: center;
  border-radius: 15px;
  border: none;
  outline: none;
}

.subheadline {
  color: white;
  font-size: 40px;
}

h1 {
  font-size: 84px;
  color: red;
  text-shadow: 1px 1px 2px white;
}

h3 {
  text-shadow: 1px 1px 2px white;
  font-size: clamp(30px, 3.5vw, 40px);
}

.header-overlay-characteristics {
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 10px;
  height: auto;
  font-weight: bold;
  font-size: 24px;
}

#my-chart {
  width: 100%;
  height: 400px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 20px auto 0;
  max-width: 600px;
}

.chartjs-title {
  font-size: 1.5rem !important;
  font-weight: 700 !important;
  color: #333 !important;
  margin-bottom: 20px;
}

.chartjs-axis-label {
  font-family: sans-serif !important;
  font-size: 0.9rem !important;
  font-weight: 600 !important;
  color: #555 !important;
}

.close-overlay {
  position: absolute;
  left: 10px;
  top: 20px;
  font-size: 40px;
  color: white;
  cursor: pointer;
}

.close-overlay:hover {
  color: #ff6b6b;
}

.previous-pokemon,
.next-pokemon {
  font-size: 35px;
  cursor: pointer;
  transition: 0.2s ease;
  color: #444;
}

.previous-pokemon:hover,
.next-pokemon:hover {
  transform: scale(1.2);
  color: #78c850;
}

form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding-top: 10px;
  width: 100%;
}

header {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.header-name-id-span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  text-transform: capitalize;
}

#content {
  width: 100%;
  padding: 40px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 35px;
  justify-items: center;
}

.load-add {
  display: flex;
  justify-content: center;
}

.pokemon-card {
  width: 100%;
  max-width: 260px;
  background: white;
  border-radius: 18px;
  padding: 20px;
  border: none;
  cursor: pointer;

  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
  transition: transform 0.15s ease, box-shadow 0.15s ease,
    background-position 0.3s ease;

  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;

  background: linear-gradient(
    135deg,
    var(--type1-color) 45%,
    var(--type2-color) 0
  );
  background-size: 200% 200%;
}

.pokemon-card h2 {
  font-size: clamp(1rem, 1.4vw, 1.6rem);
  font-weight: 700;
  margin-bottom: 8px;
  text-align: center;
}

.pokemon-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
  background-position: 100% 100%;
}

.pokemon-card img {
  width: 40%;
  max-width: 130px;
  max-height: 130px;
  object-fit: contain;
  display: block;
  margin: 0 auto 10px;
}

.pokemon-card .pokemon-id {
  font-size: clamp(0.9rem, 1.1vw, 1.4rem);
  font-weight: 600;
  opacity: 0.9;
  position: absolute;
  top: 12px;
  right: 12px;
}

.show-pokemon-types {
  font-size: clamp(0.85rem, 1vw, 1.2rem);
  margin-bottom: 10px;
  opacity: 0.9;
}

.pokemon-card:hover {
  transform: scale(1.1);
}

.pokemon-image-card img {
  width: 250px;
  filter: drop-shadow(0 8px 15px rgba(0, 0, 0, 0.4));
  max-height: 28vh;
  object-fit: contain;
}

::-webkit-scrollbar {
  width: 10px;
  overflow: scroll;
  scrollbar-color: red orange;
  scrollbar-width: thin;
}

.card-container {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pokemon-info {
  padding: 5px;
  font-size: clamp(0.9rem, 1vw, 1.2rem);
  text-align: center;
  line-height: 1.4;
  margin-top: 10px;
  overflow-y: auto;
}

.pokemon-info span {
  display: flex;
  justify-content: space-around;
}

.pokemon-info-big-card-moves {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
  overflow-y: auto;
  height: 100%;
  flex-grow: 1;
}

.pokemon-moves {
  background: #ebebeb;
  border: 1px solid #ccc;
  padding: 10px 18px;
  border-radius: 25px;
  font-size: clamp(12px, 1vw, 16px);
  transition: 0.2s ease;
  white-space: nowrap;
}

.pokemon-moves:hover {
  background: #ddd;
}

#pokemon-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 30px;
  z-index: 500;
}

.cries-sound:hover {
  transform: scale(1.1);
}

.pokemon-details {
  width: 95%;
  max-width: 1100px;
  height: 100%;
  min-height: 75vh;
  max-height: 90vh;
  background: white;
  border-radius: 25px;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  gap: 25px;
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 0 40px 40px 40px;
  position: relative;
}

.pokemon-details-overlay {
  display: flex;
  justify-content: center;
  padding-top: 10px;
  height: 100%;
}

.pokemon-details-id {
  position: absolute;
  right: 20px;
  top: 20px;
  color: white;
  font-size: 24px;
  opacity: 1;
  text-shadow: 0 0 black;
}

.section-overlay-card {
  display: flex;
  flex-direction: column;
  height: 75%;
  gap: 10px;
  align-items: center;
  padding-top: 10px;
}

.section-overlay-card button {
  background: #f2f2f2;
  border-radius: 15px;
  padding: 12px 30px;
  border: none;
  font-weight: 600;
  font-size: clamp(14px, 1.5vw, 18px);
}

.section-overlay-card button.active {
  background: var(--type1-color, #78c850);
  color: white;
}

.display-pokemon-overlay {
  display: flex;
  justify-content: center;
}

.load-more-input {
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

#loading-spinner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: white;
}

.pokemon-detail-header {
  padding: 30px 40px;
  border-radius: 20px 20px 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  max-height: 40vh;
  overflow: hidden;
}

.pokeball {
  width: 80px;
  height: 80px;
  background: radial-gradient(circle at center, #fff 40%, white 40%);
  border: 5px solid black;
  border-radius: 50%;
  position: relative;
  overflow: hidden;
  animation: spin 1s linear infinite;
}

.pokeball::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 50%;
  background: red;
  top: 0;
}

.section-overlay-card button {
  background: #e6e6e6;
  border-radius: 12px;
  padding: 10px 30px;
  font-size: 14px;
}

.section-overlay-card button.active {
  background: #78c850;
  /* Grass */
  color: white;
}

.pokeball::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  background: white;
  border: 5px solid black;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
}

#overlay-load-all-pokemon {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.2);
}

.overlay-message {
  background-color: lightgrey;
  padding: 20px;
  border-radius: 15px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  align-items: center;
  margin: 10px;
  text-align: center;
}

.buttons-overlay-message {
  display: flex;
  gap: 20px;
}

#load-all,
#stop-load {
  padding: 5px;
  font-size: 16px;
}

#loaded-pokemon {
  font-size: 24px;
}

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

  100% {
    transform: rotate(360deg);
  }
}

#favorite-icon {
  position: absolute;
  left: 10px;
  top: 10px;
  width: 40px;
  height: 40px;
  cursor: pointer;

  img {
    width: 100%;
  }
}
