:root {
  --bg-standard: rgb(255, 255, 255);
  --shadow-color: rgba(0, 0, 0, 0.2);
  --button-text: rgba(0, 0, 0, 0.7);
  --glow-color: rgba(57, 107, 186, 0.5);
  --bug-color: #92bc2c;
  --dark-color: #595761;
  --dragon-color: #0c69c8;
  --electric-color: #f2d94e;
  --fire-color: #fba54c;
  --fairy-color: #ee90e6;
  --fighting-color: #d3425f;
  --flying-color: #a1bbec;
  --ghost-color: #5f6dbc;
  --grass-color: #5fbd58;
  --ground-color: #ecb59a;
  --ice-color: #75d0c1;
  --normal-color: #a0a29f;
  --poison-color: #b763cf;
  --psychic-color: #fa8581;
  --rock-color: #c9bb8a;
  --steel-color: #5695a3;
  --water-color: #539ddf;
}

@font-face {
  font-family: "Cabin";
  src: url(./fonts/Cabin-Regular.ttf);
  font-weight: 400;
}

@font-face {
  font-family: "Cabin";
  src: url(./fonts/Cabin-Medium.ttf);
  font-weight: 500;
}

@font-face {
  font-family: "Cabin";
  src: url(./fonts/Cabin-Bold.ttf);
  font-weight: 700;
}

@font-face {
  font-family: "Courier Prime";
  src: url(./fonts/CourierPrime-Bold.ttf);
  font-weight: 700;
}

body {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Cabin", sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 150ms ease-in-out;
}

h3 {
  margin: 0;
  font-size: 20px;
  font-family: "Cabin", sans-serif;
}

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

.d-none {
  display: none;
}

.disable-scroll {
  overflow: hidden;
}

.d-flex {
  display: flex;
}

.invisible {
  opacity: 0;
}

/* header */

header {
  height: 56px;
  width: 100%;
  position: fixed;
  z-index: 20;
  display: flex;
  justify-content: center;
  box-shadow: 4px 0px 8px var(--shadow-color);
  transition: background-color 150ms ease-in-out;
}

.standard-header {
  background-color: var(--bg-standard);
}

.limiter {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex: 1;
  max-width: 1920px;
  margin-left: 24px;
  margin-right: 24px;
}

.header-left {
  display: flex;
  align-items: center;
}

.header-left img {
  height: 64px;
  object-fit: contain;
  position: relative;
  top: 16px;
  z-index: 3;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 32px;
}

.searchbar {
  display: flex;
  align-items: center;
  height: 36px;
  width: 240px;
  padding-left: 12px;
  padding-right: 12px;
  border-radius: 100px 100px 100px 100px;
  border-style: solid;
  border-color: var(--shadow-color);
  background-color: var(--bg-standard);
  transition: all 100ms ease-in-out;
}

.searchbar:focus-within {
  border-color: var(--button-text);
  box-shadow: 2px 2px 4px var(--glow-color);
  filter: saturate(200%);
}

.searchbar img {
  height: 24px;
}

.searchbar input {
  height: 100%;
  width: 100%;
  background-color: transparent;
  outline: none;
  border-style: none;
  font-size: 16px;
  font-family: "Cabin", sans-serif;
  font-weight: 400;
}

#empty-search {
  cursor: pointer;
}

header details {
  position: relative;
  display: flex;
}

header details summary {
  list-style: none;
}

details ul {
  position: absolute;
  right: 0;
  width: 120px;
  height: max-content;
  list-style: none;
  background-color: var(--bg-standard);
  border-color: var(--shadow-color);
  border-style: solid;
  border-width: 1px;
  padding: 0;
  padding-top: 12px;
  padding-bottom: 12px;
  border-radius: 20px;
  z-index: 10;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
}

.settype {
  display: flex;
  align-items: center;
  height: 36px;
  padding-left: 12px;
  padding-right: 12px;
  border-radius: 100px 100px 100px 100px;
  border-style: solid;
  border-color: var(--shadow-color);
  background-color: var(--bg-standard);
  cursor: pointer;
  transition: all 100ms ease-in-out;
}

.settype:hover {
  box-shadow: 2px 2px 4px var(--glow-color);
  filter: saturate(200%);
}

.settype:active {
  box-shadow: none;
  border-color: var(--button-text);
}

.settype-menu {
  padding-top: 6px;
  padding-bottom: 6px;
  cursor: pointer;
  width: 100%;
  text-align: center;
}

#clear-selector {
  border-top: solid 1px var(--shadow-color);
  border-bottom: solid 1px var(--shadow-color);
}

#clear-selector:hover {
  background-color: var(--shadow-color);
}

#bug-selector:hover {
  background-color: var(--bug-color);
}
#dark-selector:hover {
  background-color: var(--dark-color);
  color: white;
}
#dragon-selector:hover {
  background-color: var(--dragon-color);
  color: white;
}
#electric-selector:hover {
  background-color: var(--electric-color);
}
#fire-selector:hover {
  background-color: var(--fire-color);
}
#fairy-selector:hover {
  background-color: var(--fairy-color);
}
#fighting-selector:hover {
  background-color: var(--fighting-color);
}
#flying-selector:hover {
  background-color: var(--flying-color);
}
#ghost-selector:hover {
  background-color: var(--ghost-color);
  color: white;
}
#grass-selector:hover {
  background-color: var(--grass-color);
}
#ground-selector:hover {
  background-color: var(--ground-color);
}
#ice-selector:hover {
  background-color: var(--ice-color);
}
#normal-selector:hover {
  background-color: var(--normal-color);
}
#poison-selector:hover {
  background-color: var(--poison-color);
}
#psychic-selector:hover {
  background-color: var(--psychic-color);
}
#rock-selector:hover {
  background-color: var(--rock-color);
}
#steel-selector:hover {
  background-color: var(--steel-color);
  color: white;
}

#water-selector:hover {
  background-color: var(--water-color);
}

/* main */

.main {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  margin-top: 64px;
}

.content {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  max-width: 1920px;
  margin-left: 24px;
  margin-right: 24px;
  padding-top: 40px;
  padding-bottom: 64px;
}

.card {
  margin: 16px;
  width: 160px;
  height: 200px;
  background-color: white;
  border-radius: 16px;
  border-style: solid;
  border-width: 1px;
  border-color: var(--shadow-color);
  position: relative;
  z-index: 1;
  transition: all 250ms ease-in-out;
}

.card:hover {
  box-shadow: 4px 4px 8px var(--shadow-color);
  transform: translate(0, -4px);
  cursor: pointer;
}

.card:hover > div > img {
  transform: translate(0, -4px) scale(1.2);
}

.card-top-area {
  height: 52%;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  border-radius: 16px 16px 0 0;
}

.card-top-area img {
  height: 96px;
  object-fit: contain;
  position: relative;
  top: 12px;
  z-index: 2;
  transition: all 350ms ease-in-out;
}

.card-bottom-area {
  padding-top: 12px;
  padding-left: 8px;
  padding-right: 8px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.types {
  display: flex;
  justify-content: flex-start;
  gap: 8px;
}

.center {
  display: flex;
  justify-content: center;
}

.loader {
  width: 50px;
  aspect-ratio: 1;
  border-radius: 50%;
  padding: 6px;
  margin-bottom: 64px;
  background: conic-gradient(from 135deg at top, currentColor 90deg, #0000 0) 0
      calc(50% - 4px) / 17px 8.5px,
    radial-gradient(
        farthest-side at bottom left,
        #0000 calc(100% - 6px),
        currentColor calc(100% - 5px) 99%,
        #0000
      )
      top right/50% 50% content-box content-box,
    radial-gradient(
        farthest-side at top,
        #0000 calc(100% - 6px),
        currentColor calc(100% - 5px) 99%,
        #0000
      )
      bottom / 100% 50% content-box content-box;
  background-repeat: no-repeat;
  animation: l11 1s infinite linear;
}
@keyframes l11 {
  100% {
    transform: rotate(1turn);
  }
}

#loadbutton {
  font-size: 16px;
  font-family: "Cabin", sans-serif;
  font-weight: 400;
  width: 200px;
  height: 36px;
  margin-bottom: 44px;
  border-style: solid;
  border-color: var(--shadow-color);
  background-color: var(--bg-standard);
  border-radius: 100px 100px 100px 100px;
  font-size: 16px;
  font-weight: 700;
  color: var(--button-text);
  cursor: pointer;
  transition: all 100ms ease-in-out;
}

#loadbutton:hover {
  box-shadow: 2px 2px 4px var(--shadow-color);
  transform: translate(0, -2px);
}

#loadbutton:active {
  box-shadow: none;
  transform: translate(0, 0);
}

#loadbutton:disabled {
  opacity: 0.6;
  box-shadow: none;
  transform: translate(0, 0);
}

#loadbutton:disabled:hover {
  box-shadow: none;
  transform: translate(0, 0);
}

/* footer */

.stretcher {
  flex: 100;
}

footer {
  width: 100%;
  padding-top: 80px;
  padding-bottom: 80px;
  text-align: center;
  background-color: var(--shadow-color);
}

footer > a {
  margin-left: 8px;
  margin-right: 8px;
  text-decoration: none;
  color: rgb(20, 20, 20);
}
footer > a:hover {
  color: rgba(57, 107, 186, 1);
}

/* type svg */

.typeicon {
  border-radius: 100%;
  height: 32px;
  width: 32px;
  margin: auto;
  transition: 350ms all;
}

.card:hover .typeicon {
  filter: saturate(200%);
}

.typeicon img {
  height: 60%;
  width: 60%;
  margin: 20%;
}

.bug {
  background: #92bc2c;
  box-shadow: 0 0 20px #92bc2c;
}

.dark {
  background: #595761;
  box-shadow: 0 0 20px #595761;
}

.dragon {
  background: #0c69c8;
  box-shadow: 0 0 20px #0c69c8;
}

.electric {
  background: #f2d94e;
  box-shadow: 0 0 20px #f2d94e;
}

.fire {
  background: #fba54c;
  box-shadow: 0 0 20px #fba54c;
}

.fairy {
  background: #ee90e6;
  box-shadow: 0 0 20px #ee90e6;
}

.fighting {
  background: #d3425f;
  box-shadow: 0 0 20px #d3425f;
}

.flying {
  background: #a1bbec;
  box-shadow: 0 0 20px #a1bbec;
}

.ghost {
  background: #5f6dbc;
  box-shadow: 0 0 20px #5f6dbc;
}

.grass {
  background: #5fbd58;
  box-shadow: 0 0 20px #5fbd58;
}

.ground {
  background: #da7c4d;
  box-shadow: 0 0 20px #da7c4d;
}

.ice {
  background: #75d0c1;
  box-shadow: 0 0 20px #75d0c1;
}

.normal {
  background: #a0a29f;
  box-shadow: 0 0 20px #a0a29f;
}

.poison {
  background: #b763cf;
  box-shadow: 0 0 20px #b763cf;
}

.psychic {
  background: #fa8581;
  box-shadow: 0 0 20px #fa8581;
}

.rock {
  background: #c9bb8a;
  box-shadow: 0 0 20px #c9bb8a;
}

.steel {
  background: #5695a3;
  box-shadow: 0 0 20px #5695a3;
}

.water {
  background: #539ddf;
  box-shadow: 0 0 20px #539ddf;
}

/* detailview */

.overlay {
  position: fixed;
  z-index: 200;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(200, 200, 200, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
}

.arrow {
  width: 0;
  height: 0;
  border-top: 280px solid transparent;
  border-bottom: 280px solid transparent;
  cursor: pointer;
}

.back {
  border-right: 90px solid rgba(255, 255, 255, 0.8);
  margin-right: 40px;
}

.back:hover {
  border-right: 90px solid rgba(255, 255, 255, 0.9);
}

.next {
  border-left: 90px solid rgba(255, 255, 255, 0.8);
  margin-left: 40px;
}

.next:hover {
  border-left: 90px solid rgba(255, 255, 255, 0.9);
}

.detailview {
  width: 480px;
  height: 600px;
  background-color: white;
  border-radius: 24px 24px 24px 24px;
}

.top-details-container {
  height: 40%;
  border-radius: 24px 24px 0 0;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

.top-details-container img {
  max-width: 50%;
  max-height: 100%;
  object-fit: contain;
  position: relative;
}

.bottom-details-container {
  height: 60%;
  border-radius: 0 0 24px 24px;
  background-color: transparent;
}

.navtabs {
  width: 100%;
  height: 32px;
  background-color: lightgray;
  display: flex;
  justify-content: flex-start;
  align-items: stretch;
}

.navtabs > button {
  border: none;
  border-left: solid 1px lightgrey;
  border-radius: 8px 8px 0 0;
  font-family: "Cabin", sans-serif;
  font-size: 16px;
  font-weight: 700;
  padding-left: 16px;
  padding-right: 16px;
  cursor: pointer;
}

.active-tab {
  background-color: white;
}

.details-text {
  width: 480px;
  height: 300px;
}

.details-content {
  width: 100%;
  height: 80%;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 30px;
}

#evolutiontab {
  height: 100%;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-around;
  flex-wrap: wrap;
}

.evopic {
  height: 100px;
}

.evo-arrow {
  height: 40px;
}

.bar-table {
  width: 90%;
  border-collapse: collapse;
  position: relative;
}

.playsound {
  height: 28px;
  background-color: #f69037;
}

#b4 {
  background-color: #f69037;
  border-radius: 8px;
}

.bar-table tr {
  height: 44px;
}

.value-bar {
  height: 20px;
  background-color: #3498db;
  border-radius: 5px;
  transition: width 1s;
}

.label {
  width: max-content;
  padding-right: 10px;
  text-align: left;
}

.bar-cell {
  width: 260px;
  padding: 5px;
  position: relative;
}

.value {
  width: 50px;
  padding-left: 10px;
  text-align: right;
  font-weight: 500;
}

.value-number {
  width: 50px;
  padding-left: 10px;
  text-align: left;
  font-weight: 500;
}

.display660 {
  display: none;
}

.display485 {
  display: none;
}

@media (max-width: 750px) {
  .arrow {
    position: absolute;
    bottom: 50px;
    width: 0;
    height: 0;
    border-top: 30px solid transparent;
    border-bottom: 30px solid transparent;
    cursor: pointer;
  }

  .back {
    border-right: 30px solid rgba(158, 158, 158, 0.8);
    left: 120px;
  }

  .back:hover {
    border-right: 30px solid rgb(158, 158, 158);
  }

  .next {
    border-left: 30px solid rgba(158, 158, 158, 0.8);
    right: 120px;
  }

  .next:hover {
    border-left: 30px solid rgb(158, 158, 158);
  }
}

@media (max-width: 700px) {
  .limiter {
    margin-left: 4px;
    margin-right: 4px;
  }

  .content {
    margin-left: 4px;
    margin-right: 4px;
  }
}

@media (max-width: 660px) {
  .remove660 {
    display: none;
  }

  .display660 {
    display: block;
  }

  .card {
    margin: 4px;
  }
  .header-right {
    gap: 8px;
  }
}

@media (max-width: 520px) {
  .card {
    width: calc(50% - 10px);
    height: 200px;
  }

  .header-right {
    gap: 8px;
  }

  .searchbar {
    flex: 1;
  }
  .detailview {
    width: 100%;
    height: 600px;
    background-color: white;
  }

  .back {
    left: 80px;
  }

  .next {
    right: 80px;
  }

  .details-content {
    width: auto;
  }

  .details-text {
    width: auto;
  }

  .bar-cell {
    width: 240px;
  }
}

@media (max-width: 485px) {
  .settype {
    display: none;
  }

  .display485 {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    width: 36px;
    border-radius: 100px 100px 100px 100px;
    border-style: solid;
    border-color: var(--shadow-color);
    background-color: var(--bg-standard);
    cursor: pointer;
    transition: all 100ms ease-in-out;
  }

  .display485 img {
    height: 24px;
  }
}

@media (max-width: 405px) {
  .display660 {
    display: none;
  }

  .header-right {
    width: 100%;
    flex: 1;
    justify-content: space-between;
  }

  .searchbar {
    flex: 1;
    width: 100%;
  }
}

@media (max-width: 330px) {
  .searchbar {
    width: 100%;
  }
}

@media (max-height: 740px) {
  .overlay {
    align-items: flex-start;
  }
}

@media (max-height: 680px) {
  .arrow {
    bottom: 10px;
  }

  .back {
    border-right: 20px solid rgba(158, 158, 158, 0.8);
    left: 20px;
  }

  .back:hover {
    border-right: 20px solid rgb(158, 158, 158);
  }

  .next {
    border-left: 20px solid rgba(158, 158, 158, 0.8);
    right: 20px;
  }

  .next:hover {
    border-left: 20px solid rgb(158, 158, 158);
  }

  details ul {
    margin-block-start: 8px;
    padding-top: 4px;
    padding-bottom: 4px;
    border-radius: 8px;
  }
}
