:root {
  --transition-delay: 0.4s ease-in-out;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Franklin Gothic Medium", "Arial Narrow", Arial, sans-serif;
  background-color: rgb(5, 22, 31);
}

a {
  color: unset;
  text-decoration: none;
}

img {
  user-select: none;
}

.d-none {
  display: none;
}

body .bg-op-0 {
  background-color: rgba(13, 38, 63, 0);
  z-index: -10;
}

#error {
  color: red;
  font-size: 20px;

  text-shadow: 1px 1px 5px black;
  text-align: center;
}

.f-sb {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: 10px;
}

.f-sa {
  display: flex;
  justify-content: space-around;
  align-items: center;
  width: 100%;
}

/* header */

header {
  min-height: 120px;
  padding: 20px 30px;

  position: fixed;
  top: 0;
  right: 0;
  left: 0;

  z-index: 10;

  display: flex;
  justify-content: space-between;
  align-items: center;

  gap: 60px;

  background-color: rgb(9, 33, 41);
}

#headline-container {
  color: white;

  display: flex;
  justify-content: center;
  align-items: center;

  gap: 15px;
}

#headline-container h1 {
  margin: 0;
}

/* search bar */

#search-bar {
  background-color: rgba(13, 86, 126, 0.8);
  border: none;
  color: #fff;
  padding: 10px 20px;
  font-size: 16px;
  border-radius: 20px;
  width: 100%;
  max-width: 500px;
  min-width: 300px;
}

#search-bar::placeholder {
  color: rgba(255, 255, 255, 0.623);
}

#search-bar:focus {
  outline: none;
}

/* img animation */

#pokemon-img-container {
  position: relative;
  width: 80px;
  height: 80px;
  overflow: hidden;
}

.pokemon-img {
  position: absolute;
  top: 0;
  left: 0;
  height: 80px;
}

/* roll up */
.next-pokemon-img {
  transform: translateY(100%);
}

.go-up-from-middle {
  transform: translateY(-100%);
  transition: transform 1s ease;
}

.go-back-from-bottom {
  transform: translateY(0);
  transition: transform 1s ease;
}

/* roll down */
/* .next-pokemon-img {
  transform: translateY(-100%);
}

.go-up-from-middle {
  transform: translateY(100%);
  transition: transform 1s ease;
}

.go-back-from-bottom {
  transform: translateY(0);
  transition: transform 1s ease;
} */

/* main */

main {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;

  margin: 120px 0 30px 0;
  padding-top: 15px;

  min-height: calc(100vh - 250px);

  background: linear-gradient(130deg, rgba(61, 125, 202, 0.2) 0%, rgba(61, 125, 202, 0.1) 10%, rgba(61, 125, 202, 0) 20%, rgb(5, 22, 31) 20%);
  background-attachment: fixed;
}

/* pokemon card */

#pokemon-cards-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;

  gap: 20px;

  padding: 20px 10px;

  max-width: 1500px;

  color: white;
}

.pokemon-card {
  height: 380px;
  width: 260px;
  overflow: hidden;

  background-color: rgb(136, 136, 136);
  border-radius: 20px;

  padding: 30px;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  gap: 5px;

  cursor: pointer;
  box-shadow: 3px 3px 5px rgba(0, 0, 0, 0.5);

  position: relative;
}

.pokemon-card-name::first-letter {
  text-transform: capitalize;
}

.pokemon-card-name,
.number-of-pokemon {
  font-size: 25px;
  text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.5);
}

.pokemon-card-name {
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  width: 100%;
}

.pokemon-card-img {
  width: 100%;

  transition: 0.2s ease-in-out;

  filter: drop-shadow(5px 5px 0px black);
}

.pokemon-card-bg-img {
  opacity: 0.2;
  position: absolute;

  height: 200px;

  right: -40%;

  /* change color to white */
  filter: brightness(0) invert(1);
}

.pokemon-card:hover .pokemon-card-img {
  transform: scale(1.2);
  filter: drop-shadow(15px 15px 3px rgba(0, 0, 0, 0.9));
}

.type {
  padding: 10px 20px;
  border-radius: 30px;

  font-size: 18px;

  text-shadow: 1px 1px 5px rgba(0, 0, 0, 1);
  box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.5);
}

/* big pokemon card */

.big-pokemon-card-bg {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  bottom: 0;

  height: 100vh;
  width: 100vw;

  z-index: 100;

  background-color: rgba(13, 38, 63, 0.7);

  transition: var(--transition-delay);
}

.big-pokemon-card {
  position: absolute;

  height: 850px;
  width: 500px;

  top: 50%;
  left: 50%;

  transform: translate(-50%, -50%) scale(1);

  background-color: #3d7dca;

  border-radius: 20px;

  box-shadow: 3px 3px 5px rgba(0, 0, 0, 0.5);

  display: flex;
  flex-direction: column;

  gap: 5px;

  transition: transform var(--transition-delay);
}

body .scale-0 {
  transform: translate(-50%, -50%) scale(0);
}

.big-pokemon-card-left-arrow,
.big-pokemon-card-right-arrow {
  height: 50px;

  position: fixed;
  top: 50%;

  z-index: 100;

  transition: 0.2s ease-in-out;
}

.big-pokemon-card-right-arrow {
  right: 30px;

  transform: scale(1) translateY(-50%);
  filter: brightness(0) invert(1) drop-shadow(1px 1px 2px black);
}

.big-pokemon-card-left-arrow {
  left: 30px;

  filter: brightness(0) invert(1) drop-shadow(-1px -1px 2px black);
  transform: scale(1) translateY(-50%) rotate(-180deg);
}

.big-pokemon-card-right-arrow:hover {
  filter: brightness(0) invert(1) drop-shadow(5px 5px 3px rgba(0, 0, 0, 0.8));

  transform: scale(1.2) translateY(-50%);
}

.big-pokemon-card-left-arrow:hover {
  filter: brightness(0) invert(1) drop-shadow(-5px -5px 3px rgba(0, 0, 0, 0.8));

  transform: scale(1.2) translateY(-50%) rotate(-180deg);
}

body .right-arrow-icon-scale-0 {
  transform: scale(0) translateY(-50%);
}

body .left-arrow-icon-scale-0 {
  transform: scale(0) translateY(-50%) rotate(-180deg);
}

.big-pokemon-card-close-icon-container {
  display: flex;
  gap: 20px;

  justify-content: center;
  align-items: center;
}

.close-icon {
  height: 50px;
  filter: brightness(0) invert(1) drop-shadow(1px 1px 2px black);

  transition: 0.2s ease-in-out;

  cursor: pointer;
}

.close-icon:hover {
  height: 50px;
  filter: brightness(0) invert(1) drop-shadow(5px 5px 3px rgba(0, 0, 0, 0.8));
  transform: scale(1.2);
}

#big-pokemon-card-image {
  width: 250px;
}

.big-pokemon-card-bg-img {
  opacity: 0.2;
  position: absolute;

  height: 280px;

  right: 20px;

  margin-top: 120px;
  z-index: -1;

  filter: brightness(0) invert(1);
}

#big-pokemon-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;

  padding: 0 20px 0 30px;

  width: 100%;

  color: white;
}

.big-pokemon-card-name,
.big-pokemon-card-number {
  font-size: 25px;
  text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.5);
}

.big-pokemon-card-name::first-letter {
  text-transform: capitalize;
}

#big-pokemon-card-main-container {
  width: 100%;
  height: 100%;

  background-color: white;

  border-radius: 20px;
}

#big-pokemon-card-image-types-container {
  display: flex;
  justify-content: space-around;
  align-items: center;
}

#big-pokemon-card-types-container {
  color: white;

  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;

  gap: 0px;
}

.big-pokemon-card-nav {
  width: 100%;

  display: flex;
  align-items: center;

  padding-bottom: 10px;
}

.big-pokemon-card-nav li {
  width: 100%;
  padding: 20px 0;

  text-align: center;
  font-size: 20px;

  color: rgb(170, 171, 172);

  list-style: none;
  cursor: pointer;

  transition: 0.2s;
}

.big-pokemon-card-nav li:hover {
  color: black;
}

.big-pokemon-card-nav li:first-child {
  border-radius: 20px 0 0 0;
}

.big-pokemon-card-nav li:last-child {
  border-right: unset;
  border-radius: 0 20px 0 0;
}

body .aktiv-li {
  color: black;
  text-decoration: underline;
}

.big-pokemon-card-main {
  width: 100%;

  display: flex;
  justify-content: center;
  flex-direction: column;

  gap: 25px;
}

.big-pokemon-card-table-row {
  display: flex;

  padding: 0 30px;
  width: 100%;

  font-size: 18px;
  font-weight: 900;

  font-family: Verdana, Geneva, Tahoma, sans-serif;
}

.big-pokemon-card-table-name,
.big-pokemon-card-table-value {
  width: 50%;
}

.stat-container {
  display: flex;
  justify-content: space-between;

  gap: 30px;

  padding: 0 30px;
  width: 100%;
}

.stat-number-and-bar-container {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.stat-number-and-bar-container p {
  margin: 0;
}

/* bar */

#bigPokemonCardMain {
  width: 80%;
  margin: 0 auto;
  padding: 20px;
  background-color: #2c3e50;
  border-radius: 10px;
}

.stat-name {
  color: #000000;
  font-size: 18px;
  margin: 0px;
}

.bar-container {
  width: 250px;
  background-color: #34495e;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 1%;

  max-height: 20px;
}

.bar {
  height: 20px;
  background-color: #e74c3c;
  border-radius: 10px;
  transition: width 1s ease-in-out;
}

/* chain */

body .big-pokemon-card-chain-container {
  flex-direction: row;
  align-items: center;
  height: calc(100% - 70px);

  padding: 0 20px;

  gap: 0;
}

.big-pokemon-card-chain-img-container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.big-pokemon-card-chain-img-container:hover .big-pokemon-card-chain-img {
  transform: scale(1.2);
}

.big-pokemon-card-chain-img-container:hover {
  cursor: pointer;
}

.big-pokemon-card-chain-img {
  height: 100%;

  max-height: 130px;

  max-width: 300px;

  transition: 0.2s ease-in-out;
}

.big-pokemon-card-chain-arrow {
  width: 180px;
  filter: drop-shadow(1px 1px 2px rgba(0, 0, 0, 0.3));
}

.big-pokemon-card-chain-name {
  padding-top: 20px;

  font-size: 20px;
  font-weight: 900;
  transform: scale(1.1);
}

.big-pokemon-card-chain-name::first-letter {
  text-transform: capitalize;
}

/* load more button */

#load-more-button {
  background-color: #3d7dca; /* Blau */
  border: 2px solid #3d7dca; /* Blauer Rahmen */
  color: #fff; /* Weißer Text */
  padding: 16px 28px;
  text-align: center;
  text-decoration: none;
  /* display: inline-block; */
  font-size: 18px;
  margin: 40px auto;
  cursor: pointer;
  border-radius: 8px;
  transition: 0.3s;
}

#load-more-button:hover {
  background-color: #1a4d80; /* Dunkleres Blau */
  border-color: #1a4d80; /* Dunklerer Rahmen */
  transform: scale(1.1);
}

#load-more-button:active {
  transform: scale(0.9);
  background-color: #0d263f; /* Aktives Blau */
  border-color: #0d263f; /* Aktiver Rahmen */
}

/* footer */

footer {
  background-color: #0d263f;

  display: flex;
  justify-content: center;
  align-items: center;

  color: white;

  height: 100px;
  width: 100%;
}

#top-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  cursor: pointer;

  height: 50px;
  width: 50px;

  color: white;
  filter: brightness(0) invert(1);

  transition: 0.2s ease-in-out;
}

#top-button:hover {
  transform: scale(1.1);
}

/* loading popup */

.loading-popup-container {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0);
  transition: background-color 0.2s;

  z-index: -10;

  display: flex;
  justify-content: center;
  align-items: center;
}

.show-loading-popup-container {
  background-color: rgba(0, 0, 0, 0.6);

  z-index: 100;
}

.loading-popup {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;

  gap: 40px;
}

.loading-popup-ball {
  transform: scale(0);

  transition: 0.2s ease-in-out;

  height: 300px;
  width: 300px;

  background-color: #1a4d80;
  color: white;

  display: flex;
  justify-content: center;
  align-items: center;

  border-radius: 100%;

  z-index: 9999;

  animation: spin 2s linear infinite;
}

.loading-popup-bar {
  width: 100%;
  height: 10px;
  background-color: hsl(210, 29%, 29%);
  border-radius: 10px;
}

.loading-popup-bar-fill {
  height: 10px;
  background-color: hsl(210, 100%, 64%);
  border-radius: 10px;
}

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

body .popup-scale-1 {
  transform: scale(1);
}

.popup-scale-0 {
  transform: scale(0);
}

#loading-img {
  filter: brightness(0) invert(1);
}

#imp {
  padding: 10px 20px;

  border-radius: 20px;

  transition: 0.2s;
}

#imp:hover {
  background-color: #3d7dca;

  transform: scale(1.1);
}

/* max-width */
@media (max-width: 1200px) {
  header {
    flex-wrap: wrap;
    gap: 20px;

    padding: 20px 10px;
  }

  #error {
    width: 100%;
  }

  #search-bar {
    width: unset;
  }

  main {
    margin: 150px 0 30px 0;
  }
}

@media (max-width: 750px) {
  #big-pokemon-card {
    width: 100%;
    height: 100vh;
  }

  #big-pokemon-card-image {
    max-width: 50%;
  }

  .big-pokemon-card-right-arrow {
    top: 20%;
    right: 10px;
  }

  .big-pokemon-card-left-arrow {
    top: 20%;
    left: 10px;
  }

  #big-pokemon-card-image-types-container {
    padding: 0 50px;
  }
}

@media (max-width: 660px) {
  header {
    flex-direction: column;
  }

  #search-bar {
    min-width: 200px;
  }

  #pokemon-img-container {
    width: 50px;
    height: 50px;
  }

  .pokemon-img {
    height: 50px;
  }

  #headline-container h1 {
    font-size: 25px;
  }
}

@media (max-width: 580px) {
  .pokemon-card {
    height: 330px;
    width: 230px;
  }

  .pokemon-card-name,
  .number-of-pokemon {
    font-size: 20px;
  }

  .type {
    padding: 6px 12px;
    border-radius: 30px;

    font-size: 16px;
  }
}

@media (max-width: 500px) {
  #big-pokemon-card-image {
    max-width: 50%;
  }

  .big-pokemon-card-right-arrow {
    top: 15%;
    right: 10px;

    height: 40px;
    width: 40px;
  }

  .big-pokemon-card-left-arrow {
    top: 15%;
    left: 10px;

    height: 40px;
    width: 40px;
  }

  #big-pokemon-card-image-types-container {
    padding: 0 30px;

    gap: 10px;

    justify-content: center;
  }

  .close-icon {
    height: 40px;
    filter: brightness(0) invert(1) drop-shadow(1px 1px 2px black);

    transition: 0.2s ease-in-out;

    cursor: pointer;
  }

  .close-icon:hover {
    height: 40px;
    filter: brightness(0) invert(1) drop-shadow(5px 5px 3px rgba(0, 0, 0, 0.8));
    transform: scale(1.2);
  }

  .bar-container {
    width: 200px;
  }

  .stat-container {
    display: flex;
    justify-content: space-between;

    gap: 5px;

    padding: 0 15px;
    width: 100%;
  }

  .big-pokemon-card-chain-img {
    max-height: 100px;
  }
}

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

  .stat-number-and-bar-container {
    width: 100%;
  }

  .bar-container {
    width: 250px;
  }

  .big-pokemon-card-chain-name {
    font-size: 16px;
  }
}

/* max-height */
@media (max-height: 835px) {
  .big-pokemon-card {
    height: 100vh;

    gap: 0;
  }
}

@media (max-height: 750px) {
  .big-pokemon-card-main {
    gap: 1vh;
  }

  #big-pokemon-card-top {
    height: 40vh;
  }

  #big-pokemon-card-image {
    max-height: calc(30vh - 45px);
    width: unset;
  }

  .big-pokemon-card-nav {
    padding-bottom: 5px;
  }

  .big-pokemon-card-nav li {
    padding: 5px 0;
  }
}

@media (max-height: 650px) {
  #big-pokemon-card-header {
    padding-top: 10px;
  }

  #big-pokemon-card-header p,
  #big-pokemon-card-header h2 {
    margin: 0;
  }

  .big-type {
    margin: 5px;
  }

  .big-pokemon-card-main {
    gap: 0vh;
  }

  .big-pokemon-card-right-arrow {
    top: 23%;
    right: 10px;

    height: 40px;
    width: 40px;
  }

  .big-pokemon-card-left-arrow {
    top: 23%;
    left: 10px;

    height: 40px;
    width: 40px;
  }
}
