:root {
    --bg-color: #0f172a;
    --sidebar-bg: rgba(30, 41, 59, 0.7);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-color: #6366f1;
    --accent-glow: rgba(99, 102, 241, 0.3);
    --border-color: rgba(255, 255, 255, 0.1);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --sidebar-width: 280px;
    --top-bar-height: 70px;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow: hidden;
}

h1,
h2,
h3,
h4,
.logo-text {
    font-family: 'Outfit', sans-serif;
    color: var(--text-primary);
}

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

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 2rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    font-size: 1.5rem;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #fff 0%, #a5b4fc 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-nav {
    flex: 1;
    padding: 1.5rem 1rem;
    overflow-y: auto;
}

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

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

.nav-link {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-link:hover {
    background: var(--glass-bg);
    color: var(--text-primary);
}

.nav-link.active {
    background: var(--accent-color);
    color: white;
    box-shadow: 0 4px 20px var(--accent-glow);
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-align: center;
}

/* Main Content */
.content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.top-bar {
    height: var(--top-bar-height);
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    z-index: 90;
}

.breadcrumb {
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.github-link {
    color: var(--text-secondary);
    transition: color 0.2s;
}

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

.content-wrapper {
    flex: 1;
    overflow-y: auto;
    padding: 3rem 4rem;
    scroll-behavior: smooth;
}

/* Markdown Styling */
.markdown-body {
    max-width: 800px;
    margin: 0 auto;
}

.markdown-body h1 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.markdown-body h2 {
    font-size: 1.75rem;
    margin: 2.5rem 0 1rem;
    color: #e2e8f0;
}

.markdown-body p {
    margin-bottom: 1.25rem;
    color: var(--text-secondary);
}

.markdown-body ul,
.markdown-body ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
    color: var(--text-secondary);
}

.markdown-body li {
    margin-bottom: 0.5rem;
}

.markdown-body code {
    background: rgba(99, 102, 241, 0.1);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    color: #a5b4fc;
    font-family: 'Fira Code', monospace;
    font-size: 0.9em;
}

.markdown-body pre {
    background: #1e293b !important;
    padding: 1.5rem !important;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    margin: 1.5rem 0;
    overflow-x: auto;
}

.markdown-body blockquote {
    border-left: 4px solid var(--accent-color);
    background: var(--glass-bg);
    padding: 1rem 1.5rem;
    border-radius: 0 12px 12px 0;
    margin: 2rem 0;
    font-style: italic;
}

.markdown-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
}

.markdown-body th,
.markdown-body td {
    padding: 1rem;
    border: 1px solid var(--border-color);
    text-align: left;
}

.markdown-body th {
    background: rgba(99, 102, 241, 0.05);
}

/* Footer Nav */
.content-footer {
    padding: 1.5rem 4rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-color);
}

.footer-nav {
    display: flex;
    justify-content: space-between;
    max-width: 800px;
    margin: 0 auto;
}

.nav-btn {
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.nav-btn:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    box-shadow: 0 4px 15px var(--accent-glow);
}

/* Animations */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(99, 102, 241, 0.1);
    border-top: 3px solid var(--accent-color);
    border-radius: 50%;
    margin: 100px auto;
    animation: spin 1s linear infinite;
    display: none;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Mobile Menu */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: 0.3s;
}

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

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

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

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

@media (max-width: 992px) {
    .sidebar {
        position: absolute;
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .menu-toggle {
        display: flex;
    }

    .content-wrapper {
        padding: 2rem;
    }
}