/* =================================
   宸浸电竞 CJCM88
   Docs Style（功能文档站）
   复用 style.css 的霓虹深色基调
================================= */

/* ---------- 头部横幅 ---------- */
.docs-hero {
  padding: 150px 8% 40px;
  text-align: center;
}

.docs-hero h1 {
  font-size: 44px;
  margin-top: 20px;
  background: linear-gradient(90deg, #00e5ff, #8b5cf6);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.docs-hero p {
  margin-top: 16px;
  color: #94a3b8;
  font-size: 16px;
}

/* ---------- 整体布局 ---------- */
.docs-layout {
  display: flex;
  align-items: flex-start;
  gap: 32px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 4% 80px;
}

/* ---------- 左侧目录 ---------- */
.docs-sidebar {
  position: sticky;
  top: 100px;
  flex: 0 0 280px;
  width: 280px;
  min-width: 280px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  padding: 20px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.docs-search input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(5, 8, 22, 0.6);
  color: #e2e8f0;
  font-size: 14px;
  outline: none;
  transition: 0.3s;
}

.docs-search input:focus {
  border-color: rgba(0, 229, 255, 0.6);
  box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.12);
}

.docs-nav {
  display: block;
  gap: 0;
  margin-top: 14px;
}

.docs-nav .docs-group-title {
  margin: 18px 8px 6px;
  font-size: 12px;
  letter-spacing: 1px;
  color: #64748b;
  text-transform: uppercase;
}

.docs-nav a {
  display: block;
  padding: 9px 12px;
  margin: 2px 0;
  border-radius: 10px;
  color: #cbd5e1;
  font-size: 14px;
  line-height: 1.4;
  border-left: 2px solid transparent;
  transition: 0.25s;
}

.docs-nav a:hover {
  color: #00e5ff;
  background: rgba(0, 229, 255, 0.06);
}

.docs-nav a.active {
  color: #00e5ff;
  background: rgba(0, 229, 255, 0.1);
  border-left-color: #00e5ff;
  font-weight: 600;
}

/* ---------- 右侧内容 ---------- */
.docs-main {
  flex: 1 1 auto;
  min-width: 0;
}

.docs-content {
  padding: 34px 40px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #d7e0ee;
  line-height: 1.85;
  user-select: text;
  -webkit-user-select: text;
}

.docs-loading {
  color: #64748b;
  text-align: center;
  padding: 60px 0;
}

/* 文档排版 */
.docs-content h1 {
  font-size: 30px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
}

.docs-content h2 {
  font-size: 23px;
  margin: 34px 0 14px;
  padding-left: 12px;
  border-left: 4px solid #00e5ff;
  color: #fff;
}

.docs-content h3 {
  font-size: 18px;
  margin: 24px 0 10px;
  color: #a5c8ff;
}

.docs-content p {
  margin: 12px 0;
}

.docs-content ul,
.docs-content ol {
  margin: 12px 0 12px 24px;
}

.docs-content li {
  margin: 6px 0;
}

.docs-content a {
  color: #00e5ff;
  text-decoration: none;
  border-bottom: 1px dashed rgba(0, 229, 255, 0.4);
}

.docs-content a:hover {
  color: #8b5cf6;
  border-bottom-color: #8b5cf6;
}

.docs-content strong {
  color: #fff;
}

.docs-content code {
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(139, 92, 246, 0.14);
  color: #c4b5fd;
  font-size: 0.92em;
  font-family: Consolas, Monaco, monospace;
}

.docs-content pre {
  margin: 16px 0;
  padding: 16px 18px;
  border-radius: 12px;
  background: rgba(5, 8, 22, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow-x: auto;
}

.docs-content pre code {
  background: none;
  color: #93c5fd;
  padding: 0;
}

.docs-content blockquote {
  margin: 16px 0;
  padding: 12px 18px;
  border-left: 4px solid #8b5cf6;
  border-radius: 0 12px 12px 0;
  background: rgba(139, 92, 246, 0.08);
  color: #c7d2e5;
}

.docs-content blockquote p {
  margin: 4px 0;
}

.docs-content hr {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin: 26px 0;
}

/* 表格 */
.docs-content table {
  width: 100%;
  margin: 16px 0;
  border-collapse: collapse;
  font-size: 14px;
  overflow: hidden;
  border-radius: 12px;
}

.docs-content th,
.docs-content td {
  padding: 10px 14px;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.08);
  vertical-align: top;
}

.docs-content th {
  background: rgba(0, 229, 255, 0.1);
  color: #e2f4ff;
  font-weight: 600;
}

.docs-content tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

/* 搜索结果条目 */
.docs-result-doc {
  font-size: 12px;
  color: #64748b;
  margin-left: 6px;
}

/* ---------- 上一页 / 下一页 ---------- */
.docs-pager {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 24px;
}

.docs-pager a {
  flex: 1;
  padding: 16px 20px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: 0.3s;
}

.docs-pager a:hover {
  border-color: rgba(0, 229, 255, 0.5);
  background: rgba(0, 229, 255, 0.06);
}

.docs-pager .pager-label {
  font-size: 12px;
  color: #64748b;
}

.docs-pager .pager-title {
  display: block;
  margin-top: 4px;
  color: #e2e8f0;
  font-size: 15px;
}

.docs-pager a.next {
  text-align: right;
}

.docs-foot {
  margin-top: 40px;
  padding-top: 20px;
  text-align: center;
  color: #64748b;
  font-size: 13px;
}

/* ---------- 移动端目录开关 / 抽屉 ---------- */
.docs-toc-toggle {
  display: none;
  position: fixed;
  left: 16px;
  bottom: 22px;
  z-index: 130;
  padding: 12px 18px;
  border-radius: 50px;
  border: 1px solid rgba(0, 229, 255, 0.4);
  background: rgba(5, 8, 22, 0.85);
  color: #00e5ff;
  font-size: 14px;
}

.docs-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 119;
  background: rgba(0, 0, 0, 0.55);
}

.docs-overlay.show {
  display: block;
}

@media (max-width: 1024px) {
  .docs-layout {
    padding: 10px 5% 90px;
  }

  .docs-toc-toggle {
    display: block;
  }

  .docs-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 82%;
    min-width: 0;
    max-width: 320px;
    max-height: 100%;
    border-radius: 0;
    z-index: 120;
    transform: translateX(-105%);
    transition: transform 0.35s ease;
    background: rgba(9, 13, 30, 0.98);
  }

  .docs-sidebar.open {
    transform: translateX(0);
  }

  .docs-content {
    padding: 24px 20px;
  }

  .docs-content table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .docs-pager {
    flex-direction: column;
  }

  .docs-pager a.next {
    text-align: left;
  }
}
