/* ============================================
   Note 块：纯色背景 → 柔光渐变 + 左侧色条
   原来 flat 模式是全色块填充，太刺眼
   ============================================ */
/* 通用 note 容器 */
div[class*="note-"] {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
}

/* info（蓝） */
.bg-tip,
div.tip,
.note-info:not(.no-icon) {
  background: linear-gradient(135deg, #f0f4ff 0%, #fafbff 100%) !important;
  border-left: 3px solid #5b7fef !important;
  border-radius: 6px;
  padding: 1rem 1.2rem !important;
}

/* success（绿） */
.bg-safe,
div.success,
.note-success:not(.no-icon) {
  background: linear-gradient(135deg, #f0faf5 0%, #fafefb 100%) !important;
  border-left: 3px solid #4caf88 !important;
  border-radius: 6px;
  padding: 1rem 1.2rem !important;
}

/* warning（黄/橙） */
.bg-warning,
div.warning,
.note-warning:not(.no-icon) {
  background: linear-gradient(135deg, #fffaf0 0%, #fffefb 100%) !important;
  border-left: 3px solid #e6a23c !important;
  border-radius: 6px;
  padding: 1rem 1.2rem !important;
}

/* danger / error（红） */
.bg-danger,
div.danger,
.note-danger:not(.no-icon) {
  background: linear-gradient(135deg, #fff5f5 0%, #fffafa 100%) !important;
  border-left: 3px solid #e06060 !important;
  border-radius: 6px;
  padding: 1rem 1.2rem !important;
}

/* 保留 note 图标颜色 */
.note-info:not(.no-icon)::before,
.note-success:not(.no-icon)::before,
.note-warning:not(.no-icon)::before,
.note-danger:not(.no-icon)::before {
  opacity: 0.8;
}

/* ============================================
   主页封面：16:9 统一比例
   ============================================ */
@media screen and (min-width: 1201px) {
  #recent-posts>.recent-post-item .post_cover {
    aspect-ratio: 16/9;
    height: auto;
  }
}

/* ============================================
   Inline code ``：去掉所有背景填充，只保留文本色
   ============================================ */
#article-container code {
  background: transparent !important;
  color: inherit !important;
  padding: 0.1em 0.3em !important;
  border-radius: 3px !important;
  box-shadow: none !important;
}
/* 代码块内的 code 不受影响 */
#article-container pre code {
  background: transparent !important;
  padding: 0 !important;
}

/* ============================================
   Mermaid 图表容器
   ============================================ */
.mermaid {
  background: transparent;
  border-radius: 8px;
}

/* ============================================
   表格：隔行变色 + 圆角优化
   ============================================ */
table {
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}
table thead th {
  background: #f5f7fa;
  font-weight: 600;
}
table tbody tr:nth-child(even) {
  background: #fafbfc;
}

/* ============================================
   全局：选中文字颜色柔和化
   ============================================ */
::selection {
  background: rgba(66, 90, 239, 0.15);
  color: inherit;
}
