/* --- DevCod Documentation Stylesheet --- */
:root {
    --sidebar-width: 280px;
    --topnav-height: 70px;

    /* Next.js Project Variables - Light Mode by Default */
    --bg-base: #ffffff;
    --bg-surface: rgba(0, 0, 0, 0.02);
    --t-1: #0f172a;
    --t-2: #475569;
    --t-3: #64748b;
    --t-4: #94a3b8;
    --b-1: rgba(0, 0, 0, 0.02);
    --b-2: rgba(0, 0, 0, 0.06);
    --b-3: rgba(0, 0, 0, 0.10);
    --b-4: rgba(0, 0, 0, 0.16);
    --p-100: rgba(124, 58, 237, 0.05);
    --p-200: rgba(124, 58, 237, 0.10);
    --p-300: rgba(124, 58, 237, 0.16);
    --p-400: rgba(124, 58, 237, 0.24);
    --p-500: rgba(124, 58, 237, 0.32);
    --p-solid: #7c3aed;
    --p-bright: #8a5cf6;
    --p-ultra: #a78bfa;
    --r-md: 6px;
    --f-body: 'Geist', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-mono: 'Geist Mono', 'JetBrains Mono', monospace;

    /* Variable Aliases (used across docs components) */
    --text-primary: var(--t-1);
    --text-muted: var(--t-2);
    --border-color: var(--b-3);
    --purple-neon: #a855f7;
    --purple-light: #8a5cf6;

    /* Theme Layout Variables */
    --topnav-bg: rgba(255, 255, 255, 0.85);
    --sidebar-bg: rgba(248, 250, 252, 0.65);
}

html[data-theme="dark"] {
    /* Next.js Project Variables - Dark Theme Overrides */
    --bg-base: #0a0a0a;
    --bg-surface: rgba(255, 255, 255, 0.02);
    --t-1: #f5f5f5;
    --t-2: #a3a3a3;
    --t-3: #737373;
    --t-4: #525252;
    --b-1: rgba(255, 255, 255, 0.03);
    --b-2: rgba(255, 255, 255, 0.06);
    --b-3: rgba(255, 255, 255, 0.10);
    --b-4: rgba(255, 255, 255, 0.16);
    --p-100: rgba(139, 92, 246, 0.05);
    --p-200: rgba(139, 92, 246, 0.10);
    --p-300: rgba(139, 92, 246, 0.16);
    --p-400: rgba(139, 92, 246, 0.24);
    --p-500: rgba(139, 92, 246, 0.32);
    --p-solid: #7c3aeddb;
    --p-bright: #8a5cf6d8;
    --p-ultra: #a78bfa;

    /* Variable Aliases */
    --text-primary: var(--t-1);
    --text-muted: var(--t-2);
    --border-color: var(--b-3);
    --purple-neon: #a855f7;
    --purple-light: #8a5cf6;

    /* Theme Layout Variables */
    --topnav-bg: rgba(10, 9, 14, 0.75);
    --sidebar-bg: rgba(4, 4, 6, 0.3);
}

body {
    margin: 0;
    padding: 0;
    background: var(--bg-base);
    color: var(--text-primary);
    font-family: var(--f-body);
    min-height: 100vh;
}

/* --- Layout Structure --- */
.docs-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* --- Top Navigation --- */
.docs-topnav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--topnav-height);
    background: var(--topnav-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 100;
    transition: background 0.3s, border-color 0.3s;
}

.topnav-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: nowrap;
    white-space: nowrap;
}

/* --- Animated Professional Logo Box in Docs (Matches Landing Page) --- */
.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-box {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.logo-box:hover {
    transform: scale(1.02);
}

.logo-box .devcod-icon {
    width: 36px;
    height: 36px;
    transition: filter 0.3s ease, transform 0.3s ease;
    animation: devcodIconMotion 8s infinite ease-in-out;
    border: none !important;
    background: transparent !important;
    outline: none !important;
    flex-shrink: 0;
}

.logo-box .devcod-icon path {
    stroke: var(--purple-neon);
    stroke-width: 16px;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: transparent;
    stroke-dasharray: 4000;
    stroke-dashoffset: 4000;
    animation: devcodPathDraw 8s infinite ease-in-out;
    transition: stroke 0.3s ease;
}

.logo-box:hover .devcod-icon path {
    stroke: var(--cyan-light);
    fill: var(--cyan-light) !important;
}

.logo-box .devcod-logo-name {
    width: 115px;
    height: auto;
    fill: var(--t-1);
    transition: fill 0.3s ease;
    border: none !important;
    background: transparent !important;
    outline: none !important;
    flex-shrink: 0;
}

.logo-slash {
    color: var(--t-3);
    margin: 0 8px 0 10px;
    font-size: 18px;
    font-weight: 300;
    line-height: 1;
}

.logo-docs-text {
    font-size: 17px;
    font-weight: 800;
    color: var(--t-1);
    font-family: var(--f-body);
    letter-spacing: -0.01em;
    margin: 0;
    line-height: 1;
}

.theme-toggle-btn {
    background: var(--bg-surface) !important;
    border: 1px solid var(--b-3) !important;
    color: var(--t-1) !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 8px !important;
    cursor: pointer;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
    flex-shrink: 0;
}

.theme-toggle-btn:hover {
    border-color: var(--p-bright) !important;
    color: var(--p-bright) !important;
    background: var(--p-100) !important;
}

.theme-toggle-btn svg {
    stroke: currentColor !important;
    fill: none !important;
}

.logo-badge {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 600;
    padding: 2px 6px;
    border: 1px solid var(--purple-light);
    color: var(--purple-light);
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* SVG Path Drawing animation replicating React's Framer Motion behavior */
@keyframes devcodPathDraw {
    0%, 100% {
        stroke-dashoffset: 4000;
        fill: transparent;
    }
    18.75% {
        stroke-dashoffset: 0;
        fill: transparent;
    }
    25%, 37.5% {
        stroke-dashoffset: 0;
        fill: var(--purple-light);
    }
    43.75% {
        stroke-dashoffset: 4000;
        fill: transparent;
    }
    56.25% {
        stroke-dashoffset: 0;
        fill: transparent;
    }
    62.5%, 75% {
        stroke-dashoffset: 0;
        fill: var(--purple-light);
    }
    81.25%, 93.75% {
        stroke-dashoffset: 0;
        fill: var(--purple-light);
    }
}

/* SVG Rotation, Zoom, and Blur animation replicating React's Framer Motion behavior */
@keyframes devcodIconMotion {
    0%, 75% {
        transform: rotate(0deg) scale(1);
        filter: drop-shadow(0 0 8px rgba(168, 85, 247, 0.4));
    }
    81.25% {
        transform: rotate(180deg) scale(1.15);
        filter: drop-shadow(0 0 15px rgba(168, 85, 247, 0.75)) blur(3px);
    }
    87.5% {
        transform: rotate(360deg) scale(1);
        filter: drop-shadow(0 0 8px rgba(168, 85, 247, 0.4));
    }
}

.topnav-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* --- Main Layout Wrapper --- */
.docs-main-container {
    display: flex;
    margin-top: var(--topnav-height);
    min-height: calc(100vh - var(--topnav-height));
    width: 100%;
}

/* --- Sidebar --- */
.docs-sidebar {
    width: var(--sidebar-width);
    position: fixed;
    top: var(--topnav-height);
    bottom: 0;
    left: 0;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    padding: 32px 24px;
    overflow-y: auto;
    scrollbar-width: none;
    z-index: 90;
    transition: transform 0.3s ease, background 0.3s, border-color 0.3s;

    transform: translateX(-100%);
    box-shadow: none;
    background: var(--bg-base);
}

.docs-sidebar::-webkit-scrollbar {
    display: none;
}

.sidebar-group {
    margin-bottom: 28px;
}

.sidebar-group-title {
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 12px;
    padding-left: 12px;
}

.sidebar-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.sidebar-link:hover {
    color: var(--text-primary);
    background: rgba(168, 85, 247, 0.05);
}

.sidebar-link.active {
    color: var(--text-primary);
    background: rgba(168, 85, 247, 0.08);
    border-color: rgba(168, 85, 247, 0.25);
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.04);
}

.active-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--purple-neon);
    box-shadow: 0 0 8px var(--purple-neon);
}

/* --- Content Panel --- */
.docs-content-panel {
    flex: 1;
    margin-left: 0;
    padding: 16px 16px 80px 16px;
    display: flex;
    justify-content: center;
    overflow-y: auto;
    transition: margin-left 0.3s ease;
}

.docs-content-wrapper {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    min-height: 500px;
}

/* --- Documentation Typography Styles --- */
.docs-content h1 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.docs-content p.lead {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 32px;
}

.docs-content section {
    margin-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding-bottom: 32px;
}

html:not([data-theme="dark"]) .docs-content section {
    border-bottom-color: rgba(0, 0, 0, 0.06);
}

.docs-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 32px;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.docs-content h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-top: 24px;
    margin-bottom: 12px;
}

.docs-content p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.docs-content ul, .docs-content ol {
    margin-bottom: 20px;
    padding-left: 20px;
}

.docs-content li {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 8px;
}

/* --- Code and Diagrams --- */
.docs-content pre {
    background: rgba(15, 23, 42, 0.5) !important;
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: #e2e8f0;
    margin-bottom: 24px;
    max-width: 100%;
    overflow-x: auto;
}

html:not([data-theme="dark"]) .docs-content pre {
    background: #f1f5f9 !important;
    color: #0f172a !important;
    max-width: 100%;
    overflow-x: auto;
}

/* --- Custom Styled Alerts / Note Boxes --- */
.docs-content .credits-box, .docs-content .diagram-box {
    background: rgba(168, 85, 247, 0.03);
    border: 1px solid rgba(168, 85, 247, 0.15);
    border-radius: 8px;
    padding: 24px;
    margin: 24px 0;
}

.docs-content .credits-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.docs-content .credits-header h3 {
    margin: 0;
    color: var(--purple-light);
}

/* --- Grids and Cards in Docs --- */
.docs-content .links-grid, .docs-content .scoring-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin: 24px 0;
}

.docs-content .link-card, .docs-content .scoring-factor {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.docs-content .link-card:hover {
    border-color: var(--purple-neon);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(168, 85, 247, 0.05);
}

.docs-content .link-icon {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--purple-light);
    margin-bottom: 8px;
}

.docs-content .link-card h3 {
    margin: 0 0 6px 0;
    font-size: 1rem;
    font-weight: 600;
}

.docs-content .link-card p {
    margin: 0;
    font-size: 0.82rem;
    color: var(--text-muted);
}

/* --- Agents list in agentes page --- */
.docs-content .agents-table {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 24px 0;
}

.docs-content .agent-row-link {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 16px 20px;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.docs-content .agent-row-link:hover {
    border-color: var(--purple-neon);
    transform: translateX(4px);
}

.docs-content .agent-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--purple-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #fff;
    font-size: 0.9rem;
}

.docs-content .agent-avatar.nova { background: #10b981; }
.docs-content .agent-avatar.atlas { background: #3b82f6; }
.docs-content .agent-avatar.echo { background: #8b5cf6; }
.docs-content .agent-avatar.cipher { background: #eab308; }
.docs-content .agent-avatar.prime { background: linear-gradient(135deg, #10b981, #8b5cf6); }

.docs-content .agent-info {
    flex: 1;
}

.docs-content .agent-info h3 {
    margin: 0 0 4px 0;
    font-size: 0.95rem;
}

.docs-content .agent-info p {
    margin: 0;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.docs-content .badge-green, .docs-content .badge-blue, .docs-content .badge-purple, .docs-content .badge-yellow, .docs-content .badge-green-glow {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
}

.docs-content .badge-green { border: 1px solid #10b981; color: #10b981; }
.docs-content .badge-blue { border: 1px solid #3b82f6; color: #3b82f6; }
.docs-content .badge-purple { border: 1px solid #8b5cf6; color: #8b5cf6; }
.docs-content .badge-yellow { border: 1px solid #eab308; color: #eab308; }
.docs-content .badge-green-glow { border: 1px solid #10b981; color: #10b981; box-shadow: 0 0 8px rgba(16, 185, 129, 0.3); }

/* --- Mobile Menu Button --- */
.menu-toggle {
    display: block;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    font-size: 1.2rem;
}

/* --- Mobile Responsive Layout --- */




.hidden {
    display: none !important;
}

/* --- Warning Notice Badge --- */
.topnav-center {
    display: none;
    align-items: center;
    justify-content: center;
    flex: 1;
    margin: 0 24px;
}

.warning-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.65rem;
    font-weight: 700;
    color: #ef4444; /* Crimson Red */
    background: transparent;
    border: none;
    padding: 6px 0;
    border-radius: 0;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: none;
    font-family: var(--f-body);
}

html[data-theme="dark"] .warning-badge {
    color: #ef4444;
    background: transparent;
    border: none;
}

.warning-ping {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ef4444;
    position: relative;
    display: inline-block;
}

.warning-ping::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 50%;
    border: 2px solid #ef4444;
    animation: warningPulse 1.8s infinite ease-out;
}

@keyframes warningPulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}



/* --- Mobile Warning Popup --- */
.mobile-warning-popup {
    position: fixed;
    bottom: 24px;
    right: 24px;
    left: 24px;
    z-index: 2000;
    background: rgba(12, 12, 14, 0.95);
    border: 1px solid rgba(239, 68, 68, 0.3); /* Red outline */
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(239, 68, 68, 0.1);
    transform: translateY(150%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: none;
}

/* For light mode, make background light */
html:not([data-theme="dark"]) .mobile-warning-popup {
    background: rgba(255, 255, 255, 0.98);
    border-color: rgba(239, 68, 68, 0.25);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1), 0 0 20px rgba(239, 68, 68, 0.05);
}

.mobile-warning-popup.show {
    display: block;
    transform: translateY(0);
}

.popup-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
}

.popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.popup-header .devcod-icon {
    width: 24px;
    height: 24px;
    animation: devcodIconMotion 8s infinite ease-in-out;
}

.popup-header .devcod-icon path {
    stroke: #ef4444; /* Premium red for warning theme */
    stroke-width: 16px;
    fill: transparent;
}

.popup-close-btn {
    background: none;
    border: none;
    color: var(--t-3);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}

.popup-close-btn:hover {
    color: #ef4444;
}

.popup-text {
    font-family: var(--f-body);
    font-size: 0.75rem;
    font-weight: 700;
    color: #ef4444; /* Crimson red text for warning */
    margin: 0;
    line-height: 1.4;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.popup-progress-container {
    width: 100%;
    height: 3px;
    background: var(--b-2);
    border-radius: 2px;
    overflow: hidden;
}

.popup-progress-bar {
    width: 100%;
    height: 100%;
    background: #ef4444; /* Crimson red progress indicator */
    transition: width 0.05s linear;
}

/* --- Premium Button Styles in Docs --- */
.docs-content .btn-primary, .docs-content .btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none !important;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    font-family: var(--f-body);
}

.docs-content .btn-primary {
    background: var(--p-solid) !important;
    color: #ffffff !important;
    border: 1px solid transparent;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.15);
}

.docs-content .btn-primary:hover {
    background: var(--p-bright) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.3);
}

.docs-content .btn-secondary {
    background: var(--bg-surface) !important;
    border: 1px solid var(--b-3) !important;
    color: var(--t-1) !important;
}

.docs-content .btn-secondary:hover {
    border-color: var(--p-bright) !important;
    color: var(--p-bright) !important;
    transform: translateY(-2px);
    background: rgba(124, 58, 237, 0.05) !important;
}

/* --- Diagram-specific Strict Fixes (Prevents Wrapping in ASCII Art) --- */
.docs-content .diagram-box,
.docs-content .diagram-box pre {
    background: #0d0d12 !important;
    border: 1px solid var(--b-3) !important;
    border-radius: 10px !important;
    padding: 16px !important;
    margin: 20px 0 !important;
    white-space: pre !important;
    word-break: normal !important;
    word-wrap: normal !important;
    overflow-x: auto !important;
    max-width: 100% !important;
    font-family: 'JetBrains Mono', 'Geist Mono', monospace !important;
    font-size: 11px !important;
    line-height: 1.3 !important;
    color: var(--t-1) !important;
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.4);
}

/* --- Cloudflare & Vercel Navigation & Action Bars --- */

/* Breadcrumb Navigation Bar */
.docs-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 0.775rem;
    color: var(--t-3);
    margin-bottom: 12px;
}

.docs-breadcrumbs a {
    color: var(--t-3);
    text-decoration: none;
    transition: color 0.2s ease;
}

.docs-breadcrumbs a:hover {
    color: var(--p-bright);
}

.docs-breadcrumbs .sep {
    color: var(--t-4);
    opacity: 0.5;
}

.docs-breadcrumbs .current-crumb {
    color: var(--t-1);
    font-weight: 600;
}

/* Cloudflare Action Bar Below Title */
.docs-action-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--b-2);
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-surface);
    border: 1px solid var(--b-3);
    color: var(--t-2);
    font-family: var(--f-body);
    font-size: 0.775rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-btn:hover {
    background: rgba(138, 92, 246, 0.08);
    border-color: var(--p-bright);
    color: var(--t-1);
}

.action-btn svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
}

/* Responsive Docs Tables */
.docs-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.85rem;
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--r-md);
    border: 1px solid var(--b-3);
}

.docs-table th, .docs-table td {
    padding: 12px 18px;
    border-bottom: 1px solid var(--b-2);
    text-align: left;
}

.docs-table th {
    background: var(--bg-surface);
    color: var(--t-1);
    font-weight: 700;
}

.docs-table td {
    color: var(--t-2);
}

.docs-table code {
    font-family: var(--font-mono);
    color: var(--p-bright);
    background: rgba(138, 92, 246, 0.08);
    padding: 3px 6px;
    border-radius: 4px;
}

/* Code Boxes & VS Code Syntax Highlighting Theme */
.code-box {
    background: #0d0d12 !important;
    border: 1px solid var(--b-3);
    border-radius: 10px;
    padding: 16px 20px;
    margin: 20px 0;
    overflow-x: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.code-box pre {
    margin: 0;
    font-family: 'JetBrains Mono', 'Geist Mono', monospace;
    font-size: 0.8rem;
    line-height: 1.6;
    color: #d4d4d4;
    white-space: pre;
}

.code-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 10px;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--t-3);
}

.code-copy-btn {
    background: transparent;
    border: 1px solid var(--b-3);
    color: var(--t-3);
    border-radius: 4px;
    padding: 3px 8px;
    font-size: 11px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
}

.code-copy-btn:hover {
    color: var(--t-1);
    border-color: var(--p-bright);
    background: rgba(138, 92, 246, 0.1);
}

/* VS Code Dark Syntax Tokens */
.token-keyword { color: #569cd6 !important; font-weight: 600; }
.token-string { color: #ce9178 !important; }
.token-comment { color: #6a9955 !important; font-style: italic; }
.token-function { color: #dcdcaa !important; }
.token-type { color: #4ec9b0 !important; }
.token-number { color: #b5cea8 !important; }
.token-sql { color: #c586c0 !important; font-weight: 600; }

/* ==========================================================================
   DEVCOD HIGH-END VISUAL FLOWCHART COMPONENT SYSTEM
   ========================================================================== */

.flow-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin: 2rem 0;
  padding: 1rem;
  background: rgba(13, 13, 18, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid var(--b-3);
  border-radius: 14px;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.6), 0 8px 30px rgba(0, 0, 0, 0.3);
  overflow-x: auto;
  max-width: 100%;
}

.flow-grid.horizontal {
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
}

.flow-row {
  display: flex;
  gap: 1.25rem;
  justify-content: center;
  align-items: center;
  width: 100%;
  flex-wrap: wrap;
    flex-direction: column;
}

.flow-node {
  position: relative;
  background: rgba(20, 20, 30, 0.9);
  border: 1px solid var(--b-3);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  min-width: 100%;
  flex: 1;
  max-width: 100%;
  transition: all 0.25s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.flow-node:hover {
  transform: translateY(-3px);
  border-color: var(--p-bright);
  box-shadow: 0 8px 24px rgba(138, 92, 246, 0.25);
}

.flow-node.primary { border-color: rgba(48, 209, 88, 0.4); }
.flow-node.purple { border-color: rgba(168, 85, 247, 0.4); }
.flow-node.blue { border-color: rgba(0, 122, 255, 0.4); }
.flow-node.amber { border-color: rgba(255, 149, 0, 0.4); }
.flow-node.red { border-color: rgba(255, 59, 48, 0.4); }

.flow-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.flow-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.2rem;
}

.flow-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--t-1);
}

.flow-desc {
  font-size: 0.75rem;
  color: var(--t-2);
  line-height: 1.4;
  margin: 0;
}

.flow-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 7px;
  border-radius: 4px;
}

.flow-badge.neon-green { color: #30D158; background: rgba(48, 209, 88, 0.12); border: 1px solid rgba(48, 209, 88, 0.3); }
.flow-badge.neon-purple { color: #a855f7; background: rgba(168, 85, 247, 0.12); border: 1px solid rgba(168, 85, 247, 0.3); }
.flow-badge.neon-blue { color: #007AFF; background: rgba(0, 122, 255, 0.12); border: 1px solid rgba(0, 122, 255, 0.3); }
.flow-badge.neon-amber { color: #FF9500; background: rgba(255, 149, 0, 0.12); border: 1px solid rgba(255, 149, 0, 0.3); }
.flow-badge.neon-red { color: #FF3B30; background: rgba(255, 59, 48, 0.12); border: 1px solid rgba(255, 59, 48, 0.3); }

.flow-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.flow-arrow.vertical {
  height: 24px;
  width: 2px;
  background: linear-gradient(180deg, var(--p-bright), #30D158);
  margin: 0 auto;
}

.flow-arrow.vertical::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: -4px;
  width: 0; height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #30D158;
}

.flow-arrow.horizontal {
  width: 24px;
  height: 2px;
  background: linear-gradient(90deg, var(--p-bright), #30D158);
}

.flow-arrow.horizontal::after {
  content: '';
  position: absolute;
  right: -4px;
  top: -4px;
  width: 0; height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 6px solid #30D158;
}



/* Mobile Responsiveness Improvements (< 768px) */









/* --- Breadcrumbs & Copy Page as Markdown Header (Exact match to screenshot) --- */
.docs-header-meta {
    margin-bottom: 20px;
}

.docs-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-family: var(--font-mono, monospace);
    color: var(--t-3, #8e8e93);
    margin-bottom: 12px;
}

.breadcrumb-item {
    color: var(--t-3, #8e8e93);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-item:hover {
    color: var(--p-bright, #a855f7);
}

.breadcrumb-item.active {
    color: var(--t-1, #ffffff);
    font-weight: 600;
}

.breadcrumb-sep {
    color: var(--t-4, #48484a);
    font-size: 0.8rem;
}

.markdown-action-bar {
    margin-top: 16px;
    margin-bottom: 28px;
}

.copy-markdown-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 16px;
    font-size: 0.82rem;
    font-weight: 500;
    font-family: var(--font-mono, monospace);
    color: var(--t-2, #d1d1d6);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.copy-markdown-btn:hover {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.07);
}

.copy-markdown-btn svg {
    stroke: currentColor;
    opacity: 0.8;
}

/* --- Security & Compliance Badge Grid (Exact match to professional screenshot) --- */
.badge-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin: 24px 0 40px 0;
}

.security-badge-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 20px 22px;
    background: var(--bg-surface, #0d0d12);
    border: 1px solid var(--b-3, rgba(255, 255, 255, 0.08));
    border-radius: 10px;
    transition: all 0.25s ease;
}

.security-badge-card:hover {
    border-color: rgba(168, 85, 247, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.badge-status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    margin-top: 6px;
    flex-shrink: 0;
}

.badge-status-dot.green {
    background: #30D158;
    box-shadow: 0 0 10px rgba(48, 209, 88, 0.6);
}

.badge-info h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--t-1, #ffffff);
    margin: 0 0 6px 0;
    font-family: var(--f-body);
}

.badge-info p {
    font-size: 0.82rem;
    color: var(--t-3, #8e8e93);
    margin: 0;
    line-height: 1.5;
}

.docs-content h2 {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--t-1);
    margin-top: 40px;
    margin-bottom: 20px;
    padding-left: 12px;
    border-left: 3px solid var(--p-bright, #a855f7);
}


/* --- Design System Color Palette & Interactive Component Previews --- */
.color-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin: 24px 0 48px 0;
}

.color-card {
    background: var(--bg-surface, #0d0d12);
    border: 1px solid var(--b-3, rgba(255, 255, 255, 0.08));
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: all 0.2s ease;
}

.color-card:hover {
    border-color: rgba(168, 85, 247, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.color-preview {
    width: 100%;
    height: 72px;
    border-radius: 8px;
    display: block;
}

.color-card h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--t-1, #ffffff);
    margin: 0;
    font-family: var(--f-body);
}

.color-card code {
    font-size: 0.78rem;
    color: var(--t-3, #8e8e93);
    font-family: var(--font-mono, monospace);
    background: rgba(255, 255, 255, 0.04);
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    word-break: break-all;
}

.component-preview-box {
    background: var(--bg-surface, #0d0d12);
    border: 1px solid var(--b-3, rgba(255, 255, 255, 0.08));
    border-radius: 12px;
    padding: 32px;
    margin: 24px 0 32px 0;
}

.preview-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
}

.demo-btn {
    padding: 12px 24px;
    font-size: 0.88rem;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: var(--f-body);
}

.demo-btn.btn-purple {
    background: linear-gradient(135deg, #8a2be2 0%, #a855f7 100%);
    color: #ffffff;
    border: 1px solid rgba(168, 85, 247, 0.5);
    box-shadow: 0 4px 20px rgba(138, 43, 226, 0.35);
}

.demo-btn.btn-purple:hover {
    box-shadow: 0 6px 28px rgba(168, 85, 247, 0.6);
    transform: translateY(-2px);
}

.demo-btn.btn-yellow {
    background: #FFD60A;
    color: #000000;
    border: none;
    box-shadow: 0 0 20px rgba(255, 214, 10, 0.4);
    font-weight: 800;
}

.demo-btn.btn-yellow:hover {
    box-shadow: 0 0 30px rgba(255, 214, 10, 0.7);
    transform: translateY(-2px);
}

.demo-btn.btn-glass {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
}

.demo-btn.btn-glass:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.demo-btn.btn-outline {
    background: transparent;
    color: #a855f7;
    border: 1px solid #a855f7;
}

.demo-btn.btn-outline:hover {
    background: rgba(168, 85, 247, 0.1);
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.3);
    transform: translateY(-2px);
}

.docs-sidebar.open {
    transform: translateX(0);
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.4) !important;
}

/* --- Mobile-First Responsive Breakpoints --- */

/* Tablet (768px and up) */
/* Tablet (768px and up) */
@media (min-width: 768px) {
    .docs-content p, .docs-content li {
        font-size: 0.95rem;
        line-height: 1.75;
    }
    .docs-content-panel {
        padding: 24px 24px 80px 24px;
    }
    
    .docs-topnav {
        padding: 0 24px;
    }
    
    .docs-content .links-grid, .docs-content .scoring-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .color-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    .badge-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    
    .flow-grid {
        padding: 1.75rem;
        gap: 1.5rem;
    }
    .flow-grid.horizontal {
        flex-direction: row;
    }
    .flow-row {
        flex-direction: row;
    }
    .flow-node {
        min-width: 200px;
        max-width: 320px;
    }
}

/* Desktop (992px and up) */
@media (min-width: 992px) {
    .docs-sidebar {
        transform: translateX(0) !important;
        background: var(--sidebar-bg) !important;
        box-shadow: none !important;
    }
    
    .menu-toggle {
        display: none;
    }
    
    .docs-content-panel {
        margin-left: var(--sidebar-width);
        padding: 48px 48px 80px 48px;
    }
    
    .topnav-center {
        display: flex;
    }
    
    .docs-topnav {
        padding: 0 32px;
    }
}

/* Mobile small (max 480px) - scale down logo */
@media (max-width: 480px) {
    .docs-topnav {
        padding: 0 10px;
        height: 56px;
    }
    .topnav-left {
        gap: 6px;
    }
    .logo-box .devcod-icon {
        width: 24px;
        height: 24px;
    }
    .logo-box .devcod-logo-name {
        width: 100px;
        height: 22px;
        margin-left: 4px;
    }
    .logo-slash {
        font-size: 14px;
        margin: 0 4px;
    }
    .logo-docs-text {
        font-size: 14px;
    }
    .theme-toggle-btn {
        width: 32px !important;
        height: 32px !important;
    }
    .docs-content-panel {
        padding: 16px 12px 60px 12px;
    }
    .docs-content h1 {
        font-size: 1.6rem;
    }
}
