:root {
  --shadow-color: 220deg 17% 52%;
  --shadow-elevation-low: 0.6px 0.7px 1px hsl(var(--shadow-color) / 0.27),
    0.9px 1.2px 1.7px -1.2px hsl(var(--shadow-color) / 0.27),
    2px 2.7px 3.8px -2.5px hsl(var(--shadow-color) / 0.27);
  --shadow-elevation-medium: 0.3px 0.5px 0.6px hsl(var(--shadow-color) / 0.47),
    0.7px 1.4px 1.6px -1.1px hsl(var(--shadow-color) / 0.42),
    1.9px 3.9px 4.4px -2.2px hsl(var(--shadow-color) / 0.36),
    5px 10px 11.3px -3.2px hsl(var(--shadow-color) / 0.31);
  --shadow-elevation-high: 0.3px 0.5px 0.7px hsl(var(--shadow-color) / 0.25),
    1.2px 2.3px 2.9px -0.4px hsl(var(--shadow-color) / 0.25),
    2.1px 4.2px 5.3px -0.7px hsl(var(--shadow-color) / 0.25),
    3.4px 6.8px 8.6px -1.1px hsl(var(--shadow-color) / 0.25),
    5.4px 10.8px 13.6px -1.4px hsl(var(--shadow-color) / 0.25),
    8.4px 16.8px 21.1px -1.8px hsl(var(--shadow-color) / 0.25),
    12.7px 25.5px 32px -2.1px hsl(var(--shadow-color) / 0.25),
    18.8px 37.5px 47.2px -2.5px hsl(var(--shadow-color) / 0.25);

  --top-down-shadow: 0px 0.2px 0.2px hsl(var(--shadow-color) / 0.18),
    0px 0.6px 1.6px -0.7px hsl(var(--shadow-color) / 0.21),
    0px 1.3px 4.4px -1.3px hsl(var(--shadow-color) / 0.23),
    0px 2.9px 11.3px -2px hsl(var(--shadow-color) / 0.25);

  --site-bg-gradient: linear-gradient(#f5f7fb, #c7d1e4);

  --text-white: #f5f7fb;
  --text-greyblue-45: rgba(66, 90, 116, 0.45);
  --text-greyblue-65: rgba(66, 90, 116, 0.65);
  --text-greyblue-85: rgba(66, 90, 116, 0.85);
  --text-greyblue-95: rgba(66, 90, 116, 0.95);

  --btn: linear-gradient(155deg, #95b2e8, #667eab);
  --btn-hover: linear-gradient(155deg, #6193ee, #265abc);
  --btn-active: linear-gradient(155deg, #265abc, #265abc);

  --moves: linear-gradient(155deg, #70758118, #70758114);

  --evo-arrow: linear-gradient(180deg, #70758114, #292a2c00);

  --fire: linear-gradient(155deg, #fe8c90, #c43237);
  --bug: linear-gradient(155deg, #5cdab6, #209272);
  --electric: linear-gradient(155deg, #f3c246, #b48307);
  --water: linear-gradient(155deg, #a2cfff, #5298e2);
  --ground: linear-gradient(155deg, #cbc5bf, #817970);
  --rock: linear-gradient(155deg, #afb7bc, #6d6f70);
  --steel: linear-gradient(155deg, #c7d0d7, #8c959d);
  --fairy: linear-gradient(155deg, #edbde4, #dd87cb);
  --poison: linear-gradient(155deg, #b18bc0, #843b9e);
  --grass: linear-gradient(155deg, #aac3ab, #449547);
  --dragon: linear-gradient(155deg, #dcc0a2, #ffa44f);
  --psychic: linear-gradient(155deg, #f497e0, #d455b8);
  --flying: linear-gradient(155deg, #abdfff, #47b3f7);
  --fighting: linear-gradient(155deg, #e8a68a, #e34e0f);
  --ghost: linear-gradient(155deg, #777a98, #213143);
  --ice: linear-gradient(155deg, #c4d6eb, #9db8d7);
  --dark: linear-gradient(155deg, #7b7ba3, #2b1e50);
  --normal: linear-gradient(155deg, #c1ad94, #736655);
}

* {
  box-sizing: border-box;
  min-width: 0px;
}

html {
  scroll-behavior: smooth;
}

a {
  text-decoration: none;
  cursor: pointer;
}

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

.hidden {
  visibility: hidden;
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 100vh;
  margin: 0;
  background: var(--site-bg-gradient);
  background-size: 100%;
  background-repeat: no-repeat;
  font-family: 'Lato', sans-serif;
  padding-top: 14rem;
}

body::-webkit-scrollbar {
  width: 0em;
}

body::-webkit-scrollbar-thumb {
  background-color: transparent;
}

header {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 12rem;
  z-index: 88;
  background: var(--ice);
  box-shadow: var(--top-down-shadow);
}

h1 {
  letter-spacing: 0.035rem;
  color: #425a74;
  font-family: 'Pokemon Hollow', sans-serif;
  font-size: 3.5rem;
  text-shadow: 0 1px 8px #c7d1e4;
  margin-bottom: 0.5rem;
  cursor: default;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.225);
}

.search-bar {
  display: flex;
  justify-content: center;
  gap: 1rem;
  width: 100%;
}

.search-bar::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-image: url(img/pokeball-fade.png);
  background-size: clamp(12rem, 13.636vw + 7.636rem, 24rem);
  background-repeat: no-repeat;
  background-position: top 1rem right 40.5%;
  z-index: -1;
}

.search-btn {
  background: var(--btn);
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 2rem;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  padding-left: 6px;
  gap: 0.5rem;
  box-shadow: var(--shadow-elevation-medium);
  outline: solid transparent 0.5px;

  transition: all 0.25s ease-in-out;
}

.search-btn:hover {
  outline: solid var(--text-white) 0.5px;
  width: 13.5rem;
  justify-content: flex-start;
  padding: 0 0.5rem;
}

.search-btn:hover input {
  display: block;
  width: 10.5rem;
}

.search-btn svg {
  width: 1.35rem;
  width: 1.35rem;
  filter: drop-shadow(0 2px 2px #00000026);
}

.search-btn input {
  display: none;
  height: 1.5rem;
  width: 19rem;
  font-weight: 400;
  font-size: 1rem;
  color: var(--text-greyblue-95);
  padding: 0.75rem;
  border: none;
  background: var(--text-white);
  border-radius: 1rem;
  border: #b8cac7 solid 0.1px;
}

::placeholder {
  font-size: 0.75rem;
}

.search-btn input:active .search-btn {
  outline: solid var(--text-white) 0.5px;
  justify-content: flex-start;
}

#love-button {
  background: var(--btn);
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: var(--shadow-elevation-medium);
  cursor: pointer;
}

#love-button:hover {
  outline: solid var(--text-white) 0.5px;
}

@keyframes outlinePulse {
  0% {
    outline: solid transparent 0px;
    /* outline-offset: 0px; */
  }
  25% {
    outline: solid var(--text-white) 3px;
    /* outline-offset: 2px; */
  }
  50% {
    outline: solid var(--text-white) 3px;
    /* outline-offset: 2px; */
  }
  75% {
    outline: solid var(--text-white) 3px;
    /* outline-offset: 2px; */
  }
  100% {
    outline: solid transparent 0px;
    /* outline-offset: 0px; */
  }
}

.outlined {
  animation: outlinePulse infinite 1.25s ease-in-out;
}

#love-button svg {
  width: 1.35rem;
  width: 1.35rem;
  filter: drop-shadow(0 2px 2px #00000026);
}

.no-likes,
.no-matches {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding-top: 2rem;
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--text-greyblue-85);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.125);
}

h3 {
  margin-top: 0;
}

.poke-container {
  display: flex;
  flex-wrap: wrap;
  align-items: space-between;
  justify-content: center;
  margin: 0 auto;
  padding-bottom: 4rem;
  max-width: 1200px;
}

.pokemon-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 240px;
  height: 180px;
  border-radius: 1rem;
  margin: 0.5rem;
  padding: 1.25rem 0rem 1.25rem 1.25rem;
  text-align: center;
  color: var(--text-white);
  box-shadow: var(--shadow-elevation-medium);
  overflow: hidden;
  cursor: pointer;
  transition: all ease-in-out 0.25s;
}

.pokemon-tile:hover {
  box-shadow: var(--shadow-elevation-high);
  z-index: 2;
}

.pokemon-tile::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-image: url(img/pokeball-op-15.png);
  background-size: 60%;
  background-repeat: no-repeat;
  background-position: top 3.5rem right -1rem;
  z-index: 0;
}

.top-right-tile {
  position: relative;
  display: flex;
  width: 100%;
  justify-content: flex-end;
  align-items: end;
}

.heart-wrapper-tile svg {
  width: 1.25rem;
  height: 1.25rem;
  vertical-align: middle;
  filter: drop-shadow(0 2px 2px #00000026);
  z-index: 111;
  cursor: pointer;
}

.pokemon-tile .img-container {
  display: flex;
  justify-content: end;
  align-items: end;
}

.pokemon-content {
  display: flex;
  justify-content: space-between;
  height: 100%;
  width: 100%;
  flex-grow: 50%;
  z-index: 10;
}

.pokemon-tile .number {
  width: fit-content;
  padding-right: 0.75rem;
  padding-left: 1.5rem;
  text-align: right;
  font-weight: 900;
  color: rgba(0, 0, 0, 0.15);
}

.pokemon-tile .name {
  font-size: 1.125rem;
  font-weight: 900;
  letter-spacing: 1px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.125);
}

.pokemon-tile button {
  width: fit-content;
  background-color: rgba(255, 255, 255, 0.25);
  margin-bottom: 0.35rem;
  padding: 0.4rem 0.8rem;
  border-radius: 16px;
  border: none;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-white);
  text-align: center;
  vertical-align: middle;
}

.pokemon-tile .img-container img {
  max-width: 100%;
  margin-top: 0.75rem;
  transition: all ease-in-out 0.125s;
}

.background-symbol {
  z-index: 0;
  right: 50px;
}

.background-symbol img {
  opacity: 0.15;
  aspect-ratio: 1 / 1;
  width: 160px;
}

.info {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  align-items: start;
}

.img-container {
  width: 57.5%;
}

.load-btn {
  background: var(--btn);
  margin-bottom: 0.35rem;
  height: 2.25rem;
  padding: 0.4rem 1.6rem;
  border-radius: 2rem;
  border: none;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-white);
  text-align: center;
  vertical-align: middle;
  box-shadow: var(--shadow-elevation-medium);
  margin: 2rem 0;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.125);
  cursor: pointer;
  outline: solid transparent 0.5px;

  transition: all 0.15s ease-in-out;
}

.load-btn:hover {
  outline: solid var(--text-white) 0.5px;
}

.load-btn:active {
  outline: solid var(--text-white) 3px;
  color: white;
}

@keyframes spinnerFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 0.65;
  }
}

@keyframes spinnerFadeOut {
  from {
    opacity: 0.65;
  }
  to {
    opacity: 0;
  }
}

#spinner {
  position: fixed;
  top: 57.5%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 111;
  opacity: 0.75;
}

#spinner svg {
  width: clamp(15rem, 8.929vw + 12.143rem, 25rem);
  height: clamp(15rem, 8.929vw + 12.143rem, 25rem);
  filter: drop-shadow(0 4px 4px #00000035);
}

.spinning {
  animation: spinnerFadeIn 0.15s ease;
}

.no-spinning {
  animation: spinnerFadeOut 0.15s ease;
}

.to-top {
  background: var(--btn);
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 2rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  box-shadow: var(--shadow-elevation-medium);
  outline: solid transparent 0.5px;
  transition: all 0.15s ease-in-out;
  cursor: pointer;
}

.to-top:hover {
  outline: solid var(--text-white) 0.5px;
}

.to-top:active {
  outline: solid var(--text-white) 3px;
  color: white;
}

.to-top svg {
  width: 2rem;
  height: 2rem;
  filter: drop-shadow(1px 2px 4px rgba(1, 11, 29, 0.35));
  transition: all 0.125s ease-in-out;
}

.to-top svg:active {
  filter: drop-shadow(1px 2px 4px rgba(1, 11, 29, 0.35));
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

.fade-in {
  animation: fadeIn 0.25s ease;
}

.fade-out {
  animation: fadeOut 0.25s ease;
}

.overlay {
  background-color: transparent;
  backdrop-filter: blur(10px) saturate(0.65) contrast(0.65);
  z-index: 99;
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
}

@media (width <= 425px) {
  .pokemon-card {
    width: 100%;
    height: 100%;
  }
}
