/* ============================================
   CLAUDE TOOLS DOCUMENTATION - STYLES
   ============================================ */

:root {
    /* Colors */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #f97316;
    --accent: #06b6d4;

    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --bg-hover: #334155;
    --bg-code: #0d1117;

    --text: #b8c4d1;
    --text-muted: #8a9bb0;
    --text-bright: #c8d0dc;

    --border: #334155;
    --border-light: #475569;

    --success: #22c55e;
    --warning: #eab308;
    --error: #ef4444;
    --info: #3b82f6;

    /* Sidebar */
    --sidebar-width: 280px;
    --sidebar-collapsed: 60px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg-dark);
    color: var(--text);
    line-height: 1.7;
    min-height: 100vh;
}

/* ============================================
   LAYOUT
   ============================================ */

.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Unified Global Header */
.global-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    height: 44px;
    display: flex;
    align-items: center;
    padding: 0 1rem;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 1001;
    box-sizing: border-box;
}

.global-header .logo {
    width: 26px;
    height: 26px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.global-header .site-title {
    font-size: 0.95rem;
    font-weight: 600;
    white-space: nowrap;
    color: var(--text-bright);
}

.global-header .version-badge {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    white-space: nowrap;
}

.global-header .header-divider {
    width: 1px;
    height: 24px;
    background: var(--border);
    margin: 0 0.5rem;
}

.global-header .page-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-bright);
    white-space: nowrap;
}

.global-header .breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.global-header .breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.global-header .breadcrumb a:hover {
    color: var(--primary-light);
}

.global-header .breadcrumb-separator {
    color: var(--border-light);
    font-size: 0.65rem;
}

.global-header .breadcrumb-current {
    color: var(--primary-light);
}

.global-header .lang-select {
    background: var(--bg-dark);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    transition: all var(--transition-fast);
    margin-left: 1rem;
}

.global-header .lang-select:hover {
    border-color: var(--primary);
}

.global-header .lang-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.global-header .lang-select option {
    background: var(--bg-dark);
    color: var(--text);
    padding: 0.5rem;
}

/* Header Search */
.header-search {
    position: relative;
    margin-left: auto;
    margin-right: 1rem;
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0 0.5rem;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.search-input-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.search-icon {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-right: 0.5rem;
}

.search-input {
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 0.85rem;
    padding: 0.4rem 0;
    width: 180px;
    outline: none;
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-shortcut {
    background: var(--bg-hover);
    color: var(--text-muted);
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    margin-left: 0.5rem;
    white-space: nowrap;
}

/* Search Results Dropdown */
.search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    min-width: 320px;
    max-height: 400px;
    overflow-y: auto;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    z-index: 1002;
    display: none;
}

.search-results.visible {
    display: block;
}

.search-results-empty {
    padding: 1.5rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.search-result-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: var(--text);
    transition: background var(--transition-fast);
    border-bottom: 1px solid var(--border);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover,
.search-result-item.active {
    background: var(--bg-hover);
}

.search-result-icon {
    width: 28px;
    height: 28px;
    background: var(--bg-card);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.search-result-content {
    flex: 1;
    min-width: 0;
}

.search-result-title {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-bright);
    margin-bottom: 0.15rem;
}

.search-result-title mark {
    background: rgba(99, 102, 241, 0.3);
    color: var(--primary-light);
    padding: 0 0.15rem;
    border-radius: 2px;
}

.search-result-path {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-section {
    font-weight: 400;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.search-result-section mark {
    background: rgba(99, 102, 241, 0.2);
    color: var(--primary-light);
}

.search-result-excerpt {
    font-size: 0.8rem;
    color: var(--text);
    line-height: 1.4;
    margin: 0.35rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-result-excerpt mark {
    background: rgba(245, 158, 11, 0.3);
    color: var(--accent);
    padding: 0 0.1rem;
    border-radius: 2px;
}

/* Search results scrollbar */
.search-results::-webkit-scrollbar {
    width: 6px;
}

.search-results::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

.search-results::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.search-results::-webkit-scrollbar-thumb:hover {
    background: var(--border-light);
}

/* Responsive search */
@media (max-width: 1024px) {
    .header-search {
        display: none;
    }
}

@media (max-width: 768px) {
    .header-search {
        display: none;
    }
}

/* App Body - contains sidebar and main content */
.app-body {
    display: flex;
    flex: 1;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-card);
    position: fixed;
    top: 44px; /* Below global header */
    left: 0;
    height: calc(100vh - 44px);
    overflow-y: auto;
    transition: width var(--transition-normal), transform var(--transition-normal);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    /* Hide scrollbar but keep functionality */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.sidebar::-webkit-scrollbar {
    display: none; /* Chrome/Safari/Opera */
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed);
}

.sidebar.collapsed .nav-text,
.sidebar.collapsed .sidebar-header h2,
.sidebar.collapsed .sidebar-footer,
.sidebar.collapsed .nav-section-title {
    opacity: 0;
    visibility: hidden;
}

/* Legacy sidebar-header styles removed - now using global-header */

/* Sidebar toggle button - fixed position, always visible */
.sidebar-toggle {
    position: fixed;
    top: calc(50% + 22px); /* Centered in sidebar area (below 44px header) */
    left: calc(var(--sidebar-width) - 1px);
    transform: translateY(-50%);
    width: 20px;
    height: 56px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: none;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.75rem;
    transition: left var(--transition-normal), background var(--transition-fast), color var(--transition-fast);
    z-index: 1001;
    padding: 0;
}

.sidebar-toggle:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Move toggle when sidebar is collapsed - use descendant selector since button is inside sidebar */
.sidebar.collapsed .sidebar-toggle {
    left: calc(var(--sidebar-collapsed) - 1px);
}

/* Toggle icon states */
.sidebar-toggle .toggle-icon-collapse,
.sidebar-toggle .toggle-icon-expand {
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-toggle .toggle-icon-expand {
    display: none;
}

.sidebar.collapsed .sidebar-toggle .toggle-icon-collapse {
    display: none;
}

.sidebar.collapsed .sidebar-toggle .toggle-icon-expand {
    display: flex;
}

/* Navigation */
.sidebar-nav {
    flex: 1;
    padding: 0.5rem 0 1rem 0;
    overflow-y: auto;
    /* Hide scrollbar but keep functionality */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.sidebar-nav::-webkit-scrollbar {
    display: none;
}

.nav-section {
    margin-bottom: 1.5rem;
}

.nav-section-title {
    padding: 0.5rem 1.5rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    transition: opacity var(--transition-fast);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1.5rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: all var(--transition-fast);
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: var(--bg-hover);
    color: var(--text);
}

.nav-item.active {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-light);
    border-left-color: var(--primary);
}

.nav-item .icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Nested sub-item (e.g. BA Develop under Business Analyse) */
.nav-item-child {
    padding-left: 2.75rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    position: relative;
}

.nav-item-child::before {
    content: '';
    position: absolute;
    left: 1.75rem;
    top: 50%;
    width: 0.625rem;
    height: 1px;
    background: var(--border-light);
}

.nav-item-child .icon {
    width: 16px;
    height: 16px;
    font-size: 0.85rem;
}

.sidebar.collapsed .nav-item-child {
    padding-left: 1.5rem;
}

.sidebar.collapsed .nav-item-child::before {
    display: none;
}

.nav-text {
    white-space: nowrap;
    transition: opacity var(--transition-fast);
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    transition: opacity var(--transition-fast);
}

.lang-switch {
    display: flex;
    background: var(--bg-dark);
    border-radius: 6px;
    padding: 3px;
}

.lang-btn {
    flex: 1;
    padding: 0.375rem 0.75rem;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 4px;
    transition: all var(--transition-fast);
}

.lang-btn.active {
    background: var(--primary);
    color: white;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: margin-left var(--transition-normal);
    min-height: 100vh;
}

.sidebar.collapsed ~ .main-content {
    margin-left: var(--sidebar-collapsed);
}

/* Legacy page-header styles removed - now using global-header */

/* Content Area */
.content {
    max-width: none;
    width: 100%;
    padding: 2rem 2.5rem;
}

.content-wide {
    max-width: none;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h2 {
    font-size: 1.75rem;
    font-weight: 600;
    margin: 2.5rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-bright);
}

h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 2rem 0 1rem;
    color: var(--primary-light);
}

h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 1.5rem 0 0.75rem;
    color: var(--text);
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-light);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ============================================
   COMPONENTS
   ============================================ */

/* Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
    margin: 1.5rem 0;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all var(--transition-fast);
}

.card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.card-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.card-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.card-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.card-body p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* Tags */
.tag {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tag-command { background: var(--primary); color: white; }
.tag-agent { background: var(--secondary); color: white; }
.tag-workflow { background: var(--success); color: white; }
.tag-best-practice { background: var(--accent); color: var(--bg-dark); }
.tag-warning { background: var(--warning); color: var(--bg-dark); }

/* Code */
code {
    background: var(--bg-code);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: 'Fira Code', 'Cascadia Code', 'JetBrains Mono', monospace;
    font-size: 0.875em;
    color: var(--text-bright);
    border: 1px solid var(--border);
}

/* Code in tables - minimal style (just monospace, no decoration) */
table code,
.table-container code,
td code {
    background: transparent !important;
    color: inherit !important;
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
}

/* Code in alerts - subtle style */
.alert code,
.alert-content code {
    background: rgba(0, 0, 0, 0.3);
    border: none;
    color: #e2e8f0;
    padding: 0.15rem 0.4rem;
}

/* Code in paragraphs - lighter style */
p code {
    background: rgba(30, 41, 59, 0.8);
    border: none;
    color: #93c5fd;
}

pre {
    background: var(--bg-code);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem;
    overflow-x: auto;
    margin: 1rem 0;
    position: relative;
}

pre code {
    background: none !important;
    padding: 0 !important;
    border: none !important;
    color: var(--text);
    font-size: 0.875rem;
    line-height: 1.6;
}

/* Code block container */
.code-block pre code {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
}

/* Code syntax highlighting */
.code-comment {
    color: #6b7280;
    font-style: italic;
}

.code-cmd {
    color: #22d3ee;
    font-weight: 600;
}

.code-arg {
    color: #a78bfa;
}

.code-string {
    color: #4ade80;
}

.code-flag {
    color: #fbbf24;
}

.code-output {
    color: #64748b;
    font-style: italic;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-hover);
    padding: 0.5rem 1rem;
    border-radius: 8px 8px 0 0;
    margin: 1rem 0 0;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.code-header + pre {
    margin-top: 0;
    border-radius: 0 0 8px 8px;
}

.copy-btn {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.copy-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Alerts */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    border-left: 4px solid;
    display: flex;
    gap: 0.75rem;
}

.alert-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.alert-content h5 {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.alert-content p {
    margin: 0;
    font-size: 0.9rem;
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--info);
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    border-color: var(--success);
}

.alert-warning {
    background: rgba(234, 179, 8, 0.1);
    border-color: var(--warning);
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--error);
}

/* Tables */
.table-container {
    overflow-x: auto;
    margin: 1.5rem 0;
    border: 1px solid var(--border);
    border-radius: 8px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 0.875rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    background: var(--bg-hover);
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: rgba(99, 102, 241, 0.05);
}

/* Workflow Diagram */
.workflow-diagram {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    overflow-x: auto;
}

.workflow-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.workflow-step {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.workflow-arrow {
    color: var(--text-muted);
    font-size: 1.5rem;
    padding: 0 0.25rem;
}

/* Best Practice Box */
.best-practice {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.1) 0%, rgba(99, 102, 241, 0.1) 100%);
    border: 1px solid var(--accent);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.best-practice-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-weight: 600;
    color: var(--accent);
}

.best-practice ul {
    margin: 0;
    padding-left: 1.5rem;
}

.best-practice li {
    margin-bottom: 0.5rem;
    color: var(--text);
}

/* Steps List */
.steps-list {
    counter-reset: step;
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.steps-list li {
    counter-increment: step;
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.steps-list li::before {
    content: counter(step);
    width: 32px;
    height: 32px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.step-content h5 {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.step-content p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Feature Grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--bg-card);
    border-radius: 8px;
}

.feature-icon {
    width: 24px;
    height: 24px;
    color: var(--success);
    flex-shrink: 0;
}

.feature-text {
    font-size: 0.9rem;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .mobile-menu-btn {
        display: flex;
    }

    /* Global header responsive */
    .global-header .site-title,
    .global-header .version-badge,
    .global-header .header-divider {
        display: none;
    }
}

@media (max-width: 768px) {
    .global-header {
        padding: 0 0.75rem;
        gap: 0.5rem;
    }

    .global-header .page-title {
        font-size: 0.85rem;
    }

    .global-header .breadcrumb {
        display: none;
    }

    .content {
        padding: 1.5rem 1rem;
    }

    .workflow-steps {
        flex-direction: column;
    }

    .workflow-arrow {
        transform: rotate(90deg);
    }

    .card-grid {
        grid-template-columns: 1fr;
    }
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 56px;
    height: 56px;
    background: var(--primary);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 999;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

@media (max-width: 1024px) {
    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Overlay */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.overlay.active {
    display: block;
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.3s ease forwards;
}

/* Bilingual content - hide inactive language, show active with original display */
[data-lang="en"] { display: none !important; }

body.lang-en [data-lang="en"] { display: revert !important; }
body.lang-en [data-lang="fr"] { display: none !important; }

/* ============================================
   COMMAND CARDS & PROMPTS
   ============================================ */

.command-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin: 1.5rem 0;
    overflow: hidden;
}

.command-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--bg-hover);
    border-bottom: 1px solid var(--border);
}

.command-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-light);
    background: var(--bg-code);
    padding: 0.35rem 0.75rem;
}

.command-body {
    padding: 1.25rem;
}

.command-body > p {
    margin-bottom: 1rem;
}

/* Lists in command body */
.command-body ul,
.command-body ol {
    margin: 1rem 0;
    padding-left: 1.75rem;
}

.command-body ul {
    list-style-type: disc;
}

.command-body ol {
    list-style-type: decimal;
}

.command-body li {
    margin-bottom: 0.5rem;
    color: var(--text);
    line-height: 1.6;
}

.command-body li::marker {
    color: var(--primary-light);
}

/* Badges (for command cards) */
.badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* Workflow colors: WHAT (Blue), HOW (Teal), DOC (Purple) */
.badge-blue {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-teal {
    background: rgba(13, 148, 136, 0.15);
    color: #2dd4bf;
    border: 1px solid rgba(13, 148, 136, 0.3);
}

.badge-purple {
    background: rgba(139, 92, 246, 0.15);
    color: #a78bfa;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

/* Additional badge variants */
.badge-pink {
    background: rgba(236, 72, 153, 0.15);
    color: #f472b6;
    border: 1px solid rgba(236, 72, 153, 0.3);
}

.badge-green {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.badge-orange {
    background: rgba(249, 115, 22, 0.15);
    color: #fb923c;
    border: 1px solid rgba(249, 115, 22, 0.3);
}

.badge-red {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-yellow {
    background: rgba(234, 179, 8, 0.15);
    color: #facc15;
    border: 1px solid rgba(234, 179, 8, 0.3);
}

/* Prompt Details (Collapsible) */
.prompt-details {
    margin-top: 1.25rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.prompt-details summary {
    display: flex;
    align-items: center;
    padding: 0.875rem 1rem;
    background: var(--bg-hover);
    cursor: pointer;
    font-weight: 500;
    color: var(--text-muted);
    transition: all var(--transition-fast);
    list-style: none;
}

.prompt-details summary::-webkit-details-marker {
    display: none;
}

.prompt-details summary::before {
    content: '▶';
    margin-right: 0.75rem;
    font-size: 0.75rem;
    transition: transform var(--transition-fast);
}

.prompt-details[open] summary::before {
    transform: rotate(90deg);
}

.prompt-details summary:hover {
    color: var(--text);
    background: var(--bg-card);
}

.prompt-content {
    background: var(--bg-code);
    border-top: 1px solid var(--border);
}

.prompt-content pre {
    margin: 0;
    border: none;
    border-radius: 0;
    max-height: 500px;
    overflow-y: auto;
}

.prompt-content pre code {
    font-size: 0.8rem;
    line-height: 1.5;
}

/* Danger Tag */
.tag-danger {
    background: var(--error);
    color: white;
}

/* Code block with position */
.code-block {
    position: relative;
    margin: 1rem 0;
}

.code-block pre {
    padding-right: 4.5rem; /* Space for copy button */
}

.code-block .copy-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 10;
    background: var(--bg-hover);
    border: 1px solid var(--border-light);
    opacity: 0.8;
    transition: opacity var(--transition-fast), background var(--transition-fast);
}

.code-block:hover .copy-btn {
    opacity: 1;
}

.code-block .copy-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    opacity: 1;
}

/* Best Practice improvements */
.best-practice h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-bright);
}

.bp-icon {
    font-size: 1.25rem;
}

/* Table inside commands */
.command-body .table-container {
    margin: 1rem 0;
}

/* ============================================
   SIDEBAR PAGE TOC (Sub-navigation)
   ============================================ */

.nav-item-with-toc {
    flex-direction: column;
    align-items: stretch;
}

.nav-item-with-toc > a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1.5rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: all var(--transition-fast);
    border-left: 3px solid transparent;
}

.nav-item-with-toc > a:hover {
    background: var(--bg-hover);
    color: var(--text);
}

.nav-item-with-toc > a.active {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-light);
    border-left-color: var(--primary);
}

/* Sidebar TOC submenu */
.sidebar-toc {
    display: none;
    flex-direction: column;
    padding: 0.5rem 0 0.5rem 2.5rem;
    background: rgba(0, 0, 0, 0.15);
    border-left: 3px solid var(--primary);
    margin-left: 0;
}

.sidebar-toc.open {
    display: flex;
}

.sidebar-toc-link {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-decoration: none;
    padding: 0.375rem 0.75rem;
    border-radius: 4px;
    transition: all var(--transition-fast);
    position: relative;
}

.sidebar-toc-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    background: var(--border-light);
    border-radius: 50%;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.sidebar-toc-link:hover {
    color: var(--text);
    background: var(--bg-hover);
}

.sidebar-toc-link:hover::before {
    opacity: 1;
}

.sidebar-toc-link.active {
    color: var(--primary-light);
    background: rgba(99, 102, 241, 0.15);
}

.sidebar-toc-link.active::before {
    opacity: 1;
    background: var(--primary);
    width: 6px;
    height: 6px;
}

/* TOC toggle button */
.toc-toggle {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    font-size: 0.7rem;
    transition: transform var(--transition-fast);
}

.toc-toggle.open {
    transform: rotate(90deg);
}

/* Hide sidebar TOC when sidebar is collapsed */
.sidebar.collapsed .sidebar-toc {
    display: none !important;
}

.sidebar.collapsed .toc-toggle {
    display: none;
}

/* Full width content (no inline TOC) */
.content-full {
    max-width: none;
    width: 100%;
    padding: 2rem 2.5rem;
}

@media (max-width: 768px) {
    .content-full {
        padding: 1.5rem 1rem;
    }
}

/* Wide content (no TOC) */
.content-wide {
    max-width: none;
    width: 100%;
    padding: 2rem 2.5rem;
}

/* ============================================
   SVG DIAGRAMS
   ============================================ */

.svg-diagram {
    background: transparent;
    border: none;
    padding: 1rem 0;
    margin: 2rem 0;
    overflow-x: auto;
    display: flex;
    justify-content: center;
}

.svg-diagram svg {
    max-width: min(1000px, 100%);
    width: 100%;
    height: auto;
}

/* GitFlow branch colors */
.branch-main { fill: #ef4444; }
.branch-develop { fill: #f97316; }
.branch-feature { fill: #22c55e; }
.branch-release { fill: #eab308; }
.branch-hotfix { fill: #ec4899; }

.branch-line-main { stroke: #ef4444; }
.branch-line-develop { stroke: #f97316; }
.branch-line-feature { stroke: #22c55e; }
.branch-line-release { stroke: #eab308; }
.branch-line-hotfix { stroke: #ec4899; }

/* Diagram legend */
.diagram-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 50%;
}

.legend-color.main { background: #ef4444; }
.legend-color.develop { background: #f97316; }
.legend-color.feature { background: #22c55e; }
.legend-color.release { background: #eab308; }
.legend-color.hotfix { background: #ec4899; }

/* EF Core structure diagram */
.efcore-structure {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Interactive diagram hover */
.svg-diagram svg g[data-tooltip]:hover {
    cursor: pointer;
    filter: brightness(1.2);
}

/* Tooltip for SVG */
.svg-tooltip {
    position: absolute;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    color: var(--text);
    pointer-events: none;
    z-index: 1000;
    max-width: 250px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Responsive adjustments for diagrams */
@media (max-width: 768px) {
    .svg-diagram {
        padding: 1rem;
    }

    .diagram-legend {
        gap: 1rem;
    }

    .legend-item {
        font-size: 0.75rem;
    }
}

/* ============================================
   INTERACTIVE DIAGRAM TOOLTIP
   ============================================ */

.svg-diagram {
    position: relative;
    flex-direction: column;
    align-items: center;
}

.diagram-hint {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 6px;
    border: 1px dashed var(--primary);
}

/* Clickable SVG elements */
.clickable-element {
    cursor: pointer;
    transition: filter 0.2s ease, opacity 0.2s ease;
}

.clickable-element:hover {
    filter: url(#highlight) brightness(1.15);
}

.clickable-element.active {
    filter: url(#highlight) brightness(1.25);
}

.clickable-element .hit-area {
    pointer-events: all;
}

/* Diagram tooltip */
.diagram-tooltip {
    position: absolute;
    background: var(--bg-dark);
    border: 1px solid var(--primary);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    max-width: 350px;
    min-width: 250px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(99, 102, 241, 0.2);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}

.diagram-tooltip.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.diagram-tooltip .tooltip-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--primary-light);
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.diagram-tooltip .tooltip-desc {
    font-size: 0.85rem;
    color: var(--text);
    line-height: 1.6;
}

.diagram-tooltip .tooltip-cmd {
    display: inline-block;
    background: var(--bg-code);
    color: var(--secondary);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-family: 'Fira Code', 'Cascadia Code', monospace;
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

/* Close hint for tooltip */
.diagram-tooltip::after {
    content: 'Cliquez ailleurs pour fermer';
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
}

body.lang-en .diagram-tooltip::after {
    content: 'Click outside to close';
}

/* Responsive tooltip */
@media (max-width: 768px) {
    .diagram-tooltip {
        max-width: 280px;
        min-width: 200px;
        padding: 0.875rem 1rem;
    }

    .diagram-tooltip .tooltip-title {
        font-size: 0.9rem;
    }

    .diagram-tooltip .tooltip-desc {
        font-size: 0.8rem;
    }
}

/* ============================================
   WORKFLOW STEPPER (Visual Steps)
   ============================================ */

.workflow-stepper {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1.5rem 0;
    padding: 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.workflow-stepper-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.step-number {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.75rem;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.step-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
}

.step-arrow {
    color: var(--text-muted);
    font-size: 1rem;
    margin: 0 0.25rem;
    opacity: 0.5;
}

/* Workflow Stepper Vertical (for longer workflows) */
.workflow-stepper-vertical {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
    margin: 1.5rem 0;
    padding: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.workflow-stepper-vertical .step-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-dark);
    border-radius: 8px;
    border: 1px solid var(--border);
    transition: all var(--transition-fast);
}

.workflow-stepper-vertical .step-item:hover {
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}

.workflow-stepper-vertical .step-number {
    width: 32px;
    height: 32px;
    font-size: 0.85rem;
}

.workflow-stepper-vertical .step-content {
    flex: 1;
    min-width: 0;
}

.workflow-stepper-vertical .step-title {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-bright);
    margin-bottom: 0.15rem;
}

.workflow-stepper-vertical .step-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Workflow Colors by type */
.step-number.step-validate { background: linear-gradient(135deg, var(--info) 0%, #1d4ed8 100%); }
.step-number.step-analyze { background: linear-gradient(135deg, var(--accent) 0%, #0891b2 100%); }
.step-number.step-detect { background: linear-gradient(135deg, var(--success) 0%, #15803d 100%); }
.step-number.step-search { background: linear-gradient(135deg, var(--warning) 0%, #ca8a04 100%); }
.step-number.step-decision { background: linear-gradient(135deg, var(--secondary) 0%, #c2410c 100%); }
.step-number.step-input { background: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%); }
.step-number.step-generate { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); }
.step-number.step-create { background: linear-gradient(135deg, var(--success) 0%, #15803d 100%); }
.step-number.step-confirm { background: linear-gradient(135deg, var(--accent) 0%, #0891b2 100%); }

/* Responsive */
@media (max-width: 768px) {
    .workflow-stepper {
        flex-direction: column;
        gap: 0.75rem;
    }

    .workflow-stepper-item {
        width: 100%;
    }

    .step-arrow {
        display: none;
    }

    .workflow-stepper-vertical {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   TEMPLATE SECTIONS (Collapsible)
   ============================================ */

.template-section {
    margin-top: 1.5rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-dark);
    overflow: hidden;
}

.template-section summary {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    cursor: pointer;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(249, 115, 22, 0.1) 100%);
    border-bottom: 1px solid transparent;
    transition: all var(--transition-fast);
}

.template-section summary:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(249, 115, 22, 0.15) 100%);
}

.template-section[open] summary {
    border-bottom-color: var(--border);
}

.template-section summary::marker,
.template-section summary::-webkit-details-marker {
    display: none;
}

.template-section summary::before {
    content: '\25B6';
    font-size: 0.7rem;
    color: var(--primary);
    transition: transform var(--transition-fast);
}

.template-section[open] summary::before {
    transform: rotate(90deg);
}

.template-section summary h4 {
    font-size: 0.95rem;
    color: var(--text-bright);
    font-weight: 600;
}

.template-badge {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-weight: 500;
}

.template-content {
    padding: 1rem 1.25rem;
}

.template-path {
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.template-path code {
    background: var(--bg-hover);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
}

.template-code {
    max-height: 500px;
    overflow-y: auto;
}

.template-code pre {
    font-size: 0.8rem !important;
    line-height: 1.5 !important;
}

.template-code code {
    white-space: pre-wrap;
    word-break: break-word;
}

/* ============================================
   COPYABLE COMMAND BLOCKS
   ============================================ */

.cmd-copy {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-code);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    margin: 0.25rem 0;
    font-family: 'Fira Code', 'Cascadia Code', 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    color: var(--secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
}

.cmd-copy:hover {
    border-color: var(--primary);
    background: var(--bg-hover);
}

.cmd-copy::after {
    content: '📋';
    font-size: 0.75rem;
    opacity: 0;
    transition: opacity var(--transition-fast);
    margin-left: 0.5rem;
}

.cmd-copy:hover::after {
    opacity: 0.7;
}

.cmd-copy.copied {
    border-color: var(--success);
    background: rgba(34, 197, 94, 0.1);
}

.cmd-copy.copied::after {
    content: '✓';
    opacity: 1;
    color: var(--success);
}

/* Block variant for standalone commands */
.cmd-copy-block {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-code);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin: 0.75rem 0;
    font-family: 'Fira Code', 'Cascadia Code', 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: var(--secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.cmd-copy-block:hover {
    border-color: var(--primary);
    background: var(--bg-hover);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.15);
}

.cmd-copy-block .cmd-text {
    flex: 1;
    user-select: all;
}

.cmd-copy-block .cmd-copy-btn {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 0.35rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
    margin-left: 1rem;
}

.cmd-copy-block .cmd-copy-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.cmd-copy-block.copied {
    border-color: var(--success);
}

.cmd-copy-block.copied .cmd-copy-btn {
    background: var(--success);
    color: white;
    border-color: var(--success);
}

/* Table cell variant */
td .cmd-copy {
    display: flex;
    margin: 0;
}

/* Step content variant */
.step-content .cmd-copy-block {
    margin-top: 0.5rem;
}

/* ============================================
   FILE LINKS (clickable file paths)
   ============================================ */

.file-link {
    color: var(--accent);
    text-decoration: none;
    transition: all var(--transition-fast);
    border-bottom: 1px dotted var(--accent);
}

.file-link:hover {
    color: var(--primary-light);
    border-bottom-color: var(--primary-light);
    text-decoration: none;
}

.file-link code {
    color: inherit;
    background: transparent;
}

/* File links in code blocks */
pre .file-link {
    border-bottom: none;
}

pre .file-link:hover {
    text-decoration: underline;
}

/* ============================================
   HOME PAGE - HERO & ECOSYSTEM
   ============================================ */

.hero-section {
    margin-bottom: 2.5rem;
    padding: 2rem 0;
}

.hero-tagline {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-bright);
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.hero-tagline .highlight {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.05rem;
    color: var(--text-muted);
    line-height: 1.7;
    max-width: 720px;
    margin-bottom: 0;
}

/* Ecosystem diagram */
.ecosystem-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 2rem 0;
}

.ecosystem-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.25rem;
    text-align: center;
    transition: all var(--transition-fast);
    position: relative;
}

.ecosystem-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.ecosystem-card .eco-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 0.75rem;
}

.ecosystem-card .eco-icon.eco-app {
    background: linear-gradient(135deg, #ef4444 0%, #f97316 100%);
}

.ecosystem-card .eco-icon.eco-cli {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
}

.ecosystem-card .eco-icon.eco-mcp {
    background: linear-gradient(135deg, var(--success) 0%, #0d9488 100%);
}

.ecosystem-card .eco-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-bright);
    margin-bottom: 0.25rem;
}

.ecosystem-card .eco-role {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Ecosystem connectors (arrows between cards) */
.ecosystem-connector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin: -0.5rem 0;
    color: var(--text-muted);
    font-size: 0.75rem;
}

.ecosystem-connector .arrow {
    color: var(--primary-light);
    font-size: 1.25rem;
}

/* Stats bar */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin: 1.5rem 0 2rem;
}

.stat-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.25rem 1rem;
    text-align: center;
    transition: all var(--transition-fast);
}

.stat-item:hover {
    border-color: var(--primary);
}

.stat-number {
    font-size: 1.75rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

@media (max-width: 768px) {
    .ecosystem-grid {
        grid-template-columns: 1fr;
    }

    .stats-bar {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-tagline {
        font-size: 1.25rem;
    }
}
