/* 算子库样式 - 深绿色主题 */
.operator-library {
    font-family: "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: #f8f9fa;
}

/* 左侧导航栏样式 */
.sticky-sidebar {
    position: sticky;
    top: 100px;
    z-index: 1000;
}

.card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.card-header {
    border-radius: 8px 8px 0 0 !important;
    padding: 16px 20px;
    font-weight: 600;
    border-bottom: 1px solid #1b5e20;
}

/* 作物标题样式 - 字体最大 */
.crop-header {
    padding: 16px 20px;
    background-color: #f5f5f5;
    font-size: 1.1em; /* 小麦字体最大 */
    font-weight: 600;
    color: #2e7d32;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
}

.crop-name {
    font-size: 1.1em; /* 作物名称字体 */
}

.crop-header.active-crop {
    background-color: #e8f5e8;
    color: #1b5e20;
}

.crop-header:hover {
    background-color: #edf7ed;
}

/* 数据类型链接样式 - 字体中等 */
.data-type-link {
    padding: 14px 20px;
    color: #555;
    text-decoration: none;
    display: block;
    background-color: #fff;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.2s ease;
    font-size: 1.0em; /* 高光谱数据字体中等 */
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.data-type-text {
    font-size: 1.0em; /* 数据类型文字 */
    flex-grow: 1;
}

/* 子分类链接样式 - 字体最小 */
.subcategory-link {
    padding: 12px 20px 12px 30px;
    color: #666;
    text-decoration: none;
    display: block;
    background: transparent;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.2s ease;
    font-size: 1.0em; /* 数据加载处理字体最小 */
    font-weight: 400;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

.subcategory-text {
    font-size: 1.0em; /* 子分类文字 */
}

/* 子分类的数字标签 */
.subcategory-badge {
    background-color: #2e7d32;
    color: white;
    font-size: 0.75em;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
    min-width: 20px;
    text-align: center;
}

/* 调整下拉箭头位置 */
.data-type-link .toggle-icon {
    font-size: 0.8em !important;
    transition: transform 0.3s ease;
    color: #666;
    margin-left: 8px;
}

/* 右侧内容区域字体 */
.card-body {
    font-size: 0.85em; /* 整体字体稍微大一点 */
}

/* 面包屑导航 */
.breadcrumb {
    background: transparent;
    margin-bottom: 0;
    padding: 12px 20px;
    border-bottom: 1px solid #e0e0e0;
    font-size: 1em;
}

.breadcrumb-item {
    font-size: 1em;
    font-weight: 400;
}

.breadcrumb-item.active {
    color: #2e7d32;
    font-weight: 500;
}

.breadcrumb-item:not(.active) {
    color: #666;
}

/* 内容区域标题 */
.section-title {
    color: #2e7d32;
    font-size: 1.25em; /* 右侧标题字体更大 */
    font-weight: 600;
    margin-bottom: 0;
}

.operator-count {
    background-color: #2e7d32;
    color: white;
    padding: 8px 16px;
    border-radius: 12px;
    font-size: 0.9em;
    font-weight: 500;
}

/* 算子卡片样式 */
.operator-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    transition: all 0.2s ease;
    border-left: 4px solid #2e7d32;
    height: 100%;
}

.operator-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-left-color: #1b5e20;
}

.operator-card .card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    height: 100%;
    font-size: 1em;
}

.operator-name {
    color: #333;
    font-size: 1.05em; /* 算子名称字体 */
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.4;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.operator-type {
    background-color: #757575;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: 500;
    align-self: flex-start;
}

.operator-description {
    color: #666;
    font-size: 0.95em; /* 描述文字字体 */
    line-height: 1.5;
    margin-bottom: 16px;
    flex-grow: 1;
}

.operator-id {
    color: #999;
    font-size: 0.85em; /* ID字体 */
    font-weight: 400;
}

/* 操作按钮 */
.operator-actions {
    display: flex;
    gap: 6px;
    margin-top: auto;
}

.btn-action {
    padding: 6px 8px;
    font-size: 0.85em;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background: white;
    color: #666;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.btn-action:hover {
    background-color: #f5f5f5;
    color: #333;
}

/* 空状态样式 */
.empty-state {
    color: #999;
    padding: 60px 20px;
    text-align: center;
    font-size: 1em;
}

.empty-state i {
    color: #e0e0e0;
    margin-bottom: 16px;
}

.empty-text {
    font-size: 1em;
    margin-bottom: 0;
    font-weight: 400;
}

/* 分隔线 */
.crop-divider {
    margin: 8px 20px;
    border-color: #e0e0e0;
}

/* 图标样式 - 确保正确显示 */
.fa-leaf, .fa-wheat-alt, .fa-seedling, .fa-corn, .fa-rice,
.fa-satellite-dish, .fa-wind, .fa-eye, .fa-dna, .fa-database, .fa-cogs {
    font-size: 1em;
    display: inline-block !important;
    width: 18px;
    text-align: center;
    opacity: 1 !important;
    visibility: visible !important;
}

/* 确保图标在各种状态下都显示 */
.crop-header i,
.data-type-link i,
.subcategory-link i {
    display: inline-block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* 响应式设计中的图标调整 */
@media (max-width: 768px) {
    .fa-leaf, .fa-wheat-alt, .fa-seedling, .fa-corn, .fa-rice,
    .fa-satellite-dish, .fa-wind, .fa-eye, .fa-dna, .fa-database, .fa-cogs {
        font-size: 0.9em;
        width: 16px;
    }
}

.data-type-link {
    padding: 12px 16px;
    font-size: 0.95em;
}

.subcategory-link {
    padding: 10px 16px 10px 13px;
    font-size: 0.9em;
}

.section-title {
    font-size: 1.2em;
}

.operator-card .card-body {
    padding: 16px;
}

.breadcrumb {
    padding: 10px 16px;
}


/* 动画效果 */
@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 500px;
    }
}

.subcategories {
    overflow: hidden;
}

/* 卡片布局优化 */
.row {
    margin: 0 -8px;
}

.col-xl-4, .col-lg-6, .col-md-6 {
    padding: 0 8px;
}

.mb-4 {
    margin-bottom: 16px !important;
}

/* 内容区域卡片样式 */
.card-body {
    padding: 0;
}

.card-body > .d-flex {
    padding: 20px 20px 0 20px;
}

.card-body > .row {
    padding: 16px 20px 20px 20px;
    margin: 0;
}

/* 旋转箭头动画 */
.toggle-icon.rotated {
    transform: rotate(180deg);
}

/* 算子类型颜色 */
.operator-type.preprocess-type {
    background-color: #388e3c !important;
}

.operator-type.model-type {
    background-color: #f57c00 !important;
}

.operator-type.evaluation-type {
    background-color: #7b1fa2 !important;
}

.operator-type.tabular-type {
    background-color: #c2185b !important;
}

/* 确保激活状态颜色正确 */
.crop-header.active-crop {
    background-color: #e8f5e8 !important;
    color: #1b5e20 !important;
}

.data-type-link.active-data-type {
    background-color: #e8f5e8 !important;
    color: #1b5e20 !important;
}

.subcategory-link.active-subcategory {
    background-color: #e8f5e8 !important;
    color: #1b5e20 !important;
    font-weight: 500 !important;
}

/* 增强交互反馈 */
.data-type-link:hover {
    background-color: #f8f9fa !important;
    color: #333 !important;
}

.subcategory-link:hover {
    background-color: #f0f0f0 !important;
    color: #333 !important;
}

/* 确保动态加载的内容也有正确样式 */
.operator-card {
    border: 1px solid #e0e0e0 !important;
    border-radius: 8px !important;
    background: white !important;
    transition: all 0.2s ease !important;
    border-left: 4px solid #2e7d32 !important;
    height: 100% !important;
}

.operator-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1) !important;
    border-left-color: #1b5e20 !important;
}

/* 强制使用CSS伪元素添加图标 */
.crop-wheat::before {
    content: "🌾";
    margin-right: 8px;
    font-size: 1.2em;
    display: inline-block !important;
}

.crop-soybean::before {
    content: "🌱";
    margin-right: 8px;
    font-size: 1.2em;
    display: inline-block !important;
}

.crop-corn::before {
    content: "🌽";
    margin-right: 8px;
    font-size: 1.2em;
    display: inline-block !important;
}

.crop-rice::before {
    content: "🍚";
    margin-right: 8px;
    font-size: 1.2em;
    display: inline-block !important;
}

.data-hsi::before {
    content: "📡";
    margin-right: 8px;
    font-size: 1.1em;
    display: inline-block !important;
}

.data-enose::before {
    content: "👃";
    margin-right: 8px;
    font-size: 1.1em;
    display: inline-block !important;
}

.data-vision::before {
    content: "👁️";
    margin-right: 8px;
    font-size: 1.1em;
    display: inline-block !important;
}

.data-pheno::before {
    content: "📊";
    margin-right: 8px;
    font-size: 1.1em;
    display: inline-block !important;
}



/* 隐藏原来的图标元素 */
.crop-header i,
.data-type-link i {
    display: none !important;
}

/* 确保伪元素图标正确显示 */
.crop-header::before,
.data-type-link::before,
.subcategory-link::before {
    opacity: 1 !important;
    visibility: visible !important;
}