:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --secondary: #10b981;
  --accent: #f59e0b;
  --danger: #ef4444;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --bg-white: #ffffff;
  --bg-light: #f8fafc;
  --bg-sidebar: #0f3a4a;
  --border: #e2e8f0;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-light);
}

.docs-container,
.docs-layout {
  display: flex;
  min-height: 100vh;
}

.docs-layout > .docs-content {
  flex: 1;
  margin-left: 280px;
  min-height: 100vh;
  background: var(--bg-light);
}

/* Sidebar */
.docs-sidebar {
  width: 280px;
  background: var(--bg-sidebar);
  color: white;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  padding: 0;
}

.sidebar-header {
  padding: 24px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 700;
  color: white;
  text-decoration: none;
}

.sidebar-logo svg {
  width: 32px;
  height: 32px;
  color: var(--primary-light);
}

.sidebar-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

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

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

.nav-section-title {
  padding: 8px 20px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 600;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 14px;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: white;
}

.nav-item.active {
  background: rgba(99, 102, 241, 0.2);
  color: white;
  border-left-color: var(--primary);
}

.nav-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.nav-item .badge {
  margin-left: auto;
  background: var(--primary);
  color: white;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 10px;
  font-weight: 600;
}

/* Main Content */
.docs-main {
  flex: 1;
  margin-left: 280px;
  min-height: 100vh;
}

.docs-header {
  background: white;
  border-bottom: 1px solid var(--border);
  padding: 16px 32px;
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-secondary);
}

.breadcrumb a {
  color: var(--text-secondary);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--primary);
}

.breadcrumb svg {
  width: 14px;
  height: 14px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px 16px;
  width: 300px;
}

.search-box input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 14px;
  width: 100%;
}

.search-box svg {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
}

.docs-content {
  padding: 40px;
  max-width: 1000px;
}

/* Typography */
.page-title {
  font-size: 36px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
  line-height: 1.2;
}

.page-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 32px;
  line-height: 1.5;
}

h2 {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 40px 0 16px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

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

h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 24px 0 12px;
}

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

/* Cards */
.card {
  background: white;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

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

.feature-card {
  background: white;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 24px;
  transition: all 0.2s;
  text-decoration: none;
  color: inherit;
  display: block;
}

.feature-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.feature-card .icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.feature-card .icon.blue { background: #dbeafe; color: #2563eb; }
.feature-card .icon.green { background: #d1fae5; color: #059669; }
.feature-card .icon.purple { background: #ede9fe; color: #7c3aed; }
.feature-card .icon.orange { background: #ffedd5; color: #ea580c; }
.feature-card .icon.pink { background: #fce7f3; color: #db2777; }
.feature-card .icon.cyan { background: #cffafe; color: #0891b2; }

.feature-card .icon svg {
  width: 24px;
  height: 24px;
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  background: #ede9fe;
  color: #7c3aed;
}

.feature-icon svg {
  width: 24px;
  height: 24px;
}

.feature-card h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.feature-card p {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
}

/* Screenshots */
.screenshot {
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  margin: 24px 0;
  overflow: hidden;
}

.screenshot img {
  width: 100%;
  display: block;
}

.screenshot-caption {
  background: var(--bg-light);
  padding: 12px 16px;
  font-size: 13px;
  color: var(--text-secondary);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}

.screenshot-caption svg {
  width: 16px;
  height: 16px;
  color: var(--primary);
}

/* Steps */
.steps {
  margin: 24px 0;
}

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

.step-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
}

.step-content {
  flex: 1;
}

.step-content h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.step-content p {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
}

/* Callouts */
.callout {
  padding: 16px 20px;
  border-radius: var(--radius-md);
  margin: 24px 0;
  display: flex;
  gap: 12px;
}

.callout svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 2px;
}

.callout.info {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
}

.callout.success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}

.callout.warning {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}

.callout.danger {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.callout-content {
  flex: 1;
}

.callout-content strong {
  display: block;
  margin-bottom: 4px;
}

/* Tables */
.table-wrapper {
  overflow-x: auto;
  margin: 24px 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

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

th {
  background: var(--bg-light);
  font-weight: 600;
  color: var(--text-primary);
}

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

tr:hover td {
  background: var(--bg-light);
}

/* Lists */
ul, ol {
  margin: 16px 0;
  padding-left: 24px;
}

li {
  margin-bottom: 8px;
  color: var(--text-secondary);
}

li strong {
  color: var(--text-primary);
}

/* Quick Actions */
.quick-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 24px 0;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
}

.action-btn.primary {
  background: var(--primary);
  color: white;
}

.action-btn.primary:hover {
  background: var(--primary-dark);
}

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

.action-btn.secondary:hover {
  background: var(--bg-light);
  border-color: var(--primary);
}

.action-btn svg {
  width: 18px;
  height: 18px;
}

/* Video Placeholder */
.video-placeholder {
  background: linear-gradient(135deg, var(--bg-sidebar), #334155);
  border-radius: var(--radius-md);
  padding: 60px;
  text-align: center;
  color: white;
  margin: 24px 0;
}

.video-placeholder svg {
  width: 64px;
  height: 64px;
  opacity: 0.8;
  margin-bottom: 16px;
}

.video-placeholder p {
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
}

/* Next/Prev Navigation */
.docs-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 60px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.docs-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.2s;
  max-width: 45%;
}

.docs-nav a:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.docs-nav a svg {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
}

.docs-nav .nav-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.docs-nav .nav-title {
  font-weight: 600;
}

/* Footer */
.docs-footer {
  margin-top: 60px;
  padding: 24px 0;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

/* Responsive */
@media (max-width: 1024px) {
  .docs-sidebar {
    width: 260px;
  }
  .docs-main {
    margin-left: 260px;
  }
}

@media (max-width: 768px) {
  .docs-sidebar {
    display: none;
  }
  .docs-main {
    margin-left: 0;
  }
  .docs-content {
    padding: 24px;
  }
  .card-grid {
    grid-template-columns: 1fr;
  }
}

/* Search Modal */
.search-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
}

.search-modal.open {
  display: block;
}

.search-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.search-modal-content {
  position: absolute;
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 640px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
}

.search-modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.search-modal-header svg {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.search-modal-header input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 16px;
  background: transparent;
}

.search-modal-header input::placeholder {
  color: var(--text-muted);
}

.search-modal-header kbd {
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 12px;
  color: var(--text-muted);
  font-family: inherit;
}

.search-modal-results {
  overflow-y: auto;
  flex: 1;
  padding: 8px;
}

.search-hint {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-secondary);
}

.search-hint p {
  margin-bottom: 16px;
}

.search-suggestions {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.search-suggestions .suggestion {
  background: var(--bg-light);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.search-suggestions .suggestion:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.search-no-results {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-secondary);
}

.search-no-results svg {
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.search-no-results p {
  margin-bottom: 8px;
}

.search-no-results span {
  font-size: 14px;
  color: var(--text-muted);
}

.search-section {
  margin-bottom: 8px;
}

.search-section-title {
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.search-result-item {
  display: block;
  padding: 12px 16px;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
}

.search-result-item:hover {
  background: var(--bg-light);
}

.search-result-title {
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.search-result-content {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.search-result-item mark {
  background: #fef08a;
  color: inherit;
  padding: 1px 2px;
  border-radius: 2px;
}

/* Keyboard shortcut hint in search box */
.search-box::after {
  content: "⌘K";
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg-light);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: auto;
}
