/**
 * mingesdk.css
 * author: 敏哥:
 * email: wxmgcs@foxmail.com
 * 适用于技术文档、指南类页面
 */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #fff;
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 1.5rem;
  height: 60px;
  background: #fff;
  border-bottom: 1px solid #eee;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  max-width: 1400px;
  margin: 0 auto;
}

.logo {
  height: 28px;
}

/* 左上角文字 Logo */
.header-left .logo-text {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  text-decoration: none;
  display: flex;
  align-items: center;
  height: 100%;
}

.header-left .logo-text:hover {
  color: #42a8ed;
}

.header-right .nav-btn {
  background: none;
  border: none;
  color: #42a8ed;
  cursor: pointer;
  margin-left: 0.5rem;
  font-size: 14px;
  padding: 4px 8px;
  border-radius: 4px;

  text-decoration: none;
  display: inline-block;
  line-height: 1.5;
}

.header-right .nav-btn:hover {
  background: #f0f9ff;
  color: #42a8ed;
}

/* Container */
.container {
  display: flex;
  margin-top: 60px;
  max-width: 1400px;      
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  padding-left: 1rem;     
  padding-right: 1rem;
}

/* Sidebar */
.sidebar {
  width: 280px;
  background: #f9fafb;
  padding: 1.5rem 0;
  border-right: 1px solid #eee;
  overflow-y: auto;
  height: calc(100vh - 60px);
  position: sticky;
  top: 60px;

  scrollbar-width: none;
}
 /* 隐藏滚动条 */
.sidebar::-webkit-scrollbar {
  display: none;
}

.nav-list {
  list-style: none;
  padding: 0 1rem;
}

.nav-list ul{
  list-style: none;
}

.nav-item {
  padding: 0.5rem 0;
  cursor: pointer;
  font-weight: 600;
  color: #2c3e50;
  user-select: none;
}

.nav-item::after {
  content: " ▼";
  font-size: 0.7em;
  opacity: 0.5;
}

.nav-item[data-toggle].collapsed::after {
  content: " ►";
}

.sub-nav {
  margin-left: 1rem;
  margin-top: 0.3rem;
  display: block;
}

.sub-nav.collapsed {
  display: none;
}

.nav-link {
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  padding: 0.4rem 0;
  color: #555;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px; 
}


.nav-link:hover {
  color: #42a8ed;
}

/* Main Content */
.main-content {
  display: flex;
  flex: 1;
  padding: 2rem 2.5rem; 
  gap: 2.5rem; 
  max-width: calc(100vw - 220px); 
}

@media (max-width: 900px) {
  .main-content {
    padding: 1.5rem 1.2rem; 
    gap: 1.5rem;
  }
}

#content {
  flex: 1;
}

#content h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #2c3e50;
}

#content h2 {
  font-size: 1.5rem;
  margin: 1.5rem 0 1rem;
  color: #34495e;
}

#content h3 {
  font-size: 1.25rem;
  margin: 1.25rem 0 0.75rem;
}

#content p, #content ul {
  margin-bottom: 1rem;
}

#content code {
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
}

#content pre {
  background-color: #f6f8fa;
  border: 1px solid #e1e4e8;
  border-radius: 6px;;
  color: #000;
  padding: 1rem;
  border-radius: 6px;
  overflow-x: auto;
}


#content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1rem auto;
  border-radius: 4px;
}

#content ol,
#content ul {
  padding-left: 1.5rem;
  margin: 0.8rem 0 1.2rem;
}

#content ul li,
#content ol li {
  margin-bottom: 0.65rem;
  line-height: 1.5;
}

#content ul li:last-child,
#content ol li:last-child {
  margin-bottom: 0;
}

#content hr{
  max-width: 500px;
}

/*内链*/
.datapage{
  background: none;
  border: none;
  text-align: left;
  padding: 0.4rem 0;
  color: #555;
  cursor: pointer;
  font-size: 14px;
  align-items: center;
  gap: 6px; 
  color:#3eaf7c;
  text-decoration: underline;
  text-underline-offset: 3px; /* 控制下划线距离文字的间距 */
  text-decoration-thickness: 1px; /* 控制下划线粗细 */
}

.datapage:hover {
  color: #42a8ed;
}

/* TOC Sidebar */
.toc-sidebar {
  width: 200px;
  font-size: 14px;
  position: sticky;
  top: 80px;
  align-self: flex-start; 
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  padding-top: 0.5rem;


  scrollbar-width: none; 

   /* mask-image: linear-gradient(to bottom, black 90%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 90%, transparent 100%); */
}

.toc-sidebar::-webkit-scrollbar {
  display: none;
}


.toc-sidebar h3 {
  margin-bottom: 0.5rem;
  color: #666;
}

.toc-sidebar ul {
  list-style: none;
}

.toc-sidebar a {
  color: #555;
  text-decoration: none;
  display: block;
  padding: 0.25rem 0;
}

.toc-sidebar a:hover {
  color: #42a8ed;
}

@media (max-width: 9000px) and (max-width: 900px) {
  .toc-sidebar {
    position: static;
    max-height: none;
    overflow-y: visible;
    margin-top: 2rem;
    width: 100%;
  }
}

@media (max-width: 900px) {
  .container {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    height: auto;
    position: static;
    border-right: none;
    border-bottom: 1px solid #eee;
  }
  .main-content {
    flex-direction: column;
    padding: 1.5rem;
  }
  .toc-sidebar {
    width: 100%;
    order: -1;
    margin-bottom: 1.5rem;
  }
}

a{
  color:#3451b2
}

