/* style.css */
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600;700;800;900&display=swap");

*,
*::after,
*::before {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

html {
  font-size: 62.5%;
}

body {
  background-color: #f5f5f5;
}

ul,
li {
  list-style: none;
}

a {
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.main {
  /* Remove max-width here */
  min-height: 100vh;
  margin: 0 auto;
  background-color: #fff;
  position: relative;
  overflow: hidden;
}
/* Add a media query for mobile */
@media (max-width: 45rem) {
  .main {
    max-width: 45rem; /* Apply max-width only on smaller screens */
  }
}

.main::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 20rem;
  background-color: #a8a878;
  z-index: -1;
  border-bottom-left-radius: 2.5rem;
  border-bottom-right-radius: 2.5rem;
}

.header {
  padding: 2.5rem 2rem 0;
}
.header .header-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.header .header-wrapper .header-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.header .header-wrapper .header-wrap .back-btn-wrap {
  width: 2.4rem;
}
.header .header-wrapper .header-wrap .back-btn-wrap .back-btn {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
}
.header .header-wrapper .header-wrap .name-wrap .name {
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  text-transform: capitalize;
}
.header .header-wrapper .pokemon-id-wrap .body2-fonts {
  font-size: 1.6rem;
  font-weight: 500;
  color: #fff;
}

.featured-img {
  position: relative;
  margin-top: 2.5rem;
}
.featured-img .arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background-color: #313131;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
}
.featured-img .arrow img {
  width: 2rem;
  height: 2rem;
  object-fit: contain; /* Changed from cover to contain */
  display: block;      /* Added display: block to ensure proper sizing */
  margin: 1rem auto;       /* Added margin: auto to center the image */
}
.featured-img .arrow.left-arrow {
  left: 2rem;
}
.featured-img .arrow.right-arrow {
  right: 2rem;
}
.featured-img .detail-img-wrapper {
  width: 17rem;
  height: 17rem;
  border-radius: 50%;
  background-color: #f2f2f2;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.featured-img .detail-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.detail-card-detail-wrapper {
  padding: 2.5rem 2rem;
}
.detail-card-detail-wrapper .power-wrapper {
  display: flex;
  gap: 1rem;
}
.detail-card-detail-wrapper .power-wrapper .body3-fonts.type {
  font-size: 1.2rem;
  font-weight: 500;
  color: #fff;
  padding: 0.4rem 1rem;
  border-radius: 0.5rem;
  text-transform: capitalize;
}
.detail-card-detail-wrapper .power-wrapper .body3-fonts.type.grass {
  background-color: #78c850;
}
.detail-card-detail-wrapper .power-wrapper .body3-fonts.type.poison {
  background-color: #a040a0;
}
.detail-card-detail-wrapper .about-text {
  font-size: 1.8rem;
  font-weight: 600;
  color: #141414;
  margin-top: 2rem;
  margin-bottom: 1.5rem;
}
.detail-card-detail-wrapper .pokemon-detail-wrapper {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 2rem;
}
.detail-card-detail-wrapper .pokemon-detail-wrapper .pokemon-detail-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}
.detail-card-detail-wrapper
  .pokemon-detail-wrapper
  .pokemon-detail-wrap
  .pokemon-detail {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

/* style.css - Updated CSS to remove "Category" section box frame */

/* ... (rest of your CSS remains the same) ... */

/* Updated Category Section Styles - Frame Box Removed */
/* .detail-card-detail-wrapper
  .pokemon-detail-wrapper
  .pokemon-detail-wrap
  .pokemon-detail.Category img {
    width:  1px;
    height: 1px;
    object-fit: contain;
} */

/* .detail-card-detail-wrapper
  .pokemon-detail-wrapper
  .pokemon-detail-wrap
  .pokemon-detail.Category {
  align-items: center; /* Keep alignment */
  flex-direction: column; /* Keep flex direction */
  gap: 0.5rem; /* Keep gap */
  text-align: left; /* Keep text alignment */
  padding: 9px 5px; /* Keep padding - key to removing the box */
  border-radius: 0; /* Keep border-radius */
  background-color: transparent; /* Keep background color */
  border: none; /* Keep border */
}

.detail-card-detail-wrapper
  .pokemon-detail-wrapper
  .pokemon-detail-wrap
  .pokemon-detail.Category p.body3-fonts {
  font-size: 1.4rem; /* Keep font size */
  line-height: 1.3; /* Keep line height */
  word-break: break-word; /* Keep word break */
  margin-bottom: 0; /* Keep no bottom margin */
  padding: 0; /* Keep padding from category items - key to removing box effect */
  border-radius: 0; /* Keep border-radius from category items */
  background-color: transparent; /* Keep background color from category items */
  box-shadow: none; /* Keep box-shadow from category items */
} */


.detail-card-detail-wrapper
  .pokemon-detail-wrapper
  .pokemon-detail-wrap
  .caption-fonts {
  text-align: center;
}


.detail-card-detail-wrapper
  .pokemon-detail-wrapper
  .pokemon-detail-wrap
  .pokemon-detail
  img {
  width: 2rem;
  height: 2rem;
  object-fit: contain;
}
.detail-card-detail-wrapper
  .pokemon-detail-wrapper
  .pokemon-detail-wrap
  .pokemon-detail
  img.straighten {
  transform: rotate(-90deg);
}
.detail-card-detail-wrapper
  .pokemon-detail-wrapper
  .pokemon-detail-wrap
  .caption-fonts {
  font-size: 1.4rem;
  font-weight: 500;
  color: #878787;
}
.detail-card-detail-wrapper .body3-fonts.pokemon-description {
  font-size: 1.4rem;
  font-weight: 400;
  color: #878787;
  line-height: 1.6;
  margin-bottom: 2.5rem;
}
.detail-card-detail-wrapper .stats-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.detail-card-detail-wrapper .stats-wrapper .stats-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.detail-card-detail-wrapper .stats-wrapper .stats-wrap p.stats {
  font-size: 1.6rem;
  font-weight: 600;
  color: #78c850;
  width: 3rem;
}
.detail-card-detail-wrapper .stats-wrapper .stats-wrap p.body3-fonts {
  font-size: 1.4rem;
  font-weight: 500;
  color: #141414;
  width: 2.5rem;
  text-align: right;
}
.detail-card-detail-wrapper .stats-wrapper .stats-wrap .progress-bar {
  width: 100%;
  height: 0.8rem;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  border: none;
  border-radius: 0.5rem;
  background-color: rgba(120, 200, 80, 0.5);
  color: #78c850;
}
.detail-card-detail-wrapper
  .stats-wrapper
  .stats-wrap
  .progress-bar::-webkit-progress-bar {
  background-color: rgba(120, 200, 80, 0.5);
  border-radius: 0.5rem;
}
.detail-card-detail-wrapper
  .stats-wrapper
  .stats-wrap
  .progress-bar::-webkit-progress-value {
  background-color: #78c850;
  border-radius: 0.5rem;
  transition: width 0.3s ease;
}
.detail-card-detail-wrapper
  .stats-wrapper
  .stats-wrap
  .progress-bar::-moz-progress-bar {
  background-color: #78c850;
  border-radius: 0.5rem;
  transition: width 0.3s ease;
}

.detail-bg {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 17rem;
  z-index: 0;
}

.main.grass::before {
  background-color: #78c850;
}
.main.grass .detail-card-detail-wrapper .power-wrapper .body3-fonts.type {
  background-color: #78c850;
}
.main.poison::before {
  background-color: #a040a0;
}
.main.poison .detail-card-detail-wrapper .power-wrapper .body3-fonts.type {
  background-color: #a040a0;
}
.main.fire::before {
  background-color: #f08030;
}
.main.fire .detail-card-detail-wrapper .power-wrapper .body3-fonts.type {
  background-color: #f08030;
}
.main.water::before {
  background-color: #6890f0;
}
.main.water .detail-card-detail-wrapper .power-wrapper .body3-fonts.type {
  background-color: #6890f0;
}
.main.electric::before {
  background-color: #f8d030;
}
.main.electric .detail-card-detail-wrapper .power-wrapper .body3-fonts.type {
  background-color: #f8d030;
}
.main.ice::before {
  background-color: #98d8d8;
}
.main.ice .detail-card-detail-wrapper .power-wrapper .body3-fonts.type {
  background-color: #98d8d8;
}
.main.fighting::before {
  background-color: #c03028;
}
.main.fighting .detail-card-detail-wrapper .power-wrapper .body3-fonts.type {
  background-color: #c03028;
}
.main.ground::before {
  background-color: #e0c068;
}
.main.ground .detail-card-detail-wrapper .power-wrapper .body3-fonts.type {
  background-color: #e0c068;
}
.main.flying::before {
  background-color: #a890f0;
}
.main.flying .detail-card-detail-wrapper .power-wrapper .body3-fonts.type {
  background-color: #a890f0;
}
.main.psychic::before {
  background-color: #f85888;
}
.main.psychic .detail-card-detail-wrapper .power-wrapper .body3-fonts.type {
  background-color: #f85888;
}
.main.bug::before {
  background-color: #a8b820;
}
.main.bug .detail-card-detail-wrapper .power-wrapper .body3-fonts.type {
  background-color: #a8b820;
}
.main.rock::before {
  background-color: #b8a038;
}
.main.rock .detail-card-detail-wrapper .power-wrapper .body3-fonts.type {
  background-color: #b8a038;
}
.main.ghost::before {
  background-color: #705898;
}
.main.ghost .detail-card-detail-wrapper .power-wrapper .body3-fonts.type {
  background-color: #705898;
}
.main.dragon::before {
  background-color: #7038f8;
}
.main.dragon .detail-card-detail-wrapper .power-wrapper .body3-fonts.type {
  background-color: #7038f8;
}
.main.steel::before {
  background-color: #b8b8d0;
}
.main.steel .detail-card-detail-wrapper .power-wrapper .body3-fonts.type {
  background-color: #b8b8d0;
}
.main.dark::before {
  background-color: #705848;
}
.main.dark .detail-card-detail-wrapper .power-wrapper .body3-fonts.type {
  background-color: #705848;
}


:root {
  --identity-primary: #dc0a2d;

  --grayscale-dark: #212121;
  --grayscale-medium: #666666;
  --grayscale-light: #e0e0e0;
  --grayscale-background: #efefef;
  --grayscale-white: #ffffff;

  --headline-font-size: 24px;
  --body1-font-size: 14px;
  --body2-font-size: 12px;
  --body3-font-size: 10px;
  --subtitle1-font-size: 14px;
  --subtitle2-font-size: 12px;
  --subtitle3-font-size: 10px;
  --caption-font-size: 8px;

  --headline-line-height: 32px;
  --common-line-height: 16px;
  --caption-line-height: 12px;

  --font-weight-regular: 400;
  --font-weight-bold: 700;

  --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: var(--common-line-height);
}

h1 {
  font-size: var(--headline-font-size);
  line-height: var(--headline-line-height);
}

h2 {
  font-size: var(--subtitle1-font-size);
}

h3 {
  font-size: var(--subtitle2-font-size);
}

h4 {
  font-size: var(--subtitle3-font-size);
}

.body1-fonts {
  font-size: var(--body1-font-size);
}

.body2-fonts {
  font-size: var(--body2-font-size);
}

.body3-fonts {
  font-size: var(--body3-font-size);
}

.caption-fonts {
  font-size: var(--caption-font-size);
  line-height: var(--caption-line-height);
}

input:focus-visible {
  outline: 0;
}

.featured-img a.arrow.hidden {
  display: none;
}

body {
  margin: 0;
  height: 100vh;
  width: 100vw;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

.main {
  margin: 0;
  padding: 0;
  background-color: var(--identity-primary);
  height: 100vh;
  width: 100vw;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.header.home {
  width: 90%;
}

.container {
  width: 100%;
  margin: 0;
}

.logo-wrapper {
  display: flex;
  align-items: center;
}

.logo-wrapper > h1 {
  color: var(--grayscale-white);
}

.logo-wrapper > img {
  margin-right: 16px;
}

.search-wrapper,
.search-wrap {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 16px;
}

.search-wrap {
  position: relative;
  background-color: var(--grayscale-white);
  border-radius: 16px;
  box-shadow: var(--drop-shadow-inner);
  height: 32px;
  gap: 8px;
}

.search-icon {
  margin-left: 16px;
}

.search-wrap svg path {
  fill: var(--identity-primary);
}

.search-wrap > input {
  width: 60%;
  border: none;
}

.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;
}

.search-close-icon-visible {
  display: block;
}

.filter-wrapper {
  position: absolute;
  background: var(--identity-primary);
  border: 4px solid var(--identity-primary);
  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: var(--font-weight-bold);
  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(--identity-primary);
}

.pokemon-list {
  background-color: var(--grayscale-white);
  box-shadow: var(--drop-shadow-inner);
  border-radius: 0.75rem;
  min-height: calc(85.5% - 1rem);
  width: calc(100% - 1rem);
  max-height: 100px;
  overflow-y: auto;
}

.list-wrapper {
  margin: 1rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ... (other styles remain the same) ... */

.list-item {
  display: flex; /* Use flexbox for better layout control */
  flex-direction: column; /* Stack items vertically */
  align-items: center;    /* Center items horizontally */
  border-radius: 8px;
  box-shadow: var(--drop-shadow);
  background-color: var(--grayscale-white);
  width: 8.85rem;
  /* Remove fixed height; let it adjust to content */
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  margin-bottom: 10px; /* Add space between items */
  padding: 8px;        /*Added some padding to the .list-item */
  /*Remove extra styles*/
  /* height: 8.85rem; */
  /* box-sizing: border-box; */
}


.list-item .number-wrap {
  text-align: right;
  padding: 0 8px;
  color: var(--grayscale-medium);
  margin-bottom: 0;
  font-size: 0.9rem; /* adjust size for better readability*/
}

.list-item .name-wrap {
  border-radius: 7px;
  background-color: var(--grayscale-background);
  padding: 0.5rem 0.5rem 0.25rem 0.5rem; /* Reduced padding */
  color: var(--grayscale-dark);
  text-align: center;
  white-space: normal;
  width: 100%;
  margin-top: 0.5rem; /* Added some top margin for better readability*/

}

.list-item .name-wrap p {
  margin: 0;
  font-weight: 600;
  font-size: 0.9rem; /* adjust size for better readability*/
}

.list-item .img-wrap {
  margin: 1rem auto;
  width: 72px;
  height: 72px;
}

.list-item .img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ... rest of your pokedex.css ... */

/* detail page */

.detail-main .header {
  padding: 20px 20px 24px 20px;
  position: relative;
  z-index: 2;
}

.detail-main .header-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  column-gap: 15px;
}

.detail-main .header-wrap {
  display: flex;
  align-items: center;
  column-gap: 8px;
}

.detail-main .back-btn-wrap {
  max-height: 32px;
}

.detail-main .back-btn-wrap path,
.detail-main .header-wrapper p,
.detail-main .header-wrapper h1 {
  fill: var(--grayscale-white);
  color: var(--grayscale-white);
}

.detail-main .close-btn-wrap {
  max-height: 32px;
}

.detail-main .close-btn-wrap path,
.detail-main .header-wrapper p,
.detail-main .header-wrapper h1 {
  fill: var(--grayscale-white);
  color: var(--grayscale-white);
}

.detail-main .pokemon-id-wrap p {
  font-weight: var(--font-weight-bold);
}

.detail-img-wrapper {
  width: 200px;
  height: 200px;
  margin: auto;
  position: relative;
  z-index: 3;
}

.detail-img-wrapper img {
  width: 100%;
  height: 100%;
}

.detail-card-detail-wrapper {
  border-radius: 8px;
  background-color: var(--grayscale-white);
  box-shadow: var(--drop-shadow-inner);
  padding: 56px 20px 20px 20px;
  margin-top: -50px;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 2;
}

.power-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.power-wrapper > p {
  border-radius: 10px;
  padding: 2px 8px;
  font-weight: var(--font-weight-bold);
  color: var(--grayscale-white);
  text-transform: capitalize;
  background-color: #74cb48;
}

.pokemon-detail.Category p {
  text-transform: capitalize;
  word-break: break-all;
}

.list-item .name-wrap p {
  text-transform: capitalize;
}

.detail-card-detail-wrapper .about-text {
  font-weight: var(--font-weight-bold);
  text-align: center;
}

.pokemon-detail-wrapper {
  display: flex;
  align-items: flex-end;
}

.pokemon-detail-wrapper .pokemon-detail-wrap {
  flex: 1;
  text-align: center;
  position: relative;
}

.pokemon-detail-wrap:before {
  content: "";
  background-color: var(--grayscale-light);
  width: 1px;
  height: 100%;
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  margin: auto;
}

.pokemon-detail-wrap:last-child::before {
  display: none;
}

.pokemon-detail {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 8px 20px;
  gap: 8px;
}

.pokemon-detail-wrapper {
  min-height: 76px;
}

.pokemon-detail.Category {
  flex-direction: column;
  gap: 0;
  align-items: center;
  padding: 8px 5px;
}

.pokemon-detail-wrap > .caption-fonts {
  color: var(--grayscale-medium);
}

.pokemon-detail-wrap .straighten {
  transform: rotate(90deg);
}

.detail-card-detail-wrapper .pokemon-description {
  color: var(--grayscale-dark);
  text-align: center;
}

.stats-wrap {
  display: flex;
  align-items: center;
}

.stats-wrap p {
  color: var(--grayscale-dark);
  margin-right: 8px;
  min-width: 19px;
}

.stats-wrap p.stats {
  text-align: right;
  padding-right: 8px;
  min-width: 35px;
  border-right: 1px solid var(--grayscale-light);
  font-weight: var(--font-weight-bold);
}

.stats-wrap .progress-bar {
  flex: 1;
  border-radius: 4px;
  height: 4px;
}

.stats-wrap .progress-bar::-webkit-progress-bar {
  border-radius: 4px;
}

.stats-wrap .progress-bar::-webkit-progress-value {
  border-radius: 4px;
}

.detail-bg {
  position: absolute;
  z-index: 1;
  right: 8px;
  top: 8px;
  opacity: 0.1;
}

.detail-bg path {
  fill: var(--grayscale-white);
}

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

.arrow img {
  -webkit-filter: brightness(0) grayscale(1) invert(1);
  filter: brightness(0) grayscale(1) invert(1);
  width: 28px;
}

.featured-img {
  position: relative;
}

.featured-img a.arrow {
  display: inline-block;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 999;
}

.featured-img a.arrow.left-arrow {
  left: -2rem;
}

.featured-img a.arrow.right-arrow {
  right: -2rem;
}

.detail-main.main {
  height: max-content;
  border-color: transparent;
  background-color: transparent;
}

/* close button */
.header .header-wrapper .close-wrap .close-btn-wrap{
  width: 40px;
  height: 40px;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background-color: transparent;
}
.header .header-wrapper .close-wrap .close-btn-wrap .close-btn{
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.close-wrap-index {
  /* position: relative; //static | relative | absolute | sticky | fixed */
  position: absolute;
  top: 10px;
  right: 0px;
}

.close-btn {
  width: 20px; /* Adjust size as needed */
  height: 20px; /* Adjust size as needed */
}
.header.home .container{
  position: relative;
}
