body {
  background-color: var(--bg);
}

.content_wraper {
  display: flex;
  flex-direction: column;
}

.privacy_policy,
.impressum {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 24px;
  padding: 96px 32px 96px;
  max-width: 1024px;
  width: 100%;
  margin: 0 auto;
  min-height: calc(100vh - (64px + 64px));
  color: var(--text);
  overflow-wrap: break-word;
  word-break: break-word;
}

.privacy_policy a,
.impressum a {
  color: var(--link-color);
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-all;
}

.privacy_policy ul,
.impressum ul {
  padding-inline-start: 24px;
}

ul {
  padding-inline-start: 16px;
}

.loading_screen {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 80px 32px;
  min-height: calc(100vh - (64px + 64px));
  cursor: wait;
}

.loading_screen img {
  max-width: 100%;
  animation: spin 2s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

header {
  height: 64px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-self: center;
  position: fixed;
  top: 0;
  background-color: var(--header-bg);
  z-index: 1;
}

.header {
  height: 64px;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: fixed;
  top: 0;
  padding-inline: 32px;
  max-width: 1440px;
}

.header_logo {
  height: 100%;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 24px;
}

.header_logo img {
  height: 80%;
}

.header_logo h1 {
  color: var(--header-text);
}

.searching_section {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.btn_search {
  border: 0;
  height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  background-color: var(--input-bg);
  color: var(--input-text);
  font-weight: 550;
  cursor: pointer;
}

.btn_search:hover {
  background-color: var(--border);
}

.input_search {
  height: 32px;
  width: 250px;
  padding: 0 8px;
  color: var(--input-text);
  background-color: var(--input-bg);
  font-size: 16px;
  border-radius: 8px;
  border: 1px solid transparent;
}

.input_search::placeholder {
  color: var(--text-muted);
}

.error_search {
  border-color: var(--accent);
}

.error_search::placeholder {
  color: var(--accent);
}

.theme_toggle {
  border: 0;
  height: 32px;
  width: 32px;
  border-radius: 50%;
  background-color: var(--input-bg);
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.theme_toggle:hover {
  background-color: var(--border);
  transform: rotate(15deg);
}

.error_banner {
  position: fixed;
  top: 72px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--error-bg);
  color: var(--error-text);
  padding: 10px 20px;
  border-radius: 8px;
  z-index: 3;
  max-width: 90%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 12px;
}

.error_banner.d_none {
  display: none !important;
}

.error-retry-btn {
  background-color: var(--error-text);
  color: var(--error-bg);
  border: 0;
  border-radius: 6px;
  padding: 4px 12px;
  font: inherit;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.error-retry-btn:hover {
  opacity: 0.85;
}

footer {
  width: 100%;
  height: 64px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-self: center;
  position: fixed;
  bottom: 0;
  background-color: var(--header-bg);
  z-index: 1;
}

.footer {
  height: 64px;
  width: 100%;
  max-width: 1440px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  position: fixed;
  bottom: 0;
  background-color: var(--header-bg);
  color: var(--header-text);
}

.copyright,
.links {
  display: flex;
  gap: 8px;
  color: var(--header-text);
}

.copyright p {
  color: var(--header-text);
}

.links a {
  color: var(--header-text);
}

.pokemon_name {
  text-transform: capitalize;
}

.capitalize {
  text-transform: capitalize;
}

.content_max_width {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.type_filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px 32px;
  margin-top: 80px;
  max-width: 1440px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

.type-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  border: 2px solid transparent;
  border-radius: 16px;
  background-color: var(--surface-raised);
  color: #ffffff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.type-filter-btn img {
  height: 18px;
  width: 18px;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.4));
}

.type-filter-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px var(--scrim);
}

.type-filter-btn.active {
  border-color: var(--text);
  box-shadow: 0 0 0 3px var(--focus-ring);
  transform: translateY(-2px);
}

.type-filter-all {
  font-weight: 600;
  color: var(--text);
  text-shadow: none;
  background-color: var(--surface-raised);
  border: 2px solid var(--border);
}

.type-filter-all.active {
  border-color: var(--text);
}

.content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  margin-top: 8px;
  margin-left: auto;
  margin-right: auto;
  padding-inline: 32px;
  min-height: calc(100vh - (64px + 64px + 80px));
  max-width: 1440px;
  width: 100%;
}

.empty-message {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-muted);
  font-size: 18px;
  padding: 40px;
}

.pokecard {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 350px;
  padding: 8px;
  aspect-ratio: 2 / 3;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.pokecard:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px var(--scrim);
}

.pokecard:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.pokecard_header {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  height: 20%;
  width: 100%;
  padding-left: 8%;
  gap: 8%;
  color: #ffffff;
}

.pokecard_header h3 {
  color: #ffffff;
}

.pokecard_img {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 66%;
  width: 100%;
}

.pokecard_img img {
  height: 80%;
  width: 80%;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.pokecard:hover .pokecard_img img {
  transform: scale(1.1);
  filter: drop-shadow(2px 4px 6px rgba(0, 0, 0, 0.35));
}

.pokecard_footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12%;
  height: 14%;
  width: 100%;
}

.pokecard_footer img {
  height: 80%;
}

.btn_section {
  width: 100%;
  margin-top: 16px;
  padding-bottom: 80px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.btn_load_more {
  color: var(--button-text);
  height: 40px;
  min-width: 120px;
  padding: 0 16px;
  background-color: var(--button-bg);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
}

.btn_load_more:hover:not(:disabled) {
  opacity: 0.9;
}

.btn_disabled,
.btn_load_more:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

@media (max-width: 712px) {
  .content {
    gap: 12px;
  }
  .content,
  .header,
  .footer,
  .privacy_policy,
  .impressum {
    padding-inline: 16px;
  }
  .type_filter {
    padding: 12px 16px;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .type-filter-btn {
    flex-shrink: 0;
  }
}

@media (max-width: 560px) {
  .input_search {
    width: 150px;
    height: 28px;
  }
  .btn_search {
    height: 28px;
    font-size: 12px;
    padding: 0 8px;
  }
  .header,
  .footer,
  header,
  footer {
    height: 52px;
  }
  .header_logo {
    gap: 12px;
  }
  .type_filter {
    margin-top: 64px;
  }
  .content {
    min-height: calc(100vh - (52px + 52px + 64px));
  }
  .loading_screen,
  .privacy_policy,
  .impressum {
    min-height: calc(100vh - (52px + 52px));
    padding: 68px 16px;
  }
}

@media (max-width: 435px) {
  h1 {
    font-size: 1.5rem;
  }
  .searching_section {
    gap: 6px;
  }
  .input_search {
    width: 110px;
    height: 24px;
    font-size: 12px;
  }
  .btn_search {
    height: 24px;
    font-size: 11px;
  }
  .theme_toggle {
    height: 28px;
    width: 28px;
    font-size: 14px;
  }
  .copyright,
  .links {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
  }
}

@media (max-width: 350px) {
  .header_logo img {
    height: 65%;
  }
  .input_search {
    width: 90px;
  }
  .header_logo {
    gap: 8px;
  }
  h1 {
    font-size: 1rem;
  }
}
