body {
  --color-background: #06090d;
  --color-font: #efefef;
  --color-font-secondary: #172333;
  --color-font-placeholder: rgba(239, 239, 239, 0.5);
  --color-primary: #172333;
  --color-primary-light: #293E59;
  --color-outer-1: rgba(0, 0, 0, 0.1);
  --color-outer-3: rgba(0, 0, 0, 0.3);
  --color-outer-i-05: rgba(255, 255, 255, 0.05);
  --color-outer-i-1: rgba(255, 255, 255, 0.1);
}

body[data-theme=light-theme] {
  --color-background: #f9f9f9;
  --color-font: #06090d;
  --color-font-secondary: #172333;
  --color-font-placeholder: rgba(6, 9, 13, 0.5);
  --color-primary: #dddddd;
  --color-primary-light: #b1b1b1;
  --color-outer-3: rgba(255, 255, 255, 0.3);
  --color-outer-i-05: rgba(0, 0, 0, 0.05);
  --color-outer-i-1: rgba(0, 0, 0, 0.1);
}

.normal {
  background-color: #adac7e !important;
  border: 2px solid #474734;
}

.fire {
  background-color: #f08639 !important;
  border: 2px solid #8A4D21;
}

.water {
  background-color: #769af1 !important;
  border: 2px solid #455A8C;
}

.grass {
  background-color: #7dca57 !important;
  border: 2px solid #39632B;
}

.electric {
  background-color: #f8d135 !important;
  border: 2px solid #917A1F;
}
.electric h2,
.electric span.electric {
  color: #172333;
}

.ice {
  background-color: #a1dbdc !important;
  border: 2px solid #567575;
  color: #172333 !important;
}

.fighting {
  background-color: #cc352c !important;
  border: 2px solid #661A16;
}

.poison {
  background-color: #a842a6 !important;
  border: 2px solid #8C378B;
}

.ground {
  background-color: #e2c370 !important;
  border: 2px solid #7D6C3E;
  color: #172333 !important;
}
.ground h2,
.ground span.ground {
  color: #172333;
}

.flying {
  background-color: #ab94f0 !important;
  border: 2px solid #62558A;
}

.psychic {
  background-color: #f96491 !important;
  border: 2px solid #943B56;
}

.bug {
  background-color: #adbc21 !important;
  border: 2px solid #505710;
}

.rock {
  background-color: #bfa73d !important;
  border: 2px solid #594E1D;
}

.ghost {
  background-color: #755b9c !important;
  border: 2px solid #281F36;
}

.dark {
  background-color: #755b4c !important;
  border: 2px solid #0F0C0A;
}

.dragon {
  background-color: #753ff8 !important;
  border: 2px solid #452491;
}

.steel {
  background-color: #bebfd4 !important;
  border: 2px solid #63636E;
  color: #172333;
}

.fairy {
  background-color: #fe86e9 !important;
  border: 2px solid #99518D;
}

.content-overlay {
  background-color: black;
  opacity: 0.7;
  filter: blur(4px);
  transition: all 175ms ease-in-out;
}

.overflow-hiden {
  overflow-y: hidden;
}

.pokemon-overlay {
  width: 100%;
  height: 100%;
  position: fixed;
  top: 0;
  left: 0;
  display: flex;
  justify-content: center;
  padding: 24px 0 0;
  z-index: 2;
}
.pokemon-overlay ::-webkit-scrollbar {
  width: 6px;
}

.close-btn {
  background-color: transparent;
  position: absolute;
  top: 16px;
  right: 16px;
  border: none;
  transform: scale(1);
  transition: all 75ms ease-in-out;
  cursor: pointer;
}
.close-btn:hover {
  transform: scale(1.1);
}
.close-btn img {
  width: 32px;
  height: 32px;
}

#pokemon_details {
  background: url("./../img/bg.png") no-repeat -10% -80%;
  background-size: 130%;
  width: 500px;
  max-height: 880px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 0 0 0;
  border-radius: 16px 40px 0 32px;
  box-shadow: 2px 0 4px 0 var(--color-outer-3);
}
#pokemon_details h2 {
  font-size: 32px;
}

#pokemon_details_top,
#pokemon_details_bottom,
#pokemon_details_moves {
  display: flex;
  flex-direction: column;
}

#pokemon_details_top {
  width: 100%;
  display: flex;
  align-items: center;
}
#pokemon_details_top button {
  background-color: transparent;
  padding: 0;
  border: none;
  transition: all 150ms ease-in-out;
  user-select: none;
}
#pokemon_details_top button:hover {
  transform: scale(1.1);
}

#pokemon_details_bottom,
#pokemon_details_moves {
  background-color: var(--color-background);
  width: 100%;
  flex-grow: 1;
  margin-top: 8px;
  padding: 16px 16px 0;
  border-radius: 16px 0 0 32px;
  overflow-y: auto;
}

.circle {
  background-color: var(--color-primary);
  width: 250px;
  height: 250px;
  top: 120px;
  position: absolute;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  box-shadow: 2px 0 4px 0 var(--color-outer-3);
}
.circle img {
  width: 180px;
  height: 180px;
}
.circle img:hover {
  width: 200px;
  height: 200px;
  animation: rotatePokemonRight 225ms ease-in-out;
}

.type-container-overlay {
  width: 100%;
  display: flex;
  justify-content: space-evenly;
  margin-top: 16px;
}

.weight-container-overlay {
  width: 100%;
  display: flex;
  justify-content: space-between;
  margin-top: 32px;
  padding: 0 16px;
  z-index: 3;
}
.weight-container-overlay span {
  background-color: rgba(255, 255, 255, 0.2);
  width: 100px;
  padding: 4px 0;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 8px;
  text-align: center;
  color: var(--color-font-secondary);
}

.navigation-overlay {
  width: 100%;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  margin-top: 32px;
  padding: 0 16px;
  z-index: 3;
}
.navigation-overlay img {
  width: 32px;
  height: 32px;
  cursor: pointer;
}

.justify-end {
  justify-content: end;
}

.justify-start {
  justify-content: start;
}

.details-switch {
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 8px 32px;
}
.details-switch span {
  padding-bottom: 4px;
  cursor: pointer;
}

.active {
  border-bottom: 5px solid white;
}

#pokemon_abilities,
#pokemon_stats {
  margin: 8px 0 16px;
}
#pokemon_abilities h3,
#pokemon_stats h3 {
  margin-bottom: 4px;
}

#pokemon_evolution {
  margin-bottom: 8px;
}
#pokemon_evolution h3 {
  margin-bottom: 4px;
}

#evolution_steps {
  display: flex;
  justify-content: space-evenly;
  margin-top: 16px;
}

.evolution-step {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.evolution-step img {
  width: 90px;
  height: 90px;
}

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

.pokemon-move {
  background-color: var(--color-primary);
  display: inline-block;
  margin-bottom: 8px;
  padding: 2px 4px;
  border: 1px solid var(--color-outer-i-1);
  border-radius: 4px;
}

.disabled {
  pointer-events: none;
}

@media (max-width: 576px) {
  #pokemon_details {
    width: 400px;
    max-height: 800px;
  }
  .weight-container-overlay span {
    width: 80px;
  }
  .circle {
    width: 200px;
    height: 200px;
    top: 130px;
  }
  .circle img {
    width: 150px;
    height: 150px;
  }
  .circle img:hover {
    width: 160px;
    height: 160px;
  }
}
@media (max-width: 456px) {
  #pokemon_details {
    background: url("./../img/bg.png") no-repeat -10% -30%;
    background-size: 130%;
    width: 300px;
    max-height: 716px;
  }
  .weight-container-overlay {
    padding: 0 8px;
  }
  .weight-container-overlay span {
    width: 60px;
  }
  .navigation-overlay {
    margin-top: 16px;
    padding: 0 8px;
  }
  .circle {
    width: 150px;
    height: 150px;
    top: 130px;
  }
  .circle img {
    width: 100px;
    height: 100px;
  }
  .circle img:hover {
    width: 110px;
    height: 110px;
  }
  .details-switch {
    margin-bottom: 8px;
    padding: 8px 0;
  }
  .evolution-step img {
    width: 80px;
    height: 80px;
  }
}
@media (max-width: 320px) {
  #pokemon_details {
    width: 264px;
    max-height: 700px;
  }
  .weight-container-overlay {
    margin-top: 16px;
  }
  .circle {
    width: 140px;
    height: 140px;
    top: 140px;
  }
  .circle img {
    width: 90px;
    height: 90px;
  }
  .circle img:hover {
    width: 100px;
    height: 100px;
  }
}
html,
body {
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
}

* {
  box-sizing: border-box;
}

::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  box-shadow: inset 0px -1px 5px var(--color-outer-i-1);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: var(--color-font);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-font-placeholder);
}

body {
  background-color: var(--color-background);
  position: relative;
  font: 16px "Lato Regular", sans-serif;
  color: var(--color-font);
}

header {
  background-color: var(--color-primary);
  width: 100%;
  height: 80px;
  position: sticky;
  top: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 0 32px;
  border-bottom: 1px solid var(--color-outer-i-1);
  box-shadow: 0px 1px 3px 0 var(--color-outer-i-05);
  z-index: 1;
}
header a {
  color: var(--color-font);
  text-decoration: none;
}

.logo {
  display: flex;
  align-items: center;
  gap: 16px;
}
.logo img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  transform: rotate(-45deg);
}

h1,
h2,
h3 {
  margin: 0;
}

.search-container {
  background-color: var(--color-primary-light);
  display: flex;
  align-items: center;
  border: 1px solid var(--color-outer-i-05);
  border-radius: 8px;
}
.search-container button {
  background-color: transparent;
  padding: 4px;
  border: none;
  cursor: pointer;
}
.search-container img {
  width: 20px;
}

.search-input {
  background-color: var(--color-primary-light);
  border: none;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 18px;
  color: #efefef;
}
.search-input::placeholder {
  color: var(--color-font-placeholder);
}
.search-input:focus {
  outline: none;
}

.search-message {
  background-color: var(--color-font);
  position: absolute;
  top: 64px;
  left: 50%;
  display: flex;
  padding: 8px 32px;
  border: 1px solid var(--color-outer-i-05);
  border-radius: 8px;
  color: var(--color-background);
  transform: scale(0) translateX(-33.3%);
  transition: transform 225ms ease-in-out;
}

.search-show {
  transform: scale(1) translateX(-33.3%);
}

.checkbox {
  opacity: 0;
  position: absolute;
}

.label {
  width: 50px;
  height: 26px;
  background-color: var(--color-primary-light);
  display: flex;
  border-radius: 50px;
  align-items: center;
  justify-content: space-between;
  margin-right: 5px;
  padding: 5px;
  border: 1px solid var(--color-outer-i-1);
  position: relative;
  transform: scale(1.25);
}
.label img {
  width: 12px;
  height: 12px;
  object-fit: cover;
}

.ball {
  width: 20px;
  height: 20px;
  background-color: var(--color-font);
  position: absolute;
  top: 2px;
  left: 2px;
  border-radius: 50%;
  transition: transform 0.2s linear;
  cursor: pointer;
}

/*  target the elemenent after the label*/
.checkbox:checked + .label .ball {
  transform: translateX(24px);
}

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

#all_pokemon {
  max-width: 1260px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin: 32px 8px 72px;
}

.one-pokemon:nth-child(odd) {
  background: url("./../img/bg.png") no-repeat 260% -30%;
  background-size: 120%;
  width: 300px;
  padding: 16px 8px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-radius: 16px 40px 16px 40px;
  color: var(--color-font);
  cursor: pointer;
  box-shadow: 2px 0 2px 0 var(--color-outer-i-1);
  transition: transform 225ms ease-in-out;
}
.one-pokemon:nth-child(odd):hover {
  transform: scale(1.05);
}
.one-pokemon:nth-child(odd) img {
  width: 105px;
  height: 105px;
}
.one-pokemon:nth-child(odd) img:hover {
  width: 125px;
  height: 125px;
  animation: rotatePokemonRight 225ms ease-in-out;
}

@keyframes rotatePokemonRight {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
.one-pokemon:nth-child(even) {
  background: url("./../img/bg.png") no-repeat -150% 110%;
  background-size: 120%;
  width: 300px;
  padding: 16px 8px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-radius: 40px 16px 40px 16px;
  color: var(--color-font);
  cursor: pointer;
  box-shadow: 2px 0 2px 0 var(--color-outer-i-1);
  transition: transform 125ms ease-in-out;
}
.one-pokemon:nth-child(even):hover {
  transform: scale(1.05);
}
.one-pokemon:nth-child(even) img {
  width: 105px;
  height: 105px;
}
.one-pokemon:nth-child(even) img:hover {
  width: 125px;
  height: 125px;
  animation: rotatePokemonLeft 225ms ease-in-out;
}

@keyframes rotatePokemonLeft {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(-360deg);
  }
}
.pokemon-content {
  width: 100%;
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  gap: 16px;
}
.pokemon-content .image {
  background-color: var(--color-primary);
  width: 150px;
  height: 150px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 16px;
  border-radius: 50%;
  box-shadow: 2px 0 2px 0 var(--color-outer-3);
}

.type-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.type {
  padding: 4px 8px;
  border-radius: 8px;
  color: var(--color-font);
  text-align: center;
}

.impress {
  width: 100%;
  padding: 32px 16px;
}
.impress a {
  color: var(--color-font-placeholder);
  text-decoration: none;
}
.impress a:hover {
  text-decoration: underline;
}

.privacy-policy {
  width: 100%;
  padding: 0 16px 32px;
}
.privacy-policy a {
  color: var(--color-font-placeholder);
  text-decoration: none;
}
.privacy-policy a:hover {
  text-decoration: underline;
}

footer {
  background-color: var(--color-primary);
  width: 100%;
  height: 40px;
  position: fixed;
  bottom: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  column-gap: 4px;
  border-top: 1px solid var(--color-outer-i-1);
  box-shadow: 0px 1px 3px 0 var(--color-outer-i-05);
}
footer a {
  color: var(--color-font);
  text-decoration: none;
}
footer a:hover {
  color: var(--color-font-placeholder);
}

.loading {
  width: 100%;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.97);
  position: fixed;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  gap: 48px;
  justify-content: center;
  align-items: center;
  z-index: 8888;
}
.loading span {
  font-size: 48px;
  font-weight: bold;
}

.loader {
  width: 122px;
  height: 122px;
  border: 10px solid #FFF;
  border-radius: 50%;
  display: inline-block;
  position: relative;
  box-sizing: border-box;
  animation: rotation 1.5s linear infinite;
}

.loader::after {
  content: "";
  box-sizing: border-box;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 10px solid;
  border-color: #e41f25 transparent;
}

@keyframes rotation {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
@media (max-width: 768px) {
  header {
    height: 60px;
    padding: 0 16px;
  }
  .logo img {
    width: 40px;
    height: 40px;
  }
  h1 {
    font-size: 24px;
  }
  .search-input {
    font-size: 16px;
  }
}
@media (max-width: 576px) {
  body {
    font-size: 14px;
  }
  header {
    gap: 8px;
  }
  .logo {
    gap: 8px;
  }
  .logo img {
    width: 32px;
    height: 32px;
  }
  h1 {
    font-size: 22px;
  }
  h2 {
    font-size: 20px;
  }
  .search-container img {
    width: 16px;
    height: 16px;
  }
  .search-input {
    width: 180px;
    padding: 2px 4px;
  }
  .label {
    width: 44px;
    height: 24px;
  }
  .label img {
    width: 12px;
    height: 12px;
  }
  .ball {
    width: 18px;
    height: 18px;
  }
  .checkbox:checked + .label .ball {
    transform: translateX(20px);
  }
  .pokemon-content .image {
    width: 120px;
    height: 120px;
  }
  .one-pokemon:nth-child(odd) {
    width: 248px;
  }
  .one-pokemon:nth-child(odd) img {
    width: 80px;
    height: 80px;
  }
  .one-pokemon:nth-child(odd) img:hover {
    width: 105px;
    height: 105px;
    animation: rotatePokemonLeft 225ms ease-in-out;
  }
  .one-pokemon:nth-child(even) {
    width: 248px;
  }
  .one-pokemon:nth-child(even) img {
    width: 80px;
    height: 80px;
  }
  .one-pokemon:nth-child(even) img:hover {
    width: 105px;
    height: 105px;
    animation: rotatePokemonLeft 225ms ease-in-out;
  }
}
@media (max-width: 456px) {
  header {
    padding: 0 8px;
  }
  header h1 {
    display: none;
  }
  h2 {
    font-size: 18px;
  }
  .search-input {
    width: 120px;
  }
}