
/* 强力锁定：确保 Gemini 粘贴的内容不被 Olivero 的网格系统拉伸 */
.node--type-article .field--name-body > * {
  grid-column: 1 / -1 !important; /* 强制占满整行，不被侧边栏挤压 */
  max-width: 800px;              /* 限制阅读宽度，符合人体工程学 */
  margin-left: auto !important;
  margin-right: auto !important;
}

/* 自动排版：列表符号丢失修复 */
.node--type-article .field--name-body ul {
  list-style-type: disc !important;
  margin-left: 2rem !important;
}

.node--type-article .field--name-body ol {
  list-style-type: decimal !important;
  margin-left: 2rem !important;
}

/* 修复 Gemini 粘贴后可能出现的空白段落 */
.node--type-article .field--name-body p:empty {
  display: none;
}

.toc-filter {
    width: 100%;
}

.field--name-body img,
.field--name-body table,
.field--name-body pre {
  max-width: 100%; /* 确保它们不会超出 .field--name-body 的宽度 */
  height: auto;
}

/* themes/custom/your_theme_name/css/blog-content.css */

/* ... (前面 1-4 部分的 CSS 保持不变，特别是 .layout__region--content .field--name-body 的样式) ... */


/* ==========================================================================
   5. 表格
   ========================================================================== */

/* 表格基础样式，用于可读性和响应性 */
.field--name-body table {
  width: 100%; /* 让表格尝试填充其父容器 (.field--name-body) 的宽度 */
  max-width: 100%; /* 确保表格不会因内部内容溢出其父容器 */
  min-width: 100%; /* **新增关键样式：确保表格至少占据其父容器的全部宽度** */
  border-collapse: collapse; /* 合并表格边框 */
  margin: 2em 0;        /* 垂直间距 */

  display: block;       /* 关键：使表格表现为块级元素，以便 overflow-x 生效 */
  overflow-x: auto;     /* 关键：当内容超出时启用水平滚动 */
  -webkit-overflow-scrolling: touch; /* 改善 iOS 设备上的滚动体验 */

  /* 调整表格布局，使其内容能够自然地溢出并触发滚动条 */
  table-layout: auto; /* 默认值，但明确声明，允许列宽根据内容调整 */
}

/* 表格单元格（表头和数据单元格） */
.field--name-body th,
.field--name-body td {
  border: 1px solid #ddd; /* 浅灰色边框 */
  padding: 10px;
  text-align: left;
  vertical-align: top;
  /* **新增关键样式：强制单元格内容不换行**，从而让整个列推动表格宽度，最终触发水平滚动条 */
  white-space: nowrap;
}

/* Table header specific styles */
.field--name-body th {
  background-color: #f2f2f2; /* 表头浅色背景 */
  font-weight: bold;
  color: #555;
}

/* Zebra striping for table rows */
.field--name-body tr:nth-child(even) {
  background-color: #f9f9f9; /* 偶数行浅灰色背景 */
}

/* ... (后面 6. 响应式设计 部分的 CSS 保持不变) ... */



/* themes/custom/wisoar/css/blog-content.css */
/* 1. 基础布局复位 - 解决乱序核心 */
.gemini-content-reset .field--name-body {
    all: revert; /* 强制重置部分浏览器默认样式 */
    display: block;
    font-family: var(--font-sans, sans-serif);
    line-height: 1.75;
    color: #2d3436;
}

/* 2. 列表修复：这是 Gemini 粘贴最容易乱的地方 */
.gemini-content-reset .field--name-body ul,
.gemini-content-reset .field--name-body ol {
    margin: 1.5rem 0 !important;
    padding-left: 2.5rem !important;
    list-style-position: outside !important;
    display: block !important;
}

.gemini-content-reset .field--name-body li {
    margin-bottom: 0.75rem !important;
    display: list-item !important; /* 强制恢复列表显示模式 */
}

/* 处理嵌套列表 */
.gemini-content-reset .field--name-body li > ul,
.gemini-content-reset .field--name-body li > ol {
    margin: 0.5rem 0 0.5rem 1.5rem !important;
}

/* 3. 标题加固 */
.gemini-content-reset .field--name-body h2,
.gemini-content-reset .field--name-body h3 {
    margin: 2.5rem 0 1.2rem 0 !important;
    line-height: 1.3 !important;
    color: #1a1a1a;
    font-weight: 700;
}

/* 4. 代码块修复（ItProHive 核心需求） */
.gemini-content-reset .field--name-body pre {
    background: #2d3436 !important;
    color: #dfe6e9 !important;
    padding: 1.5rem !important;
    border-radius: 6px !important;
    overflow-x: auto !important;
    margin: 1.5rem 0 !important;
}

.gemini-content-reset .field--name-body code {
    font-family: 'Courier New', Courier, monospace;
    background: #f1f2f6;
    color: #eb4d4b;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
}