/* 论文页风格 */
.paper{
  max-width: 760px;
  margin: 0 auto;
  padding: 34px 20px 60px;
  background: #fff;
}
.paper-head h1{
  font-family: 'Noto Serif SC','Noto Serif', serif;
  font-size: 28px;
  margin-bottom: 8px;
}
.meta{ color: #6B7280; margin-bottom: 16px; }
.paper h2{
  font-family: 'Noto Serif SC','Noto Serif', serif;
  font-size: 20px; margin-top: 24px;
  border-bottom: 1px solid #ECECEC; padding-bottom: 6px;
}
.toc{
  position: sticky; top: 0; display: flex; gap: 12px; padding: 10px 0; background:#fff;
  border-bottom: 1px solid #F2F2F2; z-index: 10;
}
.toc a{ color: #204D8D; text-decoration: none; font-weight: 600; }
.toc a:hover{ text-decoration: underline; }
figure{ margin: 14px 0; }
figcaption{ color: #6B7280; font-size: 14px; }
.paper-foot{ margin-top: 24px; }

/* PDF查看器样式 */
.pdf-viewer {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.viewer-head {
  text-align: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e5e7eb;
}

.viewer-head h1 {
  font-family: 'Noto Serif SC', 'Noto Serif', serif;
  font-size: 32px;
  color: #111827;
  margin-bottom: 8px;
}

.viewer-head .meta {
  color: #6b7280;
  margin-bottom: 20px;
}

.controls {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
}

/* 加载状态 */
.loading-state {
  text-align: center;
  padding: 60px 20px;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f4f6;
  border-left: 4px solid #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-state p {
  color: #6b7280;
  font-size: 16px;
}

/* 错误状态 */
.error-state {
  text-align: center;
  padding: 60px 20px;
  color: #dc2626;
}

.error-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.error-state h3 {
  font-size: 24px;
  margin-bottom: 12px;
  color: #dc2626;
}

.error-state p {
  color: #6b7280;
  margin-bottom: 20px;
}

/* PDF容器 */
.pdf-container {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

#pdfViewer {
  border: none;
  display: block;
  min-height: 800px;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .pdf-viewer {
    padding: 10px;
  }
  
  .viewer-head h1 {
    font-size: 24px;
  }
  
  .controls {
    flex-direction: column;
    gap: 8px;
  }
  
  #pdfViewer {
    height: 600px;
  }
}

/* 统一表单控件的排版继承（解决 <button> 与 <a> 视觉字号不一致） */
button, input, select, textarea {
  font: inherit;          /* 同时继承 family/size/weight/line-height */
  color: inherit;
}

/* 取消原生按钮外观，避免各平台默认样式干扰字重/字距/缩放 */
button.btn {
  -webkit-appearance: none;
  appearance: none;
  background: none;       /* 你的主题里若有背景色/边框会在下面 .btn.* 中设定 */
  border: none;
}

/* 统一 .btn 的基础排版与布局（<a> 与 <button> 一样的“按钮”表现） */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 8px;
  text-decoration: none;      /* <a> 去下划线 */
  font-size: 16px;            /* ← 统一字号 */
  line-height: 1.2;           /* ← 统一行高 */
  font-weight: 600;           /* ← 统一字重 */
  letter-spacing: 0;          /* ← 避免平台默认字距差异 */
  cursor: pointer;
}

/* 主题色按你现有风格来，下面只是示例 */
.btn.primary {
  background: #ffd182;
  color: #111827;
}
.btn.secondary {
  background: #fff;
  color: #111827;
  border: 1px solid #e5e7eb;
}

/* disabled 状态：只改交互与透明度，不改字号/字重，避免“看起来变小” */
.btn[disabled],
button[disabled].btn {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

