/* Theme variables scoped to docs only: docs pages must add `class="docs-root"` on <body> */
.docs-root {
    --bg: #0a0a0a;
    --bg-2: #1a1a1a;
    --bg-gradient: linear-gradient(135deg, var(--bg) 0%, var(--bg-2) 50%, var(--bg) 100%);
    --text: #e0e0e0;
    --muted: #b0b0b0;
    --accent: #4CAF50;
    --accent-weak: rgba(76, 175, 80, 0.3);
    --accent-light: #81C784;
    --card-bg: rgba(42, 42, 42, 0.8);
    --card-border: rgba(76, 175, 80, 0.2);
    --focus-ring: rgba(129, 199, 132, 0.18);
}

.docs-root.light-theme {
    --bg: #f6f7f8;
    --bg-2: #eef1f0;
    --bg-gradient: linear-gradient(135deg, var(--bg) 0%, var(--bg-2) 50%, var(--bg) 100%);
    --text: #202225;
    --muted: #4a4a4a;
    --accent: #0f8b2f;
    --accent-weak: rgba(15, 139, 47, 0.12);
    --accent-light: #2e9e48;
    --card-bg: rgba(255, 255, 255, 0.9);
    --card-border: rgba(15, 139, 47, 0.12);
    --focus-ring: rgba(15, 139, 47, 0.18);
}

/* Respect user system preference on first load */
@media (prefers-color-scheme: light) {
    :root:not(.light-theme) {
        /* If user hasn't chosen explicitly, set defaults to light */
    }
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
    line-height: 1.6;
    color: var(--text, #e0e0e0);
    background: var(--bg-gradient, linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #0a0a0a 100%));
    background-attachment: fixed;
}

/* Global link styles: ensure good contrast on dark background and clear focus outlines */
a {
    color: #81C784;
    /* slightly lighter green for good contrast */
    text-decoration: underline dotted rgba(129, 199, 132, 0.25);
    transition: color 0.18s ease, text-decoration-color 0.18s ease, transform 0.18s ease;
}

a:visited {
    color: #66BB6A;
}

a:hover,
a:focus {
    color: #A5D6A7;
    text-decoration-color: rgba(165, 214, 167, 0.6);
    transform: translateY(-1px);
}

a:focus {
    outline: 3px solid rgba(129, 199, 132, 0.18);
    outline-offset: 3px;
    border-radius: 4px;
}

/* Make inline code links readable inside code blocks */
code a {
    color: #C8E6C9;
    text-decoration: underline dotted rgba(200, 230, 201, 0.25);
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle at 20% 80%, rgba(76, 175, 80, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(76, 175, 80, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: rgba(26, 26, 26, 0.9);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    border-bottom: 1px solid rgba(76, 175, 80, 0.3);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    animation: fadeIn 1s ease-out;
}

.logo h1 {
    margin-left: 10px;
    color: var(--accent, #4CAF50);
    text-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: flex-end;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    color: var(--text, #e0e0e0);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: #4CAF50;
    transition: width 0.3s ease;
}

nav ul li a:hover::after {
    width: 100%;
}

nav ul li a:hover {
    color: var(--accent, #4CAF50);
    transform: translateY(-2px);
}

/* Hero section */
.hero {
    padding: 4rem 0;
    min-height: 80vh;
    display: flex;
    align-items: center;
}

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

.hero-text h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--accent);
    background: linear-gradient(45deg, #4CAF50, #81C784);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: slideInLeft 1s ease-out;
}

.hero-text p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: #b0b0b0;
}

.key-benefits {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
}

.benefit {
    background: var(--card-bg, rgba(42, 42, 42, 0.8));
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid var(--accent, #4CAF50);
    flex: 1;
    transition: transform 0.3s ease;
}

.benefit:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.2);
}

.workflow-note {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #b0b0b0;
    font-style: italic;
}

.hero-visual {
    animation: slideInRight 1s ease-out;
}

.cta-button {
    display: inline-block;
    padding: 15px 30px;
    background: linear-gradient(45deg, var(--accent, #4CAF50), var(--accent-light, #66BB6A));
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
    animation: pulse 2s infinite;
}

.cta-button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

/* Features */
.features {
    padding: 4rem 0;
    background: rgba(26, 26, 26, 0.5);
}

.features h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: #4CAF50;
    font-size: 2.5rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.feature {
    text-align: center;
    padding: 2rem;
    background: var(--card-bg, rgba(42, 42, 42, 0.8));
    border-radius: 12px;
    border: 1px solid var(--card-border, rgba(76, 175, 80, 0.2));
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(76, 175, 80, 0.1), transparent);
    transition: left 0.5s ease;
}

.feature:hover::before {
    left: 100%;
}

.feature:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(76, 175, 80, 0.2);
}

.feature h3 {
    margin-top: 1rem;
    color: #4CAF50;
    font-size: 1.3rem;
}

/* Components */
.components {
    padding: 4rem 0;
    background: rgba(10, 10, 10, 0.8);
}

.components h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: #4CAF50;
    font-size: 2.5rem;
}

.component-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.component {
    padding: 2rem;
    background: var(--card-bg, rgba(42, 42, 42, 0.8));
    border-radius: 12px;
    border: 1px solid var(--card-border, rgba(76, 175, 80, 0.2));
    transition: all 0.3s ease;
}

.component:hover {
    transform: rotateY(5deg);
    box-shadow: 0 10px 30px rgba(76, 175, 80, 0.2);
}

.component h3 {
    color: #4CAF50;
    margin-bottom: 1rem;
}

.component code {
    background: rgba(0, 0, 0, 0.5);
    padding: 0.5rem;
    border-radius: 4px;
    display: block;
    margin-top: 1rem;
    font-size: 0.9rem;
}

/* Marketplace */
.marketplace {
    padding: 4rem 0;
    background: rgba(10, 10, 10, 0.8);
}

.marketplace h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #4CAF50;
    font-size: 2.5rem;
}

.marketplace>.container>p {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 1.2rem;
    color: #b0b0b0;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.marketplace-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.marketplace-category {
    background: var(--card-bg, rgba(42, 42, 42, 0.8));
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--card-border, rgba(76, 175, 80, 0.2));
    transition: all 0.3s ease;
}

.marketplace-category:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(76, 175, 80, 0.2);
}

.marketplace-category h3 {
    color: #4CAF50;
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
}

.marketplace-category>p {
    color: #b0b0b0;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.extension-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.extension-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.extension-item:hover {
    background: rgba(76, 175, 80, 0.1);
    transform: translateX(5px);
}

.extension-icon {
    font-size: 1.5rem;
    margin-right: 1rem;
    width: 40px;
    text-align: center;
}

.extension-info {
    flex: 1;
}

.extension-info h4 {
    color: #e0e0e0;
    margin-bottom: 0.25rem;
    font-size: 1rem;
}

.extension-info p {
    color: #b0b0b0;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

.extension-price {
    color: #4CAF50;
    font-weight: bold;
    font-size: 0.9rem;
}

.marketplace-cta {
    text-align: center;
    background: var(--card-bg, rgba(42, 42, 42, 0.8));
    padding: 3rem 2rem;
    border-radius: 12px;
    border: 1px solid var(--card-border, rgba(76, 175, 80, 0.2));
}

.marketplace-cta h3 {
    color: #4CAF50;
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.marketplace-cta>p {
    color: #b0b0b0;
    margin-bottom: 2rem;
    font-size: 1rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.pricing-tiers {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.tier {
    padding: 2rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border: 1px solid rgba(76, 175, 80, 0.1);
    transition: all 0.3s ease;
}

.tier:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.2);
}

.tier.featured {
    border-color: #4CAF50;
    background: rgba(76, 175, 80, 0.1);
    transform: scale(1.05);
}

.tier h4 {
    color: #4CAF50;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.tier>p {
    color: #b0b0b0;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.tier ul {
    list-style: none;
    text-align: left;
}

.tier ul li {
    color: #e0e0e0;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    padding-left: 1rem;
    position: relative;
}

.tier ul li::before {
    content: "✓";
    color: #4CAF50;
    position: absolute;
    left: 0;
}

/* MCP Section */
.mcp-section {
    padding: 4rem 0;
    background: rgba(26, 26, 26, 0.5);
    text-align: center;
}

.mcp-section h2 {
    color: #4CAF50;
    margin-bottom: 1rem;
    font-size: 2.5rem;
}

.mcp-tools {
    margin: 2rem 0;
    text-align: left;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.mcp-tools ul {
    list-style: none;
    padding: 0;
}

.mcp-tools li {
    background: rgba(42, 42, 42, 0.8);
    margin: 0.5rem 0;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #4CAF50;
}

.code-snippet {
    background: rgba(10, 10, 10, 0.8);
    padding: 2rem;
    border-radius: 12px;
    margin-top: 2rem;
    text-align: left;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    border: 1px solid rgba(76, 175, 80, 0.2);
}

code {
    color: #e0e0e0;
    font-family: 'Fira Code', monospace;
}

/* Repository Section */
.repository {
    padding: 4rem 0;
    background: rgba(10, 10, 10, 0.8);
}

.repository h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #4CAF50;
    font-size: 2.5rem;
}

.repo-preview {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    align-items: start;
}

.repo-stats {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.stat {
    background: rgba(42, 42, 42, 0.8);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(76, 175, 80, 0.2);
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #4CAF50;
    display: block;
}

.stat-label {
    font-size: 0.9rem;
    color: #b0b0b0;
}

.repo-ui-placeholder {
    background: rgba(42, 42, 42, 0.8);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid rgba(76, 175, 80, 0.2);
}

.repo-ui-placeholder h3 {
    color: #4CAF50;
    margin-bottom: 1rem;
}

.placeholder-ui {
    margin-top: 1rem;
}

.search-bar {
    background: rgba(0, 0, 0, 0.5);
    padding: 0.5rem;
    border-radius: 5px;
    margin-bottom: 1rem;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.chunk-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.chunk-item {
    background: rgba(76, 175, 80, 0.1);
    padding: 0.5rem;
    border-radius: 5px;
    border-left: 3px solid #4CAF50;
}

/* MCP Efficiency Stats */
.efficiency-stats {
    display: flex;
    justify-content: space-around;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.efficiency-stats .stat {
    flex: 1;
    min-width: 200px;
    margin: 0.5rem;
    text-align: center;
    background: rgba(42, 42, 42, 0.8);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(76, 175, 80, 0.2);
}

/* Workflows Section */
.workflows {
    padding: 4rem 0;
    background: rgba(26, 26, 26, 0.5);
}

.workflows h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: #4CAF50;
    font-size: 2.5rem;
}

.workflow-tabs {
    max-width: 1000px;
    margin: 0 auto;
}

.tab-buttons {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.tab-btn {
    background: rgba(42, 42, 42, 0.8);
    border: 1px solid rgba(76, 175, 80, 0.2);
    color: #e0e0e0;
    padding: 0.75rem 1.5rem;
    margin: 0.25rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.tab-btn:hover,
.tab-btn.active {
    background: #4CAF50;
    color: white;
    transform: translateY(-2px);
}

.tab-content {
    background: rgba(42, 42, 42, 0.8);
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid rgba(76, 175, 80, 0.2);
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

.workflow-steps {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.step {
    background: rgba(0, 0, 0, 0.3);
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #4CAF50;
}

.case-studies {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.case-study {
    background: rgba(0, 0, 0, 0.3);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid rgba(76, 175, 80, 0.2);
}

.case-study h4 {
    color: #4CAF50;
    margin-bottom: 0.5rem;
}

.case-study strong {
    color: #81C784;
}

.llm-generation-note {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border: 1px solid rgba(76, 175, 80, 0.2);
}

.llm-generation-note h4 {
    color: #4CAF50;
    margin-bottom: 1rem;
}

.generation-example {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border: 1px solid rgba(76, 175, 80, 0.2);
}

.generation-example h4 {
    color: #4CAF50;
    margin-bottom: 1rem;
}

.manual-coding-note {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border: 1px solid rgba(76, 175, 80, 0.2);
}

.manual-coding-note h4 {
    color: #4CAF50;
    margin-bottom: 1rem;
}

.manual-coding-note ul {
    list-style: none;
    padding: 0;
}

.manual-coding-note li {
    margin: 0.5rem 0;
    padding-left: 1rem;
    border-left: 3px solid #4CAF50;
}

.manual-coding-note li strong {
    color: #81C784;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-50px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(50px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
    }

    50% {
        box-shadow: 0 4px 25px rgba(76, 175, 80, 0.5);
    }

    100% {
        box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .key-benefits {
        flex-direction: column;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
    }

    nav ul li {
        margin: 10px 0;
    }

    .hero-text h2 {
        font-size: 2rem;
    }

    .repo-preview {
        grid-template-columns: 1fr;
    }

    .efficiency-stats {
        flex-direction: column;
    }

    .tab-buttons {
        flex-direction: column;
        align-items: center;
    }

    .case-studies {
        grid-template-columns: 1fr;
    }
}

/* Footer */
footer {
    background: rgba(10, 10, 10, 0.9);
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid rgba(76, 175, 80, 0.3);
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.footer-links a {
    color: var(--accent, #4CAF50);
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    border: 1px solid transparent;
}

.footer-links a:hover {
    color: var(--accent-light, #81C784);
    transform: scale(1.05);
    background: var(--accent-weak, rgba(76, 175, 80, 0.1));
    border-color: var(--accent, #4CAF50);
}

/* Mobile Footer */
@media (max-width: 768px) {
    .footer-links {
        flex-direction: column;
        align-items: center;
    }

    .footer-links a {
        width: 100%;
        max-width: 200px;
        text-align: center;
    }
}