html { scroll-behavior: smooth; }
body { font-family: 'Inter', system-ui, -apple-system, sans-serif; background-color: #F8FAFC; }

/* Main content area - 独立滚动 */
.content-wrapper {
    display: flex;
    min-height: calc(100vh - 56px);
}
.main-content {
    flex: 1;
    min-width: 0;
    padding: 24px 32px;
    overflow-wrap: break-word;
    word-break: break-word;
}

/* Main content docs page - extracted from inline style */
.docs-main {
}


/* Component card */
.component {
    background: white;
    border-radius: 16px;
    padding: 28px;
    margin-bottom: 24px;
    border: 1px solid #E2E8F0;
    overflow: hidden;
    overflow-wrap: break-word;
    word-break: break-word;
}
.component-header {
    border-bottom: 2px solid #2563EB;
    padding-bottom: 15px;
    margin-bottom: 20px;
}
.component-name {
    font-size: 1.5em;
    color: #2563EB;
    margin-bottom: 5px;
    font-weight: 700;
}
section.component {
    scroll-margin-top: 60px;
}
.component-name-cn {
    font-size: 1.1em;
    color: #64748B;
    font-weight: 500;
}
.en-name {
    font-size: 0.85em;
    color: #94A3B8;
    font-weight: 400;
    margin-left: 4px;
}
.component-name .en-name {
    font-size: 0.65em;
}
.item-name .en-name {
    font-size: 0.85em;
}
.item-params .en-name {
    font-size: 0.85em;
}
.component-desc {
    color: #475569;
    margin-top: 10px;
    line-height: 1.8;
}
.section {
    margin-top: 25px;
}
.section-title {
    font-size: 1.2em;
    color: #1E293B;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #E2E8F0;
    font-weight: 600;
}

/* Item list - MIT style simple list format */
.item-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.item-card {
    padding: 6px 0;
    border-bottom: 1px solid #F1F5F9;
}
.item-card:last-child {
    border-bottom: none;
}
.item-name {
    font-weight: 600;
    color: #1E293B;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 14px;
}
.item-name .en-name {
    font-style: italic;
    font-weight: 400;
    color: #64748B;
    font-size: 13px;
    margin-left: 4px;
}
.item-desc {
    display: block;
    color: #475569;
    font-size: 14px;
    line-height: 1.7;
    padding-left: 16px;
    margin-top: 2px;
}
.item-params {
    font-size: 13px;
    color: #64748B;
    margin-left: 4px;
}
.item-params::before {
    content: '(';
}
.item-params::after {
    content: ')';
}
.param-item {
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-style: italic;
}
.param-type {
    font-style: normal;
    color: #94A3B8;
    font-size: 12px;
}
.item-return {
    font-size: 10px;
    color: #059669;
    margin-left: 8px;
}
.item-return::before {
    content: '→ ';
    color: #94A3B8;
}
/* 返回值类型颜色（无背景，仅文字颜色） */
.item-return[data-type="boolean"] { color: #6CA538; }
.item-return[data-type="text"] { color: #C23B6E; }
.item-return[data-type="number"] { color: #3373CC; }
.item-return[data-type="list"] { color: #4CBFE9; }
.item-return[data-type="dictionary"] { color: #674EA7; }
.item-return[data-type="component"] { color: #5a9773; }
.item-return[data-type="any"] { color: #E66A22; }
.item-return[data-type="color"] { color: #808080; }
.item-return[data-type="procedure"] { color: #63426a; }
.item-return[data-type^="android."] { color: #059669; }
.badge {
    font-size: 10px;
    padding: 0 5px;
    border-radius: 3px;
    font-weight: 500;
    margin-left: 4px;
    font-style: normal;
    display: inline-block;
    line-height: 16px;
    vertical-align: middle;
}
.badge { background: #444; color: #fff; }
.deprecated .item-name {
    text-decoration: line-through;
    color: #94A3B8;
}
.deprecated .item-name .en-name {
    text-decoration: none;
    color: #94A3B8;
}
.deprecated .item-desc {
    text-decoration: none;
}

/* 隐藏旧的表格样式元素 */
.item-header { display: none; }
.item-type {
    font-size: 10px;
    font-style: normal;
    margin-left: 4px;
    padding: 0 5px;
    border-radius: 3px;
    font-weight: 500;
    display: inline-block;
    line-height: 16px;
    vertical-align: middle;
}
/* 类型颜色 - 对齐MIT App Inventor积木块颜色 */
.item-type[data-type="boolean"] { background: #6CA538; color: #fff; }
.item-type[data-type="text"] { background: #C23B6E; color: #fff; }
.item-type[data-type="number"] { background: #3373CC; color: #fff; }
.item-type[data-type="list"] { background: #4CBFE9; color: #fff; }
.item-type[data-type="dictionary"] { background: #674EA7; color: #fff; }
.item-type[data-type="component"] { background: #5a9773; color: #fff; }
.item-type[data-type="any"] { background: #E66A22; color: #fff; }
.item-type[data-type="color"] { background: #808080; color: #fff; }
.item-type[data-type="enum"] { background: rgb(191, 67, 67); color: #fff; }
.item-type[data-type="procedure"] { background: #63426a; color: #fff; }
/* Java类型 */
.item-type[data-type="android.graphics.Bitmap"] { background: #059669; color: #fff; }
.item-default { display: none; }
.item-meta { display: none; }

/* Mobile: sidebar collapsed by default */
@media (max-width: 768px) {
    .content-wrapper {
        flex-direction: column;
    }
    .main-content {
        height: auto;
        overflow-y: visible;
    }
}

/* Mobile: card layout */
@media (max-width: 768px) {
    .component {
        padding: 16px;
        border-radius: 12px;
    }
    .item-card {
        padding: 10px 0;
    }
    .item-header {
        display: none;
    }
    .item-name { font-size: 13px; }
    .item-meta { font-size: 12px; }
    .item-params { font-size: 12px; }
    .item-desc { font-size: 12px; }
}

/* Category card for index */
.category-card {
    background: white;
    border-radius: 16px;
    border: 1px solid #E2E8F0;
    padding: 25px;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}
.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border-color: #2563EB;
}
.category-name { font-size: 1.4em; color: #2563EB; margin-bottom: 10px; font-weight: 600; }
.category-count { color: #64748B; font-size: 0.95em; }

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}
.breadcrumb a {
    color: #64748B;
    text-decoration: none;
}
.breadcrumb a:hover {
    color: #2563EB;
}
.breadcrumb span {
    color: #94A3B8;
}
.breadcrumb .current {
    color: #1E293B;
    font-weight: 500;
}

/* 废弃项样式 - 仅名称删除线 */
.item-card.deprecated {
    opacity: 0.6;
}
.item-card.deprecated .item-name {
    text-decoration: line-through;
    color: #94A3B8;
}
.item-card.deprecated .item-name .en-name {
    text-decoration: none;
    color: #94A3B8;
}
.item-card.deprecated .item-type,
.item-card.deprecated .item-params {
    color: #94A3B8;
}
.item-card.deprecated .item-desc {
    text-decoration: none;
    color: #94A3B8;
}

/* 标记样式 */
.badge {
    font-size: 10px;
    padding: 0 5px;
    border-radius: 3px;
    font-weight: 500;
    margin-left: 4px;
    font-style: normal;
    display: inline-block;
    line-height: 16px;
    vertical-align: middle;
    font-family: system-ui, -apple-system, sans-serif;
}

/* TOC */
.toc {
    background: #F8FAFC;
    border-radius: 12px;
    margin-bottom: 24px;
}
.toc-title {
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 12px;
}
.toc-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.toc-item {
    display: inline-block;
    padding: 6px 12px;
    background: white;
    border: 1px solid #E2E8F0;
    border-radius: 6px;
    font-size: 13px;
    color: #475569;
    text-decoration: none;
    transition: all 0.2s;
}
.toc-item:hover {
    background: #EFF6FF;
    border-color: #2563EB;
    color: #2563EB;
}


