/* ==========================================================================
   loci Documentation Hub Stylesheet
   Matches the Dark Glassmorphic Design System of loci Landing Page
   ========================================================================== */

:root {
    --bg-dark: #090d16;
    --bg-card: rgba(15, 23, 42, 0.75);
    --bg-card-hover: rgba(30, 41, 59, 0.85);
    --border-color: rgba(255, 255, 255, 0.1);
    --border-glow: rgba(99, 102, 241, 0.3);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --accent-indigo: #6366f1;
    --accent-indigo-light: #818cf8;
    --accent-cyan: #06b6d4;
    --accent-emerald: #10b981;
    --accent-amber: #f59e0b;
    --accent-rose: #f43f5e;
    
    --sidebar-width: 280px;
    --header-height: 70px;
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Background Blobs */
.glow-blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.15;
    pointer-events: none;
    z-index: 0;
}

.bg-blob-1 {
    top: -100px;
    left: -100px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--accent-indigo), transparent);
}

.bg-blob-2 {
    bottom: -100px;
    right: -100px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-cyan), transparent);
}

/* Header Navbar */
.docs-header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-height);
    background: rgba(9, 13, 22, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
}

.docs-header-container {
    max-width: 1440px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}

.docs-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.docs-logo {
    width: 32px;
    height: 32px;
}

.docs-brand-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.35rem;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.docs-badge {
    font-size: 0.72rem;
    padding: 2px 8px;
    border-radius: 12px;
    background: rgba(99, 102, 241, 0.2);
    color: var(--accent-indigo-light);
    border: 1px solid rgba(99, 102, 241, 0.3);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.docs-search-bar {
    position: relative;
    width: 320px;
}

.docs-search-input {
    width: 100%;
    padding: 8px 16px 8px 38px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 0.88rem;
    outline: none;
    transition: all 0.2s ease;
}

.docs-search-input:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent-indigo);
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.25);
}

.docs-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.9rem;
    pointer-events: none;
}

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

.docs-header-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.docs-header-link:hover {
    color: var(--text-primary);
}

.btn-chrome {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-chrome:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

/* Mobile Sidebar Toggle */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.4rem;
    cursor: pointer;
}

/* Main Layout Grid */
.docs-layout {
    display: flex;
    max-width: 1440px;
    margin: 0 auto;
    min-height: calc(100vh - var(--header-height));
    position: relative;
    z-index: 1;
}

/* Sidebar Navigation */
.docs-sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
    border-right: 1px solid var(--border-color);
    padding: 28px 16px 40px 24px;
    position: sticky;
    top: var(--header-height);
    height: calc(100vh - var(--header-height));
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

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

.sidebar-group-title {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 10px;
    padding-left: 12px;
}

.sidebar-nav-list {
    list-style: none;
}

.sidebar-nav-item {
    margin-bottom: 3px;
}

.sidebar-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.15s ease;
}

.sidebar-nav-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
}

.sidebar-nav-link.active {
    color: #ffffff;
    background: rgba(99, 102, 241, 0.18);
    border: 1px solid rgba(99, 102, 241, 0.3);
    font-weight: 600;
}

.sidebar-icon {
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

/* Documentation Content Area */
.docs-content {
    flex: 1;
    min-width: 0;
    padding: 40px 48px 80px 48px;
    max-width: 960px;
}

.docs-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

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

.docs-breadcrumb a:hover {
    color: var(--accent-indigo-light);
}

.docs-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.docs-lead {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
    line-height: 1.7;
}

/* Typography & Headings inside Articles */
.docs-body h2 {
    font-family: var(--font-heading);
    font-size: 1.65rem;
    font-weight: 700;
    margin: 40px 0 16px 0;
    color: var(--text-primary);
    letter-spacing: -0.01em;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
    scroll-margin-top: calc(var(--header-height) + 20px);
}

.docs-body h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    margin: 28px 0 12px 0;
    color: var(--accent-indigo-light);
    scroll-margin-top: calc(var(--header-height) + 20px);
}

.docs-body p {
    margin-bottom: 16px;
    color: var(--text-secondary);
    font-size: 0.98rem;
}

.docs-body ul, .docs-body ol {
    margin: 0 0 20px 24px;
    color: var(--text-secondary);
}

.docs-body li {
    margin-bottom: 8px;
}

.docs-body strong {
    color: var(--text-primary);
}

/* Alert Boxes / Callouts */
.docs-alert {
    padding: 16px 20px;
    border-radius: 12px;
    margin: 24px 0;
    display: flex;
    gap: 14px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
}

.docs-alert-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
}

.docs-alert-content {
    font-size: 0.92rem;
}

.docs-alert-content strong {
    display: block;
    margin-bottom: 4px;
    font-size: 0.95rem;
}

.docs-alert-tip {
    border-color: rgba(16, 185, 129, 0.3);
    background: rgba(16, 185, 129, 0.08);
}
.docs-alert-tip strong { color: var(--accent-emerald); }

.docs-alert-info {
    border-color: rgba(99, 102, 241, 0.3);
    background: rgba(99, 102, 241, 0.08);
}
.docs-alert-info strong { color: var(--accent-indigo-light); }

.docs-alert-warning {
    border-color: rgba(245, 158, 11, 0.3);
    background: rgba(245, 158, 11, 0.08);
}
.docs-alert-warning strong { color: var(--accent-amber); }

/* Code Blocks & Inline Code */
code {
    font-family: var(--font-mono);
    font-size: 0.86rem;
    background: rgba(255, 255, 255, 0.07);
    padding: 2px 6px;
    border-radius: 4px;
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.code-block-wrapper {
    position: relative;
    margin: 24px 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: #0d1322;
}

.code-block-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--border-color);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-muted);
}

.code-block-content {
    padding: 16px;
    overflow-x: auto;
}

.code-block-content code {
    background: none;
    border: none;
    padding: 0;
    font-size: 0.88rem;
    line-height: 1.6;
    color: #cbd5e1;
}

.btn-copy-code {
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: var(--text-secondary);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-copy-code:hover {
    background: var(--accent-indigo);
    color: white;
}

/* Feature Key Badges */
.kbd {
    display: inline-block;
    padding: 3px 7px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1;
    color: #f1f5f9;
    background-color: #1e293b;
    border: 1px solid #475569;
    border-radius: 6px;
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.2);
}

/* Feature Grid Cards */
.docs-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin: 28px 0;
}

.docs-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    text-decoration: none;
    color: inherit;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
}

.docs-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-glow);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.docs-card-icon {
    font-size: 1.8rem;
    margin-bottom: 12px;
}

.docs-card-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.docs-card-desc {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.5;
    flex: 1;
}

.docs-card-arrow {
    margin-top: 16px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-indigo-light);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Screenshot Placeholder Cards */
.doc-screenshot-container {
    margin: 28px 0;
    border: 1px solid var(--border-glow);
    border-radius: 16px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.8);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4);
}

.doc-screenshot-img {
    width: 100%;
    height: auto;
    display: block;
    border-bottom: 1px solid var(--border-color);
}

.screenshot-placeholder-info {
    padding: 16px 20px;
    background: rgba(30, 41, 59, 0.6);
}

.placeholder-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    background: rgba(245, 158, 11, 0.2);
    color: var(--accent-amber);
    border: 1px solid rgba(245, 158, 11, 0.4);
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.placeholder-filename {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--accent-indigo-light);
    margin-bottom: 6px;
}

.placeholder-desc {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Footer Pagination Links */
.docs-pagination {
    display: flex;
    justify-content: space-between;
    margin-top: 60px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.page-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
    max-width: 48%;
}

.page-link:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--border-glow);
}

.page-link-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.page-link-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.page-link.next {
    text-align: right;
    margin-left: auto;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .docs-sidebar {
        position: fixed;
        left: -100%;
        top: var(--header-height);
        z-index: 90;
        background: var(--bg-dark);
        transition: left 0.3s ease;
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
    }
    
    .docs-sidebar.open {
        left: 0;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .docs-content {
        padding: 24px 20px 60px 20px;
    }
    
    .docs-search-bar {
        width: 200px;
    }
}

@media (max-width: 640px) {
    .docs-search-bar {
        display: none;
    }
    
    .docs-title {
        font-size: 1.9rem;
    }
}
