/* ============================================
   全局样式 - 所有页面共用
   纯语义化 CSS（替代 Tailwind CDN）
   主色：#0ea5e9
   ============================================ */

/* --------------------------------------------
   设计令牌（CSS 变量）
   -------------------------------------------- */
:root {
  /* 主色 */
  --color-primary: #0ea5e9;
  --color-primary-hover: #0284c7;
  --color-primary-light: #f0f9ff;

  /* 文本 */
  --color-text: #333333;
  --color-text-muted: #6b7280;
  --color-text-light: #9ca3af;

  /* 背景/边框 */
  --color-bg: #f9fafb;
  --color-bg-alt: #f3f4f6;
  --color-border: #e5e7eb;
  --color-border-light: #f3f4f6;
  --color-white: #ffffff;

  /* Gray 阶 */
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;

  /* 强调色 */
  --blue-50: #eff6ff;
  --blue-100: #dbeafe;
  --blue-200: #bfdbfe;
  --blue-400: #60a5fa;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --orange-500: #f97316;
  --orange-600: #ea580c;
  --red-500: #ef4444;
  --red-600: #dc2626;
  --green-50: #f0fdf4;
  --green-100: #dcfce7;
  --green-400: #4ade80;
  --green-500: #22c55e;
  --green-700: #15803d;
  --yellow-500: #eab308;
  --amber-50: #fffbeb;
  --amber-200: #fde68a;
  --amber-700: #b45309;
  --amber-800: #92400e;
  --indigo-50: #eef2ff;
  --indigo-600: #4f46e5;
  --indigo-700: #4338ca;

  /* 阴影 */
  --shadow-sm: 0 1px 2px 0 rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);

  /* 圆角 */
  --radius-sm: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --radius-2xl: 1rem;
  --radius-full: 9999px;

  /* 过渡 */
  --transition: all 0.2s ease;
  --transition-slow: all 0.3s ease;
}

/* --------------------------------------------
   最小重置（不做全量 Preflight，保留 h1-h6/p 默认样式由 .article-content 控制）
   -------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
}

/* --------------------------------------------
   基础元素
   -------------------------------------------- */
html {
  overflow-y: scroll !important;
}

body {
  background-color: var(--color-bg);
  color: var(--gray-800);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
}

button {
  cursor: pointer;
  font-family: inherit;
}

input, textarea {
  font-family: inherit;
}

svg {
  flex-shrink: 0;
}

/* --------------------------------------------
   保留的现有全局类
   -------------------------------------------- */
.hover-color-primary:hover {
  color: var(--color-primary);
}
.hover-bg-primary:hover {
  background-color: var(--color-primary);
  color: white;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-shadow {
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.card-shadow:hover {
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  transform: translateY(-2px);
  transition: all 0.3s ease;
}

.placeholder-img {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  font-size: 0.75rem;
  font-weight: 500;
}

/* 固定 header 样式 */
#site-header {
  height: 64px !important;
  box-sizing: border-box !important;
  border-bottom: 1px solid var(--color-border) !important;
  position: sticky;
  top: 0;
  z-index: 50;
  background: white;
}
#site-header > div {
  height: 64px !important;
}
#site-header > div > div {
  height: 64px !important;
  display: flex !important;
  align-items: center !important;
}

/* 下拉菜单和搜索框需要超出header显示 */
#site-header .header-dropdown > .header-dropdown-menu {
  z-index: 100 !important;
}
#searchBox {
  z-index: 100 !important;
}

/* 固定 logo 位置 */
#site-logo {
  width: 160px !important;
  flex-shrink: 0 !important;
  display: flex !important;
  align-items: center !important;
  cursor: pointer;
}
#site-logo a {
  display: flex !important;
  align-items: center !important;
}
#site-logo img {
  height: 32px !important;
  width: auto !important;
  display: block !important;
}

/* --------------------------------------------
   1. 布局
   -------------------------------------------- */
.container-page {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1rem;
}
@media (min-width: 640px) {
  .container-page { padding: 0 1.5rem; }
}
@media (min-width: 1024px) {
  .container-page { padding: 0 2rem; }
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 1024px) {
  .content-grid { grid-template-columns: repeat(4, 1fr); }
}

.content-main {
  min-width: 0;
}
@media (min-width: 1024px) {
  .content-main { grid-column: span 3 / span 3; }
}

.content-aside {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
@media (min-width: 1024px) {
  .content-aside {
    grid-column: span 1 / span 1;
    position: sticky;
    top: 5rem;
    align-self: start;
  }
}

.section-stack {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* 通用卡片 */
.card {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
}
.card-padded {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
}

/* --------------------------------------------
   2. Header（head.html）
   -------------------------------------------- */
.header-inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1rem;
  height: 100%;
}
@media (min-width: 640px) { .header-inner { padding: 0 1.5rem; } }
@media (min-width: 1024px) { .header-inner { padding: 0 2rem; } }

.header-flex {
  display: flex;
  height: 100%;
  align-items: center;
}

.header-nav {
  display: none;
  flex: 1;
  justify-content: center;
  align-items: center;
  gap: 0.25rem;
}
@media (min-width: 768px) {
  .header-nav { display: flex; gap: 0.5rem; }
}

.header-nav-item {
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-md);
  transition: background 0.2s;
  display: flex;
  align-items: center;
  color: var(--color-text);
}
.header-nav-item:hover {
  background: var(--gray-50);
}
.header-nav-item.is-active {
  color: var(--color-primary);
}

.header-dropdown {
  position: relative;
}
.header-dropdown-arrow {
  width: 1rem;
  height: 1rem;
  margin-left: 0.25rem;
  color: var(--gray-400);
  transition: transform 0.2s;
}
.header-dropdown:hover .header-dropdown-arrow {
  transform: rotate(180deg);
}

.header-dropdown-menu {
  position: absolute;
  left: 0;
  top: 100%;
  padding-top: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(0.5rem);
  transition: all 0.2s;
}
.header-dropdown:hover .header-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.header-dropdown-panel {
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--gray-100);
  padding: 0.5rem 0;
  min-width: 160px;
  overflow: hidden;
}

.header-dropdown-link {
  display: flex;
  align-items: center;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  color: var(--gray-600);
  transition: all 0.2s;
}
.header-dropdown-link:hover {
  background: var(--color-primary);
  color: white;
}

.header-dropdown-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-primary);
  margin-right: 0.5rem;
}

.header-actions {
  width: 160px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
}

.header-search-toggle {
  color: var(--color-text-muted);
  transition: color 0.2s;
  background: none;
  border: none;
  padding: 0;
}
.header-search-toggle:hover {
  color: var(--color-primary);
}

.header-search-box {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 0.5rem;
  width: 16rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-0.5rem);
  transition: all 0.3s;
}
.header-search-box.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.header-search-form {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--gray-100);
  padding: 0.75rem;
  position: relative;
}

.header-search-input {
  width: 100%;
  padding: 0.5rem 2.5rem 0.5rem 0.75rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.header-search-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px var(--color-primary);
}

.header-search-submit {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  padding: 0 0.75rem;
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  transition: background 0.2s;
}
.header-search-submit:hover {
  background: var(--blue-600);
}

.header-login-link {
  color: var(--color-text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s;
}
.header-login-link:hover {
  color: var(--color-primary);
}

/* --------------------------------------------
   3. Footer（foot.html）
   -------------------------------------------- */
.site-footer {
  background: var(--gray-800);
  color: #d1d5db;
  margin-top: 1.5rem;
  padding: 2rem 0;
  border-top: 1px solid #374151;
}
.footer-inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
}
@media (min-width: 640px) { .footer-inner { padding: 0 1.5rem; } }
@media (min-width: 768px) {
  .footer-inner { flex-direction: row; padding: 0 2rem; }
}
@media (min-width: 1024px) { .footer-inner { padding: 0 2rem; } }

.footer-brand {
  margin-bottom: 1rem;
}
@media (min-width: 768px) {
  .footer-brand { margin-bottom: 0; }
}

.footer-logo {
  display: inline-block;
  margin-bottom: 0.5rem;
}
.footer-logo img {
  height: 2rem;
  width: auto;
}

.footer-text {
  color: #9ca3af;
  font-size: 0.75rem;
  margin: 0.25rem 0;
}

.footer-links {
  display: flex;
  gap: 1rem;
}
.footer-link {
  cursor: pointer;
  transition: color 0.2s;
  color: #d1d5db;
}
.footer-link:hover {
  color: white;
}

.footer-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.footer-modal.is-open {
  display: flex;
}
.footer-modal-dialog {
  background: white;
  border-radius: var(--radius-xl);
  max-width: 32rem;
  width: 100%;
  max-height: 80vh;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}
.footer-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border-bottom: 1px solid var(--gray-100);
}
.footer-modal-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--gray-800);
  margin: 0;
}
.footer-modal-close {
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: none;
  border: none;
  transition: background 0.2s;
}
.footer-modal-close:hover {
  background: var(--gray-100);
}
.footer-modal-body {
  padding: 1.5rem;
  font-size: 0.875rem;
  color: var(--gray-600);
  line-height: 1.625;
  overflow-y: auto;
  max-height: 60vh;
}
.footer-modal-body p {
  margin: 0 0 1rem;
}
.footer-modal-body .text-primary {
  color: var(--color-primary);
  font-weight: 500;
}
.footer-modal-body strong {
  font-weight: 700;
}

/* --------------------------------------------
   4. Sidebar（right.html）
   -------------------------------------------- */
.sidebar-card {
  background: white;
  padding: 1rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}
.sidebar-card-flush {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.sidebar-header {
  border-bottom: 1px solid var(--gray-100);
  padding: 0.75rem;
}
.sidebar-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-text);
  border-left: 3px solid var(--color-primary);
  padding-left: 0.5rem;
  display: flex;
  align-items: center;
  margin: 0;
}

.sidebar-search-form {
  position: relative;
}
.sidebar-search-input {
  width: 100%;
  padding: 0.5rem 2.5rem 0.5rem 0.75rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.sidebar-search-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px var(--color-primary);
}
.sidebar-search-submit {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  padding: 0 0.75rem;
  background: var(--red-500);
  color: white;
  border: none;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  transition: background 0.2s;
}
.sidebar-search-submit:hover {
  background: var(--red-600);
}

.hot-list {
  padding: 1rem;
  font-size: 0.875rem;
}
.hot-item {
  display: block;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--gray-100);
}
.hot-item:last-child {
  border-bottom: 0;
}
.hot-item-row {
  display: flex;
  align-items: center;
}
.hot-item-rank {
  width: 1.25rem;
  height: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  margin-right: 0.5rem;
  flex-shrink: 0;
  background: var(--gray-100);
  color: var(--gray-500);
}
.hot-item-rank--1 {
  background: var(--red-500);
  color: white;
}
.hot-item-rank--2 {
  background: var(--orange-500);
  color: white;
}
.hot-item-rank--3 {
  background: var(--yellow-500);
  color: white;
}
.hot-item-title {
  font-size: 0.875rem;
  color: var(--gray-700);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.2s;
}
.hot-item:hover .hot-item-title {
  color: var(--color-primary);
}
.hot-item-hits {
  font-size: 0.75rem;
  color: var(--gray-400);
  margin-left: 0.5rem;
  flex-shrink: 0;
}

.tag-cloud {
  padding: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* --------------------------------------------
   5. Tag Chip（标签胶囊，多页面共用）
   -------------------------------------------- */
.tag-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.75rem;
  background: linear-gradient(to right, var(--gray-50), var(--gray-100));
  color: var(--gray-600);
  font-size: 0.75rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--gray-200);
  transition: all 0.2s;
}
.tag-chip:hover {
  background: linear-gradient(to right, var(--color-primary), var(--blue-600));
  color: white;
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
}

/* --------------------------------------------
   6. Article Row（首页文章列表项）
   -------------------------------------------- */
.article-row {
  padding: 1rem;
  display: flex;
  gap: 1.25rem;
  transition: background 0.2s;
}
.article-row:hover {
  background: rgba(249,250,251,0.8);
}
.article-thumb {
  flex-shrink: 0;
  width: 12rem;
  height: 8rem;
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--gray-50);
  border: 1px solid var(--gray-100);
}
.article-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.article-thumb:hover .article-thumb-img {
  transform: scale(1.1);
}
.article-cat-badge {
  position: absolute;
  top: 0.375rem;
  left: 0.375rem;
  background: rgba(31,41,55,0.8);
  color: white;
  font-size: 10px;
  padding: 0.125rem 0.375rem;
  border-radius: var(--radius-sm);
  z-index: 10;
}
.article-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
}
.article-title {
  font-size: 1rem;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin: 0;
  color: var(--gray-800);
}
.article-title.is-top {
  color: var(--red-500);
}
.article-desc {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-top: 0.375rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.625;
}
.article-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--gray-400);
  margin-top: 0.5rem;
}
.article-meta-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.top-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.375rem;
  border-radius: var(--radius-sm);
  font-size: 10px;
  font-weight: 500;
  background: linear-gradient(to right, var(--orange-500), var(--red-500));
  color: white;
  margin-right: 0.375rem;
  box-shadow: var(--shadow-sm);
  animation: pulse 2s infinite;
}
.article-title-link {
  transition: color 0.2s;
  color: inherit;
}
.article-title-link:hover {
  color: var(--color-primary);
}
.article-title-link.is-top {
  color: var(--red-500);
}
.article-title-link.is-top:hover {
  color: var(--red-600);
}

/* --------------------------------------------
   7. List Card（列表/搜索页文章卡片）
   -------------------------------------------- */
.list-card {
  display: flex;
  gap: 1.25rem;
  padding: 1rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-100);
  transition: all 0.2s;
  background: white;
  margin-bottom: 1rem;
}
.list-card:hover {
  border-color: rgba(14,165,233,0.3);
  box-shadow: var(--shadow-md);
}
.list-card:last-child {
  margin-bottom: 0;
}
.list-thumb {
  width: 13rem;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--gray-50);
  height: 9rem;
}
.list-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.list-thumb:hover .list-thumb-img {
  transform: scale(1.1);
}
.list-cat-badge {
  position: absolute;
  top: 0.375rem;
  left: 0.375rem;
  background: rgba(31,41,55,0.8);
  color: white;
  font-size: 10px;
  padding: 0.125rem 0.375rem;
  border-radius: var(--radius-sm);
  z-index: 10;
}

/* --------------------------------------------
   8. Tabs（栏目切换）
   -------------------------------------------- */
.tabs {
  background: white;
  padding: 0.75rem;
  border-radius: var(--radius-lg);
  display: flex;
  gap: 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  border: 1px solid var(--color-border);
  overflow-x: auto;
  white-space: nowrap;
}
.tab {
  color: var(--color-text-muted);
  transition: color 0.2s;
  padding-bottom: 0.25rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
}
.tab:hover {
  color: var(--color-primary);
}
.tab.is-active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

/* --------------------------------------------
   9. Buttons
   -------------------------------------------- */
.btn-load-more {
  background: white;
  border: 1px solid var(--color-primary);
  color: var(--color-primary);
  padding: 0.625rem 2rem;
  border-radius: var(--radius-full);
  transition: all 0.3s;
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}
.btn-load-more:hover {
  background: var(--color-primary);
  color: white;
}
.btn-load-more:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.btn-download {
  display: inline-flex;
  align-items: center;
  padding: 0.625rem 1.25rem;
  color: white;
  border-radius: var(--radius-lg);
  transition: all 0.2s;
  box-shadow: var(--shadow-sm);
  border: none;
  font-size: 0.875rem;
}
.btn-download:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.btn-download--baidu {
  background: var(--blue-500);
}
.btn-download--baidu:hover {
  background: var(--blue-600);
}
.btn-download--kuake {
  background: var(--orange-500);
}
.btn-download--kuake:hover {
  background: var(--orange-600);
}

.btn-visit {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 2rem;
  background: linear-gradient(to right, var(--blue-500), var(--indigo-600));
  color: white;
  border-radius: var(--radius-full);
  font-size: 1rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  transition: all 0.3s;
  border: none;
}
.btn-visit:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-4px);
  background: linear-gradient(to right, var(--blue-600), var(--indigo-700));
}
.btn-visit .icon-rotate {
  transition: transform 0.3s;
}
.btn-visit:hover .icon-rotate {
  transform: rotate(12deg);
}
.btn-visit .icon-arrow {
  transition: transform 0.3s;
}
.btn-visit:hover .icon-arrow {
  transform: translateX(4px);
}

.btn-back-home {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 0.5rem 1.5rem;
  background: var(--color-primary);
  color: white;
  border-radius: var(--radius-md);
  transition: background 0.2s;
}
.btn-back-home:hover {
  background: var(--color-primary-hover);
}

.btn-unlock {
  padding: 0.625rem 1.25rem;
  background: var(--blue-500);
  color: white;
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  font-weight: 500;
  transition: background 0.2s;
  border: none;
  cursor: pointer;
}
.btn-unlock:hover {
  background: var(--blue-600);
}
.btn-unlock:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.btn-comment-submit {
  margin-left: auto;
  padding: 0.5rem 1.5rem;
  background: var(--color-primary);
  color: white;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  transition: background 0.2s;
  display: flex;
  align-items: center;
  border: none;
  cursor: pointer;
}
.btn-comment-submit:hover {
  background: var(--blue-600);
}
.btn-comment-submit:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.btn-load-more-comment {
  padding: 0.5rem 1.5rem;
  font-size: 0.875rem;
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
  border-radius: var(--radius-md);
  transition: all 0.2s;
  background: white;
  cursor: pointer;
}
.btn-load-more-comment:hover {
  background: var(--color-primary);
  color: white;
}

/* --------------------------------------------
   10. Banner（首页轮播）
   -------------------------------------------- */
.banner-carousel {
  border-radius: var(--radius-xl);
  overflow: hidden;
  position: relative;
}
.banner-slides {
  position: relative;
  height: 16rem;
}
@media (min-width: 768px) {
  .banner-slides { height: 20rem; }
}
@media (min-width: 1024px) {
  .banner-slides { height: 24rem; }
}
.banner-slide {
  position: absolute;
  inset: 0;
  transition: opacity 0.5s;
  opacity: 0;
  z-index: 0;
}
.banner-slide.is-active {
  opacity: 1;
  z-index: 10;
}
.banner-slide-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}
.banner-carousel:hover .banner-slide.is-active .banner-slide-img {
  transform: scale(1.05);
}
.banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
}
.banner-caption {
  position: absolute;
  bottom: 1rem;
  left: 1.5rem;
  color: white;
}
.banner-caption-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
}
.banner-caption-desc {
  font-size: 0.875rem;
  opacity: 0.9;
  margin: 0;
}
.banner-dots {
  position: absolute;
  bottom: 0.5rem;
  right: 1rem;
  display: flex;
  gap: 0.5rem;
  z-index: 20;
}
.banner-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  transition: background 0.2s;
  background: rgba(255,255,255,0.5);
  border: none;
  cursor: pointer;
  padding: 0;
}
.banner-dot.is-active {
  background: white;
}
.banner-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.5rem;
  height: 2.5rem;
  background: rgba(0,0,0,0.3);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  transition: background 0.2s, opacity 0.2s;
  opacity: 0;
  border: none;
  cursor: pointer;
}
.banner-carousel:hover .banner-arrow {
  opacity: 1;
}
.banner-arrow:hover {
  background: rgba(0,0,0,0.5);
}
.banner-arrow--prev { left: 0.5rem; }
.banner-arrow--next { right: 0.5rem; }

.banner-side {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
@media (min-width: 1024px) {
  .banner-side { grid-column: span 1 / span 1; }
}
.banner-side-card {
  border-radius: var(--radius-2xl);
  overflow: hidden;
  position: relative;
  flex: 1;
  display: block;
  min-height: 10rem;
  box-shadow: var(--shadow-lg);
  transition: all 0.5s;
  border: 1px solid rgba(255,255,255,0.2);
}
.banner-side-card:hover {
  box-shadow: var(--shadow-xl);
}
.banner-side-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s;
}
.banner-side-card:hover .banner-side-img {
  transform: scale(1.1);
}
.banner-side-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7), rgba(0,0,0,0.1), transparent);
  opacity: 0.8;
  transition: opacity 0.5s;
}
.banner-side-card:hover .banner-side-overlay {
  opacity: 0.6;
}
.banner-side-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  z-index: 10;
}
.banner-side-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: white;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3));
  transition: color 0.3s;
  margin: 0 0 0.25rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.banner-side-card:hover .banner-side-title {
  color: #fde047;
}
.banner-side-desc {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.7);
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.3s;
}
.banner-side-card:hover .banner-side-desc {
  color: rgba(255,255,255,0.9);
}

/* --------------------------------------------
   11. Website Grid（网站推荐）
   -------------------------------------------- */
.website-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
@media (min-width: 768px) {
  .website-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 1024px) {
  .website-grid { grid-template-columns: repeat(5, 1fr); }
}
.website-card {
  background: white;
  padding: 0.75rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  transition: box-shadow 0.2s;
  display: block;
}
.website-card:hover {
  box-shadow: var(--shadow-md);
}
.website-thumb {
  aspect-ratio: 16 / 9;
  background: var(--gray-100);
  border-radius: var(--radius-md);
  margin-bottom: 0.75rem;
  overflow: hidden;
  position: relative;
}
.website-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.website-card:hover .website-thumb-img {
  transform: scale(1.1);
}
.website-badge {
  position: absolute;
  top: 0.25rem;
  left: 0.25rem;
  background: var(--red-500);
  color: white;
  font-size: 10px;
  padding: 0.125rem 0.25rem;
  border-radius: var(--radius-sm);
  z-index: 10;
}
.website-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text);
  transition: color 0.2s;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.website-card:hover .website-title {
  color: var(--color-primary);
}
.website-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  color: var(--gray-400);
  margin-top: 0.5rem;
}

/* --------------------------------------------
   12. Section Heading（区块标题）
   -------------------------------------------- */
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}
.section-title {
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--color-text);
  display: flex;
  align-items: center;
  margin: 0;
}
.section-title-bar {
  width: 4px;
  height: 1rem;
  background: var(--color-primary);
  margin-right: 0.5rem;
  display: block;
}
.section-title-sub {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--gray-400);
  margin-left: 0.5rem;
}
.section-more {
  font-size: 0.875rem;
  color: var(--gray-500);
  transition: color 0.2s;
  display: flex;
  align-items: center;
}
.section-more:hover {
  color: var(--color-primary);
}

/* --------------------------------------------
   13. Breadcrumb（面包屑）
   -------------------------------------------- */
.breadcrumb {
  display: flex;
  align-items: center;
  font-size: 0.875rem;
  color: var(--gray-500);
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.breadcrumb-link {
  transition: color 0.2s;
  display: flex;
  align-items: center;
  color: var(--gray-500);
}
.breadcrumb-link:hover {
  color: var(--color-primary);
}
.breadcrumb-separator {
  width: 1rem;
  height: 1rem;
  margin: 0 0.5rem;
  color: var(--gray-300);
  flex-shrink: 0;
}

/* --------------------------------------------
   14. Page Title（列表/搜索页标题）
   -------------------------------------------- */
.page-title {
  display: flex;
  align-items: center;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--gray-100);
  color: var(--color-text);
}
.page-title-bar {
  width: 4px;
  height: 1.5rem;
  background: var(--color-primary);
  border-radius: var(--radius-full);
  margin-right: 0.75rem;
  flex-shrink: 0;
}
.page-title-count {
  margin-left: 0.5rem;
  font-size: 0.875rem;
  color: var(--gray-400);
  font-weight: 400;
}

/* --------------------------------------------
   15. Article Detail（详情页）
   -------------------------------------------- */
.article-detail {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
  margin-bottom: 1.5rem;
  overflow: hidden;
}
.article-detail-header {
  padding: 1.5rem 1.5rem 1rem;
  border-bottom: 1px solid var(--gray-100);
}
.article-detail-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 1rem;
  color: var(--gray-800);
  line-height: 1.25;
}
@media (min-width: 768px) {
  .article-detail-title { font-size: 1.875rem; }
}
.article-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  font-size: 0.875rem;
  color: var(--gray-400);
  gap: 1rem;
}
.article-meta-row .article-meta-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.article-meta-row .article-meta-item a {
  color: var(--blue-500);
  transition: color 0.2s;
}
.article-meta-row .article-meta-item a:hover {
  color: var(--color-primary);
}
.article-detail-body {
  padding: 1.5rem;
  font-size: 1rem;
  line-height: 1.625;
  color: var(--gray-700);
  word-wrap: break-word;
}

/* --------------------------------------------
   16. Download Area（下载区）
   -------------------------------------------- */
.download-section {
  margin-top: 2rem;
}
.download-section-title {
  display: flex;
  align-items: center;
  font-size: 1.125rem;
  font-weight: 500;
  margin: 0 0 1rem;
  color: var(--gray-800);
}
.download-section-title-bar {
  width: 4px;
  height: 1.25rem;
  background: var(--color-primary);
  border-radius: var(--radius-full);
  margin-right: 0.5rem;
  flex-shrink: 0;
}
.download-lock {
  background: linear-gradient(to right, var(--blue-50), var(--indigo-50));
  border: 1px solid var(--blue-100);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.download-lock-header {
  background: var(--blue-500);
  color: white;
  text-align: center;
  padding: 0.75rem 0;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.025em;
}
.download-lock-body {
  display: flex;
  align-items: center;
  padding: 1.5rem;
  gap: 1.5rem;
}
.download-lock-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.download-lock-icon {
  width: 3rem;
  height: 3rem;
  color: var(--blue-500);
}
.download-lock-input-row {
  display: flex;
  gap: 0.5rem;
  max-width: 24rem;
  width: 100%;
}
.download-lock-input {
  flex: 1;
  padding: 0.625rem 1rem;
  border: 1px solid var(--blue-200);
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.download-lock-input:focus {
  border-color: var(--blue-400);
  box-shadow: 0 0 0 2px rgba(96,165,250,0.3);
}
.download-lock-error {
  color: var(--red-500);
  font-size: 0.875rem;
  margin: 0;
}
.download-lock-tip {
  color: var(--gray-500);
  font-size: 0.75rem;
  line-height: 1.625;
  text-align: center;
  margin: 0;
}
.download-lock-tip strong {
  font-weight: 700;
  color: var(--color-primary);
}
.download-qr {
  flex-shrink: 0;
  width: 9rem;
  height: 9rem;
  border: 2px dashed var(--blue-200);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
}
.download-qr img {
  width: 8rem;
  height: 8rem;
  object-fit: contain;
}
.download-content {
  background: linear-gradient(to right, var(--blue-50), var(--indigo-50));
  padding: 1.25rem;
  border: 1px solid var(--blue-100);
  border-radius: var(--radius-lg);
}
.download-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.download-tip-text {
  font-size: 0.75rem;
  color: var(--gray-400);
  margin: 0.75rem 0 0;
}

/* --------------------------------------------
   17. Tips Box（温馨提示）
   -------------------------------------------- */
.tips-box {
  margin-top: 1.5rem;
  background: var(--amber-50);
  border: 1px solid var(--amber-200);
  padding: 1rem;
  border-radius: var(--radius-lg);
  font-size: 0.75rem;
  color: var(--amber-700);
  line-height: 2;
}
.tips-box p {
  margin: 0;
}
.tips-title {
  display: flex;
  align-items: center;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--amber-800);
}

/* --------------------------------------------
   18. Tag Row（详情页标签行）
   -------------------------------------------- */
.tag-row {
  margin-top: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  flex-wrap: wrap;
}
.tag-row-label {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--gray-500);
}
.tag-empty {
  color: var(--gray-400);
  font-size: 0.75rem;
}

/* --------------------------------------------
   19. Prev/Next（上下篇）
   -------------------------------------------- */
.prev-next-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
@media (min-width: 640px) {
  .prev-next-grid { grid-template-columns: repeat(2, 1fr); }
}
.prev-next-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: white;
  padding: 1rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-100);
  transition: all 0.2s;
}
.prev-next-card:hover {
  border-color: rgba(14,165,233,0.3);
  box-shadow: var(--shadow-md);
}
.prev-next-card--next {
  text-align: right;
}
.prev-next-thumb {
  flex-shrink: 0;
  width: 4rem;
  height: 4rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--gray-50);
}
.prev-next-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s;
}
.prev-next-card:hover .prev-next-thumb-img {
  transform: scale(1.1);
}
.prev-next-body {
  flex: 1;
  min-width: 0;
}
.prev-next-label {
  font-size: 0.75rem;
  color: var(--gray-400);
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-bottom: 0.25rem;
}
.prev-next-card--next .prev-next-label {
  justify-content: flex-end;
}
.prev-next-title {
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--gray-700);
  transition: color 0.2s;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.prev-next-card:hover .prev-next-title {
  color: var(--color-primary);
}

/* --------------------------------------------
   20. Related（相关推荐）
   -------------------------------------------- */
.related-box {
  background: white;
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
  margin-bottom: 1.5rem;
}
.related-title {
  display: flex;
  align-items: center;
  font-size: 1.125rem;
  font-weight: 500;
  margin: 0 0 1rem;
  color: var(--gray-800);
}
.related-title-bar {
  width: 4px;
  height: 1.25rem;
  background: var(--color-primary);
  border-radius: var(--radius-full);
  margin-right: 0.5rem;
  flex-shrink: 0;
}
.related-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  font-size: 0.875rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
@media (min-width: 768px) {
  .related-list { grid-template-columns: repeat(2, 1fr); }
}
.related-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  border-radius: var(--radius-lg);
  transition: background 0.2s, color 0.2s;
  color: var(--gray-600);
}
.related-item:hover {
  background: var(--gray-50);
  color: var(--color-primary);
}
.related-item-icon {
  width: 0.75rem;
  height: 0.75rem;
  color: var(--gray-300);
  flex-shrink: 0;
  transition: color 0.2s;
}
.related-item:hover .related-item-icon {
  color: var(--color-primary);
}
.related-item-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 1;
}

/* --------------------------------------------
   21. Friend Links（友情链接）
   -------------------------------------------- */
.friend-links-section {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0.75rem 1rem;
}
@media (min-width: 640px) { .friend-links-section { padding: 0.75rem 1.5rem; } }
@media (min-width: 1024px) { .friend-links-section { padding: 0.75rem 2rem; } }
.friend-links-box {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  padding: 1rem;
}
.friend-links-header {
  display: flex;
  align-items: center;
  margin-bottom: 0.75rem;
}
.friend-links-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text);
}
.friend-links-divider {
  margin-left: 0.5rem;
  flex: 1;
  height: 1px;
  background: var(--color-border);
}
.friend-links-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  font-size: 0.875rem;
}
.friend-links-list a {
  color: var(--gray-600);
  transition: color 0.2s;
}
.friend-links-list a:hover {
  color: var(--color-primary);
}

/* --------------------------------------------
   22. Comment（评论组件）
   -------------------------------------------- */
.comment-box {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
  overflow: hidden;
  margin-top: 1.5rem;
}
.comment-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--gray-100);
  background: var(--gray-50);
}
.comment-header-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--gray-800);
  display: flex;
  align-items: center;
  margin: 0;
}
.comment-header-count {
  margin-left: 0.25rem;
  font-size: 0.875rem;
  color: var(--gray-500);
  font-weight: 400;
}
.comment-closed {
  padding: 3rem 1.5rem;
  text-align: center;
}
.comment-closed-icon {
  width: 3rem;
  height: 3rem;
  margin: 0 auto 0.75rem;
  color: var(--gray-300);
}
.comment-closed-text {
  color: var(--gray-500);
  margin: 0;
}
.comment-main {
  padding: 1.5rem 1.25rem;
}
.comment-form-wrap {
  margin-bottom: 1.5rem;
}
.comment-form-wrap-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-700);
  margin: 0 0 0.75rem;
}
.comment-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 0;
}
.comment-form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}
@media (min-width: 768px) {
  .comment-form-row { grid-template-columns: repeat(2, 1fr); }
}
.comment-label {
  display: block;
  font-size: 0.75rem;
  color: var(--gray-500);
  margin-bottom: 0.25rem;
}
.comment-label-required {
  color: var(--red-500);
}
.comment-label-optional {
  color: var(--gray-400);
}
.comment-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.comment-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px var(--color-primary);
}
.comment-textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  resize: none;
}
.comment-textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px var(--color-primary);
}
.comment-captcha-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.comment-captcha-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.comment-captcha-input {
  width: 7rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.comment-captcha-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px var(--color-primary);
}
.comment-captcha-img {
  height: 2.25rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid var(--gray-200);
}
.comment-form-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 0.25rem;
}
.comment-form-meta-text {
  font-size: 0.75rem;
  color: var(--gray-400);
}
.comment-reply-tip {
  font-size: 0.75rem;
  color: #2563eb;
  background: var(--blue-50);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
}
.comment-reply-tip a {
  color: var(--red-500);
  margin-left: 0.5rem;
}
.comment-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.comment-item {
  display: flex;
  gap: 0.75rem;
}
.comment-avatar {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.875rem;
  font-weight: 500;
}
.comment-avatar--reply {
  width: 2rem;
  height: 2rem;
  font-size: 0.75rem;
}
.comment-body {
  flex: 1;
  min-width: 0;
}
.comment-bubble {
  background: var(--gray-50);
  border-radius: var(--radius-lg);
  padding: 0.75rem 1rem;
}
.comment-bubble--admin {
  border-left: 2px solid var(--green-400);
  background: var(--green-50);
}
.comment-bubble-header {
  display: flex;
  align-items: center;
  margin-bottom: 0.25rem;
}
.comment-nick {
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--gray-800);
}
.comment-admin-badge {
  margin-left: 0.5rem;
  padding: 0.125rem 0.375rem;
  font-size: 0.75rem;
  background: var(--green-100);
  color: var(--green-700);
  border-radius: var(--radius-sm);
}
.comment-admin-badge--reply {
  margin-left: 0.25rem;
}
.comment-time {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--gray-400);
}
.comment-text {
  font-size: 0.875rem;
  color: var(--gray-700);
  white-space: pre-wrap;
  word-break: break-all;
}
.comment-text--reply {
  font-size: 0.75rem;
}
.comment-reply-to {
  color: var(--gray-400);
  font-size: 0.75rem;
}
.comment-reply-to-name {
  font-weight: 500;
  font-size: 0.75rem;
  color: var(--blue-500);
  margin: 0 0.125rem;
}
.comment-reply-btn {
  font-size: 0.75rem;
  color: var(--gray-400);
  transition: color 0.2s;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.comment-reply-btn:hover {
  color: var(--color-primary);
}
.comment-reply-btn-wrap {
  margin-top: 0.25rem;
  margin-left: 0.25rem;
}
.comment-replies {
  margin-top: 0.75rem;
  margin-left: 3rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.comment-reply {
  display: flex;
  gap: 0.5rem;
}
.comment-load-more {
  text-align: center;
  margin-top: 1.5rem;
}
.comment-empty {
  text-align: center;
  padding: 3rem 0;
}
.comment-empty-icon {
  width: 3rem;
  height: 3rem;
  margin: 0 auto 0.75rem;
  color: var(--gray-300);
}
.comment-empty-text {
  color: var(--gray-400);
  font-size: 0.875rem;
  margin: 0;
}

/* --------------------------------------------
   23. Toast & Loading & Empty
   -------------------------------------------- */
.toast {
  position: fixed;
  top: 5rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-lg);
  color: white;
  font-size: 0.875rem;
  box-shadow: var(--shadow-lg);
  z-index: 50;
  transition: opacity 0.3s;
}
.toast--success { background: var(--green-500); }
.toast--error { background: var(--red-500); }
.toast--info { background: var(--blue-500); }

.loading-state {
  padding: 2rem;
  text-align: center;
  color: var(--gray-400);
}
.loading-state-sm {
  text-align: center;
  padding: 1rem 0;
  color: var(--gray-400);
  font-size: 0.875rem;
}
.loading-state-sm--error {
  color: var(--red-400);
}
.empty-state {
  padding: 2rem;
  text-align: center;
  color: var(--gray-400);
}
.empty-search {
  padding: 4rem 0;
  text-align: center;
}
.empty-search-icon {
  width: 5rem;
  height: 5rem;
  margin: 0 auto 1rem;
  color: var(--gray-300);
}
.empty-search-title {
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--gray-500);
  margin: 0 0 0.5rem;
}
.empty-search-desc {
  font-size: 0.875rem;
  color: var(--gray-400);
  margin: 0 0 1.5rem;
}
.empty-search-desc .text-primary {
  color: var(--color-primary);
  font-weight: 500;
}
.empty-search-suggestions {
  font-size: 0.875rem;
  color: var(--gray-400);
}
.empty-search-suggestions ul {
  margin: 0.5rem 0 0;
  padding: 0;
  list-style: none;
}
.empty-search-suggestions li {
  margin: 0.25rem 0;
}

.spinner {
  animation: spin 1s linear infinite;
}
.spinner-lg {
  width: 1.5rem;
  height: 1.5rem;
  margin: 0 auto 0.5rem;
  color: var(--color-primary);
}
.spinner-sm {
  width: 1rem;
  height: 1rem;
  display: inline-block;
  margin-right: 0.25rem;
  vertical-align: middle;
}

/* --------------------------------------------
   状态类
   -------------------------------------------- */
.is-hidden {
  display: none !important;
}

/* --------------------------------------------
   动画
   -------------------------------------------- */
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* --------------------------------------------
   工具类
   -------------------------------------------- */
.line-clamp-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.text-center { text-align: center; }
.text-right { text-align: right; }

.icon--xs { width: 0.75rem; height: 0.75rem; }
.icon--sm { width: 0.875rem; height: 0.875rem; }
.icon--md { width: 1rem; height: 1rem; }
.icon--lg { width: 1.25rem; height: 1.25rem; }
.icon--xl { width: 2.5rem; height: 2.5rem; }

.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }

.pagination-wrap {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
}

/* ============================================
   文章内容区排版样式
   修复 Tailwind Preflight 重置标题/段落/列表等默认样式的问题
   链接用 :not([class]) 仅针对无class的纯文本链接，避免覆盖按钮/标签的类
   ============================================ */

/* 标题 */
.article-content h1 { font-size: 1.875em; font-weight: 700; margin: 1em 0 0.5em; line-height: 1.3; color: #1f2937; }
.article-content h2 { font-size: 1.5em; font-weight: 600; margin: 0.8em 0 0.4em; line-height: 1.35; color: #1f2937; padding-bottom: 0.3em; border-bottom: 1px solid #e5e7eb; }
.article-content h3 { font-size: 1.25em; font-weight: 600; margin: 0.8em 0 0.4em; line-height: 1.4; color: #1f2937; }
.article-content h4 { font-size: 1.1em; font-weight: 600; margin: 0.6em 0 0.3em; color: #374151; }
.article-content h5,
.article-content h6 { font-size: 1em; font-weight: 600; margin: 0.6em 0 0.3em; color: #374151; }

/* 段落 */
.article-content p { margin: 0 0 1em; }

/* 链接（仅无class的纯文本链接） */
.article-content a:not([class]) { color: #0ea5e9; }
.article-content a:not([class]):hover { color: #0284c7; }

/* 列表 */
.article-content ul { list-style-type: disc; margin: 0.5em 0 1em; padding-left: 2em; }
.article-content ol { list-style-type: decimal; margin: 0.5em 0 1em; padding-left: 2em; }
.article-content li { margin: 0.25em 0; }

/* 引用 */
.article-content blockquote { border-left: 4px solid #0ea5e9; padding: 0.5em 1em; margin: 1em 0; background: #f0f9ff; color: #374151; }

/* 分隔线 */
.article-content hr { border: none; border-top: 1px solid #e5e7eb; margin: 1.5em 0; }

/* 表格 */
.article-content table { border-collapse: collapse; width: 100%; margin: 1em 0; }
.article-content th,
.article-content td { border: 1px solid #d1d5db; padding: 0.5em 0.75em; text-align: left; }
.article-content th { background: #f3f4f6; font-weight: 600; }

/* 代码 */
.article-content code { background: #f3f4f6; padding: 0.15em 0.4em; border-radius: 3px; font-size: 0.9em; }
.article-content pre { background: #1f2937; color: #e5e7eb; padding: 1em; border-radius: 6px; overflow-x: auto; margin: 1em 0; }
.article-content pre code { background: none; padding: 0; font-size: 0.9em; }

/* 强调 */
.article-content strong,
.article-content b { font-weight: 700; }
.article-content em,
.article-content i { font-style: italic; }

/* 文章内容区图片样式（合并 news.css 的 margin/border） */
.article-content img {
  max-width: 100%;
  height: auto;
  margin: 1rem 0;
  border: 1px solid #eee;
}
/* 父级居中（style 或 align 属性）时，图片自动居中 */
.article-content p[style*="center"] img,
.article-content div[style*="center"] img,
.article-content p[align="center"] img,
.article-content div[align="center"] img {
  display: block;
  margin-left: auto !important;
  margin-right: auto !important;
}
/* 支持各种居中方式 */
.article-content p[style*="center"],
.article-content div[style*="center"],
.article-content span[style*="center"],
.article-content [align="center"] {
  text-align: center !important;
}
.article-content img[align="center"],
.article-content img[style*="center"] {
  display: block !important;
  margin: 0 auto !important;
}
.article-content figure {
  text-align: center !important;
}
.article-content figure img {
  margin: 0 auto !important;
}

/* ============================================
   分页样式（从 list.css 迁入）
   ============================================ */
.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  justify-content: center;
  list-style: none;
  padding: 0;
  margin: 0;
}
.pagination li {
  list-style: none;
}
.pagination li a {
  display: inline-block;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: #6b7280;
  background-color: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.375rem;
  transition: all 0.2s;
}
.pagination li a:hover {
  color: #0ea5e9;
  border-color: #0ea5e9;
  background-color: #f0f9ff;
}
.pagination li.active span,
.pagination li.active a {
  display: inline-block;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #fff;
  background-color: #0ea5e9;
  border: 1px solid #0ea5e9;
  border-radius: 0.375rem;
}
.pagination-total {
  display: inline-block;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: #6b7280;
}

/* ============================================
   补充规则（迁移期追加）
   ============================================ */

/* SVG 图标统一垂直对齐 */
svg { vertical-align: middle; }

/* footer 模态框关闭按钮图标 */
.footer-modal-close svg { width: 1.25rem; height: 1.25rem; color: var(--gray-500); }
.footer-modal-close:hover svg { color: var(--gray-700); }

/* 评论标题图标 */
.comment-header-icon { width: 1.25rem; height: 1.25rem; color: var(--color-primary); margin-right: 0.5rem; }

/* 空状态图标 */
.comment-empty-icon svg,
.empty-search-icon svg { width: 3rem; height: 3rem; color: var(--gray-300); margin: 0 auto 0.5rem; display: block; }

/* 工具类兼容 */
.mt-8 { margin-top: 2rem; }
.mb-6 { margin-bottom: 1.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.text-center { text-align: center; }

/* 侧边栏空状态 */
.sidebar-empty { padding: 2rem 1rem; text-align: center; color: var(--gray-400); font-size: 0.875rem; }

/* banner slide 链接（整块可点击） */
.banner-slide-link { display: block; width: 100%; height: 100%; }

/* 面包屑当前项 */
.breadcrumb-current { color: var(--gray-500); font-weight: 500; }

/* footer 模态框联系信息 */
.footer-modal-contact-list { margin: 0.5rem 0; padding-left: 1.25rem; list-style: disc; }
.footer-modal-contact-list li { margin: 0.25rem 0; }
.footer-modal-contact-box { background: var(--gray-50); border-radius: var(--radius-lg); padding: 1rem; margin: 0.75rem 0; }
.footer-modal-contact-box strong { color: var(--color-primary); }

/* 图标尺寸变体 */
.icon--xs { width: 0.75rem; height: 0.75rem; }
.icon--sm { width: 1rem; height: 1rem; }
.icon--md { width: 1.25rem; height: 1.25rem; }
.icon--lg { width: 1.5rem; height: 1.5rem; }
.icon--xl { width: 2rem; height: 2rem; }

/* line-clamp-1 单行截断 */
.line-clamp-1 { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 加载更多按钮包裹 */
.pagination-wrap { display: flex; justify-content: center; margin-top: 1.5rem; }

/* ============================================
   移动端适配（max-width: 767px）
   不影响桌面端样式
   ============================================ */
@media (max-width: 767px) {
  /* 1. 口令锁定区域 - 二维码改为垂直排列，避免被遮挡 */
  .download-lock-body {
    flex-direction: column;
    padding: 1rem;
    gap: 1rem;
  }
  .download-lock-left {
    width: 100%;
  }
  .download-lock-icon {
    width: 2rem;
    height: 2rem;
  }
  .download-qr {
    width: 7rem;
    height: 7rem;
  }
  .download-qr img {
    width: 6rem;
    height: 6rem;
  }

  /* 2. 首页/列表页/搜索页 - 缩略图缩小，文字区域更宽敞 */
  .article-row {
    gap: 0.625rem;
    padding: 0.625rem;
  }
  .article-thumb {
    width: 5rem;
    height: 5rem;
  }

  .list-card {
    gap: 0.625rem;
    padding: 0.625rem;
  }
  .list-thumb {
    width: 5rem;
    height: 5rem;
  }

  /* 3. 评论发布按钮 - 缩小并防止文字换行 */
  .btn-comment-submit {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    white-space: nowrap;
  }

  /* 4. 网站推荐 - 缩小间距和内边距，防止内容溢出被遮挡 */
  .website-grid {
    gap: 0.5rem;
  }
  .website-card {
    padding: 0.5rem;
    min-width: 0;
    overflow: hidden;
  }
  .website-thumb {
    margin-bottom: 0.5rem;
  }

  /* 5. 相关推荐 - 允许列表项收缩，防止标题溢出 */
  .related-box {
    padding: 1rem;
  }
  .related-list {
    gap: 0.5rem;
  }
  .related-item {
    min-width: 0;
    overflow: hidden;
  }
}
