/* 文档站点样式 */
* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ui-bg);
  color: var(--ui-text);
  line-height: 1.6;
}

/* 侧边栏 */
.docs-sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 260px;
  background: var(--ui-bg-card);
  border-right: 1px solid var(--ui-border);
  overflow-y: auto;
  padding: 1.5rem;
}

.docs-logo {
  margin-bottom: 2rem;
}

.docs-logo a {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--ui-primary);
  text-decoration: none;
}

.docs-nav-group {
  margin-bottom: 1.5rem;
}

.docs-nav-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ui-text-muted);
  margin-bottom: 0.5rem;
}

.docs-nav-link {
  display: block;
  padding: 0.5rem 0.75rem;
  margin: 0.125rem 0;
  border-radius: 0.5rem;
  color: var(--ui-text);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: all 0.15s;
}

.docs-nav-link:hover {
  background: var(--ui-bg);
  color: var(--ui-text-dark);
}

.docs-nav-link.active {
  background: var(--ui-primary);
  color: white;
}

/* 主内容区 */
.docs-main {
  margin-left: 260px;
  min-height: 100vh;
  padding: 3rem;
}

.docs-content {
  max-width: 800px;
}

.docs-content h1 {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--ui-text-dark);
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
}

.docs-content h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--ui-text-dark);
  margin: 2.5rem 0 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--ui-border);
}

.docs-content h2:first-of-type {
  border-top: none;
  padding-top: 0;
}

.docs-content h3 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--ui-text-dark);
  margin: 2rem 0 0.75rem;
}

.docs-lead {
  font-size: 1.25rem;
  color: var(--ui-text-muted);
  margin: 0 0 2rem;
}

.docs-content p {
  margin: 0 0 1rem;
}

.docs-content ul {
  margin: 0 0 1rem;
  padding-left: 1.5rem;
}

.docs-content li {
  margin: 0.5rem 0;
}

.docs-content code {
  background: var(--ui-bg);
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-family: 'Fira Code', 'Consolas', monospace;
  font-size: 0.875em;
  color: var(--ui-primary);
}

.docs-content a {
  color: var(--ui-primary);
  text-decoration: none;
  font-weight: 600;
}

.docs-content a:hover {
  text-decoration: underline;
}

/* 代码块 */
.docs-code {
  background: #1e293b;
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  margin: 1rem 0;
  overflow-x: auto;
}

.docs-code code {
  background: none;
  padding: 0;
  color: #e2e8f0;
  font-family: 'Fira Code', 'Consolas', monospace;
  font-size: 0.875rem;
  line-height: 1.7;
}

/* 演示区域 */
.docs-demo {
  background: var(--ui-bg-card);
  border: 1px solid var(--ui-border);
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin: 1rem 0;
}

.docs-demo-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.docs-demo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

/* 表格 */
.docs-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.9375rem;
}

.docs-table th,
.docs-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--ui-border);
}

.docs-table th {
  font-weight: 700;
  color: var(--ui-text-dark);
  background: var(--ui-bg);
}

.docs-table code {
  font-size: 0.8125rem;
}

/* 响应式 */
@media (max-width: 768px) {
  .docs-sidebar {
    position: static;
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--ui-border);
  }
  
  .docs-main {
    margin-left: 0;
    padding: 1.5rem;
  }
  
  .docs-content h1 {
    font-size: 2rem;
  }
}


/* 特性列表图标 */
.feature-list {
  list-style: none;
  padding-left: 0;
}

.feature-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.feature-li-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  color: var(--ui-primary);
  flex-shrink: 0;
}

.feature-li-icon svg {
  width: 1.25rem;
  height: 1.25rem;
}


/* 侧边栏链接中的 tag 在选中状态下的样式 */
.docs-nav-link.active .ui-tag {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}
