/* Docs Dark Theme Stylesheet */

/* Global reset to remove any default borders */
* {
  box-sizing: border-box;
}

body, html {
  margin: 0;
  padding: 0;
  border: none;
  outline: none;
}

/* Reset and base styles */
.docs-container {
  background: #0f172a;
  min-height: 100vh;
  color: #e2e8f0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-feature-settings: 'kern' 1, 'liga' 1, 'calt' 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Main content wrapper */
.docs-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem 2rem;
  line-height: 1.7;
}

/* Floating back arrow */
.docs-floating-back {
  position: fixed;
  top: 2rem;
  left: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: #1e293b;
  color: #94a3b8;
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: 600;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  z-index: 100;
}

.docs-floating-back:hover {
  background: #334155;
  color: #e2e8f0;
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

/* Typography for rendered markdown */
.docs-markdown h1 {
  color: #f1f5f9;
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 2rem 0;
  padding-bottom: 1rem;
  border-bottom: 2px solid #334155;
  letter-spacing: -0.025em;
}

.docs-markdown h2 {
  color: #f8fafc;
  font-size: 1.875rem;
  font-weight: 600;
  line-height: 1.3;
  margin: 3rem 0 1.5rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #475569;
  letter-spacing: -0.02em;
}

.docs-markdown h3 {
  color: #f8fafc;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.4;
  margin: 2.5rem 0 1rem 0;
  letter-spacing: -0.015em;
}

.docs-markdown h4 {
  color: #f8fafc;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.4;
  margin: 2rem 0 0.75rem 0;
}

.docs-markdown h5 {
  color: #f8fafc;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.4;
  margin: 1.75rem 0 0.5rem 0;
}

.docs-markdown h6 {
  color: #cbd5e1;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  margin: 1.5rem 0 0.5rem 0;
}

/* Paragraph and text styling */
.docs-markdown p {
  color: #cbd5e1;
  margin-bottom: 1.5rem;
  font-size: 1rem;
  line-height: 1.7;
}

.docs-markdown strong {
  color: #f1f5f9;
  font-weight: 600;
}

.docs-markdown em {
  color: #e2e8f0;
  font-style: italic;
}

/* Links */
.docs-markdown a {
  color: #60a5fa;
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: all 0.2s ease;
}

.docs-markdown a:hover {
  color: #93c5fd;
  border-bottom-color: #60a5fa;
}

/* Lists */
.docs-markdown ul,
.docs-markdown ol {
  margin: 1.5rem 0;
  padding-left: 1.5rem;
  color: #cbd5e1;
}

.docs-markdown li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.docs-markdown li::marker {
  color: #64748b;
}

/* Code blocks and inline code */
.docs-markdown code {
  background: #1e293b;
  color: #e2e8f0;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  font-family: 'JetBrains Mono', 'Fira Code', Menlo, Monaco, 'Courier New', monospace;
  font-size: 0.875rem;
  font-weight: 500;
}

.docs-markdown pre {
  background: #1e293b;
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin: 2rem 0;
  overflow-x: auto;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.docs-markdown pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.875rem;
  color: #e2e8f0;
  line-height: 1.5;
}

/* Tables */
.docs-markdown table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  background: #1e293b;
  border-radius: 0.5rem;
  overflow: hidden;
}

.docs-markdown th {
  background: #334155;
  color: #f1f5f9;
  font-weight: 600;
  padding: 0.875rem 1rem;
  text-align: left;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.docs-markdown td {
  padding: 0.875rem 1rem;
  border-top: 1px solid #334155;
  color: #cbd5e1;
  font-size: 0.9rem;
}

.docs-markdown tr:hover {
  background: rgba(30, 41, 59, 0.5);
}

/* Blockquotes */
.docs-markdown blockquote {
  border-left: 4px solid #3b82f6;
  margin: 2rem 0;
  padding: 1rem 0 1rem 1.5rem;
  background: rgba(30, 41, 59, 0.3);
  border-radius: 0 0.5rem 0.5rem 0;
  font-style: italic;
  color: #e2e8f0;
}

.docs-markdown blockquote p {
  margin-bottom: 0;
  font-size: 1.05rem;
}

/* Horizontal rules */
.docs-markdown hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, #475569, transparent);
  margin: 3rem 0;
}

/* Index page specific styles */
.docs-index-container {
  background: #0f172a;
  min-height: 100vh;
  color: #e2e8f0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  padding: 3rem 2rem;
}

.docs-index-content {
  max-width: 900px;
  margin: 0 auto;
}

.docs-index-title {
  color: #f1f5f9;
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 2rem 0;
  padding-bottom: 1rem;
  border-bottom: 2px solid #334155;
  letter-spacing: -0.025em;
}

.docs-file-tree {
  background: #1e293b;
  border-radius: 0.75rem;
  padding: 2rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.docs-folder {
  color: #60a5fa;
  font-weight: 600;
  font-size: 1rem;
  margin: 0.75rem 0;
}

.docs-file-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.5rem;
}

.docs-file-row {
  border-bottom: 1px solid #334155;
  transition: background-color 0.2s ease;
}

.docs-file-row:hover {
  background: rgba(51, 65, 85, 0.3);
}

.docs-file-row:last-child {
  border-bottom: none;
}

.docs-file-link {
  color: #cbd5e1;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.docs-file-link:hover {
  color: #60a5fa;
}

.docs-file-meta {
  color: #64748b;
  font-size: 0.875rem;
  text-align: right;
  padding: 0.75rem;
}

.docs-file-name {
  padding: 0.75rem;
}

/* Responsive design */
@media (max-width: 768px) {
  .docs-content,
  .docs-index-content {
    padding: 2rem 1rem;
  }
  
  .docs-markdown h1,
  .docs-index-title {
    font-size: 2rem;
  }
  
  .docs-markdown h2 {
    font-size: 1.5rem;
  }
  
  .docs-markdown pre {
    padding: 1rem;
    font-size: 0.8rem;
  }
  
  .docs-file-meta {
    display: none;
  }
}