/* Base styles */
body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: rgb(245, 245, 245);
  margin: 0;
  padding: 20px;
  color: rgb(51, 51, 51);
  user-select: none;
}

h1 {
  text-align: center;
  color: rgb(255, 28, 28);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
  margin-bottom: 30px;
}

/* Sign In Button */
#signin-button {
  position: fixed;
  top: 10px;
  right: 10px;
  z-index: 1000;
}

#signin-button button {
  background: linear-gradient(135deg, rgb(66, 133, 244), rgb(52, 168, 83));
  color: rgb(255, 255, 255);
  border: none;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
}

#signin-button button:hover {
  background: linear-gradient(135deg, rgb(80, 150, 244), rgb(70, 180, 100));
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

#signin-button button:active {
  transform: scale(0.97);
}

/* Mobile adjustments */
@media (max-width: 768px) {
  #signin-button {
    position: static;
    text-align: center;
    margin-bottom: 20px;
  }

  #signin-button button {
    padding: 10px 16px;
    font-size: 14px;
  }
}

/* Loading */
#loading-pokedex-list {
  text-align: center;
  font-size: 18px;
  color: rgb(51, 51, 51);
  margin: 20px 0;
}

/* Container for the Pokémon */
#pokedex-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  margin: 0 auto;
}

/* Individual Pokémon Card */
.pokemon-div {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: rgb(255, 255, 255);
  border-radius: 7px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  padding: 10px 15px;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
  cursor: pointer;
  position: relative;
}

.pokemon-div:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.pokemon-div > .pokemon-img {
  width: 90px;
  height: 90px;
  margin-top: 5px;
  margin-bottom: 0px;
  filter: drop-shadow(0px 0px 5px rgba(255, 255, 255, 0.5))
    drop-shadow(1px 1px 0px rgb(0, 0, 0));
}

.pokemon-div > .corner-img {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 15px;
  height: 15px;
  border-radius: 5%;
  filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.5))
    drop-shadow(0 0 2px rgba(255, 255, 255, 0.9));
  filter: drop-shadow(1px 1px 0 rgba(0, 0, 0, 0.7));
}

.pokemon-div > .corner-text {
  position: absolute;
  top: 4px;
  left: 4px;
  font-size: 12px;
  font-weight: bold;
  background: rgba(
    0,
    0,
    0,
    0.6
  ); /* Optional: dark background for readability */
  color: rgb(255, 255, 255);
  padding: 2px 5px;
  border-radius: 4px;
}

.pokemon-div > .pokemon-text {
  font-weight: bold;
  font-size: 1rem;
  text-align: center;
  color: rgb(68, 68, 68);
  height: 42px;
  text-wrap-style: balance;
  display: flex;
  align-items: center;
}

/* Controls */
.controls {
  display: flex;
  justify-content: center;
  margin-bottom: 25px;
}

/* Filter Button */
.controls #filter-btn {
  background: linear-gradient(135deg, rgb(255, 59, 59), rgb(255, 28, 28));
  color: rgb(255, 255, 255);
  border: none;
  padding: 12px 28px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
}

.controls #filter-btn:hover {
  background: linear-gradient(135deg, rgb(255, 90, 90), rgb(255, 45, 45));
  transform: scale(1.05);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

.controls #filter-btn:active {
  transform: scale(0.97);
}

/* Filter Modal */
#filter-modal {
  display: none;
  align-items: center;
  justify-content: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1000;
}

/* Filter Modal Content */
#filter-modal-content {
  background: rgba(245, 245, 245, 0.8);
  padding: 25px 30px;
  border-radius: 14px;
  width: 320px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.25);
  position: relative;
}

#filter-modal-content h2 {
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 22px;
}

#filter-modal-close-btn {
  position: absolute;
  top: 12px;
  right: 15px;
  font-size: 24px;
  cursor: pointer;
  color: rgb(68, 68, 68);
  transition:
    transform 0.2s,
    color 0.2s;
}

#filter-modal-close-btn:hover {
  color: rgb(255, 59, 59);
  transform: scale(1.2);
}

#filter-modal-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#filter-modal-options label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  cursor: pointer;
}

.filter-modal-option {
  width: 18px;
  height: 18px;
  accent-color: rgb(255, 59, 59);
  cursor: pointer;
}

/* Pokemon Modal */
#pokemon-modal {
  display: none;
  align-items: center;
  justify-content: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  z-index: 1000;
}

/* Pokemon Modal Content */
#pokemon-modal-content {
  background: rgba(245, 245, 245, 0.8);
  padding: 25px 30px;
  border-radius: 14px;
  width: 320px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.25);
  position: relative;

  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

#pokemon-modal-content h2 {
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 22px;
}

#pokemon-modal-content > .pokemon-types-div {
  font-size: 14px;
  color: rgb(102, 102, 102);
  text-transform: uppercase;
  margin-top: -15px;
  margin-bottom: 15px;
  font-weight: 600;
  letter-spacing: 1px;

  display: flex;
  justify-content: space-around;

  width: 200px;
}

#pokemon-modal-content > .pokemon-types-div > .type-badge {
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: bold;
  color: rgb(255, 255, 255);
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.3);
  text-transform: uppercase;
  min-width: 70px;
  text-align: center;
  background-color: rgb(119, 119, 119);
}

#pokemon-modal-content > .pokemon-img {
  width: 60%;
  height: auto;
  max-width: 200px;
  margin: 10px auto;
  filter: drop-shadow(0px 0px 5px rgba(255, 255, 255, 0.5))
    drop-shadow(1px 1px 0px rgb(0, 0, 0));
}

#pokemon-modal-close-btn {
  position: absolute;
  top: 12px;
  right: 15px;
  font-size: 24px;
  cursor: pointer;
  color: rgb(68, 68, 68);
  transition:
    transform 0.2s,
    color 0.2s;
}

#pokemon-modal-close-btn:hover {
  color: rgb(255, 59, 59);
  transform: scale(1.2);
}

/* Responsive tweaks */
@media (max-width: 500px) {
  .pokemon-row img {
    width: 60px;
    height: 60px;
  }

  .pokemon-row span {
    font-size: 0.9rem;
  }
}
