body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

#sidebar {
    position: sticky;
    top: 57px;
    height: calc(100vh - 57px);
}

.category-leaf:hover,
.category-header:hover {
    background-color: #f3f4f6;
}

.category-leaf.bg-blue-50,
.category-header.bg-blue-50 {
    background-color: #eff6ff;
}

.article-card {
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.article-card:hover {
    transform: translateY(-1px);
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

#article-modal {
    backdrop-filter: blur(2px);
}

#article-modal .prose h2:first-of-type {
    margin-top: 0;
}

#mobile-menu-btn {
    transition: transform 0.15s ease;
}

#mobile-menu-btn:active {
    transform: scale(0.95);
}

@media (max-width: 767px) {
    #sidebar {
        display: none;
    }

    #main-content {
        padding: 1rem;
    }

    #article-list {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    #article-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    #article-list {
        grid-template-columns: repeat(2, 1fr);
    }
}
