/* CSS Variables for theming */
:root {
  /* Light theme */
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --border-hover: #cbd5e1;
  --accent-primary: #3db588;
  --accent-secondary: #2d9a6b;
  --accent-muted: rgba(61, 181, 136, 0.1);
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --code-bg: #f8fafc;
  --code-border: #e2e8f0;
  --method-post: #10b981;
  --method-get: #3b82f6;
  --method-put: #f59e0b;
  --method-delete: #ef4444;
}

[data-theme="dark"] {
  /* Dark theme */
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --border-color: #334155;
  --border-hover: #475569;
  --accent-primary: #3db588;
  --accent-secondary: #2d9a6b;
  --accent-muted: rgba(61, 181, 136, 0.1);
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
  --code-bg: #1e293b;
  --code-border: #334155;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.875rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1.125rem; }

p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

code {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  background-color: var(--accent-muted);
  color: var(--accent-primary);
  padding: 0.2rem 0.4rem;
  border-radius: 0.375rem;
  font-size: 0.875em;
}

pre {
  background-color: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: 0.75rem;
  padding: 1.5rem;
  overflow-x: auto;
  margin: 1rem 0;
}

pre code {
  background: none;
  color: var(--text-primary);
  padding: 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  font-size: 0.875rem;
  font-family: inherit;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
  color: white;
  box-shadow: var(--shadow-md);
}

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

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

.btn-secondary:hover {
  background: var(--bg-tertiary);
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

/* Header */
.docs-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  z-index: 100;
  transition: all 0.3s ease;
}

[data-theme="dark"] .docs-header {
  background: rgba(15, 23, 42, 0.95);
}

.docs-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo {
  text-decoration: none;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent-primary);
  letter-spacing: -0.02em;
}

.docs-label {
  background: var(--accent-muted);
  color: var(--accent-primary);
  padding: 0.25rem 0.75rem;
  border-radius: 2rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.theme-toggle {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 0.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--text-secondary);
}

.theme-toggle:hover {
  background: var(--bg-tertiary);
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.theme-toggle .moon-icon {
  display: none;
}

[data-theme="dark"] .theme-toggle .sun-icon {
  display: none;
}

[data-theme="dark"] .theme-toggle .moon-icon {
  display: block;
}

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: all 0.3s ease;
}

/* Container */
.docs-container {
  display: flex;
  margin-top: 80px;
  min-height: calc(100vh - 80px);
  width: 100%;
  position: relative;
  padding-left: 320px;
  transition: padding-left 0.3s ease;
  overflow-x: hidden;
  z-index: 1;
}

/* Sidebar */
.docs-sidebar {
  width: 320px;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  overflow-y: auto;
  position: fixed;
  top: 80px;
  left: 0;
  height: calc(100vh - 80px);
  transition: all 0.3s ease;
  flex-shrink: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) transparent;
  z-index: 50;
}

/* Custom scrollbar for webkit browsers */
.docs-sidebar::-webkit-scrollbar {
  width: 6px;
}

.docs-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.docs-sidebar::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}

.docs-sidebar::-webkit-scrollbar-thumb:hover {
  background: var(--border-hover);
}

.docs-sidebar.collapsed {
  width: 80px;
  overflow: hidden;
}

.docs-sidebar.collapsed .sidebar-header h2,
.docs-sidebar.collapsed .nav-section h3,
.docs-sidebar.collapsed .nav-item {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  white-space: nowrap;
  pointer-events: none;
}

.docs-sidebar.collapsed .sidebar-toggle .toggle-icon {
  transform: rotate(180deg);
}

.docs-sidebar.collapsed .sidebar-toggle {
  margin-right: 0;
  position: absolute;
  right: 0.5rem;
  top: 1.5rem;
  z-index: 10;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 0.375rem;
}

.docs-sidebar.collapsed .nav-section {
  text-align: center;
}

.docs-sidebar.collapsed .nav-item {
  justify-content: center;
  padding: 0.75rem 0;
}

.docs-sidebar.collapsed .nav-item::before {
  margin-right: 0;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  position: relative;
  min-height: 60px;
}

.sidebar-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 0.5rem;
  border-radius: 0.375rem;
  transition: all 0.3s ease;
  margin-right: 0.5rem;
}

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

.sidebar-toggle .toggle-icon {
  transition: transform 0.3s ease;
}

.sidebar-header h2 {
  font-size: 1.25rem;
  margin: 0;
}

.sidebar-close {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 0.5rem;
  border-radius: 0.375rem;
  transition: all 0.3s ease;
}

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

.sidebar-nav {
  padding: 1.5rem;
}

.nav-section {
  margin-bottom: 2rem;
}

.nav-section h3 {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-weight: 600;
}

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

.nav-section li {
  margin-bottom: 0.5rem;
}

.nav-item {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  font-size: 0.875rem;
}

.nav-item:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  transform: translateX(4px);
}

.nav-item.active {
  background: var(--accent-muted);
  color: var(--accent-primary);
  font-weight: 500;
}

/* Main Content */
.docs-main {
  flex: 1;
  padding: 2rem;
  width: 100%;
  transition: all 0.3s ease;
  min-width: 0;
  overflow-x: hidden;
  position: relative;
  z-index: 1;
}

.docs-main.sidebar-collapsed {
  width: 100%;
}

.docs-container.sidebar-collapsed {
  margin-left: 0;
}

/* Hero Section */
.docs-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 4rem;
  padding: 2rem 0;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.hero-content h1 {
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-align: center;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  text-align: center;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

.hero-visual {
  display: flex;
  justify-content: center;
}

.code-preview {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 500px;
}

.code-header {
  background: var(--bg-tertiary);
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.code-dots {
  display: flex;
  gap: 0.5rem;
}

.code-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ef4444;
}

.code-dots span:nth-child(2) {
  background: #f59e0b;
}

.code-dots span:nth-child(3) {
  background: #10b981;
}

.code-label {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
}

.code-content {
  padding: 1.5rem;
}

/* Sections */
.docs-section {
  margin-bottom: 4rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--border-color);
  position: relative;
  z-index: 1;
}

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

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  margin-bottom: 1rem;
}

.section-header p {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* Quick Start Grid */
.quick-start-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.step-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
}

.step-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
  border-color: var(--accent-primary);
}

.step-number {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-primary);
  color: white;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
}

.step-icon {
  font-size: 3rem;
  margin: 1rem 0;
}

.step-card h3 {
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.step-card p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.step-code {
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: 0.5rem;
  padding: 0.75rem;
}

.step-code code {
  background: none;
  color: var(--accent-primary);
  font-size: 0.875rem;
}

/* Auth Content */
.auth-content {
  max-width: 800px;
  margin: 0 auto;
}

.auth-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.info-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 2rem;
}

.info-card h3 {
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.info-card ul {
  list-style: none;
  margin-top: 1rem;
}

.info-card li {
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

/* Code Block */
.code-block {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  overflow: hidden;
  margin: 1rem 0;
}

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

.copy-btn {
  background: var(--accent-primary);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.copy-btn:hover {
  background: var(--accent-secondary);
  transform: translateY(-1px);
}

/* URL Grid */
.url-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.url-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 2rem;
  transition: all 0.3s ease;
}

.url-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.url-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.url-badge {
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
}

.url-badge.production {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.url-badge.sandbox {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.url-status {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.url-content {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.base-url {
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.875rem;
  color: var(--text-primary);
  flex: 1;
}

/* Endpoint Details */
.endpoint-details {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  overflow: hidden;
  margin: 2rem 0;
}

.endpoint-header {
  background: var(--bg-tertiary);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.method {
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  color: white;
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
}

.method.post { background: var(--method-post); }
.method.get { background: var(--method-get); }
.method.put { background: var(--method-put); }
.method.delete { background: var(--method-delete); }

.endpoint-url {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.125rem;
  color: var(--text-primary);
  font-weight: 600;
}

.endpoint-content {
  padding: 2rem;
}

.endpoint-section {
  margin-bottom: 2rem;
}

.endpoint-section:last-child {
  margin-bottom: 0;
}

.endpoint-section h3 {
  margin-bottom: 1rem;
  color: var(--text-primary);
}

/* Params Table */
.params-table {
  overflow-x: auto;
}

.params-table table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

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

.params-table th {
  background: var(--bg-tertiary);
  font-weight: 600;
  color: var(--text-primary);
}

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

/* Interactive Test */
.interactive-test {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 1.5rem;
}

.test-inputs {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  align-items: end;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.input-group label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
}

.input-group select {
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: inherit;
}

.test-result {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 1.5rem;
  min-height: 100px;
}

.result-placeholder {
  color: var(--text-muted);
  text-align: center;
  font-style: italic;
}

/* Webhooks */
.webhooks-content {
  max-width: 1000px;
  margin: 0 auto;
}

.webhook-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.flow-step {
  text-align: center;
  flex: 1;
  min-width: 200px;
}

.flow-step .step-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.flow-step h3 {
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.flow-step p {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.flow-arrow {
  font-size: 2rem;
  color: var(--accent-primary);
  font-weight: bold;
}

.webhook-types h3 {
  text-align: center;
  margin-bottom: 2rem;
}

.webhook-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.webhook-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
}

.webhook-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.webhook-header {
  margin-bottom: 1rem;
}

.status-badge {
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
}

.status-badge.processing {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}

.status-badge.completed {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.status-badge.failed {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.webhook-card h4 {
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.webhook-card p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.webhook-example {
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: 0.5rem;
  padding: 0.75rem;
}

.webhook-example code {
  background: none;
  color: var(--accent-primary);
  font-size: 0.875rem;
}

/* Webhook Payload */
.webhook-payload {
  margin-bottom: 3rem;
}

.webhook-payload h3 {
  text-align: center;
  margin-bottom: 2rem;
}

.webhook-headers {
  margin-top: 2rem;
}

.webhook-headers h4 {
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.headers-table {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  overflow: hidden;
}

.headers-table table {
  width: 100%;
  border-collapse: collapse;
}

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

.headers-table th {
  background: var(--bg-tertiary);
  font-weight: 600;
  color: var(--text-primary);
}

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

.headers-table td:first-child {
  font-weight: 500;
  color: var(--text-primary);
}

/* Webhook Retry */
.webhook-retry {
  margin-top: 3rem;
}

.webhook-retry h3 {
  text-align: center;
  margin-bottom: 2rem;
}

.retry-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.retry-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.retry-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.retry-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.retry-item h4 {
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.retry-item p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-bottom: 0;
}

/* Error Codes */
.error-codes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.error-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 2rem;
  transition: all 0.3s ease;
}

.error-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.error-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.error-code {
  background: var(--accent-muted);
  color: var(--accent-primary);
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.875rem;
  font-weight: 600;
}

.http-status {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  padding: 0.25rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 600;
}

.error-card p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.error-solution {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 1rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* Integration Flow */
.integration-content {
  max-width: 1000px;
  margin: 0 auto;
}

.flow-diagram {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.flow-diagram .flow-step {
  text-align: center;
  flex: 1;
  min-width: 200px;
}

.flow-diagram .step-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.flow-diagram h3 {
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.flow-diagram p {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.flow-arrow {
  font-size: 2rem;
  color: var(--accent-primary);
  font-weight: bold;
}

/* Rate Limits */
.rate-limits-content {
  max-width: 800px;
  margin: 0 auto;
}

.limits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.limit-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
}

.limit-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.limit-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.limit-value {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--accent-primary);
  margin: 1rem 0;
}

.limit-card h3 {
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.limit-card p {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* Examples */
.examples-content {
  max-width: 900px;
  margin: 0 auto;
}

.example-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 2rem;
  margin-bottom: 2rem;
  transition: all 0.3s ease;
}

.example-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.example-card h3 {
  margin-bottom: 1.5rem;
  color: var(--text-primary);
  border-bottom: 2px solid var(--accent-primary);
  padding-bottom: 0.5rem;
}

/* Testing */
.testing-content {
  max-width: 800px;
  margin: 0 auto;
}

.testing-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.testing-step {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 2rem;
  transition: all 0.3s ease;
}

.testing-step:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.testing-step h3 {
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.testing-step p {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* Support */
.support-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.support-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
}

.support-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-primary);
}

.support-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.support-card h3 {
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.support-card p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.support-link {
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.support-link:hover {
  color: var(--accent-secondary);
}

/* Floating Action Button */
.fab {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 56px;
  height: 56px;
  background: var(--accent-primary);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition: all 0.3s ease;
  z-index: 1000;
  display: none;
}

.fab:hover {
  background: var(--accent-secondary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.fab.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .docs-sidebar {
    transform: translateX(-100%);
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    z-index: 2000;
    width: 320px;
  }
  
  .docs-sidebar.open {
    transform: translateX(0);
  }
  
  .docs-container {
    padding-left: 0 !important;
  }
  
  .sidebar-close {
    display: block;
  }
  
  .sidebar-toggle {
    display: none;
  }
  
  .mobile-menu-toggle {
    display: flex;
  }
  
  .docs-main {
    width: 100%;
    padding: 1rem;
  }
  
  .docs-main.sidebar-collapsed {
    width: 100%;
  }
  
  .docs-hero {
    padding: 1rem 0;
    max-width: 100%;
  }
  
  .hero-actions {
    justify-content: center;
  }
  
  .auth-info {
    grid-template-columns: 1fr;
  }
  
  .webhook-flow,
  .flow-diagram {
    flex-direction: column;
    gap: 1rem;
  }
  
  .flow-arrow {
    transform: rotate(90deg);
  }
  
  .limits-grid,
  .testing-steps {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .docs-nav {
    padding: 1rem;
  }
  
  .hero-actions {
    flex-direction: column;
    align-items: center;
  }
  
  .quick-start-grid {
    grid-template-columns: 1fr;
  }
  
  .url-grid {
    grid-template-columns: 1fr;
  }
  
  .error-codes-grid {
    grid-template-columns: 1fr;
  }
  
  .support-cards {
    grid-template-columns: 1fr;
  }
  
  .test-inputs {
    flex-direction: column;
    align-items: stretch;
  }
  
  .endpoint-content {
    padding: 1rem;
  }
  
  .endpoint-header {
    padding: 1rem;
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
  
  .webhook-cards {
    grid-template-columns: 1fr;
  }
  
  .retry-info {
    grid-template-columns: 1fr;
  }
  
  .headers-table {
    font-size: 0.875rem;
  }
  
  .headers-table th,
  .headers-table td {
    padding: 0.75rem 0.5rem;
  }
}

@media (max-width: 480px) {
  .docs-main {
    padding: 0.5rem;
  }
  
  .docs-hero {
    padding: 1rem 0;
  }
  
  .hero-content h1 {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .section-header h2 {
    font-size: 1.75rem;
  }
  
  .fab {
    bottom: 1rem;
    right: 1rem;
    width: 48px;
    height: 48px;
  }
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.docs-section {
  animation: fadeInUp 0.6s ease;
}

.step-card {
  animation: slideInLeft 0.6s ease;
}

/* Smooth transitions for theme switching */
* {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Focus styles for accessibility */
.btn:focus,
.copy-btn:focus,
.theme-toggle:focus,
.mobile-menu-toggle:focus,
.fab:focus {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

/* Loading states */
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Print styles */
@media print {
  .docs-sidebar,
  .docs-header,
  .fab {
    display: none;
  }
  
  .docs-main {
    max-width: 100%;
    padding: 0;
  }
}
