/* ===== 设计令牌 ===== */
:root {
  /* 颜色 - 带色调的灰 */
  --bg: #f8f7f4;
  --bg-elevated: #ffffff;
  --bg-subtle: #f0eeea;
  --bg-hover: #eae7e2;
  --text: #2d2a26;
  --text-secondary: #6b6560;
  --text-muted: #9e9891;
  --border: #e0ddd8;
  --accent: #4a6741;
  --accent-soft: rgba(74, 103, 65, 0.08);
  --accent-text: #3a5332;
  --danger: #b23a2e;
  
  /* 字体 */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-family: "Newsreader", "Source Han Serif SC", "Noto Serif SC", Georgia, serif;
  --font-sans: "Inter", "SF Pro Text", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", monospace;
  
  /* 间距与圆角 */
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  
  /* 尺寸 */
  --sidebar-width: 260px;
  --header-height: 56px;
  --content-max-width: 680px;
  
  /* 阴影 */
  --shadow-sm: 0 1px 2px rgba(45, 42, 38, 0.04);
  --shadow: 0 2px 8px rgba(45, 42, 38, 0.06);
  --shadow-lg: 0 8px 30px rgba(45, 42, 38, 0.1);
}

/* 深色主题 */
[data-theme="dark"] {
  --bg: #1c1b19;
  --bg-elevated: #252320;
  --bg-subtle: #2a2825;
  --bg-hover: #32302c;
  --text: #e8e4dc;
  --text-secondary: #a8a29a;
  --text-muted: #6e6a63;
  --border: #353330;
  --accent: #7da06e;
  --accent-soft: rgba(125, 160, 110, 0.12);
  --accent-text: #9abb8a;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.2);
  --shadow: 0 2px 8px rgba(0,0,0,0.25);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.4);
}

/* ===== 重置 ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow: hidden;
  height: 100vh;
  transition: background 0.3s ease, color 0.3s ease;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s;
}
a:hover {
  color: var(--accent-text);
}

input, button, textarea {
  font-family: inherit;
  font-size: inherit;
}

/* ===== 应用布局 ===== */
#app {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ===== 侧边栏 ===== */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-subtle);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--border);
}

.sidebar-header h1 {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}

.feed-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px 10px;
}

.feed-list::-webkit-scrollbar {
  width: 4px;
}
.feed-list::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

.feed-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s ease;
  position: relative;
  margin-bottom: 2px;
}

.feed-item:hover {
  background: var(--bg-hover);
}

.feed-item.active {
  background: var(--accent-soft);
  color: var(--accent-text);
  font-weight: 500;
}

.feed-item .feed-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}

.feed-item .feed-icon-svg {
  width: 16px;
  height: 16px;
  display: block;
}

.feed-item .feed-icon-img {
  width: 18px;
  height: 18px;
  border-radius: 4px;
}

.feed-item.active .feed-icon {
  color: var(--accent);
}

.feed-item .feed-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.88rem;
  font-family: var(--font-sans);
  font-weight: 400;
}

.feed-item .feed-unread {
  background: var(--accent);
  color: var(--bg-elevated);
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 10px;
  min-width: 20px;
  text-align: center;
  line-height: 1.4;
}

.feed-item .btn-delete-feed {
  opacity: 0;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  transition: opacity 0.15s, color 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feed-item:hover .btn-delete-feed {
  opacity: 1;
}

.feed-item .btn-delete-feed:hover {
  color: var(--danger);
}

.sidebar-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: var(--font-sans);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-actions {
  display: flex;
  gap: 8px;
}

.btn-text-small {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.75rem;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}

.btn-text-small:hover {
  color: var(--accent);
  background: var(--bg-hover);
}

/* ===== 主内容区 ===== */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
  background: var(--bg);
  position: relative;
}

/* ===== 文章列表视图 ===== */
.list-view {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.topbar {
  height: var(--header-height);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 28px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  flex-shrink: 0;
}

.topbar h2 {
  font-size: 1.05rem;
  font-weight: 600;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.topbar-actions {
  display: flex;
  gap: 2px;
}

.menu-btn {
  display: none;
}

/* ===== 文章列表 ===== */
.article-list {
  flex: 1;
  overflow-y: auto;
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.article-list::-webkit-scrollbar {
  width: 6px;
}
.article-list::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.article-inner {
  width: 100%;
  max-width: var(--content-max-width);
}

/* 文章条目 */
.article-item {
  padding: 22px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: opacity 0.15s;
}

.article-item:last-child {
  border-bottom: none;
}

.article-item:hover {
  opacity: 0.8;
}

.article-item:active {
  opacity: 0.6;
}

.article-item .article-title {
  font-size: 1.1rem;
  font-weight: 500;
  line-height: 1.45;
  margin-bottom: 6px;
  color: var(--text);
  letter-spacing: -0.01em;
}

.article-item .article-excerpt {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 8px;
}

.article-item .article-meta {
  font-family: var(--font-sans);
  font-size: 0.76rem;
  color: var(--text-muted);
  display: flex;
  gap: 14px;
  align-items: center;
}

.article-item .article-meta .favorited {
  color: var(--accent);
  display: inline-flex;
  align-items: center;
}

/* ===== 空状态 ===== */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 60vh;
  color: var(--text-muted);
  gap: 10px;
  font-family: var(--font-sans);
  text-align: center;
}

.empty-state p {
  font-size: 0.9rem;
}

/* ===== 按钮 ===== */
.btn-icon {
  background: none;
  border: none;
  cursor: pointer;
  padding: 7px 9px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  transition: background 0.15s, color 0.15s;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-icon:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.icon {
  width: 18px;
  height: 18px;
  display: block;
}

.icon-logo {
  width: 20px;
  height: 20px;
  display: inline-block;
  vertical-align: -3px;
  margin-right: 2px;
}

.icon-inbox-large {
  width: 48px;
  height: 48px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.icon-small {
  width: 14px;
  height: 14px;
  display: block;
}

.icon-tiny {
  width: 12px;
  height: 12px;
  display: inline-block;
  vertical-align: -1px;
  margin-right: 2px;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg-elevated);
  border: none;
  padding: 9px 22px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 500;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  transition: filter 0.15s;
}

.btn-primary:hover {
  filter: brightness(1.1);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
  border: none;
  padding: 9px 22px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 500;
  font-family: var(--font-sans);
  font-size: 0.85rem;
}

.btn-text {
  background: none;
  border: none;
  color: var(--text-secondary);
  padding: 9px 16px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  transition: background 0.15s;
}

.btn-text:hover {
  background: var(--bg-hover);
}

/* ===== 弹窗 ===== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal.hidden {
  display: none;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(45, 42, 38, 0.45);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.modal-content {
  position: relative;
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 720px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: modalIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.97) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-small {
  max-width: 420px;
  padding: 28px;
}

.modal-small h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 18px;
  letter-spacing: -0.01em;
}

.modal-small input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  margin-bottom: 18px;
  outline: none;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  transition: border-color 0.15s;
}

.modal-small input:focus {
  border-color: var(--accent);
}

.modal-settings {
  max-width: 460px;
}

.modal-settings .field-label {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.modal-settings input {
  margin-bottom: 8px;
}

.modal-settings .field-hint {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 16px;
}

.modal-settings .field-hint code {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  background: var(--bg-subtle);
  padding: 1px 5px;
  border-radius: 4px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-sans);
  margin-top: 16px;
  line-height: 1.6;
}

.hint a {
  color: var(--accent);
  margin: 0 2px;
}

/* ===== 搜索栏 ===== */
.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 28px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  animation: slideDown 0.2s ease;
}

.search-bar.hidden {
  display: none;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.search-icon {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.search-bar input {
  flex: 1;
  border: none;
  background: none;
  outline: none;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--text);
}

.search-bar input::placeholder {
  color: var(--text-muted);
}

/* ===== 阅读进度条 ===== */
.reading-progress {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--border);
  z-index: 20;
}

.reading-progress-bar {
  height: 100%;
  background: var(--accent);
  width: 0%;
  transition: width 0.1s linear;
}

/* ===== 阅读器页面（全页面）===== */
.reader-page {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg);
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 10;
}

.main.show-reader .reader-page {
  transform: translateX(0);
}

.reader-topbar {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  flex-shrink: 0;
}

.reader-topbar-actions {
  display: flex;
  gap: 2px;
}

.reader-body {
  flex: 1;
  overflow-y: auto;
  padding: 40px 28px 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.reader-body::-webkit-scrollbar {
  width: 6px;
}
.reader-body::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.reader-article {
  width: 100%;
  max-width: var(--content-max-width);
}

.reader-article h1 {
  font-size: 1.65rem;
  font-weight: 600;
  margin-bottom: 16px;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.reader-meta {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 36px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.reader-meta-dot {
  opacity: 0.5;
}

.reader-content {
  font-size: 1.02rem;
  line-height: 1.85;
  color: var(--text);
}

.reader-content h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 32px 0 14px;
  letter-spacing: -0.01em;
}

.reader-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 26px 0 12px;
}

.reader-content p {
  margin-bottom: 16px;
}

.reader-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin: 20px 0;
  display: block;
  box-shadow: var(--shadow-sm);
}

.reader-content pre {
  background: var(--bg-subtle);
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  font-size: 0.85rem;
  margin: 18px 0;
  font-family: var(--font-mono);
  line-height: 1.6;
}

.reader-content code {
  background: var(--bg-subtle);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.88em;
  font-family: var(--font-mono);
}

.reader-content blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 18px;
  color: var(--text-secondary);
  margin: 18px 0;
  font-style: italic;
}

.reader-content ol, .reader-content ul {
  padding-left: 24px;
  margin: 14px 0;
}

.reader-content li {
  margin-bottom: 8px;
}

.reader-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ===== 文章导航（上一篇/下一篇）===== */
.article-nav {
  width: 100%;
  max-width: var(--content-max-width);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 60px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.nav-card {
  padding: 18px 20px;
  background: var(--bg-subtle);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
  border: 1px solid transparent;
}

.nav-card:hover {
  background: var(--bg-hover);
  border-color: var(--border);
  transform: translateY(-1px);
}

.nav-card:active {
  transform: translateY(0);
}

.nav-disabled {
  opacity: 0.5;
  cursor: default;
}

.nav-disabled:hover {
  background: var(--bg-subtle);
  border-color: transparent;
  transform: none;
}

.nav-label {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-prev .nav-label {
  justify-content: flex-start;
}

.nav-next .nav-label {
  justify-content: flex-end;
}

.nav-title {
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.45;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.nav-next .nav-title {
  text-align: right;
}

.nav-meta {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.nav-next .nav-meta {
  text-align: right;
}

/* ===== Toast ===== */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: var(--bg);
  padding: 10px 24px;
  border-radius: var(--radius);
  font-size: 0.82rem;
  font-family: var(--font-sans);
  z-index: 200;
  box-shadow: var(--shadow-lg);
  transition: opacity 0.3s, transform 0.3s;
}

.toast.hidden {
  opacity: 0;
  transform: translateX(-50%) translateY(10px);
  pointer-events: none;
}

/* ===== 加载动画 ===== */
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* 刷新按钮旋转动画 */
.btn-icon.spinning svg {
  animation: spin 0.8s linear infinite;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 50;
    transform: translateX(-100%);
  }
  
  .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }
  
  .menu-btn {
    display: block;
  }
  
  .article-list {
    padding: 16px 18px;
  }
  
  .article-item {
    padding: 18px 0;
  }
  
  .article-item .article-title {
    font-size: 1.02rem;
  }
  
  .reader-body {
    padding: 24px 18px 40px;
  }
  
  .reader-article h1 {
    font-size: 1.4rem;
  }
  
  .reader-topbar {
    padding: 0 16px;
  }
  
  .reader-topbar-actions {
    gap: 0;
  }
  
  .topbar {
    padding: 0 16px;
  }
  
  .modal-small {
    padding: 22px 18px;
  }
  
  .article-nav {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .nav-next .nav-title,
  .nav-next .nav-meta {
    text-align: left;
  }
  
  .nav-next .nav-label {
    justify-content: flex-start;
  }
  
  .search-bar {
    padding: 10px 16px;
  }
  
  .keyboard-hint {
    padding: 0 20px;
  }
  
  .keyboard-hint-list {
    grid-template-columns: 1fr;
  }
  
  .share-options {
    flex-direction: column;
  }
  
  .share-btn {
    flex-direction: row;
    justify-content: flex-start;
  }
  
  .article-search-bar {
    padding: 8px 16px;
  }
  
  .article-search-bar .btn-icon {
    padding: 4px 6px;
  }
}

@media (max-width: 480px) {
  .article-item .article-excerpt {
    -webkit-line-clamp: 2;
  }
  
  .reader-body {
    padding: 20px 16px 32px;
  }
  
  .reader-content {
    font-size: 0.95rem;
  }
}

/* ===== 分享弹窗 ===== */
.share-options {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.share-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 24px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.share-btn:hover {
  background: var(--bg-hover);
  border-color: var(--accent);
  color: var(--text);
}

.share-btn .icon {
  width: 24px;
  height: 24px;
}

/* ===== 键盘快捷键提示 ===== */
.keyboard-hint {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(45, 42, 38, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: fadeIn 0.15s ease;
}

.keyboard-hint.hidden {
  display: none;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.keyboard-hint-content {
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  box-shadow: var(--shadow-lg);
  min-width: 280px;
}

.keyboard-hint-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 18px;
  color: var(--text);
}

.keyboard-hint-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.keyboard-hint-list span {
  display: flex;
  align-items: center;
  gap: 8px;
}

kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text);
}

/* ===== 图片懒加载占位 ===== */
.reader-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin: 20px 0;
  display: block;
  box-shadow: var(--shadow-sm);
  background: var(--bg-subtle);
  min-height: 200px;
  position: relative;
  transition: opacity 0.3s ease;
}

.reader-content img.img-loading {
  opacity: 0;
}

.reader-content img.loaded,
.reader-content img:not([loading]) {
  opacity: 1;
  min-height: auto;
}

/* ===== 文章内搜索栏 ===== */
.article-search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 28px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  animation: slideDown 0.2s ease;
}

.article-search-bar.hidden {
  display: none;
}

.article-search-bar input {
  flex: 1;
  border: none;
  background: none;
  outline: none;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--text);
}

.article-search-bar input::placeholder {
  color: var(--text-muted);
}

.article-search-count {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: var(--text-muted);
  min-width: 40px;
  text-align: center;
}

/* ===== 搜索高亮 ===== */
.article-search-highlight {
  background: rgba(255, 193, 7, 0.4);
  padding: 1px 2px;
  border-radius: 2px;
}

.article-search-highlight.current {
  background: rgba(255, 152, 0, 0.6);
  outline: 2px solid rgba(255, 152, 0, 0.8);
}

[data-theme="dark"] .article-search-highlight {
  background: rgba(255, 193, 7, 0.3);
}

[data-theme="dark"] .article-search-highlight.current {
  background: rgba(255, 152, 0, 0.5);
  outline: 2px solid rgba(255, 152, 0, 0.7);
}

/* ===== 全文提取按钮 ===== */
.full-text-action {
  display: flex;
  justify-content: center;
  margin: 24px 0;
}

.full-text-action .btn-text {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ===== 字体引入 ===== */
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('https://fonts.gstatic.com/s/newsreader/v20/cY9qfjOCX1hbuyalUrK49dLac06G1ZGsZBtoBCzBDXXD9JVF438weI6DRI4.woff2') format('woff2');
}

@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('https://fonts.gstatic.com/s/newsreader/v20/cY9qfjOCX1hbuyalUrK49dLac06G1ZGsZBtoBCzBDXXD9JVF438wSI6DRI4.woff2') format('woff2');
}

@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('https://fonts.gstatic.com/s/newsreader/v20/cY9qfjOCX1hbuyalUrK49dLac06G1ZGsZBtoBCzBDXXD9JVF438w-ZODRI4.woff2') format('woff2');
}
