@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&family=Share+Tech+Mono&display=swap');

:root {
  --bg-color: #0b0f19;
  --text-color: #f1f5f9;
  --muted-color: #94a3b8;
  --border-color: rgba(255, 255, 255, 0.12);
  --code-bg: rgba(15, 23, 42, 0.7);
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Outfit', sans-serif;
  --accent-color: #3b82f6;
}

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

body {
  background-color: var(--bg-color);
  background-image: linear-gradient(rgba(11, 15, 25, 0.95), rgba(11, 15, 25, 0.95)), radial-gradient(rgba(59, 130, 246, 0.15) 1px, transparent 1px);
  background-size: 20px 20px;
  background-attachment: fixed;
  color: var(--text-color);
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.7;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  margin-top: 3rem;
  margin-bottom: 1.5rem;
  letter-spacing: -0.01em;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

h1 {
  font-size: 3.5rem;
  line-height: 1.1;
  border-bottom: 2px solid;
  border-image: linear-gradient(to right, #3b82f6, #60a5fa, transparent) 1;
  padding-bottom: 1.5rem;
  margin-top: 0;
}

h2 {
  font-size: 2.2rem;
  border-bottom: 1px solid;
  border-image: linear-gradient(to right, #475569, transparent) 1;
  padding-bottom: 0.5rem;
}

h3 {
  font-size: 1.6rem;
}

p {
  margin-bottom: 1.5rem;
  color: #f8fafc;
}

a {
  color: #60a5fa;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: var(--accent-color);
  transition: all 0.3s ease;
}

a:hover {
  text-decoration-color: #fff;
  color: #fff;
}

ul, ol {
  padding-left: 2rem;
  margin-bottom: 2rem;
}

li {
  margin-bottom: 0.75rem;
  color: #f8fafc;
}

blockquote {
  border-left: 4px solid var(--accent-color) !important;
  background-color: var(--code-bg);
  padding: 1.5rem 2rem !important;
  margin: 2.5rem 0 !important;
  font-style: italic;
  color: #e2e8f0;
  border-radius: 0 8px 8px 0;
}

.global-search-container {
  position: relative;
  width: 280px;
  margin: 0 20px;
}

#global-search-input {
  width: 100%;
  padding: 8px 32px 8px 12px;
  font-size: 0.9rem;
  font-family: 'Outfit', sans-serif;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05);
  outline: none;
  transition: all 0.3s ease;
}

#global-search-input:focus {
  background: rgba(15, 23, 42, 0.6);
  border-color: var(--accent-color);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1), 0 0 10px rgba(59, 130, 246, 0.3);
}

.global-search-icon {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 1rem;
  pointer-events: none;
}

.global-search-results-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 320px;
  max-height: 400px;
  overflow-y: auto;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: none;
}

.global-search-results-dropdown.show {
  display: block;
}

.search-result-item {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  display: block;
  text-decoration: none !important;
  color: inherit !important;
  transition: background 0.2s ease;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover, .search-result-item.selected {
  background: rgba(59, 130, 246, 0.2);
}

.search-result-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: #ffffff;
  margin-bottom: 4px;
}

.search-result-snippet {
  font-size: 0.75rem;
  color: #94a3b8;
  line-height: 1.4;
  word-break: break-all;
}

.search-result-snippet mark {
  background: rgba(59, 130, 246, 0.4);
  color: #ffffff;
  padding: 1px 3px;
  border-radius: 2px;
  font-weight: 600;
}

.search-no-results {
  padding: 16px;
  font-size: 0.85rem;
  color: #94a3b8;
  text-align: center;
}

pre {
  background-color: var(--code-bg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 2.5rem 0;
  border-radius: 8px;
  position: relative;
  max-width: 100%;
  word-break: normal;
  white-space: pre;
}

.copy-code-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 50%, rgba(0, 0, 0, 0.2) 50%, rgba(0, 0, 0, 0.15) 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 2px 4px rgba(0, 0, 0, 0.3);
  border-radius: 4px;
  padding: 4px 10px;
  color: #f1f5f9;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: 'Outfit', sans-serif;
  cursor: pointer;
  transition: all 0.2s ease;
  opacity: 0.8;
}

.copy-code-btn:hover {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0.15) 50%, rgba(59, 130, 246, 0.4) 50%, rgba(59, 130, 246, 0.2) 100%);
  border-color: rgba(96, 165, 250, 0.6);
  color: #fff;
  opacity: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 0 8px rgba(59, 130, 246, 0.5);
}

.copy-code-btn.copied {
  background: linear-gradient(180deg, rgba(52, 211, 153, 0.4) 0%, rgba(52, 211, 153, 0.2) 50%, rgba(16, 185, 129, 0.5) 50%, rgba(16, 185, 129, 0.3) 100%);
  border-color: rgba(52, 211, 153, 0.7);
  color: #fff;
}

code {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.9em;
}

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

.sidebar-cell {
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  padding-right: 2rem;
  width: 250px;
}

.main-cell {
  padding-left: 3rem;
  overflow: hidden;
}

.main-content-wrapper {
  width: 100%;
  overflow: hidden;
  word-wrap: break-word;
}

.grid-table {
  border-collapse: separate;
  border-spacing: 20px;
  margin-top: 2rem;
  width: 100%;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 2.5rem 0;
  font-size: 0.9rem;
  background-color: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  overflow: hidden;
}

th, td {
  padding: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
}

th {
  font-weight: 700;
  color: #fff;
  background-color: rgba(30, 41, 59, 0.8);
  border-bottom: 2px solid rgba(59, 130, 246, 0.5);
}

tr:hover {
  background-color: rgba(255, 255, 255, 0.03);
}

.header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 1.5rem;
  margin-bottom: 4rem;
}

.brand {
  font-size: 1.2rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.meta-info {
  font-size: 0.75rem;
  color: var(--muted-color);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-item {
  margin-bottom: 1rem;
}

.nav-link, .doc-card-link, .brand, .glossy-btn {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.04) 50%, rgba(0, 0, 0, 0.2) 50%, rgba(0, 0, 0, 0.1) 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 2px 4px rgba(0, 0, 0, 0.3);
  border-radius: 6px;
  padding: 8px 16px;
  color: #f1f5f9;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s ease;
  cursor: pointer;
  display: inline-block;
}

.nav-link:hover, .doc-card-link:hover, .glossy-btn:hover {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0.12) 50%, rgba(59, 130, 246, 0.3) 50%, rgba(59, 130, 246, 0.1) 100%);
  border-color: rgba(96, 165, 250, 0.6);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 0 12px rgba(59, 130, 246, 0.4);
}

.nav-link.active {
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.4) 0%, rgba(59, 130, 246, 0.2) 50%, rgba(29, 78, 216, 0.5) 50%, rgba(29, 78, 216, 0.3) 100%);
  border-color: rgba(96, 165, 250, 0.7);
  color: #fff;
  font-weight: 700;
}

.doc-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.7) 0%, rgba(15, 23, 42, 0.8) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1), 0 8px 32px 0 rgba(0, 0, 0, 0.5);
  border-radius: 12px;
  padding: 2.5rem;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  min-height: 250px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.doc-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-color);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.2), 0 12px 40px rgba(59, 130, 246, 0.25);
}

.doc-card-title {
  font-size: 1.8rem;
  margin-top: 0;
  margin-bottom: 1rem;
}

.doc-card-desc {
  font-size: 0.85rem;
  color: #e2e8f0;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.doc-card-link {
  margin-top: auto;
}

.mermaid {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 2rem;
  margin: 2rem 0;
  display: flex;
  justify-content: center;
  align-items: center;
  max-width: 100%;
  overflow-x: auto;
}

.mermaid svg {
  max-width: 100% !important;
  height: auto !important;
  background: transparent !important;
}

.mermaid svg > rect, 
.mermaid svg rect.background, 
.mermaid svg rect.grid-background, 
.mermaid svg .background, 
.mermaid svg rect[fill="#f3f4f6"], 
.mermaid svg rect[fill="#f8f9fa"], 
.mermaid svg rect[fill="#ffffff"] {
  fill: transparent !important;
}

.mermaid g.yaxis-title text, 
.mermaid text.yaxis-title {
  transform: translateX(-12px) !important;
}

/* CSS overrides to force high-contrast legibility inside Mermaid charts */
.mermaid .node rect, 
.mermaid .node polygon, 
.mermaid .node circle, 
.mermaid .node ellipse, 
.mermaid .node path {
  fill: #111827 !important; /* Dark Slate background */
  stroke: #3b82f6 !important; /* Aero blue border */
  stroke-width: 2px !important;
}

.mermaid .node .label, 
.mermaid .node text, 
.mermaid text, 
.mermaid tspan {
  fill: #ffffff !important; /* Clean high-contrast white text */
  color: #ffffff !important;
  font-family: 'Outfit', sans-serif !important;
}

.mermaid .edgePath .path {
  stroke: #60a5fa !important; /* Light blue arrows */
  stroke-width: 2px !important;
}

.mermaid .edgePath .arrowheadPath {
  fill: #60a5fa !important;
  stroke: #60a5fa !important;
}

.mermaid rect.bar {
  fill: #3b82f6 !important; /* Bar colors */
  stroke: #60a5fa !important;
  stroke-width: 1px !important;
}

.mermaid g.xaxis text, 
.mermaid g.yaxis text, 
.mermaid .axis text, 
.mermaid .tick text {
  fill: #ffffff !important;
  color: #ffffff !important;
  font-size: 13px !important;
}

.mermaid g.xaxis path, 
.mermaid g.yaxis path, 
.mermaid .axis path, 
.mermaid .axis line, 
.mermaid .tick line {
  stroke: #475569 !important;
}

.mermaid .pieTitleText {
  fill: #ffffff !important;
  color: #ffffff !important;
  font-size: 18px !important;
  font-weight: 700 !important;
}

.mermaid .legend text {
  fill: #ffffff !important;
  color: #ffffff !important;
}

.mermaid .slice text {
  fill: #ffffff !important;
  color: #ffffff !important;
  font-weight: 600 !important;
}

footer {
  margin-top: 8rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2.5rem;
  font-size: 0.75rem;
  color: var(--muted-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hub-title {
  font-size: 4.5rem;
  line-height: 1.0;
  margin-bottom: 1.5rem;
}

.hub-section-title {
  font-size: 2.2rem;
  margin-top: 4rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding-bottom: 0.5rem;
  color: #fff;
  font-family: var(--font-heading);
}

