#book-reader {
    position: fixed;
    z-index: 999;
    top: 0;
    max-width: 420px;
    width: 100%;
    height: 100svh;
    margin: auto;
    background-color: rgba(0, 0, 0, 0.5);
    transition: 0.5s;
    transform: scale(0);
}

[ref="epubjs-mk"] {
    background: url("data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPScxLjEnIHhtbG5zPSdodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZycgeG1sbnM6eGxpbms9J2h0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsnIHg9JzBweCcgeT0nMHB4JyB2aWV3Qm94PScwIDAgNzUgNzUnPjxnIGZpbGw9JyNCREJEQkQnIGlkPSdidWJibGUnPjxwYXRoIGNsYXNzPSdzdDAnIGQ9J00zNy41LDkuNEMxOS42LDkuNCw1LDIwLjUsNSwzNC4zYzAsNS45LDIuNywxMS4zLDcuMSwxNS42TDkuNiw2NS42bDE5LTcuM2MyLjgsMC42LDUuOCwwLjksOC45LDAuOSBDNTUuNSw1OS4yLDcwLDQ4LjEsNzAsMzQuM0M3MCwyMC41LDU1LjQsOS40LDM3LjUsOS40eicvPjwvZz48L3N2Zz4=") no-repeat;
    width: 20px;
    height: 20px;
    cursor: pointer;
    margin-left: 0;
}

#book-reader.active {
    transform: scale(1);
}

#book-reader #book-content {
    height: 100%;
    padding: 30px 30px 70px;
}

#book-reader #viewer {
    width: 100%;
    height: 100%;
}
#book-reader #navigation {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    padding: 50px 0 75px;
    display: none;
}
#book-reader #navigation.active {
    display: flex;
}
#book-reader #navigation div{
    width: 50%;
}

/* #book-reader #prev {
    left: 0;
}

#book-reader #next {
    right: 0;
} */

/* #book-reader #next,
#book-reader #prev {
    top: 0;
    position: absolute;
    border: none;
    background: none;
    font-size: 2rem;
    color: darkgray;
    cursor: pointer;
    height: 100%;
}

#book-reader #prev:hover,
#book-reader #next:hover {
    color: black;
}

#book-reader #prev i,
#book-reader #next i {
    opacity: 0;
} */

#book-reader #book-content.default {
    background: white;
}

#book-reader #book-content.dark {
    background: #4b4a4d;
}

#book-reader #book-content.gray {
    background: #eeeeee;
}

#book-reader #book-content.sharp {
    background: #ffffff;
}

#book-reader #book-content.relaxing {
    background: #f0e2c7;
}

#book-reader #book-content.focused {
    background: #fffcf1;
}

#book-reader .page-info {
    position: relative;
    width: 100%;
    margin-top: -25px;
}
#book-reader .page-info .progress-reading-container {
    height: 4px;
    position: absolute;
    background: #ccc;
    width: 100%;
    border-radius: 2px;
}
#book-reader .page-info .progress-reading {
    height: 4px;
    position: absolute;
    background: #000000;
    width: 0;
    transition: 0.5s;
    border-radius: 2px;
}

#book-reader #bottom-section {
    display: flex;
    padding: 0 25px;
    position: relative;
    align-items: center;
    justify-content: center;
}

#book-reader #button-section {
    right: 0;
    position: absolute;
    bottom: -45px;
    z-index: 9;
}
#book-reader #menu-highlight-text {
    background: #e7e6eb;
    padding: 10px 16px;
    border-radius: 10px;
    font-weight: 500;
    cursor: pointer;
    position: absolute;
    left: 0;
    bottom: -45px;
    z-index: 9;
}

#book-reader #button-section #open-general-settings {
    background: #ecebf0;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 6px;
    color: gray;
}

#book-reader #button-section #open-general-settings:hover {
    color: black;
}

#book-reader #close-book {
    background: #ecebf0;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    position: absolute;
    top: 18px;
    right: 30px;
    color: gray;
    z-index: 9;
}

#book-reader #close-book:hover {
    color: black;
}

#book-reader #popup-settings {
    position: absolute;
    display: flex;
    justify-content: end;
    right: 0;
    height: 100%;
    bottom: 0;
    transition: 0.3s;
    opacity: 0;
    width: 100%;
    transform: translateY(100%);
    flex-direction: column;
}

#book-reader #popup-settings.active {
    opacity: 1;
    transform: translateY(0);
}

#book-reader #popup-settings #menu-show {
    background: #e7e6eb;
    margin-bottom: 5px;
    border-radius: 10px;
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 25px rgba(0, 0, 0, 0.25);
}

#book-reader #popup-settings #popup-1 {
    padding: 15px 25px;
    width: 320px;
    align-self: end;
    transform: translateY(100%);
    transition: 0.2s;
}

#book-reader #popup-settings #popup-1.active {
    transform: translateY(-70px);
}

#book-reader #popup-settings #menu-show span {
    padding: 10px 16px;
}

#book-reader #popup-settings #menu-show span.current-page {
    padding: 0;
}

#book-reader #popup-settings #menu-show a {
    font-size: 20px;
    color: #fff;
    padding: 10px 16px;
    width: 30%;
    background: #37363b;
    text-align: end;
    border-radius: 0 10px 10px 0;
}

#book-reader #popup-settings #menu-search {
    background: #e7e6eb;
    padding: 10px 16px;
    margin-bottom: 5px;
    border-radius: 10px;
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    cursor: pointer;
    box-shadow: 0 2px 25px rgba(0, 0, 0, 0.25);
}

#book-reader #popup-settings #menu-search i {
    font-size: 20px;
}

#book-reader #popup-settings #menu-theme {
    background: #e7e6eb;
    padding: 10px 16px;
    margin-bottom: 5px;
    border-radius: 10px;
    font-weight: 500;
    display: flex;
    cursor: pointer;
    justify-content: space-between;
    box-shadow: 0 2px 25px rgba(0, 0, 0, 0.25);
}
#book-reader #popup-settings #menu-theme i {
    font-size: 20px;
}

#book-reader #popup-settings #menu-etc {
    margin-bottom: 5px;
}

#book-reader #popup-settings #menu-etc a {
    background: #e7e6eb;
    padding: 10px;
    text-align: center;
    width: 100%;
    display: block;
    color: #000000;
    font-size: 20px;
    border-radius: 10px;
    box-shadow: 0 0 22px rgba(0, 0, 0, 0.25);
}

#book-reader #popup-settings #menu-etc #save-bookmark.active .fa-regular {
    display: none;
}

#book-reader #popup-settings #menu-etc #save-bookmark .fa-solid {
    display: none;
}

#book-reader #popup-settings #menu-etc #save-bookmark.active .fa-solid {
    display: block;
}

#book-reader #theme-selector {
    position: absolute;
    display: flex;
    bottom: 0;
    justify-content: end;
    width: 100%;
    flex-direction: column;
    left: 0;
    height: 0;
    background: #808080cc;
    transform: translateY(100%);
    transition: 0.3s;
    z-index: 9;
}

#book-reader #theme-selector.active {
    height: 100svh;
    transform: translateY(0);
}

#book-reader #theme-selector #theme-and-settings {
    height: 0;
    transform: translateY(0);
    border-radius: 16px 16px 0 0;
}

#book-reader #theme-selector.active #theme-and-settings {
    background: #f6f6f6;
    height: 50vh;
    padding: 10px 20px;
}

#book-reader #theme-selector .header {
    display: flex;
    justify-content: space-between;
}

#book-reader #theme-selector #close-theme-selector {
    background: #ecebf0;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    border-radius: 50%;
    padding: 0;
    width: 32px;
    height: 32px;
    color: gray;
    align-self: start;
}

#book-reader #theme-selector #close-theme-selector:hover {
    color: black;
}

#book-reader #theme-selector h3 {
    margin-bottom: 1rem;
}

#book-reader #theme-selector #theme-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 13px;
}

#book-reader #theme-selector #theme-content .theme-option {
    text-align: center;
    border: 1px solid lightgray;
    padding: 20px;
    border-radius: 12px;
    cursor: pointer;
}

#book-reader #theme-selector #theme-content .theme-option.active {
    border: 2px solid black;
}

#book-reader #theme-selector #theme-content .theme-option.default {
    background: #fff;
}

#book-reader #theme-selector #theme-content .theme-option.dark {
    background: #4b4a4d;
    color: gray;
}

#book-reader #theme-selector #theme-content .theme-option.gray {
    background: #eeeeee;
}

#book-reader #theme-selector #theme-content .theme-option.sharp {
    background: #ffffff;
    font-weight: 800;
}

#book-reader #theme-selector #theme-content .theme-option.relaxing {
    background: #f0e2c7;
    color: #5B4636;
}

#book-reader #theme-selector #theme-content .theme-option.focused {
    background: #fffcf1;
}

#book-reader #theme-selector #theme-content .theme-option h5 {
    font-size: 2rem;
    margin-bottom: 6px;
}

#book-reader #page-list {
    position: absolute;
    display: flex;
    bottom: 0;
    justify-content: end;
    flex-direction: column;
    z-index: 9;
    left: 0;
    height: 0;
    background: #808080e3;
    transform: translateY(100%);
    transition: 0.3s;
    opacity: 0;
}

#book-reader #page-list.active {
    height: 100svh;
    transform: translateY(0);
    opacity: 1;
}

#book-reader #page-list #detail-list {
    display: flex;
    padding: 16px;
}

#book-reader #page-list #page-list-content {
    background: #f6f6f6;
    border-radius: 16px 16px 0 0;
    display: flex;
    height: 0;
    flex-direction: column;
}

#book-reader #page-list.active #page-list-content {
    height: calc(100% - 180px);
}

#book-reader #page-list .left {
    width: 20%;
    padding: 0 15px;
    display: flex;
    align-items: center;
}

#book-reader #page-list .left img {
    width: 100%;
}

#book-reader #page-list .right {
    display: flex;
    width: 80%;
    justify-content: space-between;
    gap: 10px;
}

#book-reader #page-list .right .title-section {
    display: flex;
    justify-content: space-around;
    flex-direction: column;
}

#book-reader #page-list .right .title-section .page-info {
    font-weight: 600;
    color: black;
}

#book-reader #page-list .right .title-section .page-info span {
    color: gray;
}

#book-reader #page-list .right .title-section .page-info span.total-pages,
#book-reader #page-list .right .title-section .page-info span.current-page {
    color: black;
}

#book-reader #page-list .right #close-ebook-lists {
    background: #ecebf0;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    border-radius: 50%;
    padding: 0;
    width: 32px;
    height: 32px;
    align-self: start;
    color: gray;
}

#book-reader #page-list .right #close-ebook-lists:hover {
    color: black;
}

#book-reader #list-ebook-content {
    overflow: auto;
    height: 85%;
}

#book-reader #list-ebook-content .ebook-list {
    display: flex;
    justify-content: space-between;
    padding: 10px 20px;
    cursor: pointer;
    border-bottom: 1px solid #e9e6ed;
}

#book-reader #list-ebook-content .ebook-list.active {
    background: #dedede;
}

#book-reader #list-ebook-content .ebook-list h6 {
    text-transform: uppercase;
    font-weight: 600;
    font-size: 14px;
}

#book-reader #list-ebook-content .ebook-list span {
    color: #767676;
    font-weight: 500;
}

#loader-content-2 {
    cursor: progress;
    position: absolute;
    width: 100%;
    top: 0;
    height: 100%;
    background: #ffffffba;
    z-index: 999;
    max-width: 420px;
    margin: auto;
    display: none;
    align-items: center;
    justify-content: center;
}

#loader-content-2.active {
    display: flex;
}

#loader-content-2 .loader-spin,
#loader-content-2 .loader-spin div {
    box-sizing: border-box;
}

#loader-content-2 .loader-spin {
    display: inline-block;
    position: relative;
    width: 80px;
    height: 80px;
    color: var(--primary);
}

#loader-content-2 .loader-spin div {
    position: absolute;
    width: 6.4px;
    height: 6.4px;
    background: currentColor;
    border-radius: 50%;
    animation: loader-animation 1.2s linear infinite;
}

#loader-content-2 .loader-spin div:nth-child(1) {
    animation-delay: 0s;
    top: 36.8px;
    left: 66.24px;
}

#loader-content-2 .loader-spin div:nth-child(2) {
    animation-delay: -0.1s;
    top: 22.08px;
    left: 62.29579px;
}

#loader-content-2 .loader-spin div:nth-child(3) {
    animation-delay: -0.2s;
    top: 11.30421px;
    left: 51.52px;
}

#loader-content-2 .loader-spin div:nth-child(4) {
    animation-delay: -0.3s;
    top: 7.36px;
    left: 36.8px;
}

#loader-content-2 .loader-spin div:nth-child(5) {
    animation-delay: -0.4s;
    top: 11.30421px;
    left: 22.08px;
}

#loader-content-2 .loader-spin div:nth-child(6) {
    animation-delay: -0.5s;
    top: 22.08px;
    left: 11.30421px;
}

#loader-content-2 .loader-spin div:nth-child(7) {
    animation-delay: -0.6s;
    top: 36.8px;
    left: 7.36px;
}

#loader-content-2 .loader-spin div:nth-child(8) {
    animation-delay: -0.7s;
    top: 51.52px;
    left: 11.30421px;
}

#loader-content-2 .loader-spin div:nth-child(9) {
    animation-delay: -0.8s;
    top: 62.29579px;
    left: 22.08px;
}

#loader-content-2 .loader-spin div:nth-child(10) {
    animation-delay: -0.9s;
    top: 66.24px;
    left: 36.8px;
}

#loader-content-2 .loader-spin div:nth-child(11) {
    animation-delay: -1s;
    top: 62.29579px;
    left: 51.52px;
}

#loader-content-2 .loader-spin div:nth-child(12) {
    animation-delay: -1.1s;
    top: 51.52px;
    left: 62.29579px;
}

#highlight-modal {
    position: absolute;
    width: 100%;
    height: 100%;
    display: none;
    left: 0;
    top: 0;
    margin: auto;
}

#highlight-modal .modal-button {
    text-align: end;
    margin-top: -16px;
}

#highlight-modal #close-highlight {
    background: #ecebf0;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: gray;
}

#highlight-modal #close-highlight:hover {
    color: black;
}

#highlight-modal.active {
    display: block;
}

#highlight-modal.add .show-in-remove,
#highlight-modal.remove .show-in-add {
    display: none;
}

#highlight-content {
    background-color: #FF6A00;
    padding: 20px;
    text-align: center;
    color: white;
    width: 100%;
    position: absolute;
    top: 0;
    z-index: 9;
}

#highlight-content p {
    line-height: 25px;
}

#highlight-content #save-highlight-button {
    background-color: rgba(255, 255, 255, 0.5);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    margin-top: 10px;
    width: 100%;
}

#highlight-content #remove-highlight-button {
    background-color: red;
    color: white;
    border: none;
    border-radius: 10px;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    margin-top: 10px;
    width: 100%;
}

#search-container {
    position: absolute;
    display: flex;
    bottom: 0;
    justify-content: end;
    flex-direction: column;
    width: 100%;
    z-index: 9;
    left: 0;
    height: 0;
    background: #808080e3;
    transform: translateY(100%);
    transition: 0.3s;
    opacity: 0;
}

#search-container.active {
    height: 100svh;
    transform: translateY(0);
    opacity: 1;
}

#search-container #search-content {
    background: #f6f6f6;
    border-radius: 16px 16px 0 0;
    display: flex;
    height: 0;
    flex-direction: column;
    padding: 0;
}

#search-container #search-content #top-section {
    height: 15%;
}

#search-container #search-results {
    height: 85%;
    display: none;
    flex-direction: column;
}

#search-container #search-results.active {
    display: flex;
}

#search-container #search-results h4 {
    height: 40px;
}

#search-container #search-results #search-results-list {
    overflow: auto;
    height: calc(100% - 40px);
    display: flex;
    flex-direction: column;
    align-items: center;
}

#search-container #search-results-list .result {
    background: white;
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 10px;
    width: 100%;
}

#search-container #search-results-list .result .view-result-content {
    text-align: end;
    margin-top: 10px;
}

#search-container #search-results-list .result .view-result-content a {
    padding: 5px 15px;
    background: var(--primary);
    color: white;
    font-size: 1rem;
    border-radius: 8px;
    border: none;
    text-align: center;
    font-weight: 500;
    cursor: pointer;
}

#search-container #search-results-list .result .highlight {
    background: yellow;
}

#search-container.active #search-content {
    height: 80%;
    padding: 20px;
}

#search-container .close {
    text-align: end;
    margin-bottom: 10px;
}

#search-container .close button {
    background: #ecebf0;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: gray;
}

#search-container .close button:hover {
    color: black;
}

#search-container #search-section {
    position: relative;
}

#search-section input {
    padding: 15px 50px 15px 15px;
}

#search-section button {
    position: absolute;
    right: 0;
    border: none;
    width: 50px;
    height: 48px;
    border-radius: 0 10px 10px 0;
}
#search-section #error-search-message {
    display: none;
    color: red;
    margin: 10px;
}

#font-size-formatter {
    display: flex;
    background: #d9d8db;
    margin-bottom: 20px;
    border-radius: 10px;
    justify-content: space-between;
    align-items: center;
    padding: 5px;
}

#font-size-formatter #decrease-font {
    width: 50%;
    text-align: center;
    font-size: 1rem;
    font-weight: 700;
    border-right: 1px solid;
    cursor: pointer;
    padding: 5px;
}

#font-size-formatter #increase-font {
    width: 50%;
    text-align: center;
    font-size: 1.3rem;
    font-weight: 700;
    padding: 5px;
    cursor: pointer;
}

@media screen and (max-width: 415px) {
    #book-reader #theme-selector #theme-content .theme-option {
        padding: 15px;
    }
}

@media screen and (max-width: 380px) {
    .theme-option span {
        font-size: 14px;
    }
}