body {
  background-color: #ffffff;
  color: #1a1a1a;
  overflow-x: hidden;
}

.tech-bg {
  background-image: radial-gradient(#d4d4d8 1px, transparent 1px);
  background-size: 30px 30px;
  opacity: 0.5;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0) 100%);
}

.glass-nav {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* 文章头部信息 */
.article-meta-row {
  justify-content: center;
  align-items: center;
  gap: 30px;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
  padding: 14px 0;
  display: inline-flex;
  width: 100%;
}

.author-box {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: #000;
}

.avatar {
  width: 30px;
  height: 30px;
  background: #ddd;
  border-radius: 50%;
}

/* 文章布局 Grid */
.article-layout {
  display: grid;
  grid-template-columns: 0.1fr 10fr 0.1fr;
  gap: 40px;
  margin-bottom: 100px;
}

/* 侧边栏 (目录/分享) */
.side-col {
  position: relative;
}

.sticky-wrapper {
  position: sticky;
  top: 120px;
  text-align: right;
  padding-right: 20px;
}

.share-icons {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 40px;
  align-items: flex-end;
}

.share-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #eee;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  transition: 0.3s;
  cursor: pointer;
  background: #fff;
}

.share-btn:hover {
  border-color: #000;
  color: #000;
  transform: scale(1.1);
}

.toc-box {
  border-left: 2px solid #eee;
  padding-left: 20px;
}

.toc-title {
  font-size: 12px;
  font-weight: bold;
  margin-bottom: 15px;
  color: #000;
  text-transform: uppercase;
}

.toc-list li {
  margin-bottom: 10px;
  font-size: 13px;
  color: #888;
  cursor: pointer;
  transition: 0.2s;
}

.toc-list li:hover {
  color: #000;
}

.toc-list li.active {
  color: #000;
  font-weight: 600;
}

/* 正文样式 (Typography) */
.article-content {
  font-size: 17px;
  color: #222;
}

.article-content p {
  margin-bottom: 30px;
  text-align: justify;
}

.article-content h2 {
  font-size: 28px;
  font-weight: 700;
  margin: 60px 0 25px;
  color: #000;
  letter-spacing: -0.5px;
}

.article-content h3 {
  font-size: 22px;
  font-weight: 600;
  margin: 40px 0 20px;
  color: #000;
}

.html-content {
  font-size: 19px;
  color: #1a1a1a;
}

.html-content h1,
.html-content h2,
.html-content h3,
.html-content h4,
.html-content h5,
.html-content h6 {
  color: #000 !important;
}

#articleDetail h1,
#articleDetail h2,
#articleDetail h3,
#articleDetail h4,
#articleDetail h5,
#articleDetail h6 {
  color: #000;
}

.dark #articleDetail h1,
.dark #articleDetail h2,
.dark #articleDetail h3,
.dark #articleDetail h4,
.dark #articleDetail h5,
.dark #articleDetail h6 {
  color: #fff;
}

.html-content p {
  color: #1a1a1a;
}

.html-content a {
  color: #2563eb;
}

.html-content ul,
.html-content ol {
  color: #1a1a1a;
}

.html-content li {
  color: #1a1a1a;
}

.html-content>p {
  margin-top: 0;
  margin-bottom: 24px;
}

/* 引用块 */
.article-content blockquote {
  border-left: 4px solid #000;
  padding: 20px 30px;
  background: #f9fafb;
  font-style: italic;
  color: #555;
  margin: 40px 0;
  border-radius: 0 8px 8px 0;
}

/* 代码块模拟 */
.code-block {
  background: #111;
  color: #f0f0f0;
  padding: 25px;
  border-radius: 12px;
  font-family: "Alibaba PuHuiTi", sans-serif;
  font-size: 13px;
  margin: 40px 0;
  overflow-x: auto;
  position: relative;
}

.code-header {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 10px;
  color: #666;
  border: 1px solid #333;
  padding: 2px 6px;
  border-radius: 4px;
}

.article-content ul {
  list-style: disc;
  padding-left: 20px;
  margin-bottom: 30px;
  color: #444;
}

.article-content li {
  margin-bottom: 10px;
}

/* 图片样式 */
.article-img {
  width: 100%;
  border-radius: 12px;
  margin: 40px 0;
  border: 1px solid #eee;
}

/* 标签 */
.article-tags {
  margin-top: 60px;
  padding-top: 30px;
  border-top: 1px solid #eee;
  display: flex;
  gap: 10px;
}

.tag-pill {
  padding: 6px 14px;
  background: #f4f4f5;
  border-radius: 20px;
  font-size: 12px;
  color: #555;
  transition: 0.3s;
}

.tag-pill:hover {
  background: #000;
  color: #fff;
}

/* 相关推荐 */
.related-section {
  padding: 80px 0;
  border-top: 1px solid #eee;
  background: #fafafa;
}

.related-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 40px;
  text-align: center;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.post-card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 25px;
  display: flex;
  flex-direction: column;
  transition: 0.3s;
}

.post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.post-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 10px;
}

.post-meta-tiny {
  font-size: 10px;
  color: #999;
  margin-top: auto;
  font-family: "Alibaba PuHuiTi", sans-serif;
}


/* 响应式 */
@media (max-width: 1024px) {
  .article-layout {
    grid-template-columns: 1fr;
    max-width: 720px;
    margin: 0 auto 80px;
  }

  .side-col {
    display: none;
  }

  /* 移动端隐藏侧栏 */
  .article-header {
    padding-top: 100px;
  }

  .article-title {
    font-size: 32px;
  }

  .posts-grid {
    grid-template-columns: 1fr;
  }
}
/* Dark Mode Overrides */
.dark body {
  background-color: #0a0a0a;
  color: #e5e5e5;
}
.dark .tech-bg {
  background-image: radial-gradient(#333 1px, transparent 1px);
  mask-image: linear-gradient(to bottom, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%);
}
.dark .glass-nav {
  background: rgba(0, 0, 0, 0.7);
  border-bottom-color: rgba(255, 255, 255, 0.05);
}
.dark .article-meta-row {
  border-top-color: #333;
  border-bottom-color: #333;
}
.dark .author-box {
  color: #e5e5e5;
}
.dark .avatar {
  background: #444;
}
.dark .share-btn {
  background: #1a1a1a;
  border-color: #333;
  color: #888;
}
.dark .share-btn:hover {
  border-color: #666;
  color: #fff;
}
.dark .toc-box {
  border-left-color: #333;
}
.dark .toc-title {
  color: #e5e5e5;
}
.dark .toc-list li {
  color: #888;
}
.dark .toc-list li:hover {
  color: #fff;
}
.dark .toc-list li.active {
  color: #fff;
}
.dark .article-content {
  color: #e5e5e5;
}
.dark .article-content h2 {
  color: #fff;
}
.dark .article-content h3 {
  color: #fff;
}
.dark .html-content {
  color: #e5e5e5;
}
.dark .html-content h1,
.dark .html-content h2,
.dark .html-content h3,
.dark .html-content h4,
.dark .html-content h5,
.dark .html-content h6 {
  color: #fff;
}
.dark .html-content p {
  color: #e5e5e5;
}
.dark .html-content a {
  color: #60a5fa;
}
.dark .html-content ul,
.dark .html-content ol {
  color: #e5e5e5;
}
.dark .html-content li {
  color: #e5e5e5;
}
.dark .article-content blockquote {
  border-left-color: #666;
  background: #1a1a1a;
  color: #aaa;
}
.dark .article-content ul {
  color: #e5e5e5;
}
.dark .article-img {
  border-color: #333;
}
.dark .article-tags {
  border-top-color: #333;
}
.dark .tag-pill {
  background: #2a2a2a;
  color: #aaa;
}
.dark .tag-pill:hover {
  background: #fff;
  color: #000;
}
.dark .related-section {
  background: #0f0f0f;
  border-top-color: #333;
}
.dark .related-title {
  color: #fff;
}
.dark .post-card {
  background: #1a1a1a;
  border-color: #333;
}
.dark .post-card h3 {
  color: #fff;
}
.dark .post-card:hover {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
.dark .post-meta-tiny {
  color: #666;
}
