/*
  Atom One Dark by Daniel Gamage
  Original One Dark Syntax theme from https://github.com/atom/one-dark-syntax
*/

.hljs {
  color: #abb2bf !important;
  background: #282c34 !important;
}

.hljs-comment,
.hljs-quote {
  color: #5c6370;
  font-style: italic;
}

.hljs-doctag,
.hljs-keyword,
.hljs-formula {
  color: #c678dd;
}

.hljs-section,
.hljs-name,
.hljs-selector-tag,
.hljs-deletion,
.hljs-subst {
  color: #e06c75;
}

.hljs-literal {
  color: #56b6c2;
}

.hljs-string,
.hljs-regexp,
.hljs-addition,
.hljs-attribute,
.hljs-meta .hljs-string {
  color: #98c379;
}

.hljs-attr,
.hljs-variable,
.hljs-template-variable,
.hljs-type,
.hljs-selector-class,
.hljs-selector-attr,
.hljs-selector-pseudo,
.hljs-number {
  color: #d19a66;
}

.hljs-symbol,
.hljs-bullet,
.hljs-link,
.hljs-meta,
.hljs-selector-id,
.hljs-title {
  color: #61aeee;
}

.hljs-built_in,
.hljs-title.class_,
.hljs-class .hljs-title {
  color: #e6c07b;
}

.hljs-emphasis {
  font-style: italic;
}

.hljs-strong {
  font-weight: bold;
}

.hljs-link {
  text-decoration: underline;
}

/* ===================== 代码高亮样式 ===================== */

/* code 块整体样式 */
.article-content code {
  font-size: 98%;
  line-height: 1.8;
  padding: 15px 20px;
}

/* pre 容器 */
.article-content pre {
  margin-bottom: 20px;
  padding-top: 0;
  background: #282c34 !important;
  border-radius: 6px;
  position: relative;
  border: 1px solid #21252b;
  overflow: visible !important;
  max-width: 100%;
}

/* hljs 高亮后的 code */
.article-content pre code.hljs {
  padding: 0;
  padding-top: 30px;
  padding-bottom: 0.7rem;
  border-bottom-left-radius: 6px;
  border-bottom-right-radius: 6px;
  background: #282c34 !important;
  color: #abb2bf !important;
  display: block;
  white-space: pre !important;
  overflow-x: auto !important;
}

/* 行号表格 */
.article-content .hljs-ln {
  border-collapse: collapse;
  background: transparent !important;
  margin: 0 !important;
  width: 100%;
  table-layout: fixed;
}
.article-content .hljs-ln tbody {
  display: table-row-group;
}
.article-content .hljs-ln tr {
  background: transparent !important;
  border: none !important;
  display: table-row;
}
.article-content .hljs-ln tr:last-child td {
  padding-bottom: 0 !important;
}
.article-content .hljs-ln td {
  border: none !important;
  padding: 0 !important;
  line-height: 1.5;
  display: table-cell;
}
.article-content .hljs-ln td.hljs-ln-numbers {
  background-color: #282c34 !important;
}

/* 行号列 */
.article-content .hljs-ln-numbers {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  text-align: center;
  color: #636d83 !important;
  background-color: #282c34 !important;
  border-right: 1px solid #3e4451 !important;
  vertical-align: top;
  padding-right: 12px !important;
  padding-left: 8px !important;
  width: 50px;
  position: sticky !important;
  left: 0 !important;
  z-index: 0 !important;
  box-shadow: 2px 0 0 0 #282c34 !important;
}

/* 代码列 */
.article-content .hljs-ln-code {
  padding-left: 20px !important;
  padding-right: 1rem !important;
  background: transparent !important;
}
.article-content .hljs-ln-line {
  background: transparent !important;
}
.article-content .hljs-ln-n {
  background-color: #282c34 !important;
  position: relative !important;
  z-index: 100 !important;
}

/* pre 顶部装饰条（深色背景条） */
.article-content pre::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 30px;
  background: #282c34;
  border-top-left-radius: 6px;
  border-top-right-radius: 6px;
  z-index: 2;
}

/* pre 顶部三色圆点（macOS 风格） */
.article-content pre::before {
  background: #fc625d;
  border-radius: 50%;
  box-shadow: 20px 0 #fdbc40, 40px 0 #35cd4b;
  content: ' ';
  height: 10px;
  top: 10px;
  position: absolute;
  left: 15px;
  width: 10px;
  z-index: 3;
}

/* 复制代码按钮 */
.article-content pre .code-copy-btn {
  position: absolute;
  top: 5px;
  right: 10px;
  z-index: 10;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #636d83;
  font-size: 15px;
  width: 22px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  padding: 0;
  line-height: 1;
  opacity: 0;
  transition: opacity 0.2s ease, color 0.2s ease;
}
.article-content pre:hover .code-copy-btn {
  opacity: 1;
}
.article-content pre .code-copy-btn:hover {
  color: #abb2bf;
}
.article-content pre .code-copy-btn.copied {
  color: #35cd4b;
  opacity: 1;
}

.article-content pre .hljs table{
  font-size: 16px;
}

