html, body {
    margin: 0;
    padding: 0;
}

.book {
    padding: 10px;
    box-sizing: border-box;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    background-color: burlywood;
    color: #000;
    font-size: 20px;
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.book-pages {
    height: 90vh;
    overflow: hidden;
    border-bottom: 1px dashed #000;
    box-sizing: border-box;
    position: relative;
}

.book-pages:after {
    content: '';
    width: calc(100% - 7px);
    height: 70px;
    background: linear-gradient(to top, burlywood, transparent);
    position: absolute;
    bottom: 0;
    pointer-events: none;
}

.book-pages-inner {
    height: 100%;
    overflow: auto;
    padding-right: 30px;
    box-sizing: border-box;
}

.book-pages-inner::-webkit-scrollbar {
    width: 7px;
}

.book-pages-inner::-webkit-scrollbar-track {
    background-color: chocolate;
}

.book-pages-inner::-webkit-scrollbar-thumb {
    background-color: brown;
}

.page-control {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    box-sizing: border-box;
}

.page-arrow.prev-page:after {
    content: '←';
}

.page-arrow.next-page:after {
    content: '→';
}

.page-arrow {
    cursor: pointer;
    font-size: 25px;
    display: block;
}

.page-num {
    cursor: pointer;
}

.page-arrow:hover, .page-num:hover {
    color: brown;
}

.book-interface {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 25px;
}

.page {
    opacity: 1;
    transition: all 1s;
    
    position: relative;
}

.page-inner {
    position: absolute;
}

.book-page-hide {
    opacity: 0;
    pointer-events: none;
    z-index: 1000;
}

.page-arrow[disabled] {
    opacity: .2;
    pointer-events: none;
}

.page-inner {
    padding-bottom: 50px;
}

.book-page-hide .page-inner {
    display: none;
}

.modal {
    position: fixed;
    z-index: 100;
    background: rgba(0, 0, 0, .5);
    display: flex;
    align-items: center;
    justify-content: center;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
}

.modal-inner {
    display: flex;
    flex-direction: column;
    gap: 15px;
    position: relative;
    background: burlywood;
    border-radius: 10px;
    box-sizing: border-box;
    padding: 25px;
    min-width: 300px;
    max-width: 90vw;
    max-height: 90dvh;
    max-height: 90vh;
}

.modal-title {
    font-size: 30px;
}

.modal-content {
    font-size: 20px;
    flex: 1;
}

.close-icon {
    position: absolute;
    top: 10px;
    right: 15px;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: brown;
    font-size: 17px;
    color: white;
    transition: all .5s;
    cursor: pointer;
}

.close-icon::after {
    content: '✖';
}

.close-icon:hover {
    transform: rotate(360deg);
}

.style-select {
    outline: none !important;
    border: 1px solid silver !important;
    font-size: 20px;
    border-radius: 10px;
    cursor: pointer;
    padding: 10px;
    box-sizing: border-box;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 20px;
}

.site-link {
    color: blue !important;
    transition: all .5s;
}

.site-link:hover {
    color: brown !important;
}

body.dark-theme .book {
    background: black;
    color: white;
}

body.dark-theme .book-pages:after {
    background: linear-gradient(to top, black, transparent)
}

body.dark-theme .book-pages-inner::-webkit-scrollbar-track {
    background-color: silver;
}

body.dark-theme .book-pages-inner::-webkit-scrollbar-thumb {
    background-color: grey;
}

.dark-mode img {
    width: 40px;
}

.dark-mode {
    transition: all 1s;
    cursor: pointer;
}

.dark-mode:not(.active) {
    opacity: .4;
}

body.dark-theme .modal-inner {
    background: black;
    color: white;
    border: 1px solid white;
}

body.dark-theme .site-link {
    color: yellow !important;
}

body.dark-theme .site-link:hover {
    color: brown !important;
}
