html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

#ebooks-hero {
    overflow-x: clip;
}

.floating-books-layer {
    position: absolute;
    inset: 0;
    z-index: 4;
    pointer-events: none;
    overflow: hidden;
}

.floating-book {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--float-size, 30px);
    height: var(--float-size, 30px);
    border-radius: 9999px;
    border: 1px solid transparent;
    font-size: calc(var(--float-size, 30px) * 0.38);
    opacity: 0.42;
    backdrop-filter: blur(2px);
    will-change: transform, opacity;
    transform: translate3d(0, 0, 0);
}

.floating-book--orange {
    background: rgba(255, 237, 231, 0.84);
    border-color: rgba(241, 90, 37, 0.36);
    color: rgba(241, 90, 37, 0.82);
}

.floating-book--sky {
    background: rgba(236, 247, 255, 0.84);
    border-color: rgba(14, 165, 233, 0.36);
    color: rgba(14, 165, 233, 0.8);
}

.floating-book--teal {
    background: rgba(234, 250, 247, 0.84);
    border-color: rgba(20, 184, 166, 0.35);
    color: rgba(15, 136, 123, 0.78);
}

.hero-noise {
    background-image: radial-gradient(rgba(15, 23, 42, 0.12) 0.45px, transparent 0.45px);
    background-size: 3px 3px;
    pointer-events: none;
}

#ebook-outline {
    isolation: isolate;
}

#ebook-outline .outline-grid-overlay {
    pointer-events: none;
    opacity: 0.55;
    background-image:
        linear-gradient(rgba(14, 165, 233, 0.09) 1px, transparent 1px),
        linear-gradient(90deg, rgba(241, 90, 37, 0.09) 1px, transparent 1px);
    background-size: 56px 56px;
}

#ebook-outline .outline-patch {
    position: absolute;
    border-radius: 9999px;
    filter: blur(54px);
    pointer-events: none;
}

#ebook-outline .outline-patch--one {
    width: 310px;
    height: 310px;
    left: -5%;
    top: 6%;
    background: rgba(14, 165, 233, 0.24);
}

#ebook-outline .outline-patch--two {
    width: 360px;
    height: 360px;
    right: -8%;
    top: 30%;
    background: rgba(241, 90, 37, 0.22);
}

#ebook-outline .outline-patch--three {
    width: 280px;
    height: 280px;
    left: 38%;
    bottom: -14%;
    background: rgba(20, 184, 166, 0.2);
}

@media (max-width: 640px) {
    .floating-book {
        opacity: 0.24;
    }

    .hero-noise {
        opacity: 0.2;
    }

    #ebook-outline .outline-grid-overlay {
        background-size: 38px 38px;
        opacity: 0.46;
    }
}

@media (min-width: 641px) and (max-width: 1023px) {
    .floating-book {
        opacity: 0.3;
    }
}

/* Ebook form modal refresh */
#globalallwebsite-modal {
    backdrop-filter: blur(6px);
    background: rgba(2, 6, 23, 0.62);
    padding: 18px;
}

#globalallwebsite-modal .globalallwebsite-modal-content.ebooks-modal-shell {
    width: min(1040px, 96vw);
    max-width: 1040px;
    min-height: auto;
    max-height: min(88vh, 760px);
    border-radius: 28px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    box-shadow: 0 34px 70px rgba(15, 23, 42, 0.45);
    overflow: hidden;
    position: relative;
    background: #f8fafc;
}

#globalallwebsite-modal .globalallwebsite-modal-body.ebooks-modal-body {
    display: grid;
    grid-template-columns: minmax(250px, 0.9fr) minmax(0, 1.1fr);
    align-items: stretch;
    gap: 0;
    padding: 0;
    height: 100%;
}

#globalallwebsite-modal .ebooks-modal-aside {
    position: relative;
    padding: clamp(20px, 3vw, 36px);
    background: linear-gradient(160deg, #fff7ed 0%, #ffedd5 46%, #e0f2fe 100%);
    border-right: 1px solid rgba(148, 163, 184, 0.25);
}

#globalallwebsite-modal .ebooks-modal-aside::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 16% 14%, rgba(241, 90, 37, 0.22) 0, transparent 44%),
        radial-gradient(circle at 84% 88%, rgba(14, 165, 233, 0.24) 0, transparent 40%);
    pointer-events: none;
}

#globalallwebsite-modal .ebooks-modal-tag,
#globalallwebsite-modal .ebooks-modal-title,
#globalallwebsite-modal .ebooks-modal-copy,
#globalallwebsite-modal .ebooks-modal-points {
    position: relative;
    z-index: 1;
}

#globalallwebsite-modal .ebooks-modal-tag {
    display: inline-flex;
    margin: 0;
    padding: 6px 11px;
    border-radius: 999px;
    border: 1px solid rgba(249, 115, 22, 0.4);
    background: rgba(255, 255, 255, 0.86);
    color: #9a3412;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 11px;
    font-weight: 800;
}

#globalallwebsite-modal .ebooks-modal-title {
    margin: 14px 0 10px;
    font-size: clamp(1.2rem, 2vw, 1.9rem);
    line-height: 1.2;
    color: #0f172a;
}

#globalallwebsite-modal .ebooks-modal-copy {
    margin: 0;
    color: #334155;
    line-height: 1.65;
    font-size: 0.96rem;
}

#globalallwebsite-modal .ebooks-modal-points {
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 11px;
}

#globalallwebsite-modal .ebooks-modal-points li {
    display: flex;
    gap: 10px;
    align-items: center;
    color: #1e293b;
    font-weight: 600;
    font-size: 0.94rem;
}

#globalallwebsite-modal .ebooks-modal-points i {
    width: 27px;
    height: 27px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #0369a1;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(56, 189, 248, 0.45);
    font-size: 13px;
}

#globalallwebsite-modal .ebooks-modal-form-wrap {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    padding: clamp(10px, 1.8vw, 16px);
}

#globalallwebsite-modal .iframebg.ebooks-modal-iframe {
    width: 100%;
    max-width: none;
    min-height: 560px;
    height: min(72vh, 640px);
    margin: 0;
    border-radius: 20px;
    border: 1px solid rgba(203, 213, 225, 0.85);
    background: #fff;
    box-shadow: inset 0 0 0 1px rgba(226, 232, 240, 0.45);
}

#globalallwebsite-modal .globalallwebsite-close-button.ebooks-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 6;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(148, 163, 184, 0.42);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: #0f172a;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

#globalallwebsite-modal .globalallwebsite-close-button.ebooks-modal-close:hover {
    transform: scale(1.06);
    background: #ffffff;
}

@media (max-width: 900px) {
    #globalallwebsite-modal .globalallwebsite-modal-content.ebooks-modal-shell {
        width: min(720px, 95vw);
    }

    #globalallwebsite-modal .globalallwebsite-modal-body.ebooks-modal-body {
        grid-template-columns: 1fr;
    }

    #globalallwebsite-modal .ebooks-modal-aside {
        border-right: 0;
        border-bottom: 1px solid rgba(148, 163, 184, 0.25);
        padding: 20px 18px 16px;
    }

    #globalallwebsite-modal .ebooks-modal-points {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #globalallwebsite-modal .iframebg.ebooks-modal-iframe {
        min-height: 500px;
        height: min(67vh, 560px);
        border-radius: 14px;
    }
}

@media (max-width: 640px) {
    #globalallwebsite-modal {
        padding: 10px;
    }

    #globalallwebsite-modal .globalallwebsite-modal-content.ebooks-modal-shell {
        width: 100%;
        border-radius: 18px;
    }

    #globalallwebsite-modal .ebooks-modal-aside {
        padding: 16px 14px 14px;
    }

    #globalallwebsite-modal .ebooks-modal-title {
        margin-top: 10px;
        font-size: 1.22rem;
    }

    #globalallwebsite-modal .ebooks-modal-points {
        grid-template-columns: 1fr;
        gap: 9px;
        margin-top: 14px;
    }

    #globalallwebsite-modal .ebooks-modal-form-wrap {
        padding: 10px;
    }

    #globalallwebsite-modal .iframebg.ebooks-modal-iframe {
        min-height: 470px;
        height: min(66vh, 520px);
    }
}
