/* Base Styles */
:root {
    --primary-color: #3b82f6;
    --primary-dark: #2563eb;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --border-color: #e5e7eb;
    --bg-color: #ffffff;
    --sidebar-bg: #f9fafb;
    --code-bg: #1e1e1e;
    --code-text: #f8f8f2;
    --hover-color: #f3f4f6;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --radius: 6px;
}

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

.small {
    font-size: small;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

/* Layout */
.container {
    display: flex;
    min-height: 100vh;
}

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

.text-muted {
    color: var(--text-light);
}

.sidebar {
    width: 300px;
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    padding: 1.5rem;
    height: 100vh;
    position: sticky;
    top: 0;
    overflow-y: auto;
}

.content {
    flex: 1;
    padding: 2rem 4rem;
}

/* Typography */
h1 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

h2 {
    font-size: 1.75rem;
    margin: 2.5rem 0 1.25rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-color);
    font-weight: 600;
}

h2:first-child {
    margin-top: 0;
    border-top: none;
    padding-top: 0;
}

.text-center {
    text-align: center;
}

p {
    margin-bottom: 1.25rem;
    line-height: 1.7;
}

a {
    color: var(--primary-color);
    text-decoration: none;
}


/* Logo */
.logo {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.logo h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.version {
    margin-left: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-light);
    background-color: var(--border-color);
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
    font-weight: 500;
}

/* Search */
.search-box {
    position: relative;
    margin-bottom: 1.5rem;
}

.search-box input {
    width: 100%;
    padding: 0.5rem 2.5rem 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 0.9375rem;
    transition: border-color 0.2s;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-box i {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

/* Navigation */
.nav-links {
    list-style: none;
}

.nav-links>li {
    margin-bottom: 0.5rem;
}

.nav-links a {
    display: block;
    padding: 0.5rem 0.75rem;
    color: var(--text-color);
    border-radius: var(--radius);
    transition: background-color 0.2s;
}

.nav-links a:hover {
    background-color: var(--hover-color);
    text-decoration: none;
}

.nav-links .active>a {
    color: var(--primary-color);
    font-weight: 500;
}

.submenu {
    list-style: none;
    margin: 0.25rem 0 1rem 1rem;
    border-left: 1px solid var(--border-color);
    padding-left: 0.75rem;
}

.submenu a {
    padding: 0.25rem 0.5rem;
    color: var(--text-light);
    font-size: 0.9375rem;
}

.submenu .active a {
    color: var(--primary-color);
    font-weight: 500;
}

/* Breadcrumbs */
.breadcrumbs {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.breadcrumbs a {
    color: var(--text-light);
}

.breadcrumbs a:hover {
    color: var(--primary-color);
}

.breadcrumbs span {
    color: var(--text-color);
}

/* Code Blocks */
.code-block {
    background-color: var(--code-bg);
    border-radius: var(--radius);
    margin: 1.5rem 0;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.1);
    padding: 0.5rem 1rem;
    color: var(--code-text);
    font-size: 0.875rem;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

.code-header span {
    opacity: 0.8;
}

.copy-btn {
    background: none;
    border: none;
    color: var(--code-text);
    cursor: pointer;
    font-size: 0.75rem;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.copy-btn:hover {
    opacity: 1;
}

.d-flex {
    display: flex;
    flex-wrap: wrap;
}

.card {
    border-radius: 5px;
    padding: 1rem .5rem;
    height: fit-content;
    width: 33.33%;
    height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card:hover {
    background-color: var(--primary-color);
    color: var(--text-light);
    transition: all .5s;
    cursor: pointer;
}

.card:hover p {
    color: #ffffff;
}

.shadow {
    box-shadow: 0 3px 2px #E2E2E2;
}

pre {
    margin: 0;
    padding: 1rem;
    overflow-x: auto;
}

code {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--code-text);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: space-between;
    margin: 3rem 0 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: var(--primary-color);
    color: white;
    border-radius: var(--radius);
    font-size: 0.9375rem;
    transition: background-color 0.2s;
}

.btn:hover {
    background-color: var(--primary-dark);
    text-decoration: none;
}

/* Responsive */
@media (max-width: 1024px) {
    .content {
        padding: 1.5rem 2rem;
    }
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .card {
        width: 100%;
    }

    .d-flex {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }

    .content {
        padding: 1.5rem;
    }

    .pagination {
        flex-direction: column;
        gap: 1rem;
    }

    .btn {
        width: 100%;
        text-align: center;
    }
}