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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    gap: 20px;
}

.sidebar {
    width: 250px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 20px;
    height: fit-content;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    scroll-behavior: smooth;
    scroll-padding-top: 50%;
}

.sidebar h3 {
    color: #00ADD8;
    margin-bottom: 15px;
    font-size: 1.2em;
    border-bottom: 2px solid #00ADD8;
    padding-bottom: 10px;
}

.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar ul ul {
    margin-left: 20px;
    margin-top: 5px;
}

.sidebar li {
    margin: 5px 0;
}

.sidebar a {
    text-decoration: none;
    color: #333;
    display: block;
    padding: 8px 12px;
    border-radius: 5px;
    transition: all 0.3s;
    font-weight: 500;
}

.sidebar a:hover {
    background: #e3f2fd;
    color: #00ADD8;
}

.sidebar a.active {
    background: #00ADD8;
    color: white;
    scroll-margin: 50vh;
}

.content {
    flex: 1;
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

h1 {
    color: #00ADD8;
    margin-bottom: 20px;
    font-size: 2.5em;
}

h2 {
    color: #00ADD8;
    margin: 30px 0 15px;
    font-size: 1.8em;
}

h3 {
    color: #555;
    margin: 25px 0 10px;
    font-size: 1.4em;
}

p {
    margin-bottom: 15px;
    color: #555;
}

code {
    background: #f4f4f4;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Consolas', 'Monaco', monospace;
    color: #e83e8c;
}

pre {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 20px 0;
}

pre code {
    background: none;
    padding: 0;
    color: #f8f8f2;
}

.keyword {
    color: #ff79c6;
}

.string {
    color: #f1fa8c;
}

.function {
    color: #50fa7b;
}

.comment {
    color: #6272a4;
}

.number {
    color: #bd93f9;
}

.topic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.topic-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 10px;
    text-decoration: none;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.topic-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.topic-card h3 {
    color: white;
    margin: 0 0 10px;
}

.topic-card p {
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

ul {
    margin-left: 20px;
    margin-bottom: 15px;
}

li {
    margin-bottom: 8px;
    color: #555;
}

.example-box {
    background: #e3f2fd;
    border-left: 4px solid #00ADD8;
    padding: 15px;
    margin: 20px 0;
    border-radius: 5px;
}

.note-box {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 15px;
    margin: 20px 0;
    border-radius: 5px;
}

.back-link {
    display: inline-block;
    margin-bottom: 20px;
    color: #00ADD8;
    text-decoration: none;
    font-weight: 500;
}

.back-link:hover {
    text-decoration: underline;
}

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

    .sidebar {
        width: 100%;
        position: static;
        max-height: none;
    }

    .content {
        padding: 20px;
    }

    h1 {
        font-size: 2em;
    }

    h2 {
        font-size: 1.5em;
    }
}