:root {
  --bg-main: #0a0a0f;
  --bg-sidebar: #0e0e16;
  --bg-card: rgba(20, 20, 32, 0.7);
  --bg-code: #111119;
  --border: rgba(255, 255, 255, 0.08);
  --border-active: rgba(99, 102, 241, 0.5);
  --text-main: #e8e8ed;
  --text-muted: #8b8b9e;
  --text-dim: #5a5a6e;
  --accent: #6366f1;
  --accent-hover: #4f46e5;
  --accent-glow: rgba(99, 102, 241, 0.15);
  --success: #22c55e;
  --warning: #f59e0b;
  --radius: 12px;
  --sidebar-width: 280px;
  --header-height: 70px;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  display: flex;
  justify-content: center;
  padding-left: var(--sidebar-width);
  min-height: 100vh;
  overflow-x: hidden;
}

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

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

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Sidebar Navigation */
.sidebar {
  width: var(--sidebar-width);
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  overflow-y: auto;
  padding: 24px 16px;
  z-index: 100;
  transition: transform 0.3s ease;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
  text-decoration: none;
  color: #fff;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.5px;
}

.brand-icon {
  font-size: 24px;
}

.brand-badge {
  font-size: 11px;
  background: var(--accent-glow);
  color: #a5b4fc;
  border: 1px solid var(--border-active);
  padding: 2px 8px;
  border-radius: 100px;
  font-weight: 600;
}

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

.nav-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dim);
  padding: 0 12px;
  margin-bottom: 8px;
}

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

.nav-link {
  display: block;
  padding: 8px 12px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.nav-link:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.04);
}

.nav-link.active {
  color: #fff;
  background: var(--accent-glow);
  border-left: 3px solid var(--accent);
  font-weight: 500;
}

.nav-sub-list {
  list-style: none;
  margin: 4px 0 4px 18px;
  border-left: 1px solid var(--border);
  padding-left: 8px;
}

.nav-sub-link {
  display: block;
  padding: 5px 10px;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 12.5px;
  border-radius: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-sub-link:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.03);
}

.nav-sub-link.active {
  color: #a5b4fc;
  font-weight: 500;
}

/* Main Content Area */
.main-content {
  width: 100%;
  max-width: 1040px;
  padding: 40px 48px 100px;
}

.hero {
  padding: 40px 0 60px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 48px;
}

.hero h1 {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -1.5px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #ffffff 0%, #a5b4fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 21px;
  color: #cbd5e1;
  max-width: 100%;
  margin-bottom: 32px;
  line-height: 1.6;
}

.badges {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.badge-tag {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-main);
  text-decoration: none;
}

.badge-tag span {
  color: var(--text-muted);
}

.hero-actions {
  display: flex;
  gap: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border: 1px solid transparent;
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 20px var(--accent-glow);
}

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

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Section Styling */
section {
  padding: 40px 0;
  border-bottom: 1px solid var(--border);
}

h2 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 20px;
  color: #fff;
}

h3 {
  font-size: 20px;
  font-weight: 600;
  margin: 32px 0 16px;
  color: #e2e8f0;
}

h4 {
  font-size: 16px;
  font-weight: 600;
  margin: 20px 0 12px;
  color: var(--text-main);
}

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

ul,
ol {
  margin: 0 0 20px 24px;
  color: var(--text-muted);
}

li {
  margin-bottom: 8px;
}

strong {
  color: var(--text-main);
}

/* Luminous inline text link formatting exclusively for main content text */
.main-content p a,
.main-content ul a,
.main-content ol a,
.main-content table a,
.screenshot-caption a {
  color: #60a5fa;
  text-decoration: none;
  border-bottom: 1px dashed rgba(96, 165, 250, 0.4);
  transition: color 0.2s ease, border-color 0.2s ease;
  font-weight: 500;
}

.main-content p a:hover,
.main-content ul a:hover,
.main-content ol a:hover,
.main-content table a:hover,
.screenshot-caption a:hover {
  color: #93c5fd;
  border-bottom: 1px solid #93c5fd;
}

/* Feature Grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.use-case-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 24px;
  margin-bottom: 24px;
}

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

.feature-card:hover {
  border-color: rgba(99, 102, 241, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.feature-icon {
  font-size: 28px;
  margin-bottom: 16px;
  display: inline-block;
}

.feature-card h4 {
  margin-top: 0;
  margin-bottom: 8px;
  color: #fff;
}

.feature-card p {
  font-size: 14px;
  margin-bottom: 0;
  line-height: 1.5;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0 32px;
  font-size: 14px;
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

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

th {
  background: rgba(255, 255, 255, 0.03);
  font-weight: 600;
  color: var(--text-main);
}

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

/* Code Blocks & Pre */
pre {
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  overflow-x: auto;
  margin: 16px 0 24px;
  position: relative;
  font-family: 'Fira Code', 'Courier New', Courier, monospace;
  font-size: 13.5px;
  color: #a5b4fc;
}

code {
  font-family: 'Fira Code', 'Courier New', Courier, monospace;
  font-size: 85%;
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 6px;
  border-radius: 4px;
  color: #c084fc;
}

pre code {
  background: transparent;
  padding: 0;
  font-size: 13.5px;
  color: inherit;
}

/* Copy button for code blocks */
.copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--text-muted);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s;
}

.copy-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.copy-btn.copied {
  background: var(--success);
  color: #000;
}

/* Alert boxes */
.alert {
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 20px 0;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.alert-icon {
  font-size: 20px;
  line-height: 1;
}

.alert-content h5 {
  margin: 0 0 4px 0;
  font-size: 15px;
  color: #a5b4fc;
}

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

/* Screenshot placeholders / images */
.screenshot-container {
  margin: 24px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.screenshot-container img {
  width: 100%;
  height: auto;
  display: block;
}

.screenshot-caption {
  background: rgba(255, 255, 255, 0.03);
  padding: 10px 16px;
  font-size: 12px;
  color: var(--text-dim);
  border-top: 1px solid var(--border);
  text-align: center;
}

/* Universal Responsive Constraints & Word Wrapping */
img, video, iframe, table, pre {
  max-width: 100%;
}

a, p, li, h1, h2, h3, h4, h5, h6, span {
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
}

/* Mobile responsive */
.menu-toggle {
  display: none;
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 200;
  background: var(--bg-sidebar);
  border: 1px solid var(--border-active);
  color: #fff;
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  cursor: pointer;
}

@media (max-width: 900px) {
  body {
    display: block !important;
    padding-left: 0;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }
  .sidebar {
    transform: translateX(-100%);
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.8);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main-content {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
    padding: 28px 24px 80px;
    margin: 0 auto;
    overflow-x: hidden;
  }
  .menu-toggle {
    display: block;
  }
  .hero h1 {
    font-size: 34px;
  }
  .use-case-grid,
  .feature-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 20px;
    width: 100%;
  }
  table {
    display: block !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    max-width: 100%;
  }
  pre, code {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    word-break: normal;
  }
  pre code {
    word-break: normal;
  }
}

@media (max-width: 640px) {
  .main-content {
    padding: 24px 18px 60px !important;
  }
  .hero {
    padding: 20px 0 40px;
  }
  .hero h1 {
    font-size: 28px;
    line-height: 1.25;
    letter-spacing: -1px;
  }
  .hero p {
    font-size: 16px;
  }
  h2 {
    font-size: 22px;
    margin-top: 36px;
    margin-bottom: 16px;
  }
  h3 {
    font-size: 18px;
    margin-top: 24px;
  }
  .feature-card {
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
  }
  th, td {
    padding: 10px 12px;
    font-size: 13px;
  }
  pre {
    padding: 14px;
    font-size: 12.5px;
    border-radius: 8px;
  }
  .alert {
    padding: 14px;
    gap: 12px;
    flex-direction: column;
    align-items: flex-start;
  }
  .hero-actions {
    flex-direction: column;
    width: 100%;
    gap: 12px;
  }
  .btn {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .main-content {
    padding: 20px 16px 50px !important;
  }
  .hero h1 {
    font-size: 24px;
  }
  .hero p {
    font-size: 15px;
  }
  .menu-toggle {
    top: 12px;
    right: 12px;
    padding: 7px 12px;
    font-size: 13px;
  }
}