:root {
    --background: #f7f9fc;
    --foreground: #0f1724;
    --border: #e0e0e0;
    --input: #ffffff;
    --primary: #4f46e5;
    --primary-foreground: #ffffff;
    --secondary: #eef2ff;
    --secondary-foreground: #312e81;
    --muted: #f3f4f6;
    --muted-foreground: #6b7280;
    --success: #16a34a;
    --accent: #06b6d4;
    --accent-foreground: #062b2e;
    --card: #ffffff;
    --sidebar-primary: #eef2ff;
    --sidebar-primary-foreground: #3730a3;
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --font-family-body: 'Inter', sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font-family-body);
    background: var(--background);
    color: var(--foreground);
}

.layout {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* Header */
.header {
    height: 64px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    background: var(--background);
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    font-size: 18px;
    text-decoration: none;
    color: var(--foreground);
    cursor: pointer;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: var(--primary);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.search-bar {
    width: 400px;
    height: 36px;
    background: var(--input);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    padding: 0 12px;
    gap: 8px;
    color: var(--muted-foreground);
    font-size: 13px;
    border: 1px solid var(--border);
}

.header-actions {
    display: flex;
    gap: 16px;
    align-items: center;
}

.version {
    font-size: 14px;
    color: var(--muted-foreground);
    font-weight: 500;
}

.github-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: var(--radius-md);
    background: var(--primary);
    color: var(--primary-foreground);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.2s;
}

.github-btn:hover {
    opacity: 0.9;
}

/* Main Container */
.main-container {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    width: 280px;
    border-right: 1px solid var(--border);
    background: var(--muted);
    overflow-y: auto;
    padding: 24px 0;
    flex-shrink: 0;
}

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

.sidebar-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--muted-foreground);
    padding: 0 24px;
    margin-bottom: 8px;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 24px;
    font-size: 14px;
    color: var(--foreground);
    cursor: pointer;
    border-left: 2px solid transparent;
    text-decoration: none;
    transition: all 0.2s;
}

.sidebar-item:hover {
    background: rgba(79, 70, 229, 0.05);
}

.sidebar-item.active {
    background: var(--sidebar-primary);
    color: var(--sidebar-primary-foreground);
    border-left-color: var(--primary);
    font-weight: 500;
}

/* Content Area */
.content-area {
    flex: 1;
    overflow-y: auto;
    padding: 48px 64px;
    max-width: 1000px;
}

.breadcrumb {
    display: flex;
    gap: 8px;
    font-size: 13px;
    color: var(--primary);
    margin-bottom: 16px;
    align-items: center;
}

.page-title {
    font-size: 36px;
    font-weight: 700;
    margin: 0 0 16px 0;
    letter-spacing: -0.5px;
}

.page-desc {
    font-size: 18px;
    line-height: 1.6;
    color: var(--muted-foreground);
    margin-bottom: 40px;
    max-width: 700px;
}

.hero-image {
    width: 100%;
    margin-bottom: 32px;
}

.section-title {
    font-size: 24px;
    font-weight: 600;
    margin: 40px 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.text-block {
    font-size: 16px;
    line-height: 1.7;
    color: var(--foreground);
    margin-bottom: 24px;
}

.code-block {
    background: #0f172a;
    color: #e2e8f0;
    padding: 20px;
    border-radius: var(--radius-md);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 14px;
    line-height: 1.5;
    overflow-x: auto;
    margin: 24px 0;
    position: relative;
}

.code-block pre {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.code-block code {
    font-family: inherit;
    color: inherit;
}

.copy-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 11px;
    color: #cbd5e1;
    cursor: pointer;
    transition: background 0.2s;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin: 32px 0;
}

.feature-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    background: var(--card);
    transition: all 0.2s;
}

.feature-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.1);
}

.feature-icon {
    font-size: 32px;
    margin-bottom: 16px;
}

.feature-title {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 8px;
}

.feature-text {
    font-size: 14px;
    color: var(--muted-foreground);
    line-height: 1.5;
}

.alert-box {
    background: var(--secondary);
    border-left: 4px solid var(--accent);
    padding: 16px 24px;
    margin: 24px 0;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.alert-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
    color: var(--secondary-foreground);
}

.alert-text {
    font-size: 14px;
    color: var(--secondary-foreground);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    font-family: inherit;
    font-size: 14px;
}

.btn-primary {
    background: var(--foreground);
    color: var(--background);
}

.btn-primary:hover {
    opacity: 0.9;
}

.btn-secondary {
    background: transparent;
    color: var(--foreground);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--muted);
}

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

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--muted-foreground);
}

/* Responsive */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        height: auto;
        padding: 16px;
        gap: 16px;
    }

    .search-bar {
        width: 100%;
    }

    .main-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border);
        overflow-y: visible;
        padding: 16px 0;
    }

    .content-area {
        padding: 24px 16px;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .page-title {
        font-size: 24px;
    }
}
