* {
    margin: 0;
    padding: 0;
    box-sizing: border-box
}

html {
    scroll-behavior: smooth
}

body {
    font-family: Poppins, sans-serif
}

.page-title {
    text-align: center;
    margin-top: 60px
}

.page-title h1 {
    font-family: 'Playfair Display', serif;
    font-size: 60px;
    color: #c97db7
}

.page-title p {
    margin-top: 10px;
    color: #777
}

.back-btn {
    position: fixed;
    top: 25px;
    left: 25px;
    background: #fff;
    border: none;
    padding: 14px 24px;
    border-radius: 40px;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0, 0, 0, .1);
    transition: .3s
}

.back-btn:hover {
    transform: translateY(-5px)
}

.bookshelf {
    width: 90%;
    margin: 70px auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 35px
}

.book {
    background: rgba(255, 255, 255, .55);
    backdrop-filter: blur(20px);
    padding: 20px;
    border-radius: 25px;
    text-align: center;
    cursor: pointer;
    transition: .35s;
    box-shadow: 0 15px 35px rgba(220, 200, 255, .35)
}

.book:hover {
    transform: translateY(-10px) rotate(-2deg)
}

.book img {
    width: 100%;
    height: 320px;
    object-fit: cover;
    border-radius: 18px
}

.book h2 {
    margin-top: 18px;
    font-size: 24px;
    color: #8a6aae
}

.book p {
    margin-top: 8px;
    color: #666
}



body {
    font-family: Poppins, sans-serif;
    background: linear-gradient(135deg, #fff8fc, #f6f2ff, #f8ffff);
    color: #5e5473;
    overflow-x: hidden
}

#floating-books {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1
}

#themeToggle {
    position: fixed;
    top: 25px;
    right: 30px;
    width: 60px;
    height: 60px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 22px;
    background: rgba(255, 255, 255, .7);
    backdrop-filter: blur(18px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .12);
    transition: .35s
}

#themeToggle:hover {
    transform: scale(1.1) rotate(10deg)
}

.sidebar {
    position: fixed;
    left: 25px;
    top: 50%;
    transform: translateY(-50%);
    width: 90px;
    padding: 22px 0;
    border-radius: 30px;
    background: rgba(255, 255, 255, .55);
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    box-shadow: 0 15px 40px rgba(255, 182, 193, .35)
}

.nav-btn {
    width: 60px;
    height: 60px;
    border: none;
    border-radius: 18px;
    font-size: 24px;
    cursor: pointer;
    background: #fff;
    transition: .35s
}

.nav-btn:hover {
    transform: translateY(-6px) scale(1.08);
    background: #ffd7e8
}

.nav-btn.active {
    background: #ffc9e2
}

.content {
    margin-left: 140px;
    width: calc(100% - 140px)
}

.page {
    display: none;
    min-height: 100vh;
    padding: 70px;
    animation: fade .7s
}

.active-page {
    display: block
}

.hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
    min-height: 80vh
}

.hero-text {
    flex: 1
}

.hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: 88px;
    color: #c97db7
}

.hero h2 {
    margin-top: 15px;
    color: #8d7aa8;
    font-weight: 500;
    font-size: 32px
}

.hero p {
    margin-top: 25px;
    max-width: 650px;
    line-height: 1.8;
    font-size: 19px
}

.hero-book {
    font-size: 180px;
    animation: floatBook 4s ease-in-out infinite
}

.buttons {
    display: flex;
    gap: 20px;
    margin-top: 35px;
    flex-wrap: wrap
}

.main-btn,
.secondary-btn {
    padding: 18px 36px;
    border: none;
    border-radius: 40px;
    cursor: pointer;
    font-size: 17px;
    transition: .35s
}

.main-btn {
    background: #ffb7d5;
    color: #5e5473;
    font-weight: 600
}

.secondary-btn {
    background: #fff;
    color: #6e6086
}

.main-btn:hover,
.secondary-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(255, 183, 213, .4)
}

.about-card,
.book-card,
.category-card,
.feature-card,
.quote {
    background: rgba(255, 255, 255, .55);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, .8);
    border-radius: 28px;
    box-shadow: 0 15px 35px rgba(220, 200, 255, .35);
    transition: .35s
}

.about-card:hover,
.book-card:hover,
.category-card:hover,
.feature-card:hover {
    transform: translateY(-10px)
}

.section-title {
    margin: 70px 0 35px;
    text-align: center;
    font-size: 42px;
    color: #b87ab6;
    font-family: 'Playfair Display', serif
}

.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 70px
}

.feature-card {
    padding: 35px;
    text-align: center
}

.feature-card h2 {
    font-size: 50px;
    margin-bottom: 15px
}

.feature-card h3 {
    margin-bottom: 12px
}

.quote {
    margin-top: 60px;
    padding: 40px;
    text-align: center
}

.quote p {
    margin: 20px 0;
    font-style: italic;
    font-size: 22px
}

.quote span {
    color: #8e84a7
}

@keyframes floatBook {
    0% {
        transform: translateY(0) rotate(-4deg)
    }

    50% {
        transform: translateY(-18px) rotate(4deg)
    }

    100% {
        transform: translateY(0) rotate(-4deg)
    }
}

@keyframes fade {
    from {
        opacity: 0;
        transform: translateY(25px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

.carousel {
    width: 100%;
    overflow: hidden;
    margin: 40px auto 70px;
    position: relative
}

.carousel-track {
    display: flex;
    gap: 30px;
    width: max-content;
    animation: scrollBooks 28s linear infinite
}

.carousel:hover .carousel-track {
    animation-play-state: paused
}

.book-card {
    width: 230px;
    padding: 20px;
    text-align: center;
    flex-shrink: 0;
    cursor: pointer
}

.book-card img {
    width: 100%;
    height: 320px;
    object-fit: cover;
    border-radius: 18px;
    transition: .45s;
    box-shadow: 0 12px 25px rgba(0, 0, 0, .15)
}

.book-card h3 {
    margin-top: 18px;
    color: #8a6aae
}

.book-card p {
    margin-top: 8px;
    color: #85789d;
    font-size: 15px
}

.book-card:hover {
    transform: translateY(-12px)
}

.book-card:hover img {
    transform: rotate(-4deg) scale(1.05);
    box-shadow: 0 20px 40px rgba(255, 182, 193, .45)
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 60px
}

.about-card {
    padding: 35px;
    text-align: center
}

.about-card h2 {
    font-size: 50px;
    margin-bottom: 18px
}

.about-card h3 {
    margin-bottom: 12px
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 60px
}

.category-card {
    padding: 35px;
    text-align: center;
    cursor: pointer
}

.category-card .emoji {
    font-size: 55px;
    margin-bottom: 18px;
    transition: .35s
}

.category-card:hover {
    transform: translateY(-12px) scale(1.03)
}

.category-card:hover .emoji {
    transform: rotate(12deg) scale(1.15)
}

.category-card h2 {
    color: #8c6db0;
    margin-bottom: 10px
}

.category-card p {
    color: #776c91
}

footer {
    text-align: center;
    padding: 40px;
    margin-top: 70px;
    color: #897c9d;
    font-weight: 500
}

body.dark {
    background: linear-gradient(135deg, #2b2438, #3b3252, #2e2b45);
    color: #fff
}

body.dark .sidebar {
    background: rgba(50, 45, 70, .75)
}

body.dark .nav-btn {
    background: #50456a;
    color: #fff
}

body.dark .nav-btn.active {
    background: #c88ac9
}

body.dark .about-card,
body.dark .book-card,
body.dark .category-card,
body.dark .feature-card,
body.dark .quote {
    background: rgba(75, 68, 95, .75);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .15)
}

body.dark .secondary-btn {
    background: #5b5277;
    color: #fff
}

body.dark .main-btn {
    background: #f3a9c9
}

body.dark h1,
body.dark h2,
body.dark h3 {
    color: #ffd8ee
}

body.dark p,
body.dark span {
    color: #efe8ff
}

@keyframes scrollBooks {
    from {
        transform: translateX(0)
    }

    to {
        transform: translateX(-50%)
    }
}

#floating-books::after,
#floating-books::before {
    content: "📚";
    position: absolute;
    font-size: 45px;
    opacity: .18;
    animation: floatBooks 18s linear infinite
}

#floating-books::before {
    left: 8%;
    animation-delay: 0s
}

#floating-books::after {
    right: 10%;
    font-size: 55px;
    animation-delay: 8s
}

@keyframes floatBooks {
    0% {
        transform: translateY(110vh) rotate(0)
    }

    100% {
        transform: translateY(-120vh) rotate(360deg)
    }
}

.book-card {
    overflow: hidden
}

.book-card img {
    transition: .45s;
    transform-origin: left center
}

.book-card:hover img {
    transform: perspective(900px) rotateY(-15deg) scale(1.05)
}

body::before {
    content: "";
    position: fixed;
    width: 320px;
    height: 320px;
    background: #ffd9ec;
    border-radius: 50%;
    filter: blur(90px);
    left: -120px;
    top: -80px;
    opacity: .45;
    z-index: -3
}

body::after {
    content: "";
    position: fixed;
    width: 350px;
    height: 350px;
    background: #dccbff;
    border-radius: 50%;
    filter: blur(100px);
    right: -130px;
    bottom: -120px;
    opacity: .4;
    z-index: -3
}

.about-card:hover,
.book-card:hover,
.category-card:hover,
.feature-card:hover {
    box-shadow: 0 18px 45px rgba(255, 182, 193, .45), 0 0 30px rgba(220, 203, 255, .35)
}

.main-btn:hover {
    box-shadow: 0 0 25px rgba(255, 182, 193, .65)
}

.secondary-btn:hover {
    box-shadow: 0 0 20px rgba(220, 203, 255, .55)
}

.hero-book {
    cursor: default;
    animation: floatBook 4s ease-in-out infinite, bounceBook 8s ease-in-out infinite
}

@keyframes bounceBook {

    0%,
    100% {
        transform: translateY(0)
    }

    50% {
        transform: translateY(-12px)
    }
}

footer {
    background: rgba(255, 255, 255, .35);
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255, 255, 255, .6)
}

@media(max-width:1000px) {
    .hero {
        flex-direction: column;
        text-align: center
    }

    .hero-book {
        font-size: 120px
    }

    .features {
        grid-template-columns: 1fr
    }

    .about-grid {
        grid-template-columns: 1fr
    }

    .category-grid {
        grid-template-columns: repeat(2, 1fr)
    }

    .content {
        margin-left: 110px
    }
}

@media(max-width:700px) {
    .sidebar {
        position: fixed;
        bottom: 20px;
        top: auto;
        left: 50%;
        transform: translateX(-50%);
        width: 260px;
        height: 75px;
        flex-direction: row;
        justify-content: center;
        padding: 10px;
        z-index: 999
    }

    .content {
        margin: 0;
        width: 100%;
        padding-bottom: 100px
    }

    .page {
        padding: 30px
    }

    .hero h1 {
        font-size: 55px
    }

    .hero h2 {
        font-size: 24px
    }

    .hero p {
        font-size: 16px
    }

    .buttons {
        justify-content: center
    }

    .category-grid {
        grid-template-columns: 1fr
    }

    .book-card {
        width: 180px
    }

    .book-card img {
        height: 260px
    }

}

    .book-card::after {
        content: "💖";
        position: absolute;
        right: 15px;
        top: 15px;
        font-size: 24px;
        opacity: 0;
        transition: .35s
    }

    .book-card:hover::after {
        opacity: 1;
        transform: scale(1.2)
    }

    .floating-books {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        pointer-events: none;
        overflow: hidden;
        z-index: -1
    }

    .floating-books span {
        position: absolute;
        bottom: -120px;
        font-size: 42px;
        opacity: .28;
        animation: floatBook 18s linear infinite
    }

    .floating-books span:nth-child(1) {
        left: 5%;
        animation-duration: 16s;
        font-size: 48px
    }

    .floating-books span:nth-child(2) {
        left: 15%;
        animation-duration: 20s;
        animation-delay: 3s
    }

    .floating-books span:nth-child(3) {
        left: 28%;
        animation-duration: 18s;
        animation-delay: 6s
    }

    .floating-books span:nth-child(4) {
        left: 42%;
        animation-duration: 23s;
        animation-delay: 1s
    }

    .floating-books span:nth-child(5) {
        left: 55%;
        animation-duration: 17s;
        animation-delay: 4s
    }

    .floating-books span:nth-child(6) {
        left: 68%;
        animation-duration: 22s;
        animation-delay: 2s
    }

    .floating-books span:nth-child(7) {
        left: 78%;
        animation-duration: 19s;
        animation-delay: 5s
    }

    .floating-books span:nth-child(8) {
        left: 88%;
        animation-duration: 21s;
        animation-delay: 7s
    }

    .floating-books span:nth-child(9) {
        left: 94%;
        animation-duration: 24s;
        animation-delay: 2s
    }

    .floating-books span:nth-child(10) {
        left: 35%;
        animation-duration: 18s;
        animation-delay: 8s
    }

    @keyframes floatBook {
        0% {
            transform: translateY(0) rotate(0);
            opacity: 0
        }

        15% {
            opacity: .25
        }

        50% {
            transform: translateY(-50vh) rotate(15deg)
        }

        100% {
            transform: translateY(-120vh) rotate(-20deg);
            opacity: 0
        }
    }
}

.category-btn {
    width: 100%;
    padding: 18px;
    font-size: 25px;
    border: none;
    border-radius: 18px;
    cursor: pointer;
    background: #5b3cc4;
    color: #fff;
    transition: .3s
}

.category-btn:hover {
    transform: scale(1.02)
}

.novels-card {
    cursor: pointer
}

.novels-list {
    display: none;
    margin-top: 30px
}

.novel-card {
    background: rgba(255, 255, 255, .12);
    backdrop-filter: blur(15px);
    padding: 15px;
    border-radius: 18px;
    transition: .3s
}

.novel-card:hover {
    transform: translateY(-8px)
}

.book-grid.hidden {
    display: none
}

.book-card-small:hover {
    transform: translateY(-10px) rotate(-2deg)
}

.book-card-small img {
    width: 100%;
    height: 290px;
    object-fit: cover;
    border-radius: 18px
}

.book-card-small h3 {
    margin-top: 15px;
    color: #8a6aae
}

.book-card-small p {
    margin-top: 6px;
    color: #777
}

.book-info img {
    width: 260px;
    border-radius: 20px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, .15)
}

.book-details {
    flex: 1
}

.book-details h2 {
    font-size: 36px;
    color: #8a6aae
}

.book-details h3 {
    margin: 18px 0;
    color: #666
}

.book-details p {
    line-height: 1.8;
    color: #555
}

#readBook:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(255, 183, 213, .4)
}