/**
 * 跳跃表可视化样式
 * @author changyadai
 * 
 * 算法特有样式 - 跳跃表节点、层级标签和SVG渲染
 */

/* 层级标签 - 在可视化容器内部，与节点对齐 */
.level-labels {
    display: flex;
    flex-direction: column;
    position: absolute;
    left: 8px;
    /* 容器 padding-top (40px) + SVG topPadding (30px) = 70px */
    top: calc(var(--spacing-lg) + 30px);
    gap: 13px;  /* levelHeight(45) - nodeHeight(32) = 13 */
    z-index: 10;
}

.level-label {
    width: 32px;
    height: 32px;  /* 与 CONFIG.nodeHeight 一致 */
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* 可视化容器覆盖 - 支持层级标签偏移 */
.visualization-container {
    padding-left: 60px;
    overflow-x: auto;
    overflow-y: hidden;
    position: relative;
}

/* 跳跃表 SVG */
.skiplist-svg {
    display: block;
    min-width: 100%;
}

/* 跳跃表节点动画 */
.skiplist-node {
    transition: all 0.3s ease;
}

.skiplist-node:hover rect {
    filter: brightness(1.15);
}

/* 跳跃表特有的复杂度注释样式 */
.complexity-note {
    background: rgba(234, 179, 8, 0.1);
    border-left-color: #eab308;
}

/* 高亮应用场景 */
.use-case.highlight {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.05);
}

/* 响应式 */
@media (max-width: 768px) {
    .level-labels {
        display: none;
    }
    
    .visualization-container {
        padding-left: var(--spacing-md);
    }
}
