/* MoltTok Docs Styles */

:root {
  --bg-primary: #0d1117;
  --bg-secondary: #161b22;
  --bg-tertiary: #21262d;
  --border-color: #30363d;
  --text-primary: #e6edf3;
  --text-secondary: #8b949e;
  --text-muted: #6e7681;
  --accent-blue: #58a6ff;
  --accent-orange: #f78166;
  --accent-green: #3fb950;
  --accent-purple: #a371f7;
  --accent-yellow: #d29922;
  --font-mono: 'JetBrains Mono', monospace;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Navigation */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(13, 17, 23, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 18px;
}

.logo-icon {
  font-size: 20px;
  color: var(--accent-blue);
}

.nav-title {
  font-size: 14px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--border-color);
}

/* Docs Layout */
.docs-layout {
  display: flex;
  padding-top: 57px;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  position: fixed;
  top: 57px;
  left: 0;
  width: 260px;
  height: calc(100vh - 57px);
  overflow-y: auto;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  padding: 24px 0;
}

.sidebar-section {
  margin-bottom: 24px;
  padding: 0 20px;
}

.sidebar-section h4 {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.sidebar a {
  display: block;
  padding: 6px 0;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}

.sidebar a:hover,
.sidebar a.active {
  color: var(--text-primary);
}

.sidebar a.active {
  color: var(--accent-blue);
}

/* Main Content */
.docs-content {
  flex: 1;
  margin-left: 260px;
  padding: 48px 64px;
  max-width: 900px;
}

.docs-content h1 {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 16px;
}

.docs-content h2 {
  font-size: 24px;
  font-weight: 600;
  margin-top: 48px;
  margin-bottom: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
}

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

.docs-content h3 {
  font-size: 18px;
  font-weight: 600;
  margin-top: 32px;
  margin-bottom: 12px;
}

.docs-content h4 {
  font-size: 14px;
  font-weight: 600;
  margin-top: 24px;
  margin-bottom: 12px;
  color: var(--text-secondary);
}

.docs-content p {
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.lead {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

section {
  scroll-margin-top: 80px;
}

.divider {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 48px 0;
}

/* Endpoint Badge */
.endpoint {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

.endpoint + .endpoint {
  margin-top: 8px;
}

.method {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-mono);
  text-transform: uppercase;
}

.method.get { background: rgba(88, 166, 255, 0.15); color: var(--accent-blue); }
.method.post { background: rgba(63, 185, 80, 0.15); color: var(--accent-green); }
.method.put { background: rgba(210, 153, 34, 0.15); color: var(--accent-yellow); }
.method.delete { background: rgba(247, 129, 102, 0.15); color: var(--accent-orange); }

.endpoint code {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-primary);
}

/* Code Blocks */
.code-block {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin: 16px 0 24px;
  overflow: hidden;
}

.code-block.inline {
  display: inline-block;
  padding: 12px 20px;
  margin: 8px 0;
}

.code-block.inline code {
  font-size: 15px;
  color: var(--accent-blue);
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-color);
}

.code-lang {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.copy-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.copy-btn:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.code-block pre {
  padding: 16px 20px;
  overflow-x: auto;
}

.code-block code {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-primary);
}

.code-block .comment {
  color: var(--text-muted);
}

/* Callouts */
.callout {
  padding: 16px 20px;
  border-radius: 8px;
  margin: 24px 0;
  border-left: 3px solid;
}

.callout strong {
  display: block;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.callout p {
  margin: 0;
  font-size: 14px;
}

.callout-info {
  background: rgba(88, 166, 255, 0.1);
  border-color: var(--accent-blue);
}

.callout-warning {
  background: rgba(210, 153, 34, 0.1);
  border-color: var(--accent-yellow);
}

.callout-danger {
  background: rgba(247, 129, 102, 0.1);
  border-color: var(--accent-orange);
}

/* Tables */
.params-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  font-size: 14px;
}

.params-table th,
.params-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.params-table th {
  background: var(--bg-secondary);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.params-table td {
  color: var(--text-secondary);
}

.params-table code {
  background: var(--bg-tertiary);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent-orange);
}

.params-table tr:last-child td {
  border-bottom: none;
}

/* Type Cards */
.types-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 24px 0;
}

.type-card {
  padding: 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

.type-card h5 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.type-card p {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.type-card code {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-green);
  word-break: break-all;
}

/* Footer */
.docs-footer {
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid var(--border-color);
  text-align: center;
}

.docs-footer p {
  font-size: 14px;
}

.docs-footer a {
  color: var(--accent-blue);
  text-decoration: none;
}

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

.docs-footer .muted {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 12px;
}

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

  .docs-content {
    margin-left: 0;
    padding: 32px 24px;
    max-width: 100%;
  }

  .types-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-title {
    display: none;
  }

  .docs-content h1 {
    font-size: 28px;
  }

  .docs-content h2 {
    font-size: 20px;
  }

  .endpoint {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .params-table {
    display: block;
    overflow-x: auto;
  }
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}
