* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
body {
  font: 11px Tahoma, SimSun, "Microsoft YaHei", sans-serif;
  color: #000; background: #3a6ea5;
}
button, select { font: 11px Tahoma, SimSun, sans-serif; }
.desktop { height: 100%; padding: 10px; display: flex; }
.window {
  width: 100%; height: 100%; min-width: 900px; min-height: 580px; margin: auto;
  display: flex; flex-direction: column; border: 3px solid #0054e3; background: #ece9d8;
}

.titlebar {
  height: 28px; flex: 0 0 28px; display: flex; align-items: center; padding: 0 3px 0 6px;
  color: #fff; font-weight: bold;
  background: linear-gradient(90deg, #0a246a 0%, #3a8fdf 62%, #7eb3ef 100%);
}
.tb-icon {
  width: 16px; height: 16px; margin-right: 7px; border: 1px solid #d0d0d0;
  background: linear-gradient(135deg, #fff 0 42%, #ffd75e 42% 58%, #fff 58%);
}
.tb-text { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tb-btns { display: flex; gap: 2px; }
.tb-btns i {
  display: block; width: 20px; height: 18px; line-height: 16px; text-align: center;
  font-style: normal; font-size: 12px; font-weight: normal;
  color: #fff; border: 1px solid #9fc4f0; border-radius: 3px;
  background: linear-gradient(135deg, #4a90e0, #1b4fa0);
}
.tb-btns i.x { background: linear-gradient(135deg, #f27b6b, #b32108); border-color: #ffb9ad; }

.toolbar {
  height: 36px; flex: 0 0 36px; display: flex; align-items: center; gap: 4px;
  padding: 0 6px; border-bottom: 1px solid #a3a3a3;
  background: linear-gradient(#fbfaf6, #e9e5db);
}
.tooltext { padding-left: 4px; color: #444; }
.tsep { width: 2px; height: 22px; margin: 0 3px; border-left: 1px solid #b4b4b4; border-right: 1px solid #fff; }
.tbtn {
  height: 24px; padding: 0 9px; cursor: pointer; white-space: nowrap;
  border: 1px solid #7f9db9; border-radius: 3px;
  background: linear-gradient(#fff, #eae4d6); box-shadow: inset 1px 1px #fff;
}
.tbtn:hover { background: linear-gradient(#fff6d8, #ffe4a8); border-color: #c08000; }
.tbtn:active { background: #e4dcc8; box-shadow: inset 1px 1px #8f8f8f; }
.smallsel { height: 21px; border: 1px solid #7f9db9; background: #fff; }
.pagejump { width: 42px; height: 21px; padding: 0 3px; border: 1px solid #7f9db9; background: #fff; text-align: center; }

/* 书架 */
.shelf-view { flex: 1; min-height: 0; overflow: auto; padding: 22px 28px; background: #d3e5fa; }
.shelf-head {
  height: 26px; line-height: 25px; padding: 0 9px; margin-bottom: 12px;
  font-weight: bold; color: #0a246a; border: 1px solid #7f9db9;
  background: linear-gradient(90deg, #8fb1e2, #d5e5fa);
}
.book-list { display: flex; flex-wrap: wrap; gap: 14px; }
.book {
  width: 420px; display: flex; gap: 14px; padding: 12px; cursor: pointer;
  background: #fff; border: 1px solid #7f9db9; box-shadow: inset 1px 1px #fff;
}
.book:hover { border-color: #316ac5; background: #f4f8ff; }
.book img { width: 96px; height: 132px; border: 1px solid #808080; background: #fff; }
.book-info { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.book-title { font-size: 17px; font-weight: bold; color: #15428b; }
.book-sub { color: #444; line-height: 1.5; }
.book-meta { margin-top: auto; color: #666; }
.shelf-foot { margin-top: 16px; color: #36609a; }

/* 点读 */
.reader-view { flex: 1; min-height: 0; display: flex; flex-direction: column; background: #7a7a7a; }
.subtitle {
  height: 150px; flex: 0 0 150px; overflow: auto; padding: 10px 26px;
  display: flex; align-items: center; justify-content: center;
  background: transparent; color: #fff; text-align: center;
  font: 44px/1.35 Tahoma, "Microsoft YaHei", sans-serif;
  border-bottom: 1px solid #666;
}
.subtitle.active { background: #1c1c1c; border-bottom: 2px solid #000; }
.subtitle .line { margin: 0; width: 100%; }
.subtitle .word { color: #fff; }
.subtitle .word.done { color: #ff3b30; }
.subtitle .empty { font-size: 14px; color: #ddd; }

.page-scroll { flex: 1; min-height: 0; overflow: auto; padding: 12px; text-align: center; }
.page-wrap { position: relative; display: inline-block; margin: 0 auto; }
.page-wrap img { display: block; border: 1px solid #333; background: #fff; }
.hotspots { position: absolute; left: 1px; top: 1px; right: 1px; bottom: 1px; pointer-events: none; }
.hotspot {
  position: absolute; pointer-events: auto; cursor: pointer;
  border: 1px solid transparent;
}
.hotspot:hover { border-color: #ffcc00; background: rgba(255, 220, 0, 0.16); }
.hotspot.current { border-color: #ff4d4d; background: rgba(255, 60, 60, 0.16); }

.statusbar { height: 22px; flex: 0 0 22px; display: flex; border-top: 1px solid #fff; background: #ece9d8; }
.statusbar span {
  height: 20px; line-height: 19px; padding: 0 8px; margin-right: 1px;
  border: 1px solid #a3a3a3; border-top: 1px solid #fff; overflow: hidden; white-space: nowrap;
}
.st1 { flex: 1; } .st2 { width: 300px; } .st3 { width: 88px; box-shadow: inset 1px 1px #808080; }

.window:fullscreen { width: 100vw; height: 100vh; border: 0; margin: 0; }
.desktop:fullscreen { padding: 0; }
::-webkit-scrollbar { width: 16px; height: 16px; }
::-webkit-scrollbar-track { background: #e8e8e8; border-left: 1px solid #b4b4b4; }
::-webkit-scrollbar-thumb { background: linear-gradient(90deg, #f4f4f4, #d4d0c8); border: 1px solid #7f7f7f; }
::-webkit-scrollbar-button { background: linear-gradient(#fff, #d4d0c8); border: 1px solid #7f7f7f; height: 16px; }
