@import url("https://fonts.googleapis.com/css2?family=Cascadia+Mono:ital,wght@0,200..700;1,200..700&family=Indie+Flower&family=Share+Tech&display=swap");

:root {
  /* Colors */
  --backgroung-color: #101b2d;
  --color-primary: #38e4e7;
  --color-secondary: #0295a8;
  --color-terciary: #283242;
  --color-base: #fff;
  --color-stats-card: #3c4a62;
  --color-text-stats: #bfbfbf;
  --hp-creature: #de0000;
  --attack-creature: #de5d00;
  --defense-creature: #edea00;
  --special-attack-creature: #0e3788;
  --special-defense-creature: #00be39;
  --speed-creature: #dd00b9;
  --type-fire-creature: #ad0000;
  --type-water-creature: #00b2ff;
  --type-rock-creature: #603500;
  --type-electric-creature: #fff824;
  --type-dragon-creature: #4f00ff;
  --type-grass-creature: #29ae00;
  --type-poison-creature: #5d3ab1;
  --type-ice-creature: #5ec7c9;
  --type-fairy-creature: #e379f1;
  --type-ground-creature: #7b3f00;
  --type-flygin-creature: #9dfff2;
  --type-bug-creature: #00b409;
  --type-dark-creature: #1f0000;
  --type-psychic-creature: #ff42ed;
  --type-steel-creature: #c8c8c8;
  --type-ghost-creature: #320081;

  /* Font size */
  --root-font-size: 16px;
  --font-weight: 550;
  font-size: var(--root-font-size);

  /* Font Family */
  --font-family: "Cascadia Mono", sans-serif;
  font-family: var(--font-family);
}

*,
*::after,
*::before {
  box-sizing: border-box;
}

body {
  background-color: var(--backgroung-color);
  font-weight: var(--font-weight);
  padding: 2rem;
}

h1 {
  color: var(--color-primary);
  text-align: center;
  margin-top: -2rem;
  font-weight: 900;
}

article {
  margin: 0 auto;
  max-width: 60rem;
}

.inputs {
  margin: 3% auto;
  width: 100%;
  display: flex;
}

.inputs input {
  width: 80%;
  height: 3.5rem;
  margin: 0 1rem 0 4rem;
  color: #bfbfbf;
  padding: 1rem;
  background-color: var(--color-terciary);
  border: 3px solid #00b2ff;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-family: var(--font-family);
}

.inputs input::placeholder {
  color: #bfbfbf;
  opacity: 0.7;
}

.inputs button {
  background-color: var(--color-secondary);
  border: 0;
  border-radius: 0.5rem;
  height: 3rem;
  width: 3rem;
  margin: auto 0;
  transition: 0.3s ease;
}

.inputs button:hover {
  background-color: #007fb6;
  cursor: pointer;
}

.search-text {
  text-align: center;
  color: #ababab;
  font-size: 15px;
  font-weight: 350;
  margin: 0 auto;
}

.card-creature {
  max-width: 60rem;
  margin: 5% auto;
  background-color: var(--color-terciary);
  padding: 1rem;
  border: 3px solid var(--color-secondary);
  border-radius: 0.5rem;
  display: none;
  flex-direction: column;
}

.card-creature figure img {
  margin: 0 auto;
  width: 100%;
  height: 50%;
  border-radius: 0.5rem;
}

.card-creature p {
  text-align: center;
}

.name-creature {
  font-size: 2rem;
  color: var(--color-base);
}

.id-creature {
  color: var(--color-text-stats);
  font-size: 1.3rem;
  margin-top: -1rem;
}

.type-creature {
  width: 30%;
  height: 1.5rem;
  margin: 0 auto;
}

.type-creature p {
  margin-top: 0;
}

.type-creature.fire {
  background-color: var(--type-fire-creature);
  color: var(--color-base);
}

.type-creature.water {
  background-color: var(--type-water-creature);
  color: black;
}

.type-creature.rock {
  background-color: var(--type-rock-creature);
  color: var(--color-base);
}

.type-creature.electric {
  background-color: var(--type-electric-creature);
  color: black;
}

.type-creature.dragon {
  background-color: var(--type-dragon-creature);
  color: var(--color-base);
}

.type-creature.grass {
  background-color: var(--type-grass-creature);
  color: black;
}

.type-creature.poison {
  background-color: var(--type-poison-creature);
  color: var(--color-base);
}

.type-creature.ice {
  background-color: var(--type-ice-creature);
  color: black;
}

.type-creature.fairy {
  background-color: var(--type-fairy-creature);
  color: black;
}

.type-creature.ground {
  background-color: var(--type-ground-creature);
  color: var(--color-base);
}

.type-creature.flying {
  background-color: var(--type-flygin-creature);
  color: black;
}

.type-creature.bug {
  background-color: var(--type-bug-creature);
  color: black;
}

.type-creature.dark {
  background-color: var(--type-dark-creature);
  color: var(--color-base);
}

.type-creature.psychic {
  background-color: var(--type-psychic-creature);
  color: black;
}

.type-creature.steel {
  background-color: var(--type-steel-creature);
  color: black;
}

.type-creature.ghost {
  background-color: var(--type-ghost-creature);
  color: var(--color-base);
}

.body-creature {
  display: flex;
  width: 100%;
  gap: 1rem;
  margin: 3% auto;
  padding: 1rem;
}

.width {
  padding: 0.6rem;
  width: 50%;
  background-color: var(--color-stats-card);
  border-radius: 0.5rem;
  color: var(--color-base);
}

.width p:first-child {
  margin-top: -0.1rem;
  margin-bottom: -0.5rem;
  color: var(--color-text-stats);
  font-weight: 400;
  font-size: 0.8rem;
}

.height {
  width: 50%;
  padding: 0.6rem;
  background-color: var(--color-stats-card);
  border-radius: 0.5rem;
  color: var(--color-base);
}

.height p:first-child {
  margin-top: -0.1rem;
  margin-bottom: -0.5rem;
  color: var(--color-text-stats);
  font-weight: 400;
  font-size: 0.8rem;
}

#text-type {
  display: flex;
  flex-direction: row;
}

.skill-div {
  padding: 1rem;
  color: var(--color-base);
}

.stats-creature {
  background-color: var(--color-stats-card);
  color: var(--color-base);
  border-radius: 0.5rem;
  padding: 1rem;
}

.stats {
  font-size: 1.2rem;
  margin: 0.4rem -1rem;
}

.divider {
  height: 1px;
  background-color: #c2c2c2;
  opacity: 0.2;
}

.statss {
  padding: 0.2rem 0;
}

.text-stats {
  display: flex;
}

.text-stats p {
  width: 100%;
}

.text-stats p:first-child {
  text-align: left;
}

.text-stats p:last-child {
  text-align: right;
}

.bar {
  margin-top: -0.8rem;
  height: 0.75rem;
  border-radius: 0.5rem;
  background-color: var(--backgroung-color);
}

.hp {
  height: 0.75rem;
  background-color: var(--hp-creature);
  border-radius: 0.5rem;
  width: 0;
  transition: 2.5s linear;
}

.attack {
  height: 0.75rem;
  background-color: var(--attack-creature);
  border-radius: 0.5rem;
  width: 0;
  transition: 2.5s linear;
}

.defense {
  height: 0.75rem;
  background-color: var(--defense-creature);
  border-radius: 0.5rem;
  width: 0;
  transition: 2.5s linear;
}

.special-attack {
  height: 0.75rem;
  background-color: var(--special-attack-creature);
  border-radius: 0.5rem;
  width: 0;
  transition: 2.5s linear;
}

.special-defense {
  height: 0.75rem;
  background-color: var(--special-defense-creature);
  border-radius: 0.5rem;
  width: 0;
  transition: 2.5s linear;
}

.speed {
  height: 0.75rem;
  background-color: var(--speed-creature);
  border-radius: 0.5rem;
  width: 0;
  transition: 2.5s linear;
}

.svg {
  max-width: 60rem;
  width: 8rem;
  margin: 25% auto;
}

#pet {
  position: absolute;
  margin-top: 2rem;
  margin-left: -5.5rem;
}

#gear {
  animation: gearRotate 10s linear infinite;
}
footer {
  max-width: 30rem;
  margin: 10% auto 0 auto;
  text-align: center;
  color: var(--color-base);
}

.globe-span {
  display: inline;
}

@keyframes rotacionX {
  0% {
    transform: rotateY(0deg);
  }
  100% {
    transform: rotateY(360deg);
  }
}

@keyframes heart {
  0% {
    transform: scale(0.7);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(0.7);
  }
}
@keyframes gearRotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

#globe {
  width: 1.2rem;
  position: absolute;
  margin-top: -0.2rem;
  margin-left: 0.4rem;
  animation: rotacionX 4s linear infinite;
}

#hearts {
  animation: heart 3s linear infinite;
}

.footer-p2 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
}

.heart-svg {
  position: relative;
  margin: 0;
  padding: 0;
  display: inline-block;
  vertical-align: middle;
}

@media (width >= 60rem) {
  .card-creature {
    flex-direction: row;
    max-width: 50rem;
  }
  .stats-creature {
    width: 100%;
    height: 51.15rem;
  }
  .skill-div {
    position: absolute;
    max-width: 20rem;
    margin-left: 28rem;
    margin-top: -20rem;
    width: 23%;
  }

  .svg {
    margin: 8% auto;
  }
  #pet {
    margin-top: -7.78rem;
    margin-left: 2.54rem;
    width: 4.8rem;
    height: 4.8rem;
  }
  #gear {
    width: 10rem;
    height: 10rem;
  }
  footer {
    margin: 6% auto -3rem auto;
  }
}
