@import url("https://fonts.googleapis.com/css?family=Lato:300,400&display=swap");

@font-face {
  font-family: pocketMonk;
  src: url(./Fonts/PocketMonk.ttf);
}
@font-face {
  font-family: slumbersWeight;
  src: url(./Fonts/SlumbersWeight.ttf);
}
@font-face {
  font-family: moltors;
  src: url(./Fonts/Moltors.ttf);
}

* {
  box-sizing: border-box;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --grass: #5fbd58;
  --bug: #92bc2c;
  --dark: #595761;
  --dragon: #0c69c8;
  --electric: #f2d94e;
  --fairy: #ee90e6;
  --fighting: #d3425f;
  --fire: #dc872f;
  --flying: #a1bbec;
  --ghost: #5f6dbc;
  --ground: #da7c4d;
  --ice: #75d0c1;
  --normal: #a0a29f;
  --poison: #b763cf;
  --psychic: #ff2ca8;
  --rock: #a38c21;
  --steel: #5695a3;
  --water: #539ddf;
}

body {
  background: #efefbb;
  /* background: linear-gradient(to right, #ffffff, #827eff); */
  background-color: whitesmoke;
}

h1 {
  letter-spacing: 3px;
  font-weight: 800;
  font-size: 2.5em;

  padding: 20px;
  color: black;
}

.poke-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  max-width: 1200px;
}

.cardContainer {
  margin: 10px;
}

.card {
  background-color: #eee;
  border-radius: 10px;
  box-shadow: 0 3px 15px rgba(0, 0, 0, 0.5);
  padding: 20px;
  align-items: center;
  text-align: center;
  transform-style: preserve-3d;
  transition: 0.25s ease-in;
  max-width: 210px;
  min-width: 210px;
  min-height: 330px;
  max-height: 330px;
  color: #202020;
  perspective: 150rem;
  position: relative;
}

@media screen and (max-width: 600px) {
  .card {
    min-width: 45vw !important;
    max-width: 45vw !important;
  }
}

.cardContainer:hover .card {
  transform: rotateY(180deg);
  cursor: pointer;
  transition: 0.25s ease-in-out;
  transition-delay: .2s;
}

/* Handle card flip behavior on touch-screen */
@media(hover: none) {
  .cardContainer:hover .card {
    transform: none;
    transition: none;
  }

  .back {
    visibility: hidden;
  }
}

.types {
  display: flex;
}

.front,
.back {
  backface-visibility: hidden;
  position: absolute;
  display: flex;
  justify-content: center;
  align-items: center;
  transform-style: preserve-3d;
}

.back {
  transform: rotateY(-180deg);
}

.back .background {
  width: 150px;
  position: absolute;
  left: 0;
  z-index: -10;
  opacity: 0.4;
  animation: rotate 5s linear infinite;
}
.side {
  width: 80%;
  display: flex;
  flex-direction: column;
  justify-content: space-between !important;
  align-items: center;
}
.image-container {
  position: relative;
}
.image {
  width: 150px;
  top: 10px;
  position: relative;
  aspect-ratio: 1/1;
  z-index: 10;
  image-rendering: pixelated;
}
.background {
  width: 150px;
  position: absolute;
  z-index: -10;
  opacity: 0.4;
  animation: rotate 5s linear infinite;
}
@keyframes rotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
.number {
  background-color: rgba(0, 0, 0, 0.1);
  padding: 10px 10px;
  margin-top: 10px;
  border-radius: 10px;
  font-size: 1em;
  font-family: moltors, sans-serif;
}
.name {
  padding: 10px;
  letter-spacing: 5px;
  font-family: "pocketMonk", sans-serif;
  font-size: 1.5em;
  white-space: nowrap;
  text-overflow: clip;
}
.stats {
  display: flex;
  justify-content: space-evenly;
  margin-top: 20px;
  margin-bottom: 10px;
  padding: 0;
  font-family: "slumbersWeight", sans-serif;
  font-size: 1.5em;
  font-style: italic;
  letter-spacing: 2px;
}

.select-wrapper .regions  {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  -ms-overflow-style: none;
  scrollbar-width: none;
  scroll-behavior: smooth;
  
}

.nav.github,
a:hover {
  color: #310d15;
  transform: scale(1.2);
  transition: color 0.2s, transform 0.2s;
}

.header {
  position: sticky;
  top: 0;
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: 5em;
  width: 100%;
  margin-bottom: 20px;
  z-index: 100;
  background-color: #e0e0e0;
}

.header .logo img {
  border-radius: 50%;
  width: 50px;
  cursor: pointer;
}

.logo {
  display: inline-block;
  transition: transform 0.6s;
}

.logo:hover {
  transform: rotate(360deg); 
}

.nav .github,
a {
  color: #202020;
  font-size: 1.5em;
  width: 10%;
}

#scrollToTopBtn {
  width: 40px;
  height: 40px;
  display: none;
  position: fixed;
  bottom: 30px;
  right: 20px;
  z-index: 99999;
  border: none;
  outline: none;
  background-color: #202020;
  color: white;
  cursor: pointer;
  border-radius: 50%;
}
#scrollToDownBtn {
  width: 40px;
  height: 40px;
  display: none;
  position: fixed;
  bottom: 30px;
  left: 20px;
  z-index: 99999;
  border: none;
  outline: none;
  background-color: #202020;
  color: white;
  cursor: pointer;
  border-radius: 50%;
}

#searchbar{
  border-radius: 15px;
  color: black;
  box-shadow: rgba(60, 64, 67, 0.3) 0px 1px 2px 0px, rgba(60, 64, 67, 0.15) 0px 1px 3px 1px;
  border: 2px solid rgb(32, 32, 32);
}
::placeholder{
  font-weight: 400;
  color: #121212;
}
#searchbar:hover{
  color: rgb(28, 28, 18);

 background-color:#f1eeee;


}

#searchbar:focus::placeholder {
  opacity: 0.1;
}

.box input {
  width: 100%;
  height: 50px;
  border-radius: 10px;
  border: none;
  outline: none;
  font-size: 1.7em;
  background-color: rgba(0, 0, 0, 0.1);
  font-weight: 300;
  letter-spacing: 5px;
  font-family: "slumbersWeight", sans-serif;
  text-align: center;
}

.box input:focus {
  border: 2px solid #202020;
}

.poke__type__bg > img {
  width: 20px;
  height: 20px;
  transition: all 0.3s ease; /* Add a smooth transition effect */
}

.poke__type__bg:hover > img {
  transform: scale(1.2); /* Enlarge the type on hover */
}

.poke__type__bg {
  width: 40px;
  height: 40px;
  border-radius: 100%;
  margin: 0px 10px;
  display: flex;
  align-items: center;
  justify-content: space-around;
}

.grass {
  background: var(--grass);
  box-shadow: 0 0 20px var(--grass);
}

.bug {
  background: var(--bug);
  box-shadow: 0 0 20px var(--bug);
}

.dark {
  background: var(--dark);
  box-shadow: 0 0 20px var(--dark);
}

.dragon {
  background: var(--dragon);
  box-shadow: 0 0 20px var(--dragon);
}

.electric {
  background: var(--electric);
  box-shadow: 0 0 20px #796d26;
}

.fairy {
  background: var(--fairy);
  box-shadow: 0 0 20px var(--fairy);
}

.fighting {
  background: var(--fighting);
  box-shadow: 0 0 20px var(--fighting);
}

.flying {
  background: var(--flying);
  box-shadow: 0 0 20px var(--flying);
}

.ghost {
  background: var(--ghost);
  box-shadow: 0 0 20px var(--ghost);
}

.ground {
  background: var(--ground);
  box-shadow: 0 0 20px var(--ground);
}

.ice {
  background: var(--ice);
  box-shadow: 0 0 20px var(--ice);
}

.normal {
  background: var(--normal);
  box-shadow: 0 0 20px var(--normal);
}

.poison {
  background: var(--poison);
  box-shadow: 0 0 20px var(--poison);
}

.psychic {
  background: var(--psychic);
  box-shadow: 0 0 20px var(--psychic);
}

.rock {
  background: var(--rock);
  box-shadow: 0 0 20px var(--rock);
}

.steel {
  background: var(--steel);
  box-shadow: 0 0 20px var(--steel);
}

.water {
  background: var(--water);
  box-shadow: 0 0 20px var(--water);
}

.fire {
  background: var(--fire);
  box-shadow: 0 0 20px var(--fire);
}

.select-wrapper {
  overflow: hidden;
  max-width: 95%;
  width: max-content;
  margin: auto;
  margin-bottom: 20px;
  font-family: "slumbersWeight", sans-serif;
  font-size: 1.5em;
  font-style: italic;
  letter-spacing: 2px;
  text-align: center;
  position: relative;
}

#regionSelect{
      display: flex;
      align-items: center;
      justify-content: start;
      gap: 10px;
      overflow-x: scroll;
      -ms-overflow-style: none;
      scrollbar-width: none;
      scroll-behavior: smooth;
}

#regionSelect::-webkit-scrollbar {
  display: none;
}
#regionSelect::-moz-scrollbar {
  display: none;
}

#regionSelect span {
  background-color: rgba(46, 46, 46, 0.1);

  padding: 5px 15px;
  border-radius: 10px;

  border: 2px solid #202020;
  outline: none;
  cursor: pointer;
  box-shadow: rgba(60, 64, 67, 0.3) 0px 1px 2px 0px, rgba(60, 64, 67, 0.15) 0px 1px 3px 1px;
}

#regionSelect span:hover{
  background-color: #bbbbbb;
  outline: none;
  cursor: pointer;
  transition: border-color 0.25s ease-in-out;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
  background-color: rgba(46, 46, 46, 0.1);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb {
  background-color: #202020;
  border-radius: 10px;
}

.active {
  background-color: black !important;
  color: white !important;
}

.lds-ring {
  margin-top: 30vh;
  display: none;
  position: relative;
  width: 80px;
  height: 80px;
  margin-inline: auto;
}
.lds-ring div {
  box-sizing: border-box;
  display: block;
  position: absolute;
  width: 64px;
  height: 64px;
  margin: 8px;
  border: 8px solid #fff;
  border-radius: 50%;
  animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
  border-color: cornflowerblue transparent transparent transparent;
}
.lds-ring div:nth-child(1) {
  animation-delay: -0.45s;
}
.lds-ring div:nth-child(2) {
  animation-delay: -0.3s;
}
.lds-ring div:nth-child(3) {
  animation-delay: -0.15s;
}
@keyframes lds-ring {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.ring-active {
  display: block;
}


.features{
  display: flex;
  justify-content: space-around;
  align-items: center;
}

#dark:hover {
  cursor: pointer;
}

.darkmode-container{
  margin-right: 2.5em;
}

.darkmode-content{
  position: relative;
  left: 15%; 
  z-index: 999;
  font-size: 1.5em;
  font-family: pocketMonk;
  display: flex;
}


.darkmode-text{
  margin-right: 0.3em;
}

.github {
  min-height: 2rem;
  min-width: 2rem;
  display: flex;
  align-items: center; 
  justify-content: center; 
}

.dark-mode {
  background-color: #333; 
  color: #fff;
}
.dark-mode .header {
  background-color: #222; 
  color: #fff; 
}
.dark-mode .darkmode-button-icon {
  color: #fff;
}

.dark-mode .github-icon {
  color: #fff;
}

.dark-mode .box input {
  background-color: #787878; 
  color: #ab0101; 
}

.dark-mode #regionSelect span {
  border: 1px solid #ccc; 
}
relative
.dark-mode #regionSelect span:hover{
  color: black;
  background-color: #ead51d;
  outline: none;
  cursor: pointer;
  transition: border-color 0.25s ease-in-out;
}

/* Media query for smaller screens */
@media (max-width: 924px) {
  .header {
    height: 6em;
    padding-top: 35px;
  }
  .logo {
    position: absolute;
    left: 10px;
  }

  .features {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    padding-left: 10px;
    padding-right: 10px;
    padding-top: 10px;
    top: 0;
    width: 100%;
    height: 25px;
  }

  .darkmode-content {
    left: 0;
  }
}