﻿* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    color: #334155;
    background-color: #ffffff;
}

/* Header */
.header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: white;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: #111723;
    color: #fff;
}

    .header-content span {
        color: #fff;
    }

    .header-left {
        display: flex;
        align-items: center;
        gap: 1rem;
    }

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: #64748b;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: #1e293b;
    font-weight: 600;
    font-size: 1.125rem;
}

.logo-icon {
    width: 2rem;
    height: 2rem;
    background: #1e293b;
    border-radius: 0.375rem;
    position: relative;
}

    .logo-icon::after {
        content: "";
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 1rem;
        height: 1rem;
        background: white;
        border-radius: 0.125rem;
    }

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-container {
    position: relative;
    display: none;
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.875rem;
}

.search-input {
    padding: 0.5rem 0.75rem 0.5rem 2.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    width: 16rem;
    font-size: 0.875rem;
}

.search-kbd {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    padding: 0.125rem 0.5rem;
    font-size: 0.75rem;
    background: #f1f5f9;
    border: 1px solid #d1d5db;
    border-radius: 0.25rem;
}

.btn {
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s;
}

.btn-ghost {
    background: none;
    border: none;
    color: #64748b;
}

    .btn-ghost:hover {
        color: #334155;
    }

.btn-primary {
    background: #3b82f6;
    color: white;
    border: none;
}

    .btn-primary:hover {
        background: #2563eb;
    }

/* Layout */
.layout {
    display: flex;
    min-height: calc(100vh - 4rem);
}

/* Sidebar */
.sidebar {
    width: 16rem;
    background: #1e293b;
    color: white;
    position: fixed;
    top: 4rem;
    left: 0;
    height: calc(100vh - 4rem);
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 40;
}

    .sidebar.active {
        transform: translateX(0);
    }

.sidebar-header {
    display: none;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #334155;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
}

.sidebar-nav {
    padding: 1rem;
}

.nav-section {
    margin-bottom: 0.5rem;
}

.nav-section-btn {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0.5rem 0.75rem;
    background: none;
    border: none;
    color: #cbd5e1;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 0.375rem;
    transition: all 0.2s;
}

    .nav-section-btn:hover {
        background: #334155;
        color: white;
    }

    .nav-section-btn i {
        margin-right: 0.5rem;
        font-size: 0.75rem;
        transition: transform 0.2s;
    }

    .nav-section-btn.active i {
        transform: rotate(90deg);
    }

.nav-items {
    margin-left: 1rem;
    margin-top: 0.25rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

    .nav-items.active {
        max-height: 200px;
    }

.nav-item {
    display: block;
    padding: 0.5rem 0.75rem;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.875rem;
    border-radius: 0.375rem;
    transition: all 0.2s;
}

    .nav-item:hover {
        background: #334155;
        color: white;
    }

    .nav-item.active {
        background: #3b82f6;
        color: white;
    }

/* Overlay */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 30;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

    .overlay.active {
        opacity: 1;
        visibility: visible;
    }

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 0;
    transition: margin-left 0.3s ease;
}

.content-wrapper {
    max-width: 4xl;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* Prose Styles */
.prose {
    max-width: none;
}

    .prose h1 {
        font-size: 2.25rem;
        font-weight: 700;
        margin-bottom: 1rem;
        color: #1e293b;
    }

    .prose h2 {
        font-size: 1.875rem;
        font-weight: 600;
        margin: 2rem 0 1rem 0;
        color: #1e293b;
    }

    .prose h3 {
        font-size: 1.5rem;
        font-weight: 600;
        margin: 1.5rem 0 0.75rem 0;
        color: #1e293b;
    }

    .prose h4 {
        font-size: 1.25rem;
        font-weight: 600;
        margin: 1rem 0 0.5rem 0;
        color: #1e293b;
    }

    .prose p {
        margin-bottom: 1rem;
    }

    .prose .lead {
        font-size: 1.125rem;
        color: #64748b;
        margin-bottom: 2rem;
    }

    .prose ul,
    .prose ol {
        margin: 1rem 0;
        padding-left: 1.5rem;
    }

    .prose li {
        margin-bottom: 0.5rem;
    }

    .prose strong {
        font-weight: 600;
        color: #1e293b;
    }

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin: 1.5rem 0;
}

.alert-info {
    background: #dbeafe;
    border: 1px solid #93c5fd;
}

    .alert-info h3 {
        color: #1e40af;
        font-size: 1rem;
        font-weight: 600;
        margin-bottom: 0.5rem;
    }

    .alert-info p {
        color: #1e40af;
        margin: 0;
    }

/* Code Blocks */
.code-block {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
    font-family: "Monaco", "Menlo", "Ubuntu Mono", monospace;
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Cards */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.card {
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 1.5rem;
    transition: box-shadow 0.2s;
}

    .card:hover {
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    }

    .card h4 {
        margin-bottom: 0.5rem;
        font-size: 1.125rem;
    }

    .card p {
        color: #64748b;
        font-size: 0.875rem;
        margin-bottom: 0.75rem;
    }

.card-link {
    color: #3b82f6;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
}

    .card-link:hover {
        color: #2563eb;
    }

/* Table of Contents */
.toc {
    display: none;
    width: 16rem;
    flex-shrink: 0;
}

.toc-content {
    position: sticky;
    top: 6rem;
}

.toc h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1rem;
}

.toc-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toc-link {
    display: block;
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    color: #64748b;
    text-decoration: none;
    border-radius: 0.25rem;
    transition: all 0.2s;
    border-left: 2px solid transparent;
}

    .toc-link:hover {
        color: #1e293b;
    }

    .toc-link.active {
        color: #3b82f6;
        background: #dbeafe;
        border-left-color: #3b82f6;
        padding-left: 0.75rem;
    }

/* Responsive Design */
@media (min-width: 768px) {
    .search-container {
        display: block;
    }
}

@media (min-width: 1024px) {
    .mobile-menu-btn {
        display: none;
    }

    .sidebar {
        position: static;
        transform: translateX(0);
        height: auto;
    }

    .sidebar-header {
        display: none;
    }

    .main-content {
        margin-left: 0;
    }

    .layout {
        display: flex;
        gap: 2rem;
    }
}

@media (min-width: 1280px) {
    .toc {
        display: block;
    }
}

@media (max-width: 1023px) {
    .mobile-menu-btn {
        display: block;
    }

    .sidebar-header {
        display: flex;
    }
}
.logo h1 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 0;
}

.nav-section-btn svg{
    margin-right: 10px !important;
}