/* UFOO Docs Page Styles */

/* Layout */
.docs-layout {
  display: flex;
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 72px;
  min-height: 100vh;
}

/* Sidebar */
.docs-sidebar {
  width: 240px;
  flex-shrink: 0;
  position: sticky;
  top: 72px;
  height: calc(100vh - 72px);
  overflow-y: auto;
  padding: 32px 0 32px 24px;
  border-right: 1px solid var(--border);
}

.docs-nav-section {
  margin-bottom: 28px;
}

.docs-nav-section h5 {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 12px;
  padding-left: 12px;
}

.docs-nav-link {
  display: block;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
  margin-bottom: 2px;
}

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

.docs-nav-link.active {
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.08);
}

/* Main Content */
.docs-main {
  flex: 1;
  min-width: 0;
  padding: 40px 48px 80px;
}

/* Sections */
.docs-section {
  margin-bottom: 64px;
  padding-top: 24px;
}

.docs-section h1 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.docs-section h3 {
  font-size: 18px;
  font-weight: 600;
  margin-top: 32px;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.docs-section p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 16px;
}

.docs-section code {
  background: var(--bg-card);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
}

/* Code Blocks */
.docs-code {
  background: var(--bg-card);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 20px;
}

.docs-code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-dim);
}

.copy-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.copy-btn:hover {
  color: var(--cyan);
  border-color: var(--cyan);
}

.docs-code pre {
  padding: 20px 24px;
  overflow-x: auto;
}

.docs-code code {
  background: none;
  padding: 0;
  font-size: 13px;
  line-height: 1.8;
}

.docs-code .prompt {
  color: var(--text-dim);
  margin-right: 8px;
}

.arch-diagram {
  text-align: center;
}

.arch-diagram pre {
  display: inline-block;
  text-align: left;
}

/* Tables */
.docs-table-wrap {
  overflow-x: auto;
  margin-bottom: 20px;
}

.docs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.docs-table th {
  text-align: left;
  padding: 12px 16px;
  font-weight: 600;
  font-size: 12px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
}

.docs-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}

.docs-table td code {
  color: var(--text-primary);
  white-space: nowrap;
}

.docs-table tbody tr:hover {
  background: var(--bg-card);
}

/* Lists */
.docs-list {
  list-style: none;
  margin-bottom: 20px;
}

.docs-list li {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
  padding: 6px 0 6px 24px;
  position: relative;
}

.docs-list li::before {
  content: '>';
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 700;
}

/* Callout */
.docs-callout {
  display: flex;
  gap: 16px;
  background: var(--bg-card);
  border-left: 3px solid var(--cyan);
  border-radius: 0 8px 8px 0;
  padding: 20px 24px;
  margin: 20px 0;
}

.docs-callout-icon {
  color: var(--cyan);
  font-weight: 700;
  font-size: 18px;
  flex-shrink: 0;
}

.docs-callout div {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.docs-callout strong {
  color: var(--text-primary);
}

/* Steps */
.docs-steps {
  margin-bottom: 20px;
}

.docs-step {
  display: flex;
  gap: 20px;
  margin-bottom: 32px;
}

.docs-step-num {
  width: 36px;
  height: 36px;
  background: var(--bg-card);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: var(--cyan);
  flex-shrink: 0;
  margin-top: 4px;
}

.docs-step > div {
  flex: 1;
  min-width: 0;
}

.docs-step h3 {
  margin-top: 0;
  margin-bottom: 12px;
}

/* Nav active state */
.nav-link.active {
  color: var(--cyan);
}

/* Logo link */
.logo-text {
  text-decoration: none;
}

a.logo-text {
  color: #fff;
}

/* Docs Footer */
.docs-footer {
  border-top: 1px solid var(--border);
  padding-top: 32px;
  margin-top: 48px;
}

.docs-footer p {
  color: var(--text-dim);
  font-size: 12px;
}

.docs-footer a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s;
}

.docs-footer a:hover {
  color: var(--cyan);
}

/* Responsive */
@media (max-width: 900px) {
  .docs-sidebar {
    display: none;
  }

  .docs-main {
    padding: 32px 24px 60px;
  }

  .docs-section h1 {
    font-size: 26px;
  }

  .docs-step {
    flex-direction: column;
    gap: 12px;
  }
}

@media (max-width: 600px) {
  .docs-main {
    padding: 24px 16px 48px;
  }

  .docs-code pre {
    padding: 16px;
  }

  .docs-table {
    font-size: 12px;
  }

  .docs-table th,
  .docs-table td {
    padding: 8px 10px;
  }
}
