/* OSINT Toolkit - Documentation Theme (Inspired by sherlockproject.xyz & Mintlify) */
:root {
  --primary: #9563ff;
  --primary-light: #ab82ff;
  --primary-glow: rgba(149, 99, 255, 0.25);
  --bg-dark: #0b0b10;
  --bg-card: #12121b;
  --bg-card-hover: #161622;
  --bg-code: #07070b;
  --border: #1e1e2d;
  --border-focus: #373752;
  --text-main: #f0f0f5;
  --text-muted: #9494a8;
  --text-dim: #5f5f73;
  --accent-green: #10b981;
  --accent-blue: #3b82f6;
  --accent-amber: #f59e0b;
  --accent-red: #ef4444;
  --sidebar-w: 280px;
  --toc-w: 240px;
  --header-h: 64px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-dim);
}

/* Header Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(11, 11, 16, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-main);
}

.logo-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), #6366f1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  color: #fff;
  box-shadow: 0 0 16px var(--primary-glow);
}

.brand-title {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.version-badge {
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  background: rgba(149, 99, 255, 0.15);
  color: var(--primary-light);
  border: 1px solid rgba(149, 99, 255, 0.3);
  font-weight: 600;
}

.nav-center {
  flex: 1;
  max-width: 480px;
  margin: 0 2rem;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-box input {
  width: 100%;
  padding: 0.5rem 2.2rem 0.5rem 2.2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-main);
  font-size: 0.88rem;
  transition: all 0.2s ease;
}

.search-box input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.search-icon {
  position: absolute;
  left: 0.75rem;
  color: var(--text-dim);
  pointer-events: none;
}

.search-kbd {
  position: absolute;
  right: 0.6rem;
  font-size: 0.7rem;
  background: var(--border);
  color: var(--text-muted);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-family: var(--font-mono);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--text-main);
}

.btn-github {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.9rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.btn-github:hover {
  border-color: var(--primary);
  background: var(--bg-card-hover);
}

.mobile-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-main);
  cursor: pointer;
  padding: 0.5rem;
}

/* Page Layout */
.layout-container {
  display: flex;
  flex: 1;
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  height: calc(100vh - var(--header-h));
  position: sticky;
  top: var(--header-h);
  overflow-y: auto;
  padding: 1.5rem 1rem 2.5rem 1.5rem;
  border-right: 1px solid var(--border);
}

.nav-group {
  margin-bottom: 1.75rem;
}

.nav-group-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
  padding: 0 0.5rem;
}

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

.sidebar-nav-item a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.6rem;
  border-radius: 6px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 450;
  transition: all 0.15s ease;
}

.sidebar-nav-item a:hover {
  color: var(--text-main);
  background: var(--bg-card);
}

.sidebar-nav-item.active a {
  color: var(--primary-light);
  background: rgba(149, 99, 255, 0.12);
  font-weight: 600;
}

/* Main Content */
.content-area {
  flex: 1;
  min-width: 0;
  padding: 2.5rem 3rem;
  max-width: 900px;
}

/* Hero Section */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(149, 99, 255, 0.1);
  border: 1px solid rgba(149, 99, 255, 0.25);
  color: var(--primary-light);
  padding: 0.35rem 0.8rem;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.hero-title {
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.gradient-text {
  background: linear-gradient(135deg, #fff 30%, var(--primary-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 1.15rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 2rem;
}

/* Feature Grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin: 2rem 0 3rem 0;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-focus);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.card-icon {
  font-size: 1.8rem;
  margin-bottom: 0.75rem;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 650;
  margin-bottom: 0.4rem;
  color: var(--text-main);
}

.card-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Typography & Document Sections */
section {
  margin-bottom: 3.5rem;
}

h2 {
  font-size: 1.75rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: var(--text-main);
  margin: 2rem 0 1rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.6rem;
}

h3 {
  font-size: 1.25rem;
  font-weight: 650;
  color: var(--text-main);
  margin: 1.5rem 0 0.75rem 0;
}

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

/* Code Snippets */
.code-block {
  position: relative;
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin: 1rem 0 1.5rem 0;
  overflow: hidden;
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.copy-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.75rem;
  font-family: var(--font-sans);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.15s ease;
}

.copy-btn:hover {
  color: var(--text-main);
  border-color: var(--primary);
  background: rgba(149, 99, 255, 0.1);
}

pre {
  padding: 1rem 1.25rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.55;
  color: #e2e8f0;
}

code {
  font-family: var(--font-mono);
  font-size: 0.88em;
}

p code, li code, td code {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 0.15rem 0.4rem;
  border-radius: 5px;
  color: var(--primary-light);
}

/* Callouts / Alerts */
.callout {
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  display: flex;
  gap: 0.9rem;
  font-size: 0.9rem;
  line-height: 1.55;
}

.callout-info {
  background: rgba(149, 99, 255, 0.08);
  border: 1px solid rgba(149, 99, 255, 0.25);
  color: #d1c4e9;
}

.callout-info .callout-icon {
  color: var(--primary);
  font-size: 1.2rem;
}

.callout-security {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #a7f3d0;
}

.callout-security .callout-icon {
  color: var(--accent-green);
  font-size: 1.2rem;
}

/* Tables */
.table-wrapper {
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.875rem;
}

th {
  background: rgba(255, 255, 255, 0.02);
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-main);
  font-weight: 650;
}

td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}

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

tr:hover td {
  background: rgba(255, 255, 255, 0.015);
}

/* Table of Contents (Right Sticky) */
.toc-sidebar {
  width: var(--toc-w);
  flex-shrink: 0;
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  overflow-y: auto;
  padding: 2.5rem 1.5rem;
  border-left: 1px solid var(--border);
  display: block;
}

.toc-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin-bottom: 0.75rem;
}

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

.toc-item a {
  display: block;
  padding: 0.35rem 0;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.82rem;
  transition: color 0.15s ease;
}

.toc-item a:hover {
  color: var(--text-main);
}

.toc-item.active a {
  color: var(--primary-light);
  font-weight: 600;
}

/* Interactive Filter for Platforms */
.filter-bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.filter-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.35rem 0.8rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-btn:hover {
  color: var(--text-main);
  border-color: var(--border-focus);
}

.filter-btn.active {
  background: rgba(149, 99, 255, 0.15);
  border-color: var(--primary);
  color: var(--primary-light);
  font-weight: 600;
}

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 1.5rem;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.85rem;
  background: var(--bg-dark);
}

footer a {
  color: var(--text-muted);
  text-decoration: none;
}

footer a:hover {
  color: var(--primary-light);
}

/* Mobile Responsive */
@media (max-width: 1080px) {
  .toc-sidebar {
    display: none;
  }
}

@media (max-width: 820px) {
  .sidebar {
    display: none;
    position: fixed;
    top: var(--header-h);
    left: 0;
    width: 100%;
    height: calc(100vh - var(--header-h));
    background: var(--bg-dark);
    z-index: 40;
  }
  .sidebar.open {
    display: block;
  }
  .mobile-toggle {
    display: block;
  }
  .nav-center {
    display: none;
  }
  .content-area {
    padding: 1.5rem;
  }
  .hero-title {
    font-size: 2.1rem;
  }
}
