/* ===============================
   SWEET TANGERINE v2
   Base Style
================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root{

    --primary:#F97316;
    --primary-light:#FFF7ED;

    --background:#FAFAF9;

    --card:#FFFFFF;

    --text:#1E293B;

    --text-light:#64748B;

    --border:#E2E8F0;

    --radius:16px;

    --shadow:0 10px 25px rgba(0,0,0,.06);

    --container:1200px;

}

html{

    scroll-behavior:smooth;

}

/* Layout */

--header-height:72px;

--hero-width:900px;

/* Controls */

--search-height:54px;

--control-height:50px;

/* Cards */

--book-radius:20px;

--chip-radius:999px;

/* Animation */

--transition:var(--transition);

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

body{

    font-family:'Poppins',sans-serif;

    background:var(--background);

    color:var(--text);

    line-height:1.6;

}

img{

    max-width:100%;

    display:block;

}

{

    text-decoration:none;

    color:inherit;

}

header{

    background:white;

    border-bottom:1px solid var(--border);

    position:sticky;

    top:0;

    z-index:100;

    display:flex;

    justify-content:center;

    align-items:center;

    margin-bottom:18px;

    height:72px;

}

/* ===============================
   SECTION
================================ */

.section{

    margin-bottom:48px;

}

.section-header{

    display:flex;

    justify-content:space-between;

    align-items:center;

    margin-bottom:18px;

}

.section-header a{

    color:var(--primary);
.
    font-weight:600;

    font-size:15px;

    transition:var(--transition);

}

.section-header a:hover{

    transform:translateX(3px);

    opacity:.85;

}

.section-header h2{

    font-size:28px;

    font-weight:700;

    letter-spacing:-.4px;

}

.logo{

    font-size:24px;

    font-weight:700;

    color:var(--primary);

}

.hero{

    max-width:720px;

    margin:36px auto 24px;

    text-align:center;

    padding:0 20px;

}

.hero h1{

    font-size:46px;

    margin-bottom:15px;

}

.hero p{

    color:var(--text-light);

    margin-bottom:35px;

}

#searchInput{

    width:100%;

    height:var(--search-height);

    border-radius:999px;

    border:1px solid var(--border);

    padding:0 24px;

    font-size:16px;

    outline:none;

    transition:.25s;

}

#searchInput:focus{

    border-color:var(--primary);

    box-shadow:0 0 0 4px rgba(249,115,22,.15);

}

main{

    max-width:var(--container);

    margin:auto;

    padding:0 20px 80px;

}


/* ===============================
   FOOTER
================================ */

footer{

    margin-top:80px;

    padding:48px 20px;

    border-top:1px solid var(--border);

    text-align:center;

    color:var(--text-light);

}

.footer-message{

    font-size:14px;

    margin-bottom:10px;

    color:var(--text);

    font-weight:500;

}

.footer-brand{

    font-size:13px;

    margin-bottom:6px;

    color:var(--text-light);

}

footer small{

    font-size:12px;

    color:var(--text-light);

}

/* ===============================
   FOOTER STATS
================================ */

.footer-stats{

    display:flex;

    justify-content:center;

    flex-wrap:wrap;

    gap:18px;

    margin:18px 0;

    font-size:14px;

    color:var(--text-light);

}

.footer-stats strong{

    color:var(--primary);

    font-weight:600;

}


/* ===============================
   BOOK CARD
================================ */

.book-card{

    background:var(--card);

    border-radius:var(--book-radius);

    overflow:hidden;

    box-shadow:0 8px 24px rgba(15,23,42,.08);

    transition:
        transform .35s ease,
        box-shadow .35s ease;

    cursor:pointer;

    height:100%;

}

.book-card:hover{

    transform:translateY(-4px);

    box-shadow:0 10px 20px rgba(15,23,42,.12);

}

.book-card:hover img{

    transform:scale(1.03);

    color:var(--primary-dark);

}

.book-card img{

    width:100%;

    aspect-ratio:2/3;

    object-fit:cover;

    background:#f3f4f6;

    transition:transform .5s ease;

}

.book-card h3{

    font-size:17px;

    font-weight:600;

    padding:14px 14px 4px;

    line-height:1.35;

    transition:color .3s ease;

    display:-webkit-box;

    -webkit-line-clamp:2;

    -webkit-box-orient:vertical;

    overflow:hidden;

    color:var(--primary);

}

.book-meta{

    display:flex;

    justify-content:space-between;

    align-items:center;

    padding:2px 14px 14px;

    gap:8px;

}

.book-author{

    color:var(--text-light);

    font-size:14px;

    overflow:hidden;

    text-overflow:ellipsis;

    white-space:nowrap;

    flex:1;

}

.book-grid{

    display:grid;

    grid-template-columns:repeat(auto-fit,minmax(180px,210px));

    justify-content:center;

    gap:24px;

}

/* ===============================
   HEADER v2
================================ */

.header-container{

    max-width:1200px;

    margin:auto;

    padding:0 20px;

    height:72px;

    display:flex;

    justify-content:space-between;

    align-items:center;

}

nav{

    display:flex;

    gap:28px;

}

nav a{

    color:var(--text-light);

    font-weight:500;

    transition:.25s;

}

nav a:hover{

    color:var(--primary);

}

/* ===============================
   HERO v2
================================ */

.hero-badge{

    display:none;

    background:var(--primary-light);

    color:var(--primary);

    padding:8px 18px;

    border-radius:999px;

    font-size:14px;

    margin-bottom:20px;

    font-weight:600;

}

.hero h1{

    font-size:52px;

    line-height:1.15;

}

.hero p{

    max-width:560px;

    margin:0 auto 24px;

    line-height:1.8;

}

/* ===========================
CATEGORY FILTER
=========================== */

.category-filter{

    display:flex;

    gap:12px;

    flex-wrap:wrap;

    justify-content:center;

    margin-top:30px;

}

/* ===============================
   SEARCH AREA
================================ */

.search-area{

    width:100%;

    margin:40px auto 0;

    display:flex;

    flex-direction:column;

    gap:16px;

}

#categorySelect,
#sortSelect{

    height:var(--control-height);

    border-radius:14px;

    border:1px solid var(--border);

    padding:0 18px;

    font-size:15px;

    background:white;

    cursor:pointer;

    transition:.25s;

    width:100%;

}

#categorySelect:hover,
#sortSelect:hover{

    border-color:var(--primary);

}

#categorySelect:focus,
#sortSelect:focus{

    outline:none;

    border-color:var(--primary);

    box-shadow:0 0 0 4px rgba(249,115,22,.15);

}

.filter-row{

    display:flex;

    flex-direction:column;

    gap:16px;

    width:100%;

}

/* ===============================
   EMPTY STATE
================================ */

.empty-state{

    display:none;

    text-align:center;

    padding:100px 20px;

    max-width:500px;

    margin:0 auto;

}

.empty-icon{

    font-size:72px;

    margin-bottom:24px;

}

.empty-state h3{

    font-size:30px;

    margin-bottom:12px;

}

.empty-state p{

    color:var(--text-light);

}

/* ===============================
   BOOK STARS
================================ */

.book-stars{

    display:flex;

    gap:2px;

    flex-shrink:0;

}

.star{

    color:#D1D5DB;

    font-size:14px;

    line-height:1;

    transition:.25s;

}

.star.filled{

    color:var(--primary);

}

/* ===============================
   LIBRARY STATS
================================ */

.stats{

    display:flex;

    justify-content:center;

    gap:10px;

    margin:20px auto 24px;

    flex-wrap:wrap;

}

.stat-card{

    display:flex;

    align-items:center;

    gap:6px;

    background:white;

    padding:7px 12px;

    border-radius:999px;

    box-shadow:0 3px 8px rgba(15,23,42,.05);

}

.stat-icon{

    font-size:14px;

}


.stat-card h3{

    font-size:15px;

    color:var(--primary);

    line-height:1;

}

.stat-card p{

    font-size:10px;

    color:var(--text-light);

}

/* ===============================
   LOAD MORE
================================ */

.load-more-container{

    display:flex;

    justify-content:center;

    margin-top:40px;

}

#loadMoreBtn{

    background:var(--primary);

    color:white;

    border:none;

    padding:14px 28px;

    border-radius:999px;

    font-size:16px;

    cursor:pointer;

    transition:.3s;

}

#loadMoreBtn:hover{

    transform:translateY(-2px);

    opacity:.9;

}

/* ===============================
   BOOK SHEET
================================ */

.book-sheet{

    position:fixed;

    inset:0;

    display:none;

    z-index:999;

}

.book-sheet.active{

    display:block;

}

.sheet-overlay{

    position:absolute;

    inset:0;

    background:rgba(15,23,42,.45);

    opacity:0;

    transition:opacity .35s ease;

}

.book-sheet.active .sheet-overlay{

    opacity:1;

}

.sheet-card{

    position:absolute;

    left:50%;

    bottom:0;

    transform:translateX(-50%);

    width:min(560px,95%);

    background:white;

    border-radius:28px 28px 0 0;

    padding:48px 32px 36px;

    animation:sheetUp .28s ease;

    transition:
        transform .35s ease,
        opacity .35s ease;

    transform:translateY(-50%,40px);

    opacity:0;

}

.book-sheet.active .sheet-card{

    transform:translateY(-50%,0);

    opacity:1;

}

.sheet-body{

    display:flex;

    flex-direction:column;

    align-items:center;

}

.sheet-title{

    width:100%;

    text-align:center;

    font-size:30px;

    font-weight:700;

    line-height:1.3;

    margin:0 0 18px;

    color:var(--text);

}

#closeSheet{

    position:absolute;

    top:24px;

    right:24px;

    width:40px;

    height:40px;

    border:none;

    border-radius:50%;

    background:#F3F4F6;

    cursor:pointer;

    font-size:18px;

}

.sheet-cover{

    width:210px;

    max-width:70%;

    aspect-ratio:2/3;

    object-fit:cover;

    border-radius:18px;

    display:block;

    margin:0 auto 28px;

    box-shadow:0 18px 40px rgba(15,23,42,.18);

    transition:.3s;

}

.sheet-cover:hover{

    transform:scale(1.03);

}

.sheet-author{
    
    text-align:center;

    color:var(--text-light);

    font-size:16px;

    margin-bottom:18px;

}

.sheet-category{

    display:inline-flex;

    align-items:center;

    gap:8px;

    background:#FFF7ED;

    color:var(--primary);

    padding:8px 18px;

    border-radius:999px;

    font-size:14px;

    font-weight:500;

    margin:0 auto 22px;

    width:max-content;

}

.sheet-stars{

    display:flex;

    justify-content:center;

    gap:6px;

    margin-bottom:22px;

    font-size:18px;

}

.sheet-date{

    text-align:center;

    color:var(--text-light);

}

.sheet-published{

    border-top:1px solid var(--border);

    padding-top:22px;

    margin-top:22px;

    text-align:center;

}

.sheet-published span{

    display:block;

    color:var(--text-light);

    font-size:13px;

    margin-bottom:6px;

}

.sheet-published strong{

    font-size:15px;

    font-weight:600;

}

.sheet-title{

    width:100%;

    text-align:center;

    font-size:32px;

    font-weight:700;

    line-height:1.3;

    margin:0 0 18px;

}

#closeSheet{

    transition:.25s;

}

#closeSheet:hover{

    background:var(--primary);

    color:white;

    transform:rotate(90deg);

}

@media (max-width:768px){

    .header-container{

        display:flex;
        flex-direction:column;
        align-items:center;
        gap:12px;

    }

    .logo{

        text-align:center;

    }

    header{

        height:auto;
        padding:12px 0;

    }

    nav{

        display:flex;
        justify-content:center;
        gap:18px;
        flex-wrap:wrap;

    }

    .hero{

        margin:50px auto;
        padding:0 20px;

    }

    .hero h1{

        font-size:36px;
        line-height:1.2;

    }

    .hero p{

        font-size:15px;

    }

    #searchInput,
    #categorySelect,
    #sortSelect{

        width:100%;
        max-width:none;
        box-sizing:border-box;

    }


    .book-grid{

        display:grid;
        grid-template-columns:repeat(2,minmax(0,1fr));
        gap:18px;

    }

    .section-header{

        flex-direction:column;
        align-items:flex-start;
        gap:8px;

    }

    .stats{

        gap:12px;

    }

}

@media (max-width:480px){

    .hero h1{

        font-size:30px;

    }

    .hero-badge{

        font-size:12px;  
        padding:6px 12px;

    }

    .logo{

        font-size:22px;

    }

    nav{

        font-size:14px;
        gap:12px;

    }

    .book-grid{

        display:grid;
        grid-template-columns:repeat(2,minmax(0,1fr));
        gap:14px;

    }

    .book-card img{

        aspect-ratio:2/3;

    }

    .book-card h3{

        font-size:14px;

    }

    .book-card p{

        font-size:12px;

    }

    .stats{

        grid-template-columns:repeat(3,1fr);
        gap:10px;

    }

    .stat-card{

        padding:14px 8px;

    }

    .stat-card h3{

        font-size:24px;

    }

    .stat-icon{

        font-size:18px;

    }

    .stat-card p{

        font-size:11px;

    }

}

@keyframes sheetUp{

    from{

        transform:translate(-50%,100%);

        opacity:.4;

    }

    to{

        transform:translate(-50%,0);

        opacity:1;

    }

}