:root {
    --main-color: #292929;
  
    --grayscale-dark: #212121;
    --grayscale-medium: #666666;
    --grayscale-light: #e0e0e0;
    --grayscale-background: #efefef;
    --grayscale-white: #ffffff;
  
    --drop-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.2);
    --drop-shadow-hover: 0px 3px 12px 3px rgba(0, 0, 0, 0.2);
    --drop-shadow-inner: 0px 1px 3px 1px rgba(0, 0, 0, 0.25) inset;
  }
  
  h2,
  h3,
  h4,
  .body1-fonts,
  .body2-fonts,
  .body3-fonts {
    line-height: 16px;
  }
  
  h1 {
    font-size: 24px;
    line-height: 32px;
  }
  
  h2 {
    font-size: 14px;
  }
  
  h3 {
    font-size: 12px;
  }
  
  h4 {
    font-size: 10px;
  }
  
  .body1-fonts {
    font-size: 14px;
  }
  
  .body2-fonts {
    font-size: 12px;
  }
  
  .body3-fonts {
    font-size: 10px;
  }
  
  .caption-fonts {
    font-size: 8px;
    line-height: 12px;
  }
  
  input:focus-visible {
    outline: 0;
  }
  
  .featured-img a.arrow.hidden {
    display: none;
  }
  
  .header-home h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 3rem;
  }


  body {
    margin: 0;
    height: 100vh;
    width: 100vw;
    box-sizing: border-box;
    font-family: "Poppins", sans-serif;
  }
  .content-wrapper{
    display: flex;
    width: 90vw;
    height: 85vh;
    gap: 1rem;
    justify-content: space-between;
}
  .main {
    margin: 0;
    padding: 0;
    background-color: var(--main-color);
    height: 100vh;
    width: 100vw;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }
  
  .header-home {
    width: 100%;
    background-color: var(--main-color);
    padding: 1rem 2rem;
    box-sizing: border-box;
    height: 20vh;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .header-home .container {
    display: flex;
    justify-content: space-between; /* logo left, search bar right */
    align-items: center;
    width: 100%;
    max-width: 1200px;
  }
  .container {
    width: 100%;
    margin: 0;
  }
  
  .logo-wrapper {
    display: flex;
    align-items: center;
    flex-shrink: 0;
  }
  
  .logo-wrapper > h1 {
    color: var(--grayscale-white);
  }
  
  .logo-wrapper > img {
    margin-right: 16px;
  }
  
  .search-wrapper {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 1;
    gap: 1rem;
  }

   .search-wrap {
    display: flex;
    align-items: center;
    width: 18vw;
    gap: 12px;
    position: relative;
    background-color: var(--grayscale-white);
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.25);
    height: 40px;
    border-radius: 999px;
    padding: 0 12px;
    transition: all 0.3s ease-in-out;
  }

  .search-wrap:hover,
.search-wrap:focus-within {
  background-color: #ffffff;
  box-shadow: 0 0 12px 3px rgba(205, 215, 8, 0.8);
}

  search-icon {
    margin-left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .search-icon svg {
    width: 24px;
    height: 24px;
    transition: transform 0.1s;
  }
  
  .search-icon svg:hover {
    transform: scale(1.1);
  }
  
  .search-wrap > input {
    width: 100%;
    border: none;
    background: transparent;
    outline: none;
    font-size: 14px;
    color: var(--main-color);
    font-weight: bold;
  }
  
  .search-wrap > input::placeholder {
    color: var(--grayscale-medium);
    opacity: 0.7;
  }
  
  .sort-wrapper {
    position: relative;
  }
  
  .sort-wrap {
    background-color: var(--grayscale-white);
    border-radius: 100%;
    min-width: 2rem;
    min-height: 2rem;
    box-shadow: var(--drop-shadow-inner);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
  }
  
  .search-close-icon {
    position: absolute;
    right: 1rem;
    display: none;
    cursor: pointer;
    color: var(--main-color);
  transition: transform 0.2s;
  }
  
  .search-close-icon-visible {
    display: block;
  }
  
  .filter-wrapper {
    position: absolute;
    background: var(--main-color);
    border: 4px solid var(--main-color);
    border-top: 0;
    border-radius: 12px;
    padding: 0px 4px 4px 4px;
    right: 0px;
    box-shadow: var(--drop-shadow-hover);
    min-width: 113px;
    top: 40px;
    display: none;
    z-index: 5000;
  }
  
  .filter-wrapper-open {
    display: block;
  }
  
  .filter-wrapper-overlay .main::before {
    background-color: rgba(0, 0, 0, 0.4);
    width: 100%;
    height: 100%;
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 2;
  }
  
  .filter-wrapper > .body2-fonts {
    color: var(--grayscale-white);
    font-weight: 700;
    padding: 16px 20px;
  }
  
  .filter-wrap {
    background-color: var(--grayscale-white);
    box-shadow: var(--drop-shadow-inner);
    padding: 16px 20px;
    border-radius: 8px;
  }
  
  .filter-wrap > div {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
  }
  
  .filter-wrap > div:last-child {
    margin-bottom: 0px;
  }
  
  .filter-wrap input {
    accent-color: var(--main-color);
  }
  
  .pokemon-list {
    background-color: #727272;
    box-shadow: var(--drop-shadow-inner);
    border-radius: 0.75rem;
    min-height: calc(85.5% - 1rem);
    width: 70vw;
    /* max-height: 100px; */
    overflow-y: auto;
    padding: 1rem 0;
  }
  
  .list-wrapper {
    margin: 1rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
  }
  
  .list-item {
    border-radius: 8px;
    box-shadow: var(--drop-shadow);
    background-color: var(--grayscale-white);
    width: 8.85rem;
    height: 8.85rem;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
  }
  
  .list-item .number-wrap {
    min-height: 16px;
    text-align: right;
    padding: 0 8px;
    color: var(--grayscale-medium);
  }
  
  .list-item .name-wrap {
    border-radius: 7px;
    background-color: var(--grayscale-background);
    padding: 24px 8px 4px 8px;
    color: var(--grayscale-dark);
    margin-top: -18px;
  }
  
  .list-item .img-wrap {
    width: 72px;
    height: 72px;
    margin: auto;
  }
  
  .list-item .img-wrap img {
    width: 100%;
    height: 100%;
  }
  
  .list-item .name-wrap p {
    text-transform: capitalize;
  }
  
  .type-buttons {
    width: fit-content;
    height: fit-content;
    max-width: 250px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); /* Auto-fill with min width of 80px */
    grid-auto-rows: 40px;
    gap: 0.5rem;
    background-color: var(--main-color);
    padding: 1rem;
    border-radius: 0.75rem;
  }
  
  /* Center the "Show All" button */
  #all {
    grid-column: 1 / -1; 
    justify-self: center; 
  }
  
  


.type-buttons button {
  border: none;
  padding: 10px 16px;
  font-family: 'Orbitron', sans-serif;
  font-weight: lighter;
  font-size: 14px;
  color: #fff6f6;;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.type-buttons button:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.type-buttons button:active {
  transform: scale(0.96);
  box-shadow: 0 2px 2px rgba(0, 0, 0, 0.2) inset;
}


/* Right side: Pokemon List */
.pokemon-list {
  width: 70%;
  background-color: #727272;
  box-shadow: var(--drop-shadow-inner);
  border-radius: 0.75rem;
  overflow-y: auto;
  padding: 1rem 0;
  min-height: calc(85.5% - 1rem);
}

div#not-found-message {
    display: none;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 20px;
    font-weight: 600;
  }

/* ==================== DETAIL PAGE - NEW MODERN DESIGN ==================== */

.detail-main {
  background-color: var(--main-color);
  min-height: 100vh;
  max-height: 100vh;
  padding: 1rem;
  box-sizing: border-box;
  overflow: hidden;
}

.header-detail {
  background-color: var(--grayscale-dark);
  border-radius: 1rem;
  padding: 1rem 1.5rem;
  margin-bottom: 1rem;
  box-shadow: var(--drop-shadow-hover);
}

.header-detail-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
}

.header-detail-left {
  flex: 1;
}

.back-btn-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 2rem;
  text-decoration: none;
  transition: all 0.3s ease;
}

.back-btn-wrap:hover {
  background-color: rgba(255, 255, 255, 0.2);
  transform: translateX(-4px);
}

.back-btn {
  width: 24px;
  height: 24px;
  filter: brightness(0) invert(1);
}

.back-text {
  color: var(--grayscale-white);
  font-family: 'Orbitron', sans-serif;
  font-size: 14px;
  font-weight: 500;
}

.header-detail-center {
  flex: 2;
  text-align: center;
}

.pokemon-name {
  color: var(--grayscale-white);
  font-family: 'Orbitron', sans-serif;
  font-size: 2.5rem;
  margin: 0 0 0.5rem 0;
  text-transform: capitalize;
  letter-spacing: 2px;
}

.pokemon-id {
  color: var(--grayscale-light);
  font-weight: 700;
  font-size: 1.2rem;
}

.header-detail-right {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
}

.nav-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transition: all 0.3s ease;
}

.nav-arrow:hover {
  background-color: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.nav-arrow.hidden {
  opacity: 0;
  pointer-events: none;
}

.nav-arrow img {
  width: 20px;
  height: 20px;
  filter: brightness(0) invert(1);
}

/* Detail Content */
.detail-content-wrapper {
  display: flex;
  gap: 1rem;
  max-width: 1400px;
  margin: 0 auto;
  height: calc(100vh - 140px);
  overflow: hidden;
}

/* Left side: Image section */
.detail-image-section {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.pokemon-image-container {
  background-color: var(--grayscale-dark);
  border-radius: 1rem;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--drop-shadow-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.image-background {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
  border-radius: 50%;
}

.pokemon-image {
  width: 100%;
  max-width: 250px;
  height: auto;
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.3));
  animation: floatImage 3s ease-in-out infinite;
}

@keyframes floatImage {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}

.type-badges-wrapper {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1rem;
  padding: 0;
}

.type-badge {
  padding: 0.5rem 1.5rem;
  border-radius: 2rem;
  font-family: 'Orbitron', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--grayscale-white);
  text-transform: capitalize;
  box-shadow: var(--drop-shadow);
  transition: all 0.3s ease;
}

.type-badge:hover {
  transform: translateY(-2px);
  box-shadow: var(--drop-shadow-hover);
}

/* Type colors */
.type-badge.normal { background-color: #e2e204; }
.type-badge.fire { background-color: #c93116; }
.type-badge.water { background-color: #0875e3; }
.type-badge.fairy { background-color: #c888c1; }
.type-badge.grass { background-color: #63b244; }
.type-badge.electric { background-color: #fbc932; }
.type-badge.dragon { background-color: #4a0870; }
.type-badge.poison { background-color: #a40b86; }
.type-badge.ground { background-color: #7c692e; }
.type-badge.flying { background-color: #697df0; }
.type-badge.rock { background-color: #634d07; }
.type-badge.psychic { background-color: #ef3e85; }
.type-badge.bug { background-color: #8e970b; }
.type-badge.ice { background-color: #0ea3ed; }
.type-badge.ghost { background-color: #4b4ba3; }
.type-badge.dark { background-color: #6e4e3f; }
.type-badge.steel { background-color: #929292; }
.type-badge.fighting { background-color: #aa4431; }

/* Right side: Info section */
.detail-info-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow: hidden;
  max-height: 100%;
}

.info-card {
  background-color: #727272;
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: var(--drop-shadow-inner);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.section-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.3rem;
  color: var(--grayscale-white);
  margin: 0 0 1.5rem 0;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-align: center;
}

/* About section stats */
.pokemon-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 0.8rem;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  transition: all 0.3s ease;
}

.stat-item:hover {
  background-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.stat-icon {
  width: 24px;
  height: 24px;
  filter: brightness(0) invert(1);
}

.stat-icon.straighten {
  transform: rotate(90deg);
}

.stat-value {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--grayscale-white);
  margin: 0;
}

.stat-label {
  color: var(--grayscale-light);
  text-transform: uppercase;
  font-weight: 600;
  margin: 0;
}

.moves-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  align-items: center;
}

.moves-list p {
  font-size: 0.85rem;
  color: var(--grayscale-white);
  margin: 0;
  text-transform: capitalize;
}

.pokemon-description {
  color: var(--grayscale-white);
  text-align: center;
  line-height: 1.5;
  padding: 0.8rem;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 0.5rem;
  margin: 0;
  font-size: 0.9rem;
}

/* Responsive design */
@media (max-width: 1024px) {
  .detail-content-wrapper {
    flex-direction: column;
  }
  
  .pokemon-name {
    font-size: 2rem;
  }
  
  .pokemon-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .detail-main {
    padding: 1rem;
  }
  
  .header-detail {
    padding: 1rem;
  }
  
  .header-detail-wrapper {
    flex-direction: column;
    gap: 1rem;
  }
  
  .header-detail-left,
  .header-detail-center,
  .header-detail-right {
    flex: none;
    width: 100%;
  }
  
  .header-detail-center {
    order: -1;
  }
  
  .header-detail-right {
    justify-content: center;
  }
  
  .pokemon-name {
    font-size: 1.3rem;
  }
  
  .pokemon-stats-grid {
    grid-template-columns: 1fr;
  }
  
  .info-card {
    padding: 1.5rem;
  }
}