:root {
    --oc-green: #4A9D7C;
    --primary-color: #4A9D7C;
    --primary-dark: #3A7D62;
    --primary-light: #6BC4A0;
    --oc-blue: #6B8FBF;
    --oc-dark: #1A1F2E;
    --oc-light: #F5F8F7;
    --light-bg: #F5F8F7;
    --code-bg: #0f1218;
}

/* General Styles */
html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', sans-serif;
    color: var(--oc-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Navbar */
.navbar-oc {
    background: linear-gradient(180deg, #1e2438 0%, var(--oc-dark) 100%);
    border-bottom: 2px solid rgba(74, 157, 124, 0.35);
}

.navbar-oc .navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.3px;
}

.navbar-oc .navbar-brand img {
    height: 36px;
    width: auto;
}

.navbar-oc .nav-link {
    color: #ffffff;
    font-weight: 600;
    letter-spacing: .2px;
    text-shadow: 0 1px 2px rgba(0,0,0,.5);
    position: relative;
    margin: 0 .25rem;
}

.navbar-oc .nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: .25rem;
    width: 0;
    height: 2px;
    background: var(--oc-green);
    transition: width .25s ease;
}

.navbar-oc .nav-link:hover::after,
.navbar-oc .nav-link:focus::after,
.navbar-oc .nav-link.active::after {
    width: 100%;
}

.navbar-oc .nav-link:hover,
.navbar-oc .nav-link:focus {
    color: var(--primary-light);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--oc-dark) 0%, #2a3040 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('/images/grid-pattern.svg') repeat;
    opacity: 0.1;
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.75rem;
    background: rgba(74, 157, 124, 0.2);
    border: 1px solid rgba(74, 157, 124, 0.4);
    border-radius: 999px;
    color: var(--primary-light);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.hero-shape {
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 100px;
    background: var(--oc-light);
    clip-path: polygon(0 100%, 100% 100%, 100% 0);
}

/* Stat Chips */
.stat-chip {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .4rem .65rem;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 999px;
    color: #fff;
    background: rgba(255,255,255,.06);
    backdrop-filter: blur(2px);
    font-size: .85rem;
}

/* Feature Cards */
.feature-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--oc-green);
}

/* Plugin Cards */
.plugin-card {
    background: white;
    border-radius: 10px;
    border-left: 4px solid var(--oc-green);
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.plugin-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,.1);
}

.plugin-card .plugin-icon {
    font-size: 1.5rem;
    color: var(--oc-green);
}

/* Code Panels */
.code-panel {
    background: var(--code-bg);
    border-radius: 12px;
    padding: 1.25rem 1.25rem 1rem;
    border: 1px solid rgba(255,255,255,.08);
    position: relative;
}

.code-panel pre {
    margin: 0;
    max-height: 380px;
    overflow-y: auto;
    overflow-x: hidden;
    color: #e6e6e6;
    background: transparent;
    font-size: .85rem;
    white-space: pre-wrap;
    word-break: break-word;
}

.code-panel code {
    white-space: inherit;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.code-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255,255,255,.1);
}

.code-panel-header span {
    color: rgba(255,255,255,.6);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-copy {
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.15);
    color: rgba(255,255,255,.6);
    border-radius: 6px;
    padding: 0.2rem 0.5rem;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-copy:hover {
    background: rgba(255,255,255,.2);
    color: #fff;
}

/* Architecture Layer Cards */
.arch-layer {
    background: white;
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,.08);
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
    transition: transform 0.2s ease;
}

.arch-layer:hover {
    transform: scale(1.02);
}

.arch-arrow {
    color: var(--oc-green);
    font-size: 1.5rem;
}

/* Tech Badge */
.tech-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.8rem;
    background: rgba(74, 157, 124, 0.1);
    border: 1px solid rgba(74, 157, 124, 0.3);
    border-radius: 8px;
    color: var(--oc-green);
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.tech-badge:hover {
    background: rgba(74, 157, 124, 0.15);
    transform: scale(1.05);
}

/* Step Number */
.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--oc-green), var(--primary-dark));
    color: #fff;
    font-size: 1.25rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--oc-green) 0%, var(--primary-dark) 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('/images/grid-pattern.svg') repeat;
    opacity: 0.08;
}

.cta-section .container {
    position: relative;
    z-index: 1;
}

/* Buttons */
.btn-primary {
    background-color: var(--oc-green);
    border-color: var(--oc-green);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-outline-light:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background-color: var(--oc-green);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
}

/* Doc Cards */
.doc-card {
    background: white;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,.06);
    box-shadow: 0 4px 10px rgba(0,0,0,.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.doc-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,.1);
}

/* AOS fixes */
[data-aos] {
    pointer-events: none;
}

[data-aos].aos-animate {
    pointer-events: auto;
}

/* Focus states */
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem var(--oc-green);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--oc-light);
}

::-webkit-scrollbar-thumb {
    background: var(--oc-green);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section {
        text-align: center;
    }

    .hero-section .btn-group {
        justify-content: center;
    }

    .feature-card {
        margin-bottom: 1rem;
    }

    .hero-section .hero-character {
        max-width: 280px;
        margin: 2rem auto 0;
    }
}

@media (max-width: 480px) {
    .stat-chip {
        font-size: 0.75rem;
        padding: 0.3rem 0.5rem;
    }
}

/* ── Docs Layout ── */
.docs-hero {
    background: linear-gradient(135deg, var(--oc-dark) 0%, #2a3040 100%);
    position: relative;
    overflow: hidden;
}

.docs-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('/images/grid-pattern.svg') repeat;
    opacity: 0.1;
}

.docs-hero .container { position: relative; z-index: 1; }

.docs-breadcrumb a { color: var(--primary-light); text-decoration: none; }
.docs-breadcrumb a:hover { text-decoration: underline; }
.docs-breadcrumb .separator { color: rgba(255,255,255,.4); margin: 0 .35rem; }

/* Sidebar */
.docs-sidebar {
    position: sticky;
    top: 80px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}

.docs-sidebar .nav-link {
    color: #4a5568;
    font-weight: 500;
    padding: .45rem .75rem;
    border-radius: 6px;
    font-size: .9rem;
    display: flex;
    align-items: center;
    gap: .5rem;
    transition: all .15s ease;
}

.docs-sidebar .nav-link:hover { color: var(--oc-green); background: rgba(74,157,124,.06); }
.docs-sidebar .nav-link.active { color: var(--oc-green); background: rgba(74,157,124,.1); font-weight: 600; }

.docs-sidebar .docs-subnav .nav-link {
    font-size: .82rem;
    padding: .3rem .75rem .3rem 2.25rem;
    font-weight: 400;
}

.docs-sidebar .docs-subnav .nav-link.active { font-weight: 600; }

/* Topic Cards */
.topic-card {
    background: white;
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,.06);
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
    padding: 1.25rem;
    text-decoration: none;
    color: inherit;
    transition: transform .2s ease, box-shadow .2s ease;
    display: block;
}

.topic-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,.1);
    color: inherit;
    text-decoration: none;
}

.topic-card .topic-icon { font-size: 1.5rem; color: var(--oc-green); }

/* Doc Content */
.doc-content h2 { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid rgba(0,0,0,.06); }
.doc-content h2:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.doc-content h3 { margin-top: 1.5rem; }

.doc-content .table { font-size: .88rem; }
.doc-content .table thead th { background: var(--oc-light); font-weight: 600; white-space: nowrap; }

.callout {
    border-left: 4px solid var(--oc-green);
    background: rgba(74,157,124,.06);
    border-radius: 0 8px 8px 0;
    padding: 1rem 1.25rem;
    margin: 1rem 0;
}

.callout-warning {
    border-left-color: #e6a817;
    background: rgba(230,168,23,.08);
}

.callout-info {
    border-left-color: var(--oc-blue);
    background: rgba(107,143,191,.08);
}

/* Mobile offcanvas docs sidebar */
.docs-offcanvas .offcanvas-body .nav-link { font-size: 1rem; padding: .55rem .75rem; }
.docs-offcanvas .offcanvas-body .docs-subnav .nav-link { padding-left: 2.25rem; }

/* Syntax highlight tokens */
.code-panel .token-keyword { color: #c586c0; }
.code-panel .token-string { color: #ce9178; }
.code-panel .token-comment { color: #6a9955; }
.code-panel .token-type { color: #4ec9b0; }
.code-panel .token-property { color: #9cdcfe; }
.code-panel .token-value { color: #b5cea8; }

/* ── Blog ── */
.blog-hero {
    background: linear-gradient(135deg, var(--oc-dark) 0%, #2a3040 100%);
    position: relative;
    overflow: hidden;
}

.blog-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('/images/grid-pattern.svg') repeat;
    opacity: 0.1;
}

.blog-hero .container { position: relative; z-index: 1; }

.blog-card-featured {
    background: linear-gradient(135deg, var(--oc-dark) 0%, #2e3a4e 100%);
    border-radius: 12px;
    border: 1px solid rgba(74,157,124,0.25);
    transition: transform .2s ease, box-shadow .2s ease;
}

.blog-card-featured:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,.2);
}

.blog-card {
    background: white;
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,.06);
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
    transition: transform .2s ease, box-shadow .2s ease;
}

.blog-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,.1);
}

.blog-topic-badge {
    display: inline-block;
    font-size: .7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    padding: .25rem .6rem;
    border-radius: 4px;
}

.badge-engineering { background: rgba(74,157,124,.15); color: var(--oc-green); }
.badge-release { background: rgba(107,143,191,.15); color: var(--oc-blue); }
.badge-tutorial { background: rgba(230,168,23,.12); color: #b8860b; }
