/* Docs Page Styles
--------------------------------------------- */

.dfstudio-docs-wrapper {
  display: flex;
  min-height: calc(100vh - 200px);
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Sidebar */
.dfstudio-docs-sidebar {
  width: 280px;
  flex-shrink: 0;
  padding: 2rem 0;
  border-right: 1px solid rgba(148, 163, 184, 0.2);
  position: sticky;
  top: 80px;
  align-self: flex-start;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}

.dfstudio-docs-sidebar-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.dfstudio-docs-sidebar-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
  color: #e5e7eb;
}

.dfstudio-docs-nav {
  font-size: 0.9rem;
}

.dfstudio-docs-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.dfstudio-docs-nav-item {
  margin-bottom: 0.25rem;
}

.dfstudio-docs-nav-item a {
  display: block;
  padding: 0.6rem 1rem;
  border-radius: 0.5rem;
  color: #9ca3af;
  transition: background 0.2s ease, color 0.2s ease;
  border-left: 2px solid transparent;
}

.dfstudio-docs-nav-item a:hover {
  background: rgba(59, 130, 246, 0.1);
  color: #e5e7eb;
}

.dfstudio-docs-nav-item-active a {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border-left-color: #60a5fa;
  font-weight: 500;
}

/* Content Area */
.dfstudio-docs-content {
  flex: 1;
  padding: 2rem 0 2rem 3rem;
  min-width: 0;
}

.dfstudio-docs-article {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}

.dfstudio-docs-article-header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.dfstudio-docs-article-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  margin: 0;
  color: #e5e7eb;
  line-height: 1.2;
}

.dfstudio-docs-article-body {
  font-size: 1rem;
  line-height: 1.8;
  color: #d1d5db;
}

.dfstudio-docs-article-body h2 {
  font-size: 1.75rem;
  font-weight: 600;
  margin: 2.5rem 0 1rem;
  color: #e5e7eb;
  padding-top: 1rem;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.dfstudio-docs-article-body h2:first-of-type {
  margin-top: 0;
  border-top: none;
  padding-top: 0;
}

.dfstudio-docs-article-body h3 {
  font-size: 1.4rem;
  font-weight: 600;
  margin: 2rem 0 0.75rem;
  color: #e5e7eb;
}

.dfstudio-docs-article-body h4 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 1.5rem 0 0.5rem;
  color: #e5e7eb;
}

.dfstudio-docs-article-body p {
  margin: 0 0 1.25rem;
}

.dfstudio-docs-article-body ul,
.dfstudio-docs-article-body ol {
  margin: 0 0 1.25rem;
  padding-left: 2rem;
}

.dfstudio-docs-article-body li {
  margin-bottom: 0.5rem;
}

.dfstudio-docs-article-body a {
  color: #60a5fa;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.dfstudio-docs-article-body a:hover {
  color: #93c5fd;
}

.dfstudio-docs-article-body code {
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 0.9em;
  padding: 0.2em 0.4em;
  border-radius: 0.25rem;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: #fbbf24;
}

.dfstudio-docs-article-body pre {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 0.5rem;
  padding: 1.25rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.dfstudio-docs-article-body pre code {
  background: transparent;
  border: none;
  padding: 0;
  color: #e5e7eb;
  font-size: 0.9rem;
  line-height: 1.6;
}

.dfstudio-docs-article-body blockquote {
  border-left: 3px solid rgba(59, 130, 246, 0.5);
  padding-left: 1.5rem;
  margin: 1.5rem 0;
  color: #9ca3af;
  font-style: italic;
}

.dfstudio-docs-article-body img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
  margin: 1.5rem 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.dfstudio-docs-article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

.dfstudio-docs-article-body table th,
.dfstudio-docs-article-body table td {
  padding: 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  text-align: left;
}

.dfstudio-docs-article-body table th {
  background: rgba(15, 23, 42, 0.6);
  font-weight: 600;
  color: #e5e7eb;
}

.dfstudio-docs-article-body table td {
  color: #d1d5db;
}

.dfstudio-docs-article-body hr {
  border: none;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  margin: 2rem 0;
}

/* Table of Contents */
.dfstudio-docs-toc {
  position: fixed;
  /* 固定在视口右侧，随页面滚动始终可见（仅桌面端，见下方 media） */
  top: 96px;
  right: 2rem;
  width: 240px;
  padding: 1.5rem;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 0.5rem;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  font-size: 0.85rem;
  z-index: 30;
}

.dfstudio-docs-toc-header {
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.dfstudio-docs-toc-title {
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0;
  color: #e5e7eb;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.dfstudio-docs-toc-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

.dfstudio-docs-toc-nav li {
  margin-bottom: 0.5rem;
}

.dfstudio-docs-toc-nav a {
  display: block;
  padding: 0.4rem 0.75rem;
  color: #9ca3af;
  border-radius: 0.25rem;
  transition: background 0.2s ease, color 0.2s ease;
  border-left: 2px solid transparent;
}

.dfstudio-docs-toc-nav a:hover {
  background: rgba(59, 130, 246, 0.1);
  color: #e5e7eb;
}

.dfstudio-docs-toc-nav a.dfstudio-toc-active {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border-left-color: #60a5fa;
  font-weight: 500;
}

.dfstudio-docs-toc-nav ul {
  list-style: none;
  padding-left: 0.75rem;
  margin-top: 0.25rem;
}

.dfstudio-docs-toc-nav ul a {
  font-size: 0.8rem;
  padding: 0.3rem 0.5rem;
}

/* Responsive */
@media (max-width: 1200px) {
  .dfstudio-docs-toc {
    display: none;
  }
}

@media (max-width: 768px) {
  .dfstudio-docs-wrapper {
    flex-direction: column;
    padding: 0 1rem;
  }

  .dfstudio-docs-sidebar {
    width: 100%;
    position: static;
    border-right: none;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    padding: 1.5rem 0;
    max-height: none;
    overflow-y: visible;
  }

  .dfstudio-docs-content {
    padding: 1.5rem 0 0;
  }

  .dfstudio-docs-article {
    max-width: 100%;
  }
}
