:root {
  --bg: #f5f6f8;
  --panel: #ffffff;
  --line: #e6e8ee;
  --text: #2e2f33;
  --muted: #70757e;
  --blue: #4e6ef2;
  --blue-soft: #edf1ff;
  --green: #1fc7a1;
  --radius: 10px;
  --shadow: 0 8px 20px rgba(30, 36, 50, 0.08);
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
}

button {
  font-family: inherit;
}

.page {
  min-height: 100vh;
  display: flex;
}

.sidebar {
  width: 68px;
  background: var(--panel);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 0;
  gap: 12px;
}

.logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #fff;
  color: #19a582;
  font-weight: 700;
  border: 1px solid #b6efe2;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.side-item {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  border: none;
  background: transparent;
  color: var(--muted);
  display: grid;
  gap: 4px;
  place-items: center;
  font-size: 11px;
  cursor: pointer;
}

.side-item .side-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #eef0f4;
  display: grid;
  place-items: center;
  color: var(--muted);
}

.side-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.side-icon img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  display: block;
}

.side-item.active {
  color: #19a582;
}

.side-item.active .side-icon {
  background: #ecfff8;
  border-color: #9be4d4;
  color: #19a582;
}

.side-label {
  font-size: 11px;
}

.side-item.icon-only {
  height: 44px;
}

.side-item.icon-only .side-label {
  display: none;
}

.sidebar-foot {
  display: grid;
  gap: 10px;
  padding-bottom: 6px;
  margin-top: auto;
}

.content {
  flex: 1;
  padding: 24px 32px 40px;
  background: #fff;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.search-wrap {
  width: min(520px, 100%);
  display: flex;
  gap: 0;
}

.search-input {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  height: 54px;
  border-radius: 14px 0 0 14px;
  border: 2px solid #8f8f8f;
  background: var(--panel);
}

.search-input:focus-within {
  border-color: #7a7a7a;
}

.search-input input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 18px;
  font-weight: 600;
  background: transparent;
}

.search-clear {
  border: none;
  background: transparent;
  font-size: 16px;
  color: #c2c2c2;
  cursor: pointer;
}

.search-btn {
  border: none;
  padding: 0 22px;
  height: 54px;
  border-radius: 0 14px 14px 0;
  background: #4f6df4;
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: none;
}

.tabbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 4px 8px;
  color: var(--muted);
  flex-wrap: wrap;
}

.tab {
  border: none;
  background: transparent;
  color: inherit;
  padding: 6px 6px;
  font-size: 13px;
  cursor: pointer;
  position: relative;
}

.tab.active {
  color: var(--text);
  font-weight: 600;
}

.tab.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  border-radius: 2px;
  background: var(--blue);
}

.promo {
  margin: 6px 0 16px;
}

.promo-card {
  background: linear-gradient(90deg, #e7f8f2 0%, #f2fbf8 30%, #ecf3ff 70%, #f5f0ff 100%);
  border-radius: 12px;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: var(--shadow);
}

.promo-title {
  font-size: 16px;
  font-weight: 600;
}

.promo-title span {
  color: #18a57a;
  margin: 0 4px;
}

.promo-sub {
  color: var(--muted);
  font-size: 12px;
  margin-top: 6px;
}

.promo-btn {
  border: 1px solid #d8dee8;
  background: #fff;
  color: var(--muted);
  padding: 8px 14px;
  border-radius: 10px;
  cursor: pointer;
}

.filters {
  display: grid;
  gap: 14px;
  padding: 6px 2px 10px;
}

.filter-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-label {
  color: #2f2f33;
  font-size: 14px;
  font-weight: 600;
}

.filter-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-chip {
  border: 1px solid transparent;
  background: transparent;
  color: #3f5bd8;
  font-size: 13px;
  padding: 4px 10px;
  border-radius: 8px;
  cursor: pointer;
}

.filter-chip.active {
  background: #4f6df4;
  color: #fff;
}

.filter-more {
  margin-left: 6px;
  border: none;
  background: transparent;
  color: #3f5bd8;
  font-size: 13px;
  cursor: pointer;
}

.results {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 18px 0 6px;
}

.results-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.left-column {
  padding-right: 6px;
  max-width: 520px;
}

.right-column {
  padding-left: 6px;
}

.result-card {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 18px;
}

.result-thumb {
  position: relative;
  width: 150px;
  display: block;
}

.result-thumb img {
  width: 100%;
  border-radius: 14px;
  border: 1px solid #e3e3e3;
  background: #f8f8f8;
  display: block;
}

.result-thumb::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 16px;
  height: 16px;
  border-radius: 3px;
  background: #fff url("../images/w_icon.jpg") center / contain no-repeat;
}

.result-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.result-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
}

.result-link {
  text-decoration: none;
  color: inherit;
}

.highlight-blue {
  color: #3f5bd8;
}

.highlight-red {
  color: #e2372c;
}

.result-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  color: #3f5bd8;
  font-size: 14px;
}

.result-desc {
  margin: 0;
  color: #3d3f44;
  font-size: 14px;
  line-height: 1.65;
  max-width: 360px;
}

.result-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #8a8f99;
  font-size: 13px;
}

.avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #d7dee8, #f0f3f7);
  border: 1px solid #e5e8ee;
  display: block;
  object-fit: cover;
}

.verified {
  font-size: 12px;
  color: #12a879;
  border: 1px solid #bfeedd;
  border-radius: 6px;
  padding: 2px 8px;
  background: #e9fbf5;
}

.result-stats {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #9aa0a6;
}

.result-stats .star {
  color: #f4b23b;
  font-size: 16px;
}

.result-stats .stat-item {
  color: #9aa0a6;
}

.pagination {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 26px 0 40px;
  flex-wrap: wrap;
}

.page-btn {
  border: none;
  background: #f4f5f7;
  color: #3f5bd8;
  width: 46px;
  height: 46px;
  border-radius: 10px;
  font-size: 16px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.page-btn.active {
  background: #4f6df4;
  color: #fff;
}

.page-btn.next {
  width: auto;
  padding: 0 20px;
}

.detail-page {
  padding: 16px 32px 90px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.detail-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 0 12px;
  border-bottom: 1px solid #eef0f4;
}

.detail-search {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #d9dde6;
  border-radius: 10px;
  padding: 6px 10px;
  width: min(620px, 100%);
  background: #fff;
}

.detail-search input {
  border: none;
  outline: none;
  flex: 1;
  font-size: 14px;
}

.detail-clear {
  border: none;
  background: transparent;
  color: #b1b5bd;
  font-size: 16px;
  cursor: pointer;
}

.detail-search-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: none;
  background: #f3f5f9;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.detail-search-icon svg {
  width: 16px;
  height: 16px;
  stroke: #7d8591;
  fill: none;
  stroke-width: 1.8;
}

.detail-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #6b7280;
  font-size: 13px;
}

.task-badge {
  color: #b45309;
  font-weight: 600;
}

.icon-btn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid #e4e7ec;
  background: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.icon-btn svg {
  width: 16px;
  height: 16px;
  stroke: #6b7280;
  fill: none;
  stroke-width: 1.6;
}

.avatar-sm {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e5e7eb, #f8fafc);
  border: 1px solid #e5e7eb;
}

.detail-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 22px;
  padding: 16px 0 0;
  flex: 1;
}

.detail-side {
  border-right: 1px solid #eef0f4;
  padding-right: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.promo-mini {
  background: #f2fbf6;
  border-radius: 12px;
  padding: 14px;
  border: 1px solid #dff5ec;
}

.promo-mini span {
  color: #1f9d7a;
}

.promo-mini-btn {
  margin-top: 10px;
  border: 1px solid #d6e3dc;
  background: #fff;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
}

.side-block {
  display: grid;
  gap: 8px;
}

.side-title {
  font-weight: 600;
  font-size: 14px;
}

.side-count {
  color: #8a8f99;
  font-size: 12px;
}

.doc-list {
  display: grid;
  gap: 8px;
}

.doc-item {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 6px 8px;
  border-radius: 10px;
  cursor: pointer;
}


.doc-badge {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: #f0f6ff;
  border: 1px solid #9fb7ff;
  color: #4f6df4;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  margin-top: 1px;
}

.doc-index {
  width: 16px;
  text-align: right;
  color: #9aa0a6;
  font-size: 12px;
}

.doc-text {
  display: grid;
  gap: 6px;
}

.doc-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.doc-name {
  font-size: 13px;
  color: #7b8290;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 170px;
}

.doc-item.active .doc-name {
  color: #1fad85;
  font-weight: 600;
}

.doc-line {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: #9aa0a6;
  flex-wrap: nowrap;
  margin-top: 2px;
}

.stars {
  display: flex;
  gap: 2px;
}

.star {
  font-size: 12px;
}

.star.filled {
  color: #1fad85;
}

.star.empty {
  color: #d6dbe3;
}

.rating {
  color: #1fad85;
  font-weight: 600;
}

.metrics {
  color: #9aa0a6;
}

.side-tools {
  display: grid;
  gap: 10px;
}

.tool-btn {
  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 12px;
  cursor: pointer;
  text-align: center;
}

.detail-reader {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #eef0f4;
  padding: 18px 24px 26px;
  min-height: 720px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.reader-head {
  display: flex;
  gap: 12px;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid #eef0f4;
}

.doc-chip {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: #eef2ff;
  color: #4f6df4;
  display: grid;
  place-items: center;
  font-weight: 700;
}

.reader-info {
  display: grid;
  gap: 4px;
}

.reader-title {
  font-weight: 600;
  font-size: 14px;
}

.reader-meta {
  font-size: 12px;
  color: #9aa0a6;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.reader-meta .date {
  margin-left: auto;
}

.reader-paper {
  padding: 26px 18px 10px;
  font-size: 16px;
  line-height: 2;
  color: #2f2f33;
  max-width: 760px;
  margin: 0 auto;
  width: 100%;
  flex: 1;
}

.reader-paper h1 {
  font-size: 20px;
  text-align: center;
  margin: 0 0 16px;
}

.reader-paper h2 {
  font-size: 17px;
  margin: 0 0 12px;
}

.reader-paper h3 {
  font-size: 15px;
  margin: 0 0 10px;
}

.toc-list {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.toc-line {
  font-size: 14px;
  color: #2f2f33;
  text-indent: 0;
  line-height: 1.9;
}

.gap-block {
  height: 24px;
}

.center-text {
  text-align: center;
  text-indent: 0;
  color: #6b7280;
}

.reader-paper p {
  margin: 0 0 16px;
  text-indent: 2em;
}

.reader-figure {
  display: block;
  width: 100%;
  margin: 14px 0;
  border-radius: 6px;
  border: 1px solid #e3e6eb;
}

.table-title {
  margin: 10px 0 12px;
  text-align: center;
  font-size: 16px;
}

.duty-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 18px;
  font-size: 14px;
  color: #2b2f36;
}

.duty-table th,
.duty-table td {
  border: 1px solid #b9c2cc;
  padding: 10px 12px;
  vertical-align: top;
  text-indent: 0;
}

.duty-table th {
  background: #5a98d5;
  color: #000000;
  font-weight: 600;
  text-align: center;
}

.duty-num,
.duty-role {
  text-align: center;
  font-weight: 600;
  white-space: nowrap;
}

.duty-table ol {
  margin: 0;
  padding-left: 18px;
}

.duty-table li {
  margin-bottom: 8px;
}

.paper-page {
  position: relative;
  padding-bottom: 18px;
}

.page-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  color: #b7bcc6;
  font-size: 12px;
  margin-top: 12px;
}

.page-num {
  font-size: 14px;
}

.page-separator {
  height: 1px;
  background: #eef0f4;
  margin: 30px auto;
  width: 100%;
}

.muted-line {
  color: #6e737b;
}

.read-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 16px;
  color: #333;
  padding: 26px 0 6px;
}

.read-more-btn {
  border: none;
  background: transparent;
  color: #1fad85;
  font-weight: 600;
  cursor: pointer;
}

.read-more-icon {
  color: #1fad85;
  font-size: 16px;
}

.vip-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 60;
}

.vip-modal-backdrop.show {
  display: flex;
}

.vip-modal {
  background: #fff;
  border-radius: 16px;
  padding: 18px 20px 16px;
  width: min(360px, 90%);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.2);
  position: relative;
}

.vip-modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  border: none;
  background: transparent;
  font-size: 18px;
  color: #9aa0a6;
  cursor: pointer;
}

.vip-modal-title {
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 6px;
}

.vip-modal-text {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.6;
  margin-bottom: 14px;
}

.vip-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.vip-btn {
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 13px;
  border: 1px solid #86d4bf;
  background: #fff;
  color: #10a77f;
  cursor: pointer;
}

.vip-btn.primary {
  background: #1fad85;
  border-color: #1fad85;
  color: #fff;
}

.vip-btn.ghost {
  border-color: #e5e7eb;
  color: #6b7280;
}

.reader-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 32px;
  border-top: 1px solid #eef0f4;
  position: fixed;
  left: 68px;
  right: 0;
  bottom: 0;
  background: #fff;
  z-index: 20;
  box-shadow: 0 -8px 20px rgba(15, 23, 42, 0.05);
}

.actions-left {
  display: flex;
  align-items: center;
  gap: 18px;
  color: #6b7280;
  font-size: 13px;
  flex-wrap: wrap;
  margin-left: auto;
}

.action-link {
  border: none;
  background: transparent;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #5f6672;
  font-size: 13px;
  cursor: pointer;
}

.action-link svg {
  width: 16px;
  height: 16px;
  stroke: #5f6672;
  fill: none;
  stroke-width: 1.6;
}

.action-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
  display: block;
}

.actions-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.action-btn {
  border-radius: 10px;
  padding: 8px 16px;
  font-size: 14px;
  border: 1px solid #86d4bf;
  background: #fff;
  color: #10a77f;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.action-btn.primary {
  background: #1fad85;
  border-color: #1fad85;
  color: #fff;
  font-weight: 600;
}

.action-btn.primary span {
  font-size: 12px;
  opacity: 0.8;
  margin-left: 4px;
}

.action-batch {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.action-badge {
  position: absolute;
  top: -12px;
  right: 8px;
  background: #ff6b5f;
  color: #fff;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 999px;
}

@media (max-width: 980px) {
  .reader-actions {
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 16px;
  }
}

@media (max-width: 980px) {
  .content {
    padding: 18px 16px 32px;
  }

  .search-wrap {
    flex-direction: column;
  }

  .filter-more {
    margin-left: 0;
  }

  .results {
    flex-direction: column;
  }
}

@media (max-width: 720px) {
  .page {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
    padding: 10px 12px;
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

  .sidebar-nav {
    flex-direction: row;
  }

  .side-item {
    width: 50px;
    height: 50px;
  }

  .sidebar-foot {
    display: none;
  }

  .result-card {
    grid-template-columns: 1fr;
  }

  .result-thumb {
    width: min(240px, 100%);
  }

  .reader-actions {
    left: 0;
  }
}
