:root {

      /* Light theme */
  --light-background: hsl(210, 20%, 98%);
  --light-on-background: hsl(210, 15%, 25%);
  --light-on-background-variant: hsl(210, 10%, 40%);
  --light-primary: hsl(212, 70%, 50%);
  --light-primary-hover: hsl(212, 65%, 45%);
  --light-primary-container: hsl(212, 90%, 95%);
  --light-error: hsl(0, 75%, 55%);
  --light-active-indicator: hsl(212, 80%, 85%);
  --light-image-background: hsl(210, 15%, 85%);
  --light-badge-btn: hsl(220, 86%, 92%);
  --light-on-badge-btn: hsl(30, 20%, 25%);
  --light-outline: hsl(210, 15%, 80%);
  --light-input-outline: hsl(210, 10%, 70%);
  --light-input-outline-hover: hsl(210, 10%, 50%);
  --light-alpha-10: hsla(210, 15%, 25%, 0.1);
  --light-alpha-20: hsla(210, 15%, 25%, 0.2);
  --light-filter-btn: hsl(0, 0%, 77%);

  /* Dark theme */
  --dark-background: hsl(210, 20%, 12%);
  --dark-on-background: hsl(210, 15%, 85%);
  --dark-on-background-variant: hsl(210, 10%, 75%);
  --dark-primary: hsl(212, 70%, 60%);
  --dark-primary-hover: hsl(212, 65%, 55%);
  --dark-primary-container: hsl(210, 30%, 20%);
  --dark-error: hsl(0, 70%, 65%);
  --dark-active-indicator: hsl(212, 60%, 40%);
  --dark-image-background: hsl(210, 10%, 20%);
  --dark-badge-btn: hsl(209, 46%, 19%);
  --dark-on-badge-btn: hsl(240, 16%, 91%);
  --dark-outline: hsl(210, 10%, 40%);
  --dark-input-outline: hsl(210, 10%, 50%);
  --dark-input-outline-hover: hsl(210, 15%, 60%);
  --dark-alpha-10: hsla(210, 15%, 85%, 0.1);
  --dark-alpha-20: hsla(210, 15%, 85%, 0.2);
  --dark-filter-btn: hsl(0, 0%, 27%);

}


[data-theme="light"] {
    color-scheme: light;
  
    --background: var(--light-background);
    --on-background: var(--light-on-background);
    --on-background-variant: var(--light-on-background-variant);
    --primary: var(--light-primary);
    --primary-hover: var(--light-primary-hover);
    --primary-container: var(--light-primary-container);
    --error: var(--light-error);
    --active-indicator: var(--light-active-indicator);
    --image-background: var(--light-image-background);
    --badge-btn: var(--light-badge-btn);
    --on-badge-btn: var(--light-on-badge-btn);
    --outline: var(--light-outline);
    --input-outline: var(--light-input-outline);
    --input-outline-hover: var(--light-input-outline-hover);
    --alpha-10: var(--light-alpha-10);
    --alpha-20: var(--light-alpha-20);
    --filter-btn: var(--light-filter-btn);
  }
  
  [data-theme="dark"] {
    color-scheme: dark;
  
    --background: var(--dark-background);
    --on-background: var(--dark-on-background);
    --on-background-variant: var(--dark-on-background-variant);
    --primary: var(--dark-primary);
    --primary-hover: var(--dark-primary-hover);
    --primary-container: var(--dark-primary-container);
    --error: var(--dark-error);
    --active-indicator: var(--dark-active-indicator);
    --image-background: var(--dark-image-background);
    --badge-btn: var(--dark-badge-btn);
    --on-badge-btn: var(--dark-on-badge-btn);
    --outline: var(--dark-outline);
    --input-outline: var(--dark-input-outline);
    --input-outline-hover: var(--dark-input-outline-hover);
    --alpha-10: var(--dark-alpha-10);
    --alpha-20: var(--dark-alpha-20);
    --filter-btn: var(--dark-filter-btn);
  }



*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'DM Sans', sans-serif;
}

html {
    font-family: 'DM Sans', sans-serif;
    font-size: 62.5%;
    scroll-behavior: smooth;
    overflow-y: auto;
  }

html::-webkit-scrollbar {
    width: 0;
}  

html {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

  

  li { list-style: none; }

  a {
    text-decoration: none;
    color: inherit;
  }

body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: var(--background);
    color: var(--on-background);
    padding-block-start: 80px;
    min-height: 100vh;
    font-family: 'DM Sans', sans-serif;
    color: var(--on-background);
}







/* HEADER */


header {
    z-index: 10;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
    background: var(--background);
    padding: 0 25px;
    border-bottom: 1px solid var(--outline);
}




.header-logo {
    height: 3.5rem;
}

.main-nav {
    height: 100%;
    display: none;
}


.header-btn{
    display: flex;
    height: 100%;
    font-size: 1.6rem;
    align-items: center;
    justify-content: space-around;
    min-width: 150px;
    position: relative;
    transition: background 0.3s ease;
    font-weight: 500;
    color: var(--on-background-variant);
}

.header-btn:hover {
    background: var(--alpha-10);
}

.home-btn {
    color: var(--on-background);
}

.home-btn::after {
    
    position: absolute;
    content: '';
    background: var(--primary);
    height: 3px;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    bottom: 0px;
    left: 39%;
    
    width: 35px;

}


.header-part {
    display: flex;
    gap: 20px;
    align-items: center;
}

.themebtn {
    display: grid;
    border-radius: 100%;
    border: none;
    align-items: center;
    height: 40px;
    aspect-ratio: 1/1;
    place-items: center;
    background: var(--primary-container);
    cursor: pointer;
    transition: background 0.3s ease;
}

.themebtn:hover {
    background: var(--alpha-10);
}

.themebtn span {
    color: var(--on-background);
    font-size: 23px;
}

.savedlink {
    display: none;
    align-items: center;
    gap: 0.7rem;
    background: var(--primary);
    color: white;
    border-radius: 5px;
    padding: 0.8rem 1.7rem;
    transition: background 0.3s ease;
}


.savedlink:hover {
    background: var(--primary-hover);
}


.span {
    font-size: 1.4rem;
}

.savedimg {
    height: 25px;
    aspect-ratio: 1/1;
}



/* MAIN */


main {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    align-items: center;
    width: 100%;
    background: var(--background);
    padding-bottom: 2rem;
}


/* HERO */

.hero {
    width: 100%;
    padding: 0 2rem;
    background: var(--background);
}

.banner-card {
    display: flex;
    flex-direction: column;
    background-image: url(../images/2ndbannerfinal.png);
    background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  height: 480px;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 20px;
  border-radius: 10px;
}

.banner-card h1 {
    font-family: 'DM Serif Display', serif;
    font-weight: 350;
    font-size: 3.6rem;
    color: aliceblue;
    user-select: none;
    text-align: center;
    text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.5);
}

.banner-card p {
    font-size: 1.2rem;
    color: aliceblue;
    letter-spacing: 0.1rem;
    user-select: none;
    text-align: center;
    font-weight: 500;
    text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.4)
}

.search-wrap {
    display: flex;
    position: relative;
    width: 90%;
    max-width: 480px;
    height: 56px;
    border-radius: 5px;
    background: var(--primary-container);
    align-items: center;
    gap: 20px;
    transition: background 0.3s ease;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.8);
}





.search-wrap span {
    font-size: 20px;
    margin-left: 18px;
}

.search-wrap input {
    background: var(--primary-container);
    border: none;
    font: inherit;
    width: 100%;
    font-size: 1.4rem;
    outline: none;
    height: 100%;

    margin-right: 110px;
    transition: background 0.3s ease;
}

.searchbookicon {
    display: grid;
    aspect-ratio: 1/1;
    height: 25px;
    margin: 0 16px;
}

.search-btn {
    position: absolute;
    display: flex;
    background: var(--primary);
    border: none;
    border-radius: 5px;
    top: 4px;
    right: 4px;
    width: 50px;
    height: 48px;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
    cursor: pointer;
}

.search-btn:hover {
    background: var(--primary-hover)
}

.search-btn span {
    padding-right: 16px;
    font-size: 18px;
    text-align: center;
    color: rgb(247, 251, 255);
}







/*  SELECTOR */

.tab-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--background);
}


.container {
    max-width: 1290px;
    width: 100%;
    padding-inline: 16px;
    display: flex;
    flex-direction: column;
    gap: 1.6rem;
    align-items: center;


}

.tab-list {
    display: flex;
    width: 100%;
    margin-inline: auto;
}

.tab-list button {
    border: none;
    background: inherit;
    border-bottom: 1px solid var(--outline);
    width: 20%;
    font-size: 12.5px;
    font-weight: 500;
    position: relative;
    color: var(--on-background-variant);
    transition: color 0.2s ease, background 0.3s ease;
    place-items: center;
    height: 71px;
    cursor: pointer;
}

.tab-list button:hover {
    background: var(--alpha-10);
}



.tab-btn.active::after {
    content: "";
    position: absolute;
    background-color: var(--primary);
    height: 1.5px;
    width: 100%;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    left: 0;
    bottom: -1px;
}

.tab-btn.active {
    color: var(--on-background);
}




.tab-panel-2,
.tab-panel-3,
.tab-panel-4,
.tab-panel-5{
    display: none;
    grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
    gap: 12px 8px; 
    width: 100%;
    justify-content: center;
    
}

.tab-panel-1 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
    gap: 12px 8px;
    width: 100%;
    justify-content: center;
}

.card {
    position: relative;
    display: flex;
    flex-direction: column;
    aspect-ratio: 0.55/1;
    gap: 10px;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
    transition: background-color 0.3s ease;
    border: 1px solid transparent;
    max-height: 550px;
    height: auto;
}

.card:hover .img-holder {
    border: 1px solid rgb(161, 161, 161);
}

.skeleton-book {
    display: flex;
    position: relative;
    flex-direction: column;
    aspect-ratio: 0.55/1;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
    align-items: center;
    justify-content: space-between;
    animation: loadingAnimation 1.5s infinite ease-in-out;
    padding-bottom: 3px;
}


@keyframes loadingAnimation {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        opacity: 1;
    }
}

.skeleton-image {
    display: flex;
    background: var(--alpha-20);
    width: 100%;
    height: 83%;
    border-radius: 12px;
}

.skeleton-meta {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding-left: 10px;
    gap: 6px;
}

.skeleton-title {
    display: flex;
    width: 100px;
    height: 16px;
    background: var(--alpha-20);
    border-radius: 2px;
}

.skeleton-author {
    
        display: flex;
        width: 130px;
        height: 14px;
        background: var(--alpha-20);
        border-radius: 3px;
    
}


    


.skeleton-card {
    display: flex;
    background: var(--alpha-10);
    position: relative;
    aspect-ratio: 0.55/1;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    gap: 15px;
    cursor: pointer;
    transition: background 0.3s ease;
    color: var(--on-background);
}



.skeleton-card:hover {
    background: var(--alpha-20);
}

.card:hover {
    background: var(--alpha-10);
}

.img-holder {
    display: flex;
    width: 100%;
    height: 73%;
    border-radius: 6px;
    overflow: hidden;
    place-items: center;
    justify-content: center;
    border: 1px solid transparent;
    transition: border 0.3s ease;
    cursor: pointer;
}

.img-holder img {
    display: grid;
    object-fit: fill;
    width: 100%;
    height: 100%;
    border-radius: 3px;
    
}

.card-body {
    display: flex;
    flex-direction: column;
    height: 24%;
    padding: 0 7px;
    justify-content: space-between;
}





.title-small {
    font-size: 14px;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    
}

.title-small a {
    display: block;
    width: 100%;
}

.meta-wrapper {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    bottom: 6px;
    padding: 0 0 2px 5px;

}

.meta-item {
    font-size: 1.22rem;
    display: flex;
    gap: 10px;
    align-items: center;
    max-width: 80%;
    flex: 1;
}

.icon-btn {
    display: flex;
    justify-content: center;
    border: none;
    padding: 5px;
    cursor: pointer;
    place-items: center;
    border-radius: 100%;
    background: var(--primary-container);
    aspect-ratio: 1/1;
    height: 33px;
    transition: background 0.3s ease;
    
}

.icon-btn:hover {
    background: var(--alpha-10);
}

 .icon-btn span {
    font-size: 15px; 
    color: var(--on-background);  
    transition: color 0.3s ease;
} 

.fa-pen {
    padding-top: 2px;
}

.label-medium {
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 70%;
    user-select: none;
}



/* SLIDER */


.slider-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 3rem;
    padding-top: 3rem;
    padding-inline: 16px;
    max-width: 1290px;
    background: var(--background);
}

.slider-1,
.slider-2 {
    display: flex;
    flex-direction: column;
    gap: 1.8rem;
    padding-inline: 16px;
    margin-inline: auto;
    width: 100%;
}

.slider-1 h2,
.slider-2 h2 {
    font-size: 2.5rem;
    font-weight: 250;
    user-select: none;
}

.slider {
    position: relative;
    overflow-x: auto;
    scroll-snap-type: inline mandatory;
    padding-block-end: 5px;
    display: flex;
    gap: 16px;
    align-items: stretch;
    justify-content: flex-start;
    scrollbar-width: thin; 
    scrollbar-color: var(--alpha-10) transparent;
}


.slider::-webkit-scrollbar {
    height: 4px; 
    width: 4px; 
}

.slider::-webkit-scrollbar-track {
    background: transparent; 
}

.slider::-webkit-scrollbar-thumb {
    background: var(--alpha-10);
    border-radius: 10px; 
}


.slider::-webkit-scrollbar-button {
    display: none;
}




.slider-item {
    min-height: 270px;
    min-width: 176px;
}

.preference {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 1260px;
    padding-inline: 16px;
    margin-inline: auto;
    width: 100%;
    align-items: center;
}


.preference h2 {
    font-size: 3.3rem;
    font-family: 'DM Serif Display', serif;
    font-weight: 400;
    user-select: none;
    text-align: center;
}

.preference p {
    font-size: 1.4rem;
    max-width: 50ch;
    margin-inline: auto;
    text-align: center;
    user-select: none;
}

.tag-div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    padding-top: 2.5rem;
}

.tag-div a {
    background: var(--badge-btn);
    color: var(--on-badge-btn);
    padding: 1.2rem;
    font-size: 1.35rem;
    align-items: center;
    border-radius: 16px;
    transition: background 0.3s ease;
}

.tag-div a:hover {
    background: var(--alpha-10);
}




footer {
    display: flex;
    flex-direction: column;
    height: 70px;
    padding: 1rem 1rem;
    border-top: 1px solid var(--outline);
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    margin-bottom: 80px;
}

footer img {
    display: none;
    height: 40px;
}


footer p {
    font-size: 1.3rem;
    user-select: none;
}

.powered-by {
    display: flex;
    gap: 8px;
    align-items: center;
}

.powered-by img {
    display: grid;
    height: 20px;
}






/* BOOKS.HTML */


.article {
    display: flex;
    width: 100%;
}

.filter-bar{
    display: flex;
    flex-direction: column;
    z-index: 200;
    background: var(--background);
    position: fixed;
    max-width: 400px;
    width: 100%;
    border-right: 1px solid var(--outline);
    top: 0;
    overflow-y: auto;
    height: 100vh;
    scrollbar-width: thin; 
    scrollbar-color: rgba(211, 211, 211, 0.6) transparent;
    box-shadow: -5px 0 10px rgba(36, 36, 36, 0.3);
    transition: right 0.4s ease-in-out
}

.filter-bar.open {
    right: 0;
}

.filter-bar.closed {
    right: -490px;
}

.filter-bar-background {
    z-index: 10;
    display: none;
    position: fixed;
    bottom: 0;
    top: 0;
    left: 0;
    right: 0;
    background: rgb(92, 92, 92);
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
}

.filter-bar-background.visible {
    opacity: 0.7; 
    display: flex; 
}


.filter-bar::-webkit-scrollbar {
    height: 6px; 
    width: 2px; 
}

.filter-bar::-webkit-scrollbar-track {
    background: transparent; 
}

.filter-bar::-webkit-scrollbar-thumb {
    background: rgba(150, 150, 150, 0.6);
    border-radius: 10px; 
}

.filter-bar::-webkit-scrollbar-thumb:hover {
    background: rgba(145, 145, 145, 0.8); 
}

.filter-bar::-webkit-scrollbar-button {
    display: none;
}

.filter-title-wrapper {
    display: flex;
    color: var(--on-background);
    align-items: center;
    padding: 24px 17px;
    gap: 18px;
    font-size: 17px;
}

.filter-title-wrapper svg {
    width: 35px;
    height: 35px;
    place-items: center;
    padding: 6px;
}

.filter-title-wrapper p {
    font-weight: 500;
    flex: 1;
}

[close-filters] {
    display: block;
    border-radius: 100%;
    transition: background 0.3s ease;
    aspect-ratio: 1/1;
}

[close-filters]:hover {
    background: var(--alpha-10);

}


.filter-content {
    display: flex;
    flex-direction: column;
    margin-bottom: 10px;
    color: var(--on-background-variant);
    flex: 1;
}

.filter-contents {
    display: none;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.5s ease-out;
}

.filter-contents.open {
    display: block;
    max-height: 500px;
    overflow: visible; 
    transition: max-height 0.5s ease-in-out;
}

[aria-expanded="true"] + .filter-contents {
    display: flex;
  }

.search-wrapper {
    padding: 0px 24px 0px 24px;
}

.input-content  {
    color: var(--on-background-variant);
    position: relative;
  width: 100%;
  margin-bottom: 20px;
}

.input-content input {
    position: relative;
    width: 100%;
    height: 56px;
    border-radius: 4px;
    padding: 0 12px;
    border: 1px solid var(--outline);
    background: var(--background);
    outline: none;
    font-size: 16px;
    transition: border 0.3s ease, box-shadow 0.3s ease;
}

.input-content input:hover {
    border-color: #888; 
    box-shadow: 0 0 4px rgba(136, 136, 136, 0.5); 
  }


  .input-content input:focus {
    border-color: var(--primary); 
    box-shadow: 0 0 6px rgba(82, 138, 221, 0.7); 
  } 
  
  
  .input-content label {
    position: absolute;
    top: 50%; 
    left: 16px;
    transform: translateY(-50%); 
    font-size: 16px;
    color: #aaa; 
    pointer-events: none;
    transition: all 0.3s ease; 
    padding: 0 4px;
    z-index: 5;

  } 
  
  

  .input-content input:focus + label,
.input-content input:not(:placeholder-shown) + label {
  top: 0; 
  left: 12px;
  font-size: 12px; 
  color: var(--primary); 
  z-index: 6;
  padding: 0 4px;
  background: var(--background);
}

.filter-part {
    display: flex;
    flex-direction: column;
}

.filter-part-btn {
    display: flex;
    padding: 16px 24px;
    align-items: center;
    background: var(--background);
    border: none;
    justify-content: space-between;
    gap: 16px;
    color: var(--on-background-variant);
    font-size: 14px;
    transition: background 0.3s ease;
    cursor: pointer;
}

.filter-part-btn:hover {
    background: var(--alpha-10)
}

.filter-part-btn[aria-expanded="true"] {
    background: var(--alpha-10)
}

.filter-part-btn p {
    margin-inline-end: auto;
    font-weight: 530;
}

.filter-part-btn span {
    font-size: 17px;
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
}

.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 20px;

}





.filter-option {
    height: 32px;
    display: flex;
    border: 1px solid var(--outline);
    border-radius: 8px;
    padding-inline: 16px;
    align-items: center;
    justify-content: center;
    width: fit-content;
    font-size: 13px;
    font-weight: 590;
    user-select: none;
    color: var(--on-background);
    transition: background 0.3s ease;
    cursor: pointer;
}

.filter-option[filter-clicked="true"] {
    background: var(--badge-btn);
}


.filter-actions{
    padding: 25px 25px;
    display: flex;
    justify-content: space-between;
    border-top: 1px solid var(--outline);
}

.filter-action {
    width: 48%;
    height: 40px;
    border: none;
    border-radius: 3px;
    font-weight: 500;
    font-size: 14px;
}

.clear-filters {
    background: var(--primary-container);
    color: var(--on-background);
    transition: background 0.3s ease;
    cursor: pointer;
}

.clear-filters:hover {
    background: var(--alpha-20);
}


.apply-filters {
    background: var(--primary);
    color: rgb(240, 240, 240);
    transition: background 0.3s ease;
    cursor: pointer;
}

.apply-filters:hover {
    background: var(--primary-hover);
}



.books-container {
    display: flex;
    flex-direction: column;
    padding-inline: 16px;
}

.title-wrapper {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
}

.title-wrapper h2 {
    font-size: 23px;
    font-weight: 400;
}

[open-filters] {
    position: relative;
    display: flex;
    font-size: 14px;
    align-items: center;
    border: none;
    background: var(--primary-container);
    gap: 7px;
    z-index: 7;
    padding: 10px 14px;
    border-radius: 4px;
    color: var(--on-background);
    font-weight: 500;
    transition: opacity 0.3s ease, transform 0.3s ease, background 0.3s ease;
    opacity: 1;
    visibility: visible;
    cursor: pointer;
}

[open-filters].sticky {
    position: fixed;
    bottom: -100px; 
    right: 20px;   
    z-index: 7;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); 
    background: var(--primary-container);  
    color: var(--on-background); 
    padding: 12px 16px;
    border-radius: 8px;
    opacity: 0;  
    transform: translateY(-190px);
    pointer-events: none;
    transition: opacity 0.6s ease, transform 0.6s ease, background 0.3s ease
}

[open-filters].sticky.visible {
    opacity: 1; 
    visibility: visible; 
    pointer-events: auto;
}
  


[open-filters]:hover {
    background: var(--alpha-10);
}

[open-filters].sticky:hover {
    background: var(--filter-btn);
}

[open-filters]:hover .filters-applied {
    background: rgb(170, 0, 0);
}

[open-filters] svg {
    display: grid;
    width: 20px;
    height: 20px;
    place-items: center;
}

.filters-applied {
    display: flex;
    place-items: center;
    background: rgb(218, 0, 0);
    color: #ecf4ff;
    border-radius: 50%; 
    padding: 0.2em 0.5em; 
    font-size: 11px;
    transition: background 0.3s ease;
    min-width: 20px; 
    height: 20px; 
    line-height: 1;  
    font-weight: bold; 
}



.books-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
    gap: 12px 8px;
    padding-inline: 16px; 
    width: 100%;
    justify-content: center;
}

.books-bookslist {
    padding-inline: 0;
}


.load-more-container {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
}

.load-more {
    display: none;
    background: var(--primary);
    outline: none;
    border: none;
    padding: 7px 15px;
    border-radius: 5px;
    color: rgb(238, 238, 238);
    font-size: 15px;
    font-weight: 590;
    transition: background 0.3s ease;
    cursor: pointer;
}

.load-more:hover {
    background: var(--primary-hover);
}

.no-more-btn {
    font-size: 15px;
    background: var(--background);
    border: none;
    outline: none;
    cursor: text;
    color: var(--on-background-variant);
}

.no-books-div {
    display: none;
    width: 100%;
    justify-content: start;
    padding-left: 20px;
}

.no-books-div p {
    font-size: 27px;
}


/* SKELETON */





/* BOOK DETAILS  */

.details-header {
    height: 72px;
}

.details-header .main-nav {
    display: none;
}

.details-header .header-part .savedlink {
    display: none;
}

#details-main {
    margin-top: 30px;
    min-height: calc(100vh - 230px);
    
}

.detail-skeleton {
    display: flex;
    flex-direction: column;
    width: 90%;
    max-width: 1130px;
    padding: 0px;
    height: 100%;
    flex: 1;
    animation: loadingAnimation 1.5s infinite ease-in-out;
    gap: 35px;
}

.book-box-skeleton {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 0;
    gap: 20px;
}

.book-box-image {
    background: var(--alpha-20);
    aspect-ratio: 5/7;
    border-radius: 2px;
}

.book-box-btns {
    display: flex;
    gap: 10px;
    width: 100%;
    padding: 0 20px;
    justify-content: center;
}

.book-box-btn {
    background: var(--alpha-20);
    width: 45%;
    height: 20px;
    border-radius: 2px;
}

.book-details-skeleton {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0;
    gap: 35px;
}

.book-title-wrapper-skeleton {
    width: 65%;
    height: 35px;
    background: var(--alpha-20);
    border-radius: 2px;
}

.author-wrapper-skeleton {
    width: 100%;
    height: 15px;
    background: var(--alpha-20);
    border-radius: 2px;
}

.stats-skeleton {
    display: flex;
}

.stat-skeleton {
    display: flex;
    flex-direction: column;
    width: 33.3%;
    align-items: center;
    gap: 10px;
}

.stat-big {
    width: 60%;
    height: 40px;
    background: var(--alpha-20);
    border-radius: 2px;
}
.stat-small {
    width: 80%;
    height: 10px;
    background: var(--alpha-20);
    border-radius: 2px;
}

.tags-skeleton {
    display: flex;
    gap: 30px;
}

.tag-skeleton {
    width: 70px;
    height: 25px;
    background: var(--alpha-20);
    border-radius: 2px;
}

.details-skeleton {
    height: 200px;
    width: 100%;
    background: var(--alpha-20);
    border-radius: 2px;

}




.detail-article {
    display: none;
    flex-direction: column;
    gap: 20px;
    max-width: 1130px;
    width: 100%;
    height: 100%;
    padding-inline: 16px;
}

.book-img {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 20px;
    overflow-y: auto;
    
}

.book-img img {
aspect-ratio: 12/16;
margin-inline: 46px;
border-radius: 4px;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 
                0 1px 3px rgba(0, 0, 0, 0.06);
}

.book-btns {
    display: flex;
    justify-content: space-between;
    padding: 0 10px;
}

.book-btns a {
    display: flex;
    background: var(--primary-container);
    color: var(--on-background);
    padding: 8px 10px;
    font-size: 12px;
    border-radius: 5px;
    transition: background 0.3s ease;
    font-weight: 450;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 
                0 1px 3px rgba(0, 0, 0, 0.06);
}

.book-btns a:hover {
    background: var(--alpha-10);

    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15), 
                0 2px 4px rgba(0, 0, 0, 0.1);
}



.detail-content {
    padding-top: 10px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.detail-title-wrapper {
    display: flex;
    gap: 20px;
    justify-content: space-between;
    align-items: center;
}

.detail-title-wrapper h2 {
    font-size: 3rem;
    font-weight: 600;
    max-width: calc(100% - 105px);
    font-family: 'DM Serif Display', serif;
    letter-spacing: 1px;
}

.save-btn {
    display: flex;
    padding: 6px 15px;
    border-radius: 5px;
    border: none;
    background: var(--primary);
    color: aliceblue;
    align-items: center;
    gap: 8px;
    height: 40px;
    cursor: pointer;
    transition: background 0.3s ease;
    justify-content: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15), 
                0 1px 3px rgba(0, 0, 0, 0.1);
}

.save-btn:hover {
    background: var(--primary-hover);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.2), 
                0 2px 4px rgba(0, 0, 0, 0.15);
}



.save-btn i {
    padding-top: 2px;
}

.authors-wrapper {
    font-size: 15px;
}

.ratings-container {
    display: flex;
    align-items: center;
    font-size: 15px;
}

.stars-span {
    margin-right: 10px;
}

.basic-details {
    display: flex;
    width: 100%;
    justify-content: space-between;
}

.basic-details div {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    gap: 7px;
    padding-block: 2.5rem;
}

.basic-details div .big-span {
    font-size: 33px;
    font-weight: 400;
    
}

.basic-details div .basic-detail {
    font-size: 13px;
}

.page-count {
    border-right: 1px solid var(--alpha-20);
}

.reading-time {
    border-right: 1px solid var(--alpha-20);
}

.tags-container {
    display: flex;
    gap: 20px;
}

.tags-container .tag {
    border: 1px solid var(--alpha-20);
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    user-select: none;
}

.more-details-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-top: 20px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.details-wrapper {
    display: flex;
    justify-content: space-between;
    background: var(--alpha-10);
    padding: 5px 10px;
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
    font-size: 15px;
    align-items: center;
    
}

.more-details {
    display: flex;
    flex-direction: column;
    padding: 20px 10px 15px 10px;
    border-left: 1px solid var(--alpha-10);
    border-right: 1px solid var(--alpha-10);
    border-bottom: 1px solid var(--alpha-10);
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 6px;
    gap: 10px;
    font-size: 14px;

}
.detailed-div {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    line-height: 1.5;
}

.detailed-div > :first-child {
    font-weight: 600; 
}

.all-categories {
    display: flex;
    flex-direction: column;
}





/* SAVED BOOKS */

.saved-books-main {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: start;
    padding-inline: 16px;
}

.saved-books-main h2 {
    font-size: 2.5rem;
    font-weight: 500;
    text-align: start;
    
}




.saved-books-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
    gap: 12px 8px;
    width: 100%;
    justify-content: center;
}

.fa-circle-xmark {
    color: rgb(248, 81, 81);
    position: absolute;
    right: -6px;
    top: -6px;
    font-size: 22px;
    cursor: pointer;
    background: white;
    border-radius: 100%;
    transition: color 0.3s ease, background 0.3s ease;
}

.fa-circle-xmark:hover {
    color: rgb(172, 6, 6);
    background: rgb(209, 209, 209);
}

#popup-notification {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background-color: #333;
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    font-size: 14px;
    z-index: 1000;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
  }
  
  #popup-notification.show {
    opacity: 1;
    transform: translateY(-80px);
  }
  
  .hidden {
    display: none;
  }

  .mobile-nav {
    position: fixed;
    height: 80px;
    bottom: 0;
    width: 100%;
    background: var(--primary-container);
    color: var(--on-background-variant);
    z-index: 3;
    place-items: center;
    box-shadow: 0 -1px 8px hsla(0, 0%, 0%, 0.2);
  }

  .mobile-btns {
    height: 100%;
    display: flex;
    width: 100%;
    color: var(--on-background-variant);
    justify-content: space-between;
    padding: 20px 0;
    align-items: center;
  }

  .mobile-btn {
    display: flex;
    flex-direction: column;
    width: 33.3%;
    align-items: center;
    color: inherit;
    gap: 2px;
  }

  .mobile-btn span {
    font-size: 18px;
    justify-content: center;
    transition: background 0.3s ease;
  }

  .item-icon {
    display: grid;
    width: 60px;
    height: 30px;
    place-items: center;
    border-radius: 15px;
  }

  .mainbtn {
    background: var(--active-indicator);
  }

  .mobilemain {
    color: var(--on-background);
  }

  .secondary:hover {
    background: var(--alpha-10);
  }

  .mobile-btn p {
    font-size: 13px;
    font-weight: 550;
  }




@media (min-width: 390px) {
    footer {
        flex-direction: row;
    }
}



  @media (min-width: 450px) {

    .book-box-skeleton {
        max-width: 420px;
        align-items: start;
    }

    .book-box-image {
        width: 80%;
    }

    .book-box-btns {
        justify-content: start;
        padding: 0;
    }

    .tab-list button {
        font-size: 14px;
    }

    footer {
        padding: 1rem 4rem;
    }

    .book-btns {
        justify-content: center;
        gap: 25px;
    }
  }

  @media (min-width: 500px) {
    
  }


    @media (min-width: 600px) {
        .books-container {
            padding-inline: 32px;
        }

        .container {
            padding-inline: 32px;
        }

        .search-wrap{
            height: 72px;
        }

        .search-btn {
            height: 64px;
            width: 100px;
        }

        .book-img {
            align-items: start;
            max-width: 420px;
        }

        .book-img img {
            width: 80%;
            margin-inline: 0;
        }

        .detail-article {
            padding-inline: 32px;
        }
    }



  @media (min-width: 768px) {


    .details-header .main-nav {
        display: flex;
    }
    
    .details-header .header-part .savedlink {
        display: flex;
    }
    

    header {
        
        
        height: 80px;
        
    }

    

    
    .header-logo {
    height: 4rem;
    }

    .main-nav {
        
        display: flex;
    }


    .savedlink {
        display: flex;
    }

    .mobile-nav {
        display: none;
    }

    .books-header {
        height: 64px;
    }


    footer a {
        display: grid;
    }

    footer img {
        display: block;
    }

    footer {
        margin-bottom: 0;
    }

    .tab-list button {
        font-size: 15px;
    }

    html {
        overflow-y: auto;
    }

    html::-webkit-scrollbar {
        width: 7px;
    }

    html{
        -ms-overflow-style: auto;
        scrollbar-width: auto;
    }

    html::-webkit-scrollbar-thumb {
        background-color: var(--alpha-20); 
        border-radius: 4px;
    }
    
    html::-webkit-scrollbar-track {
        background: var(--background); 
    }

    .books-html::-webkit-scrollbar {
        width: 0;
    }  
    
    .books-html {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    .book-html::-webkit-scrollbar-thumb {
        background-color: none; 
        border-radius: none;
    }
    
    .books-html::-webkit-scrollbar-track {
        background: none; 
    }

    #popup-notification.show {
        
        transform: translateY(0);
      }

      .saved-books-main {
        margin-top: 20px;
      }

      .saved-books-main h2 {
        margin-left: 10px;
      }
    
  }

  @media (min-width: 992px) {


    .detail-skeleton {
        flex-direction: row;
    }

    .book-box-skeleton {
        align-items: center;
        width: 40%;
    }

    .book-box-btns {
        justify-content: center;
    }


    .detail-title-wrapper {
        align-items: baseline;
    }



    .tag-div {
        padding-top: 0;
    }

    .preference {
        gap: 2rem;
    }

    .preference h2 {
        font-size: 4.8rem;
    }

    .detail-article {
        flex-direction: row;
        gap: 32px;
    }

    .book-img {
        position: sticky;
        top: 110px;
        height: calc(100vh - 240px);
        width: 44%;
        align-items: center;
    }

    .book-img img {
        width: 80%;
    }


    .books-body {
        padding-block-start: 96px;
    }

    .books-header {
        height: 80px;
    }

    .filter-bar {
        height: calc(100vh - 80px);
        max-width: 360px;
    }

    .books-html {
        overflow-y: auto;
    }

    .books-html::-webkit-scrollbar {
        width: 7px;
    }

    .books-html{
        -ms-overflow-style: auto;
        scrollbar-width: auto;
    }

    .books-html::-webkit-scrollbar-thumb {
        background-color: var(--alpha-20); 
        border-radius: 4px;
    }
    
    .books-html::-webkit-scrollbar-track {
        background: var(--background); 
    }

    .filter-bar {
    position: sticky;
    top: 80px;
    margin-block-start: -16px;
    margin-block-end: -40px;
    overflow-y: auto;
    height: calc(100vh - 80px);
    scrollbar-width: thin; 
    scrollbar-color: rgba(211, 211, 211, 0.6) transparent;
    box-shadow: none;
    }

    [close-filters] {
        display: none;
    }

    [open-filters] {
        display: none;
    }

    .filter-bar-background.visible {
        display: none; 
    }

    .search-wrap {
        max-width: 800px;
    }

    .banner-card h1 {
        font-size: 5.7rem;
    }

    .banner-card p {
        font-size: 14px;
        
    }

    .details-header {
        height: 80px;
    }
  }


  @media (min-width: 1050px) {
    .banner-card{
        background-image: url(../images/widebackgroundv2.png);
    }

    .banner-card p {
        font-weight: 400;
        color: hsl(0, 0%, 89%);
    }
    
  }