header {
  width: 100%;
  text-align: center;
  padding-bottom: 50px;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
}

.search-container {
  flex: 1;
}

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

.headerlogo img {
  height: 80px;
}

.spacer {
  flex: 1; 
}

.search-box {
  position: relative;
  width: 300px;
  height: 100px;
}

.search-icon {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 80px;
  height: 80px;
  background: crimson;
  border-radius: 50%;
  border: none;
  outline: none;
  transition: 0.5s;
  z-index: 2;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-icon i,
.search-reset i {
  pointer-events: none;
  font-size: 1.2rem;
  color: white;
}

.search-reset {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  cursor: pointer;
  z-index: 4;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s ease;
}

.search-box:focus-within .search-reset,
.search-box .search-input:not(:placeholder-shown) ~ .search-reset {
  opacity: 1;
  pointer-events: all;
}

.search-icon::before,
.search-icon::after {
  content: none;
}

.search-input {
  font-family: 'Inconsolata', monospace;
  position: absolute;
  inset: 0;
  margin: auto;
  width: 50px;
  height: 50px;
  padding: 0 80px 0 20px;
  border: none;
  outline: none;
  border-radius: 30px;
  background: crimson;
  color: white;
  text-shadow: 0 0 10px crimson;
  box-shadow:
    0 0 25px crimson,
    0 20px 25px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transition: 0.5s;
  font-weight: bold;
  letter-spacing: 0.1em;
  z-index: 3;
  cursor: pointer;
}

.search-box:focus-within .search-input {
  width: 300px;
  opacity: 1;
  cursor: text;
}

.search-box:focus-within .search-icon {
  transform: translateX(110px);
  background: #151515;
}

/* hide old pseudo art rules now icons are used */
.search-box:focus-within .search-icon::before,
.search-box:focus-within .search-icon::after {
  content: none;
}

/* PLACEHOLDER */
.search-input::placeholder {
  color: white;
  opacity: 0.6;
}

/* Modal styling pokemons */
body {
  font-family: system-ui, sans-serif;
  margin: 0;
  padding: 40px;
  background: #f8f9fa;
  line-height: 1.6;
}

.container-modal-pkm {
  max-width: 800px;
  margin: 0 auto;
}

.modal-overlay-pkm {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 1000;
}

.modal-overlay-pkm.active {
  opacity: 1;
  pointer-events: all;
}

.modal-content-pkm {
  background: white;
  max-width: 90%;
  width: 500px;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  transform: translateY(40px);
  opacity: 0;
  transition: all 0.3s ease;
  padding: 0;
  overflow: hidden;
}

.modal-overlay-pkm.active .modal-content-pkm {
  transform: translateY(0);
  opacity: 1;
}

.modal-header-pkm {
  background: #f0f4f8;
  padding: 20px;
  border-bottom: 1px solid #ddd;
  font-weight: bold;
  font-size: 1.3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-close-pkm {
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: #666;
}

.modal-close-pkm:hover {
  color: #000;
}

.modal-body-pkm {
  padding: 24px;
}

.modal-footer-pkm {
  padding: 16px 24px;
  border-top: 1px solid #ddd;
  text-align: right;
}

button.more-info-pkm {
  background: #0066cc;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}

button.more-info-pkm:hover {
  background: #0052a3;
}

.indexpokemon {
  height: 125px;
  width: 125px;
  border-radius: 50%;
  margin-bottom: 20px;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #cc2d2d 50%, white 50%);
  border: 3px solid #000;
  box-shadow: 
    0 4px 8px 0 rgba(0, 0, 0, 0.4), 
    0 6px 20px 0 rgba(0, 0, 0, 0.3),
    inset -2px -2px 5px rgba(0, 0, 0, 0.2),
    inset 2px 2px 5px rgba(255, 255, 255, 0.3);
  position: relative;
}

.indexpokemon::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  background: white;
  border: 2px solid #000;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.2);
}

.indexpokemon img {
  max-height: 140px;
  max-width: 140px;
  object-fit: contain;
}

.pokemon-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  /* 5 per rij */
  gap: 20px;
}

.pokemon-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 15px;
  background: linear-gradient(135deg, #ffffff 0%, #f5f5f5 100%);
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.pokemon-card:hover {
  transform: translateY(-8px) scale(1.05);
  box-shadow: 
    0 12px 24px rgba(0, 0, 0, 0.2),
    0 0 20px rgba(204, 45, 45, 0.2);
}

.pokemon-card h4 {
  margin: 8px 0 4px 0;
  font-size: 0.85rem;
  color: #cc2d2d;
  font-weight: 600;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.pokemon-card h3 {
  margin: 0;
  font-size: 1.1rem;
  color: #333;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  text-align: center;
  max-width: 120px;
  word-wrap: break-word;
}

/* SWITCH TOGGLE */
.filter-switch {
  display: flex;
  width: 260px;
  margin: 20px auto 10px;
  background: #f1f1f1;
  border-radius: 999px;
  padding: 4px;
  position: relative;
  justify-content: center;
}

.filter-switch a {
  flex: 1;
  text-align: center;
  text-decoration: none;
  padding: 8px 0;
  border-radius: 999px;
  font-weight: 600;
  color: #555;
  z-index: 2;
  transition: 0.3s;
  justify-content: center;
}

/* active button */
.filter-switch a.active {
  color: white;
}

/* sliding background */
.filter-switch::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc(50% - 4px);
  height: calc(100% - 8px);
  background: crimson;
  border-radius: 999px;
  transition: 0.3s;
  justify-content: center;
}


.filter-switch.all-active::before {
  transform: translateX(100%);
}

.btn-login {
  background: crimson;
  border-radius: 10px;
  border: none;
  width: 10vh;
  height: 5vh;
}
.btn-login a {
 color: white;
 text-decoration: none;
 font-weight: 600;
}

.type-filters select{
   background: crimson;
  border-radius: 10px;
  border: none;
   color: white;
 text-decoration: none;
 font-weight: 600;
 
}