.book-preview {
  width: 100%;
  border: solid 1px #e2e2e2;
  display: flex;
  flex-direction: column;
  background: #f0ede7;
}

.book-preview .book-preview-tool {
  padding: 8px;
  background: #f4f0e8;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  border-bottom: solid 1px rgba(138,148,143, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  z-index: 1;
}

.book-preview .book-preview-tool button {
  padding: 0 8px;
  height: 32px;
  background: #f5f0e8;
  border-radius: 2px;
  border: solid 1px rgba(138,148,143,0.3);
  cursor: pointer;
}

.book-preview .book-preview-tool input {
  width: 48px;
  height: 32px;
  border-radius: 2px;
  border: solid 1px rgba(138,148,143,0.3);
  text-align: center;
}

.book-preview .book-preview-tool button:hover {
  background: rgba(232,200,160,0.3);
}

.book-preview .book-preview-quality-tip {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 10px 12px;
  font-size: 12px;
  color: #6b5b4f;
  background: rgba(232, 200, 160, 0.25);
  border-bottom: solid 1px rgba(138, 148, 143, 0.3);
}

.book-preview .book-preview-quality-tip .layui-icon {
  flex-shrink: 0;
  margin-top: 2px;
  font-size: 14px;
  line-height: 1;
  color: #b36b40;
}

.book-preview .book-preview-quality-tip-text {
  flex: 1;
  min-width: 0;
  margin: 0;
  line-height: 1.6;
  text-indent: 0;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.book-preview .book-preview-download-hd {
  display: inline;
  padding: 0;
  margin: 0;
  border: none;
  background: none;
  color: #b36b40;
  font-size: inherit;
  font-weight: bold;
  line-height: inherit;
  cursor: pointer;
  text-decoration: underline;
  vertical-align: baseline;
  white-space: nowrap;
}

.book-preview .book-preview-download-hd:hover {
  color: #8a4f2e;
}

.book-preview .book-preview-view-placeholder {
  min-height: 200px;
}

.book-preview .book-preview-error {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  text-align: center;
  width: 100%;
  height: 100%;
}

.book-preview .book-preview-error-text {
  margin: 0;
  font-size: 14px;
  color: #6b5b4f;
  line-height: 1.6;
  max-width: 320px;
}

.book-preview .book-preview-busy {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px 16px;
  text-align: center;
}

.book-preview .book-preview-busy-text {
  margin: 0;
  font-size: 14px;
  color: #6b5b4f;
  line-height: 1.6;
}

.book-preview .book-preview-retry {
  padding: 0 16px;
  height: 32px;
  background: #f5f0e8;
  border-radius: 2px;
  border: solid 1px rgba(138, 148, 143, 0.3);
  color: #6b5b4f;
  font-size: 12px;
  cursor: pointer;
}

.book-preview .book-preview-retry:hover {
  background: rgba(232, 200, 160, 0.3);
}


.book-preview .book-preview-main {
  flex: 1;
  min-height: 0;
  display: flex;
}

.book-preview-nav-title {
  display: flex;
  align-items: center;
  padding: 8px;
  gap: 8px;
  font-weight: bold;
  border-bottom: solid 1px #e2e2e2;
}

.book-preview .book-preview-nav {
  width: 200px;
  border-right: solid 1px rgba(138,148,143, 0.3);
  background: rgba(245, 240, 232, 0.8);
  flex-direction: column;
  display: flex;
  max-height: 1033px;
}

.book-preview .book-preview-nav-ul {
  flex: 1;
  overflow-y: auto;
}

.book-preview .book-preview-nav li {
  margin-bottom: 1px;
}

.book-preview .book-preview-nav li a {
  padding: 8px;
  background: #f5f0e8;
  border-left: solid 4px transparent;
  display: block;
}

.book-preview .book-preview-nav li a:hover {
  background: #f0e3d2;
}

.book-preview .book-preview-nav li a.active {
  background: #ede2d6;
  border-color: #b36b40;
  font-weight: bold;
}

.book-preview .book-preview-view {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  position: relative;
}

.book-preview .book-preview-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.book-preview .book-preview-text {
  padding: 16px;
  height: 100%;
  overflow-y: auto;
  white-space: pre-wrap;
  width: 100%;
  font-size: 14px;
  background-color: #fbf6e6;
}

@media (max-width: 800px) {
  .book-preview .book-preview-main {
    flex-direction: column;
  }

  .book-preview .book-preview-nav {
    width: 100%;
    max-height: 140px;
  }

  .book-preview .book-preview-view {
    flex: auto;
  }

  .book-preview .book-preview-quality-tip {
    padding: 10px;
    font-size: 13px;
  }

  .book-preview .book-preview-tool {
    flex-wrap: wrap;
    row-gap: 6px;
  }
}