/* Documentation Carlytics - Style GitBook */

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

:root {
  --primary: #00FF88;
  --primary-dark: #00CC6A;
  --secondary: #8b5cf6;
  --accent: #06b6d4;
  --bg: #0B1120;
  --bg-sidebar: #0F172A;
  --bg-code: #1A2230;
  --bg-card: #1A2230;
  --text: #ffffff;
  --text-light: #94a3b8;
  --text-muted: #64748b;
  --border: rgba(255, 255, 255, 0.1);
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 30px rgba(0, 255, 136, 0.15);
  --radius: 12px;
  --radius-lg: 16px;
  --sidebar-width: 280px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
}

/* Layout */
.docs-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
}

.sidebar-header {
  padding: 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sidebar-toggle {
  display: none;
}

.header-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-row h1 {
  margin: 0;
  font-size: 2.5rem;
}

.sidebar-open {
  display: none;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 1.7rem;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
  transition: all 0.2s;
  line-height: 1;
  flex-shrink: 0;
}

.sidebar-open:hover {
  background: rgba(0, 255, 136, 0.1);
  border-color: var(--primary);
  color: var(--primary);
}

.sidebar-close {
  display: none;
  background: none;
  border: none;
  color: #ef4444;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.2s;
  line-height: 1;
}

.sidebar-close:hover {
  background: rgba(239, 68, 68, 0.1);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
}

.logo-icon {
  font-size: 1.5rem;
}

.sidebar-nav {
  padding: 20px 0;
}

.nav-section {
  margin-bottom: 24px;
}

.nav-section h3 {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  padding: 0 24px 12px;
}

.nav-section ul {
  list-style: none;
}

.nav-section li a {
  display: block;
  padding: 8px 24px;
  font-size: 0.9rem;
  color: var(--text-light);
  transition: all 0.2s;
  border-left: 3px solid transparent;
}

.nav-section li a:hover {
  color: var(--primary);
  background: rgba(0, 255, 136, 0.08);
}

.nav-section li a.active {
  color: var(--primary);
  background: rgba(0, 255, 136, 0.12);
  border-left-color: var(--primary);
  font-weight: 600;
}

/* Main Content */
.content {
  flex: 1;
  margin-left: var(--sidebar-width);
  max-width: 900px;
  padding: 48px 64px;
  background: var(--bg);
}

.content-header {
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.content-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.last-updated {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.content-body {
  font-size: 1rem;
  line-height: 1.8;
}

.content-body h2 {
  font-size: 1.75rem;
  font-weight: 600;
  margin: 48px 0 20px;
  color: var(--text);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.content-body h3 {
  font-size: 1.35rem;
  font-weight: 600;
  margin: 32px 0 16px;
  color: var(--text);
}

.content-body h4 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 24px 0 12px;
  color: var(--text);
}

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

.content-body strong {
  color: var(--text);
  font-weight: 600;
}

.content-body ul,
.content-body ol {
  margin-bottom: 16px;
  padding-left: 24px;
}

.content-body li {
  margin-bottom: 8px;
  color: var(--text-light);
}

/* Intro Box */
.intro-box {
  background: linear-gradient(135deg, rgba(0, 255, 136, 0.08), rgba(139, 92, 246, 0.08));
  border: 1px solid rgba(0, 255, 136, 0.2);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 40px;
}

.intro-box .lead {
  font-size: 1.25rem;
  margin-bottom: 12px;
  color: var(--text);
}

.intro-box p {
  color: var(--text-light);
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin: 32px 0;
}

.feature-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: all 0.2s;
}

.feature-item:hover {
  border-color: rgba(0, 255, 136, 0.4);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

.feature-item h4 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--text);
}

.feature-item p {
  font-size: 0.9rem;
  margin: 0;
  color: var(--text-light);
}

/* Audience Cards */
.audience-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 32px 0;
}

.audience-item {
  text-align: center;
  padding: 24px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.audience-emoji {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 12px;
}

.audience-item h4 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--text);
}

.audience-item p {
  font-size: 0.85rem;
  margin: 0;
  color: var(--text-light);
}

/* Info Box */
.info-box {
  background: rgba(0, 255, 136, 0.08);
  border: 1px solid rgba(0, 255, 136, 0.25);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 32px 0;
}

.info-box p {
  margin: 0;
  color: var(--text);
}

/* CTA Section */
.cta-section {
  background: linear-gradient(135deg, var(--bg-card), rgba(0, 255, 136, 0.05));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  text-align: center;
  margin: 48px 0;
}

.cta-section h2 {
  margin-top: 0;
  border: none;
}

.cta-section p {
  margin-bottom: 24px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #0B1120;
  font-weight: 700;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

/* Code Blocks */
code {
  background: var(--bg-code);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 0.9em;
  color: var(--primary);
}

pre {
  background: #050810;
  color: #ffffff;
  padding: 20px;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 20px 0;
}

pre code {
  background: none;
  color: inherit;
  padding: 0;
}

/* Steps */
.steps {
  counter-reset: step;
  margin: 32px 0;
}

.step {
  display: flex;
  gap: 20px;
  margin-bottom: 24px;
  padding: 24px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.step-number {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #0B1120;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
}

.step-content h4 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.step-content p {
  margin: 0;
}

/* Tips */
.tip {
  background: rgba(0, 255, 136, 0.08);
  border: 1px solid rgba(0, 255, 136, 0.25);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 24px 0;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.tip-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.tip p {
  margin: 0;
  color: var(--text);
}

/* Warning */
.warning {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 24px 0;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.warning-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.warning p {
  margin: 0;
  color: var(--text);
}

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

.content-footer p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.content-footer a {
  color: var(--primary);
}

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

/* Documentation Screenshots */
.doc-screenshot {
  max-width: 300px;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(0, 255, 136, 0.1);
  margin: 24px auto;
  display: block;
  border: 2px solid rgba(0, 255, 136, 0.2);
}

.doc-screenshot-caption {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 12px;
  font-style: italic;
}

.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin: 32px 0;
}

.screenshot-item {
  text-align: center;
}

.screenshot-item img {
  max-width: 100%;
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3), 0 0 15px rgba(0, 255, 136, 0.1);
  border: 2px solid rgba(0, 255, 136, 0.15);
}

/* Responsive */
@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s;
    z-index: 150;
  }

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

  .sidebar.open .sidebar-close {
    display: block;
  }

  .sidebar-open {
    display: block;
  }

  .content {
    margin-left: 0;
    padding: 24px;
  }

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

  .audience-cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .content {
    padding: 20px 16px;
  }

  .content-header h1 {
    font-size: 1.75rem;
  }

  .content-body h2 {
    font-size: 1.5rem;
    margin-top: 36px;
  }

  .intro-box {
    padding: 24px;
  }

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

  .step-number {
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
  }

  .feature-item {
    padding: 20px;
  }

  .cta-section {
    padding: 32px 24px;
  }

  .btn {
    padding: 10px 20px;
    font-size: 0.9rem;
  }

  .tip,
  .warning {
    padding: 14px 16px;
  }

  .doc-screenshot {
    max-width: 100%;
    width: 100%;
  }

  .screenshot-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .screenshot-item img {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .content {
    padding: 16px 12px;
  }

  .content-header h1 {
    font-size: 1.5rem;
  }

  .content-body h2 {
    font-size: 1.3rem;
    margin-top: 28px;
  }

  .intro-box {
    padding: 20px;
  }

  .step {
    padding: 16px;
  }

  .step-content h4 {
    font-size: 1rem;
  }

  .feature-item {
    padding: 16px;
  }

  .feature-item h3 {
    font-size: 1.1rem;
  }

  .cta-section {
    padding: 24px 16px;
  }

  .cta-section h3 {
    font-size: 1.2rem;
  }

  .btn {
    display: block;
    width: 100%;
    margin: 8px 0;
    text-align: center;
  }

  .doc-screenshot {
    border-radius: 12px;
  }

  .content-footer {
    margin-top: 48px;
  }
}

@media (max-width: 360px) {
  .content {
    padding: 12px 10px;
  }

  .content-header h1 {
    font-size: 1.3rem;
  }

  .content-body h2 {
    font-size: 1.15rem;
  }

  .intro-box {
    padding: 16px;
  }

  .step {
    padding: 14px;
  }

  .step-number {
    width: 32px;
    height: 32px;
    font-size: 0.85rem;
  }

  .feature-item {
    padding: 14px;
  }

  .info-box {
    padding: 16px;
  }
}
