.tutorial-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.tutorial-nav a {
    color: var(--primary);
    text-decoration: none;
}

.tutorial-nav a:hover {
    text-decoration: underline;
}

.tutorial-nav .separator {
    color: var(--text-muted);
}

.tutorial-container {
    display: flex;
    gap: 2rem;
    padding: 2rem 0;
}

.tutorial-sidebar {
    width: 240px;
    flex-shrink: 0;
    position: sticky;
    top: 2rem;
    height: fit-content;
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
}

.tutorial-sidebar::-webkit-scrollbar {
    width: 4px;
}

.tutorial-sidebar::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 2px;
}

.sidebar-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    padding-left: 0.75rem;
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-group {
    margin-bottom: 0.5rem;
}

.toc-group-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 0.75rem;
    cursor: pointer;
    border-radius: var(--radius);
    transition: background 0.2s;
    user-select: none;
}

.toc-group-header:hover {
    background: var(--bg-card);
}

.toc-group-icon {
    font-size: 0.625rem;
    color: var(--text-muted);
    transition: transform 0.2s;
    width: 1rem;
    text-align: center;
}

.toc-group.collapsed .toc-group-icon {
    transform: rotate(-90deg);
}

.toc-group-name {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text);
}

.toc-group .toc-list {
    padding-left: 1.25rem;
}

.toc-group.collapsed .toc-list {
    display: none;
}

.toc-item {
    margin-bottom: 0.25rem;
}

.toc-link {
    display: block;
    padding: 0.5rem 0.75rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    border-radius: var(--radius);
    border-left: 2px solid transparent;
    transition: all 0.2s;
}

.toc-link:hover {
    background: var(--bg-card);
    color: var(--primary);
}

.toc-link.active {
    background: rgba(6, 182, 212, 0.1);
    color: var(--primary);
    border-left-color: var(--primary);
}

.tutorial-content {
    flex: 1;
    min-width: 0;
}

.tutorial-content h1 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.tutorial-content .intro {
    color: var(--text-secondary);
    font-size: 1.125rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 2rem;
}

.article-content {
    padding: 1.5rem 0;
}

.article-content h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text);
    margin: 2rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary);
    display: inline-block;
}

.article-content h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text);
    margin: 1.5rem 0 0.75rem;
}

.article-content p {
    color: var(--text-secondary);
    line-height: 2;
    margin-bottom: 1.25rem;
}

.article-content ul,
.article-content ol {
    color: var(--text-secondary);
    line-height: 2;
    padding-left: 1.5rem;
    margin-bottom: 1.25rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-content pre {
    /* background: #252424; */
    border-radius: var(--radius);
    padding: 1rem;
    overflow-x: auto;
    margin: 1rem 0 1.5rem;
}

.article-content code {
    font-family: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
    font-size: 0.875rem;
    background: rgba(0, 0, 0, 0.05);
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    /* color: var(--text); */
}

.article-content pre code {
    background: none;
    padding: 0;
    /* color: #e2e8f0; */
}

.tutorial-section {
    margin-bottom: 2.5rem;
    scroll-margin-top: 6rem;
}

.tutorial-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary);
    display: inline-block;
}

.tutorial-section h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text);
    margin: 1.5rem 0 0.75rem;
}

.tutorial-section p {
    color: var(--text-secondary);
    line-height: 2;
    margin-bottom: 1rem;
}

.tutorial-section ul {
    color: var(--text-secondary);
    line-height: 2;
    padding-left: 1.5rem;
}

.tutorial-section li {
    margin-bottom: 0.5rem;
}

.code-block {
    /* background: #0d1117; */
    border-radius: var(--radius);
    margin: 1.5rem 0;
    overflow: hidden;
    border: 1px solid #30363d;
}

.code-block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: #161b22;
    border-bottom: 1px solid #30363d;
}

.code-block-title {
    font-size: 0.75rem;
    color: #8b949e;
    font-family: monospace;
}

.code-block-copy {
    background: transparent;
    border: none;
    color: #8b949e;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 4px;
    transition: all 0.2s;
}

.code-block-copy:hover {
    background: #30363d;
    color: #c9d1d9;
}

.code-block pre {
    margin: 0;
    padding: 1.25rem;
    overflow-x: auto;
}

.code-block code {
    font-family: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
    font-size: 0.875rem;
    line-height: 1.7;
    /* color: #c9d1d9; */
}

.code-block .keyword { color: #ff7b72; font-weight: 500; }
.code-block .string { color: #a5d6ff; }
.code-block .tag { color: #7ee787; }
.code-block .attr { color: #79c0ff; }
.code-block .comment { color: #8b949e; font-style: italic; }
.code-block .number { color: #79c0ff; }
.code-block .type { color: #ffa657; }
.code-block .function { color: #d2a8ff; }
.code-block .operator { color: #ff7b72; }
.code-block .class-name { color: #ffa657; }
.code-block .method { color: #d2a8ff; }

.tip-box {
    background: rgba(6, 182, 212, 0.1);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    margin: 1rem 0;
}

.tip-box-title {
    font-weight: 600;
    color: var(--primary);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tip-box p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.warning-box {
    background: rgba(251, 146, 60, 0.1);
    border-left: 4px solid #fb923c;
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    margin: 1rem 0;
}

.warning-box-title {
    font-weight: 600;
    color: #fb923c;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.warning-box p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.nav-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.nav-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.nav-btn.next {
    margin-left: auto;
}

@media (max-width: 900px) {
    .tutorial-container {
        flex-direction: column;
    }
    .tutorial-sidebar {
        width: 100%;
        position: static;
        max-height: none;
        border-bottom: 1px solid var(--border);
        padding-bottom: 1rem;
        margin-bottom: 1rem;
    }
}

/* ===== Java Editor Container ===== */
.java-editor-container {
    /* max-width: 1100px; */
    margin: 2rem auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
    overflow: hidden;
}

/* ===== Flow Diagram ===== */
.flow-diagram {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--bg-card);
    border-radius: var(--radius);
    margin: 1.5rem 0;
}

.flow-step {
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, var(--primary), #0891b2);
    color: white;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
}

.flow-arrow {
    color: var(--text-muted);
    font-size: 1.25rem;
}

/* ===== Timeline ===== */
.timeline {
    position: relative;
    padding-left: 2rem;
    margin: 1.5rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary), var(--border));
}

.timeline-item {
    position: relative;
    margin-bottom: 1.5rem;
}

.timeline-marker {
    position: absolute;
    left: -1.5rem;
    top: 0.25rem;
    width: 12px;
    height: 12px;
    background: var(--primary);
    border-radius: 50%;
    border: 2px solid var(--bg-card);
}

.timeline-content h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.timeline-content p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.6;
}

/* ===== Feature Grid ===== */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.feature-card {
    padding: 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.2s;
}

.feature-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), #0891b2);
    color: white;
    border-radius: 8px;
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
}

.feature-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.feature-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.feature-card ul {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.feature-card li {
    margin-bottom: 0.25rem;
    padding-left: 1rem;
    position: relative;
}

.feature-card li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary);
}

.feature-count {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0.5rem 0;
}

/* ===== Feature List ===== */
.feature-list {
    margin: 1.5rem 0;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

.feature-item:last-child {
    border-bottom: none;
}

.feature-item i {
    color: var(--primary);
    font-size: 1rem;
}

.feature-item span {
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.method-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 600;
}

.priority-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: var(--bg-card);
    border: 1px solid var(--primary);
    color: var(--primary);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* ===== Data Table ===== */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.875rem;
}

.data-table th,
.data-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border: 1px solid var(--border);
}

.data-table th {
    background: var(--bg-card);
    font-weight: 600;
    color: var(--text);
}

.data-table td {
    color: var(--text-secondary);
}

.data-table tr:hover td {
    background: var(--bg-card);
}

/* ===== Summary ===== */
.summary {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
}

.summary ul {
    margin: 0;
    padding-left: 1.25rem;
}

.summary li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* ===== Alert Boxes ===== */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin: 1.5rem 0;
    border-left: 4px solid;
}

.alert-info {
    background: rgba(6, 182, 212, 0.1);
    border-color: var(--primary);
}

.alert-warning {
    background: rgba(251, 146, 60, 0.1);
    border-color: #fb923c;
}

.alert p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.7;
}

.alert strong {
    color: var(--text);
}

/* ===== Lambda Icon ===== */
.lambda-icon {
    font-family: serif;
    font-style: italic;
}
