:root {
  --bg-color: #FAFAFA;
    --bg-secondary: #FFFFFF;
    --surface-color: rgba(255, 255, 255, 0.7);
    --border-color: rgba(0, 0, 0, 0.08);
    --accent-color: #000000;
    --accent-glow: rgba(0, 0, 0, 0.1);
    --text-primary: #1A1A1A;
    --text-secondary: #6B7280;
    --font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --radius-xl: 32px;
    --radius-lg: 20px;
    --radius-md: 12px;
    --radius-pill: 9999px;
  
    /* Gradient Blobs */
    --blob-1: rgba(147, 197, 253, 0.1);
    --blob-2: rgba(196, 181, 253, 0.1);
    --blob-3: rgba(167, 243, 208, 0.1);
}

[data-theme="dark"] {
  --bg-color: #0A0A0A;
  --bg-secondary: #121212;
  --surface-color: rgba(255, 255, 255, 0.03);
  --border-color: rgba(255, 255, 255, 0.1);
  --accent-color: #FFFFFF;
  --accent-glow: rgba(255, 255, 255, 0.2);
  --text-primary: #F3F4F6;
  --text-secondary: #9CA3AF;

  --blob-1: rgba(59, 130, 246, 0.05);
  --blob-2: rgba(139, 92, 246, 0.05);
  --blob-3: rgba(16, 185, 129, 0.05);
}

body {
  margin: 0;
  background-color: var(--bg-color);
  background-image:
    radial-gradient(circle at 0% 0%, var(--blob-1) 0%, transparent 40%),
      radial-gradient(circle at 100% 0%, var(--blob-2) 0%, transparent 40%),
      radial-gradient(circle at 50% 100%, var(--blob-3) 0%, transparent 40%),
      url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23000' fill-opacity='0.02' fill-rule='evenodd'%3E%3Ccircle cx='3' cy='3' r='1'/%3E%3C/g%3E%3C/svg%3E");
  color: var(--text-primary);
  font-family: var(--font-family);
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s ease, color 0.3s ease;
  min-height: 100vh;
}
[data-theme="dark"] body {
  background-image:
    radial-gradient(circle at 0% 0%, var(--blob-1) 0%, transparent 40%),
      radial-gradient(circle at 100% 0%, var(--blob-2) 0%, transparent 40%),
      radial-gradient(circle at 50% 100%, var(--blob-3) 0%, transparent 40%),
      url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23fff' fill-opacity='0.03' fill-rule='evenodd'%3E%3Ccircle cx='3' cy='3' r='1'/%3E%3C/g%3E%3C/svg%3E");
}

.a2-surface {
  max-width: 900px;
  margin: 2rem auto;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.a2-card {
  background: var(--surface-color);
  backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
    padding: 2rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

.a2-card:hover {
  border-color: var(--accent-glow);
  transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.a2-h1 {
  font-size: 3rem;
  font-weight: 800;
  margin: 0 0 1.5rem 0;
    letter-spacing: -0.04em;
    background: linear-gradient(135deg, var(--text-primary) 0%, #3b82f6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.a2-h2 {
  font-size: 1.75rem;
    font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 1rem 0;
  letter-spacing: -0.02em;
}

.a2-body {
  color: var(--text-secondary);
  line-height: 1.7;
    font-size: 1.05rem;
}

.a2-button {
  padding: 0.75rem 1.75rem;
    border-radius: var(--radius-pill);
    font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.a2-button.primary {
  background: var(--accent-color);
  color: var(--bg-color);
}

.a2-button.primary:hover {
  transform: scale(1.02);
    filter: brightness(0.9);
}

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

.a2-button.secondary:hover {
  background: var(--bg-color);
}

/* Theme Toggle */
.theme-toggle {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
}

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

/* Agent Thinking Animation */
.agent-pulse {
  width: 10px;
    height: 10px;
    background-color: #10b981;
    /* Green for health */
  border-radius: 50%;
  position: relative;
}

.agent-pulse::after {
  content: '';
  position: absolute;
  top: -2px;
  right: -2px;
  bottom: -2px;
  left: -2px;
  border-radius: 50%;
  border: 2px solid #10b981;
  animation: pulse-ring 2s infinite cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes pulse-ring {
  0% {
    transform: scale(1);
    opacity: 1;
  }

  100% {
    transform: scale(2.5);
    opacity: 0;
  }
}

/* Layout Utilities */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 2.5rem;
    background: var(--surface-color);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.status-text {
  font-family: var(--font-mono);
    font-size: 0.8rem;
  color: var(--text-secondary);
}

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

.nav-link:hover {
  color: #3b82f6;
}

/* Doc Layout */
.doc-layout {
  display: flex;
  min-height: 100vh;
  background: var(--bg-color);
}

.doc-sidebar {
  width: 300px;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 50;
    transition: transform 0.3s ease;
  }
  
  .doc-sidebar.closed {
    transform: translateX(-100%);
}

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

.doc-logo {
  font-weight: 800;
    font-size: 1rem;
    color: var(--text-primary);
    text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.doc-nav {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

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

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

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 1rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: all 0.2s;
  margin-bottom: 0.25rem;
}

.nav-item:hover,
.nav-item.active {
  background: var(--bg-color);
    color: var(--text-primary);
}

.nav-item .chevron {
  margin-left: auto;
  opacity: 0;
    transition: opacity 0.2s;
  }
  
  .nav-item:hover .chevron {
  opacity: 0.5;
}

.doc-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.doc-header {
  height: 64px;
    padding: 0 2.5rem;
    display: flex;
    align-items: center;
    background: var(--surface-color);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 40;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

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

.breadcrumb a:hover {
  color: var(--text-primary);
}
.doc-content-wrapper {
  padding: 4rem 6rem;
    max-width: 1000px;
  margin: 0 auto;
  width: 100%;
}

/* Chat Rendering */
.msg-bubble {
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  font-size: 0.9375rem;
}

.user .msg-bubble {
  background: var(--accent-color);
  color: var(--bg-color);
}

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

/* Redacted: Playground styles removed. */


/* Ecosystem Section Styling */
.ecosystem-section {
  padding: 10rem 4rem;
  max-width: 1400px;
  margin: 0 auto;
}

.ecosystem-grid {
  display: flex;
  flex-direction: column;
  gap: 4rem;
}

.ecosystem-card {
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  transition: all 0.4s ease;
}

.ecosystem-card.full-width {
  width: 100%;
}

.glass-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 4rem;
  padding: 4rem;
}

.ecosystem-card.reverse .glass-content {
  grid-template-columns: 1fr 1fr;
}

.text-side {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.accent-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #3b82f6;
  letter-spacing: 0.1em;
}

.text-side h3 {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  margin: 0;
}

.text-side p {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

.accent-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.accent-list li {
  position: relative;
  padding-left: 2rem;
  font-size: 1rem;
  color: var(--text-primary);
}

.accent-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: #3b82f6;
  font-weight: 800;
}

.visual-side {
  position: relative;
}

.ecosystem-img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.1);
  transition: transform 0.5s ease;
}

.ecosystem-card:hover .ecosystem-img {
  transform: scale(1.02);
}

.value-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 1rem;
}

.value-stat h4 {
  font-size: 2rem;
  font-weight: 800;
  margin: 0 0 0.25rem 0;
  color: #3b82f6;
}

.value-stat p {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

@media (max-width: 1024px) {
  .glass-content {
    grid-template-columns: 1fr;
    padding: 3rem 2rem;
    gap: 3rem;
  }

  .ecosystem-card.reverse .glass-content {
    grid-template-rows: auto auto;
  }

  .ecosystem-card.reverse .visual-side {
    order: 2;
  }

  .text-side h3 {
    font-size: 2rem;
  }
}
.parse-error {
  margin: 2rem;
  padding: 1.5rem;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: var(--radius-md);
  color: #ef4444;
}

.parse-error code {
  display: block;
  margin-top: 1rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  background: rgba(0, 0, 0, 0.2);
  padding: 0.5rem;
  border-radius: 4px;
}

/* --- A2UI Component Styles --- */
.a2-image-container {
  margin: 1.5rem 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: var(--bg-color);
}

.a2-image {
  width: 100%;
  height: auto;
  display: block;
}

.a2-caption {
  padding: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-align: center;
  background: var(--surface-color);
    border-top: 1px solid var(--border-color);
}

.a2-list-container {
  margin: 1rem 0;
}

.a2-list-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

.a2-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
    gap: 0.5rem;
  }
.a2-list-item {
  padding: 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
    font-size: 0.95rem;
  color: var(--text-primary);
}

.a2-stat-bar-container {
  margin: 1.5rem 0;
}

.a2-stat-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
  color: var(--text-secondary);
}

.a2-stat-bar-track {
  height: 10px;
  background: var(--border-color);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.a2-stat-bar-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Documentation / Markdown --- */
.markdown-body {
  line-height: 1.8;
  color: var(--text-primary);
}

.markdown-body h1 {
  font-size: 3.5rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 2rem;
  background: linear-gradient(135deg, var(--text-primary) 0%, #3b82f6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.markdown-body h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-top: 3rem;
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}

.markdown-body p {
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  color: var(--text-secondary);
}

.markdown-body pre {
  background: #0D0D0D;
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  overflow-x: auto;
  margin: 2rem 0;
}

.markdown-body code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
    padding: 0.2rem 0.4rem;
  border-radius: 6px;
}

.markdown-body pre code {
  background: transparent;
  padding: 0;
  color: #E5E7EB;
}

/* --- Chat & Agent UI --- */
.agent-pane {
  flex: 1;
  display: flex;
    flex-direction: column;
    background: var(--bg-color);
    border-right: 1px solid var(--border-color);
}

.chat-history {
  flex: 1;
  padding: 2.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.chat-input-area {
  padding: 1.5rem 2.5rem;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  display: flex;
    gap: 1rem;
}

.chat-input-area input {
  flex: 1;
  background: var(--bg-color);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.875rem 1.25rem;
    border-radius: var(--radius-pill);
    outline: none;
    font-size: 0.95rem;
    transition: border-color 0.2s;
  }
                .chat-input-area input:focus {
                  border-color: var(--text-primary);
}

.chat-input-area button {
  background: var(--accent-color);
  color: var(--bg-color);
  border: none;
  padding: 0 1.5rem;
  border-radius: var(--radius-pill);
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.mode-toggle {
  display: flex;
  background: var(--bg-color);
  padding: 4px;
  border-radius: var(--radius-pill);
  gap: 2px;
  border: 1px solid var(--border-color);
}

.mode-toggle button {
  padding: 6px 16px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.mode-toggle button.active {
  background: var(--accent-color);
  color: var(--bg-color);
}

/* --- CrewAI Inspired Documentation Styles --- */

.crew-docs-layout {
  --sidebar-width: 280px;
  --header-height: 64px;
}

.markdown-container .markdown-body {
  font-family: var(--font-family);
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-primary);
}

.markdown-container .markdown-body h1 {
  font-size: 3rem;
  font-weight: 850;
  letter-spacing: -0.04em;
  margin-top: 0;
  margin-bottom: 2rem;
  background: linear-gradient(135deg, var(--text-primary) 30%, var(--primary-color) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.markdown-container .markdown-body h2 {
  font-size: 1.75rem;
  font-weight: 800;
  margin-top: 3.5rem;
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}

.markdown-container .markdown-body h3 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.markdown-container .markdown-body p {
  margin-bottom: 1.5rem;
  opacity: 0.9;
}

.markdown-container .markdown-body ul,
.markdown-container .markdown-body ol {
  margin-bottom: 2rem;
  padding-left: 1.5rem;
}

.markdown-container .markdown-body li {
  margin-bottom: 0.75rem;
}

.markdown-container .markdown-body pre {
  background: #0D0D0D;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 2rem 0;
  overflow-x: auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.markdown-container .markdown-body code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  background: rgba(var(--primary-color-rgb), 0.1);
  color: var(--primary-color);
}

.markdown-container .markdown-body pre code {
  background: transparent;
  padding: 0;
  color: #E5E7EB;
  font-size: 0.85rem;
}

/* Callouts/Alerts simulation */
.markdown-container .markdown-body blockquote {
  margin: 2rem 0;
  padding: 1.5rem;
  background: rgba(var(--primary-color-rgb), 0.03);
  border-left: 4px solid var(--primary-color);
  border-radius: 0 8px 8px 0;
  font-style: normal;
}

.markdown-container .markdown-body blockquote p {
  margin-bottom: 0;
  color: var(--text-primary);
  font-weight: 500;
}

/* Tables */
.markdown-container .markdown-body table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 2rem 0;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
}

.markdown-container .markdown-body th {
  background: rgba(var(--text-primary-rgb), 0.03);
  padding: 1rem;
  text-align: left;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-color);
}

.markdown-container .markdown-body td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.95rem;
}

.markdown-container .markdown-body tr:last-child td {
  border-bottom: none;
}

/* Loading State */
.doc-loading-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding-top: 2rem;
}

.skeleton-title {
  height: 48px;
  width: 60%;
  background: var(--border-color);
  border-radius: 8px;
  animation: pulse 1.5s infinite;
}

.skeleton-line {
  height: 16px;
  width: 100%;
  background: var(--border-color);
  border-radius: 4px;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% {
    opacity: 0.5;
  }

  50% {
    opacity: 0.8;
  }

  100% {
    opacity: 0.5;
  }
}