:root {
    --bg-color: #0d0e12;
    --sidebar-bg: rgba(23, 25, 35, 0.7);
    --accent-primary: #7c4dff;
    --accent-secondary: #00e5ff;
    --text-primary: #e0e0e0;
    --text-muted: #94a3b8;
    --glass-border: rgba(255, 255, 255, 0.1);
    --card-bg: rgba(30, 32, 47, 0.6);
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
    --font-code: 'Fira Code', 'Cascadia Code', monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-main);
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 10px;
}

/* Sidebar Styling */
aside {
    width: 280px;
    height: 100vh;
    background: var(--sidebar-bg);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--glass-border);
    padding: 2rem 1rem;
    position: fixed;
    z-index: 100;
    display: flex;
    flex-direction: column;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 3rem;
    text-align: center;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

nav ul {
    list-style: none;
}

nav li {
    padding: 0.8rem 1.2rem;
    margin-bottom: 0.5rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-muted);
    font-weight: 500;
    border: 1px solid transparent;
}

nav li:hover {
    background: rgba(124, 77, 255, 0.1);
    color: var(--text-primary);
}

nav li.active {
    background: linear-gradient(135deg, rgba(124, 77, 255, 0.2), rgba(0, 229, 255, 0.1));
    border-color: var(--accent-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(124, 77, 255, 0.1);
}

/* Content Area */
main {
    margin-left: 280px;
    padding: 3rem 5%;
    width: calc(100% - 280px);
    max-width: 1200px;
}

.section {
    display: none;
    animation: fadeIn 0.6s ease-out;
}

.section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #fff 0%, #a5a2bc 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2 {
    color: var(--accent-secondary);
    margin: 2rem 0 1rem;
    font-size: 1.4rem;
}

p {
    line-height: 1.7;
    margin-bottom: 1.2rem;
    color: var(--text-muted);
}

/* Code block styling */
pre {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    padding: 1.5rem;
    border-radius: 16px;
    overflow-x: auto;
    margin: 1.5rem 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

code {
    font-family: var(--font-code);
    font-size: 0.95rem;
    color: #f1f1f1;
}

.keyword {
    color: #ff79c6;
}

.comment {
    color: #6272a4;
    font-style: italic;
}

.string {
    color: #f1fa8c;
}

.type {
    color: #8be9fd;
}

.func {
    color: #50fa7b;
}

ul.explanation {
    list-style: none;
    margin-left: 0.5rem;
}

ul.explanation li {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
    position: relative;
    border-left: 2px solid var(--glass-border);
}

ul.explanation li strong {
    color: var(--accent-primary);
    display: block;
    margin-bottom: 0.3rem;
}

.pros-cons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
}

.card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
}

.card h3 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
}

th,
td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
}

th {
    background: rgba(124, 77, 255, 0.1);
    color: var(--accent-secondary);
    font-weight: 600;
}

@media (max-width: 768px) {
    aside {
        width: 100%;
        height: auto;
        position: relative;
        padding: 1rem;
    }

    main {
        margin-left: 0;
        width: 100%;
        padding: 2rem 1rem;
    }

    body {
        flex-direction: column;
    }

    .pros-cons {
        grid-template-columns: 1fr;
    }
}